8 #ifndef PENGINE_UNPACK__H
9 # define PENGINE_UNPACK__H
39 # if defined(HAVE_LIBNCURSES) || defined(HAVE_LIBCURSES)
40 # if defined(HAVE_NCURSES_H) && !defined(HAVE_INCOMPATIBLE_PRINTW)
42 # define CURSES_ENABLED 1
43 # elif defined(HAVE_NCURSES_NCURSES_H) && !defined(HAVE_INCOMPATIBLE_PRINTW)
44 # include <ncurses/ncurses.h>
45 # define CURSES_ENABLED 1
46 # elif defined(HAVE_CURSES_H) && !defined(HAVE_INCOMPATIBLE_PRINTW)
48 # define CURSES_ENABLED 1
49 # elif defined(HAVE_CURSES_CURSES_H) && !defined(HAVE_INCOMPATIBLE_PRINTW)
50 # include <curses/curses.h>
51 # define CURSES_ENABLED 1
53 # define CURSES_ENABLED 0
56 # define CURSES_ENABLED 0
60 # define status_printw(fmt, args...) printw(fmt, ##args)
62 # define status_printw(fmt, args...) \
63 crm_err("printw support requires ncurses to be available during configure"); \
64 do_crm_log(LOG_WARNING, fmt, ##args);
67 # define status_print(fmt, args...) \
68 if(options & pe_print_html) { \
69 FILE *stream = print_data; \
70 fprintf(stream, fmt, ##args); \
71 } else if(options & pe_print_ncurses) { \
72 status_printw(fmt, ##args); \
73 } else if(options & pe_print_printf) { \
74 FILE *stream = print_data; \
75 fprintf(stream, fmt, ##args); \
76 } else if(options & pe_print_xml) { \
77 FILE *stream = print_data; \
78 fprintf(stream, fmt, ##args); \
79 } else if(options & pe_print_log) { \
80 int log_level = *(int*)print_data; \
81 do_crm_log(log_level, fmt, ##args); \
95 extern uint32_t
pe_wo;
97 #define pe_warn_once(pe_wo_bit, fmt...) do { \
98 if (is_not_set(pe_wo, pe_wo_bit)) { \
99 if (pe_wo_bit == pe_wo_blind) { \
104 set_bit(pe_wo, pe_wo_bit); \
gboolean unpack_resources(xmlNode *xml_resources, pe_working_set_t *data_set)
gboolean unpack_tags(xmlNode *xml_tags, pe_working_set_t *data_set)
gint sort_op_by_callid(gconstpointer a, gconstpointer b)
gboolean determine_online_status(xmlNode *node_state, node_t *this_node, pe_working_set_t *data_set)
gboolean unpack_remote_nodes(xmlNode *xml_resources, pe_working_set_t *data_set)
gboolean unpack_config(xmlNode *config, pe_working_set_t *data_set)
gboolean unpack_status(xmlNode *status, pe_working_set_t *data_set)
gboolean unpack_lrm_resources(node_t *node, xmlNode *lrm_rsc_list, pe_working_set_t *data_set)
gboolean add_node_attrs(xmlNode *xml_obj, node_t *node, gboolean overwrite, pe_working_set_t *data_set)
gboolean unpack_nodes(xmlNode *xml_nodes, pe_working_set_t *data_set)