From: Florian Forster Date: Tue, 15 Jun 2010 09:35:09 +0000 (+0200) Subject: graph.[ch]: Remove the "gl_" prefix. X-Git-Tag: v4.0.0~258 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=beb1cb55ddc89ad2e8bfd31ecf1e5cf39e73204a;p=collection4.git graph.[ch]: Remove the "gl_" prefix. --- diff --git a/action_graph.c b/action_graph.c index b565182..a0f257e 100644 --- a/action_graph.c +++ b/action_graph.c @@ -87,9 +87,9 @@ int action_graph (void) /* {{{ */ rrd_info_t *info; int status; - cfg = graph_get_selected (); + cfg = gl_graph_get_selected (); if (cfg == NULL) - OUTPUT_ERROR ("graph_get_selected () failed.\n"); + OUTPUT_ERROR ("gl_graph_get_selected () failed.\n"); inst = inst_get_selected (cfg); if (inst == NULL) diff --git a/graph.c b/graph.c index 025a867..c092482 100644 --- a/graph.c +++ b/graph.c @@ -201,31 +201,31 @@ int gl_graph_get_title (graph_config_t *cfg, /* {{{ */ return (0); } /* }}} int gl_graph_get_title */ -graph_ident_t *gl_graph_get_selector (graph_config_t *cfg) /* {{{ */ +graph_ident_t *graph_get_selector (graph_config_t *cfg) /* {{{ */ { if (cfg == NULL) return (NULL); return (ident_clone (cfg->select)); -} /* }}} graph_ident_t *gl_graph_get_selector */ +} /* }}} graph_ident_t *graph_get_selector */ -graph_instance_t *gl_graph_get_instances (graph_config_t *cfg) /* {{{ */ +graph_instance_t *graph_get_instances (graph_config_t *cfg) /* {{{ */ { if (cfg == NULL) return (NULL); return (cfg->instances); -} /* }}} graph_instance_t *gl_graph_get_instances */ +} /* }}} graph_instance_t *graph_get_instances */ -graph_def_t *gl_graph_get_defs (graph_config_t *cfg) /* {{{ */ +graph_def_t *graph_get_defs (graph_config_t *cfg) /* {{{ */ { if (cfg == NULL) return (NULL); return (cfg->defs); -} /* }}} graph_def_t *gl_graph_get_defs */ +} /* }}} graph_def_t *graph_get_defs */ -int gl_graph_add_def (graph_config_t *cfg, graph_def_t *def) /* {{{ */ +int graph_add_def (graph_config_t *cfg, graph_def_t *def) /* {{{ */ { if ((cfg == NULL) || (def == NULL)) return (EINVAL); @@ -237,7 +237,7 @@ int gl_graph_add_def (graph_config_t *cfg, graph_def_t *def) /* {{{ */ } return (def_append (cfg->defs, def)); -} /* }}} int gl_graph_add_def */ +} /* }}} int graph_add_def */ _Bool graph_matches (graph_config_t *cfg, const graph_ident_t *ident) /* {{{ */ { diff --git a/graph.h b/graph.h index f7c12e4..25da1e0 100644 --- a/graph.h +++ b/graph.h @@ -23,16 +23,16 @@ int graph_config_add (const oconfig_item_t *ci); int graph_add_file (graph_config_t *cfg, const graph_ident_t *file); -int gl_graph_get_title (graph_config_t *cfg, +int graph_get_title (graph_config_t *cfg, char *buffer, size_t buffer_size); -graph_ident_t *gl_graph_get_selector (graph_config_t *cfg); +graph_ident_t *graph_get_selector (graph_config_t *cfg); -graph_instance_t *gl_graph_get_instances (graph_config_t *cfg); +graph_instance_t *graph_get_instances (graph_config_t *cfg); -graph_def_t *gl_graph_get_defs (graph_config_t *cfg); +graph_def_t *graph_get_defs (graph_config_t *cfg); -int gl_graph_add_def (graph_config_t *cfg, graph_def_t *def); +int graph_add_def (graph_config_t *cfg, graph_def_t *def); _Bool graph_matches (graph_config_t *cfg, const graph_ident_t *ident); diff --git a/graph_def.c b/graph_def.c index 4f91820..a5511f6 100644 --- a/graph_def.c +++ b/graph_def.c @@ -80,10 +80,10 @@ static graph_def_t *def_config_get_obj (graph_config_t *cfg, /* {{{ */ graph_def_t *def; int i; - ident = gl_graph_get_selector (cfg); + ident = graph_get_selector (cfg); if (ident == NULL) { - fprintf (stderr, "def_config_get_obj: gl_graph_get_selector failed"); + fprintf (stderr, "def_config_get_obj: graph_get_selector failed"); return (NULL); } @@ -135,7 +135,7 @@ graph_def_t *def_create (graph_config_t *cfg, graph_ident_t *ident, /* {{{ */ if ((cfg == NULL) || (ident == NULL) || (ds_name == NULL)) return (NULL); - selector = gl_graph_get_selector (cfg); + selector = graph_get_selector (cfg); if (selector == NULL) return (NULL); @@ -218,7 +218,7 @@ int def_config (graph_config_t *cfg, const oconfig_item_t *ci) /* {{{ */ child->key); } - return (gl_graph_add_def (cfg, def)); + return (graph_add_def (cfg, def)); } /* }}} int def_config */ int def_append (graph_def_t *head, graph_def_t *def) /* {{{ */ diff --git a/graph_instance.c b/graph_instance.c index 5273ef3..25a24a4 100644 --- a/graph_instance.c +++ b/graph_instance.c @@ -165,10 +165,10 @@ graph_instance_t *inst_create (graph_config_t *cfg, /* {{{ */ return (NULL); memset (i, 0, sizeof (*i)); - selector = gl_graph_get_selector (cfg); + selector = graph_get_selector (cfg); if (selector == NULL) { - fprintf (stderr, "inst_create: gl_graph_get_selector failed\n"); + fprintf (stderr, "inst_create: graph_get_selector failed\n"); free (i); return (NULL); } @@ -244,7 +244,7 @@ graph_instance_t *inst_get_selected (graph_config_t *cfg) /* {{{ */ graph_instance_t *inst; if (cfg == NULL) - cfg = graph_get_selected (); + cfg = gl_graph_get_selected (); if (cfg == NULL) { @@ -262,7 +262,7 @@ graph_instance_t *inst_get_selected (graph_config_t *cfg) /* {{{ */ ident = ident_create (host, plugin, plugin_instance, type, type_instance); - for (inst = gl_graph_get_instances (cfg); inst != NULL; inst = inst->next) + for (inst = graph_get_instances (cfg); inst != NULL; inst = inst->next) { if (ident_compare (ident, inst->select) != 0) continue; @@ -302,7 +302,7 @@ int inst_get_rrdargs (graph_config_t *cfg, /* {{{ */ } #endif - defs = gl_graph_get_defs (cfg); + defs = graph_get_defs (cfg); if (defs == NULL) { defs = inst_get_default_defs (cfg, inst); @@ -339,10 +339,10 @@ int inst_get_params (graph_config_t *cfg, graph_instance_t *inst, /* {{{ */ || (buffer == NULL) || (buffer_size < 1)) return (EINVAL); - cfg_select = gl_graph_get_selector (cfg); + cfg_select = graph_get_selector (cfg); if (cfg_select == NULL) { - fprintf (stderr, "inst_get_params: gl_graph_get_selector failed"); + fprintf (stderr, "inst_get_params: graph_get_selector failed"); return (-1); } diff --git a/graph_list.c b/graph_list.c index 83c5e68..f59508d 100644 --- a/graph_list.c +++ b/graph_list.c @@ -175,7 +175,7 @@ int gl_graph_get_all (gl_cfg_callback callback, /* {{{ */ return (0); } /* }}} int gl_graph_get_all */ -graph_config_t *graph_get_selected (void) /* {{{ */ +graph_config_t *gl_graph_get_selected (void) /* {{{ */ { const char *host = get_part_from_param ("graph_host", "host"); const char *plugin = get_part_from_param ("graph_plugin", "plugin"); @@ -205,7 +205,7 @@ graph_config_t *graph_get_selected (void) /* {{{ */ ident_destroy (ident); return (NULL); -} /* }}} graph_config_t *graph_get_selected */ +} /* }}} graph_config_t *gl_graph_get_selected */ /* gl_instance_get_all, gl_graph_instance_get_all {{{ */ struct gl_inst_callback_data /* {{{ */ @@ -236,7 +236,7 @@ int gl_graph_instance_get_all (graph_config_t *cfg, /* {{{ */ if ((cfg == NULL) || (callback == NULL)) return (EINVAL); - return (inst_foreach (gl_graph_get_instances (cfg), + return (inst_foreach (graph_get_instances (cfg), gl_inst_callback_handler, &data)); } /* }}} int gl_graph_instance_get_all */ diff --git a/graph_list.h b/graph_list.h index 979c13d..8f21e86 100644 --- a/graph_list.h +++ b/graph_list.h @@ -20,7 +20,7 @@ int gl_add_graph (graph_config_t *cfg); int gl_graph_get_all (gl_cfg_callback callback, void *user_data); -graph_config_t *graph_get_selected (void); +graph_config_t *gl_graph_get_selected (void); int gl_graph_instance_get_all (graph_config_t *cfg, gl_inst_callback callback, void *user_data);