/* Determine if the given module is set to be ignored. * * If ignored, 1 is returned, else 0 is returned. */ int ignore_panel (GModule mod) { int i, module; for (i = 0; i < conf.ignore_panel_idx; ++i) { if ((module = get_module_enum (conf.ignore_panels[i])) == -1) continue; if (mod == (unsigned int) module) { return 1; } } return 0; }
int ignore_panel (GModule mod) { int i; int module; const char *view; for (i = 0; i < conf.ignore_panel_idx; ++i) { view = conf.ignore_panels[i]; if ((module = get_module_enum (view)) == -1) continue; if (mod == (unsigned int) module) return 1; } return 0; }
void set_initial_sort (const char *smod, const char *sfield, const char *ssort) { int module, field, order; if ((module = get_module_enum (smod)) == -1) return; if ((field = get_sort_field_enum (sfield)) == -1) return; if ((order = get_sort_order_enum (ssort)) == -1) return; if (!can_sort_module (module, field)) return; module_sort[module].field = field; module_sort[module].sort = order; }
/* Parse color module from the given config string. * * On error, 1 is returned. * On success, 0 is returned. */ static int parse_module_color (GColors * color, const char *value) { char *line = xstrdup (value), *p; p = strrchr (line, ' '); if (!p || !*(p + 1)) { LOG_DEBUG (("attempted to parse color module: %s\n", value)); goto clean; } if ((color->module = get_module_enum (p + 1)) == -1) LOG_DEBUG (("attempted to parse color module: %s\n", value)); clean: free (line); return 0; }