18 #ifndef PENGINE_UNPACK__H
19 # define PENGINE_UNPACK__H
51 # if defined(HAVE_LIBNCURSES) || defined(HAVE_LIBCURSES)
52 # if defined(HAVE_NCURSES_H) && !defined(HAVE_INCOMPATIBLE_PRINTW)
54 # define CURSES_ENABLED 1
55 # elif defined(HAVE_NCURSES_NCURSES_H) && !defined(HAVE_INCOMPATIBLE_PRINTW)
56 # include <ncurses/ncurses.h>
57 # define CURSES_ENABLED 1
58 # elif defined(HAVE_CURSES_H) && !defined(HAVE_INCOMPATIBLE_PRINTW)
60 # define CURSES_ENABLED 1
61 # elif defined(HAVE_CURSES_CURSES_H) && !defined(HAVE_INCOMPATIBLE_PRINTW)
62 # include <curses/curses.h>
63 # define CURSES_ENABLED 1
65 # define CURSES_ENABLED 0
68 # define CURSES_ENABLED 0
72 # define status_printw(fmt, args...) printw(fmt, ##args)
74 # define status_printw(fmt, args...) \
75 crm_err("printw support requires ncurses to be available during configure"); \
76 do_crm_log(LOG_WARNING, fmt, ##args);
79 # define status_print(fmt, args...) \
80 if(options & pe_print_html) { \
81 FILE *stream = print_data; \
82 fprintf(stream, fmt, ##args); \
83 } else if(options & pe_print_ncurses) { \
84 status_printw(fmt, ##args); \
85 } else if(options & pe_print_printf) { \
86 FILE *stream = print_data; \
87 fprintf(stream, fmt, ##args); \
88 } else if(options & pe_print_xml) { \
89 FILE *stream = print_data; \
90 fprintf(stream, fmt, ##args); \
91 } else if(options & pe_print_log) { \
92 int log_level = *(int*)print_data; \
93 do_crm_log(log_level, fmt, ##args); \
115 #define pe_warn_once(pe_wo_bit, fmt...) do { \
116 if (is_not_set(pe_wo, pe_wo_bit)) { \
117 if (pe_wo_bit == pe_wo_blind) { \
122 set_bit(pe_wo, pe_wo_bit); \
gboolean unpack_config(xmlNode *config, pe_working_set_t *data_set)
gboolean unpack_remote_status(xmlNode *status, pe_working_set_t *data_set)
gboolean determine_online_status(xmlNode *node_state, node_t *this_node, pe_working_set_t *data_set)
gint sort_op_by_callid(gconstpointer a, gconstpointer b)
gboolean unpack_resources(xmlNode *xml_resources, pe_working_set_t *data_set)
gboolean unpack_status(xmlNode *status, pe_working_set_t *data_set)
gboolean unpack_nodes(xmlNode *xml_nodes, pe_working_set_t *data_set)
gboolean unpack_remote_nodes(xmlNode *xml_resources, 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_lrm_resources(node_t *node, xmlNode *lrm_rsc_list, pe_working_set_t *data_set)
gboolean unpack_tags(xmlNode *xml_tags, pe_working_set_t *data_set)