summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: a2a5b1b)
raw | patch | inline | side by side (parent: a2a5b1b)
author | octo <octo> | |
Mon, 30 Jan 2006 20:42:35 +0000 (20:42 +0000) | ||
committer | octo <octo> | |
Mon, 30 Jan 2006 20:42:35 +0000 (20:42 +0000) |
src/configfile.c | patch | blob | history |
diff --git a/src/configfile.c b/src/configfile.c
index 52978b39c2a43b57dd642f6b6713ae37aa9a4969..41439ee187059cc1e50c20ef7544ff499bb810bb 100644 (file)
--- a/src/configfile.c
+++ b/src/configfile.c
* Florian octo Forster <octo at verplant.org>
**/
-/* TODO
- * make internal-only functions `static' */
-
#include "collectd.h"
#include "libconfig/libconfig.h"
static char *current_module = NULL;
/* `cf_register' needs this prototype */
-int cf_callback_plugin_dispatch (const char *, const char *, const char *,
- const char *, lc_flags_t, void *);
+static int cf_callback_plugin_dispatch (const char *, const char *,
+ const char *, const char *, lc_flags_t, void *);
/*
* Functions to handle register/unregister, search, and other plugin related
* stuff
*/
-cf_callback_t *cf_search (char *type)
+static cf_callback_t *cf_search (char *type)
{
cf_callback_t *cf_cb;
return (cf_cb);
}
-int cf_dispatch (char *type, const char *orig_key, const char *orig_value)
+static int cf_dispatch (char *type, const char *orig_key, const char *orig_value)
{
cf_callback_t *cf_cb;
char *key;
*
* Mode `value'
*/
-int cf_callback_mode (const char *shortvar, const char *var,
+static int cf_callback_mode (const char *shortvar, const char *var,
const char *arguments, const char *value, lc_flags_t flags,
void *extra)
{
* PluginDir `value'
* </Mode>
*/
-int cf_callback_mode_plugindir (const char *shortvar, const char *var,
+static int cf_callback_mode_plugindir (const char *shortvar, const char *var,
const char *arguments, const char *value, lc_flags_t flags,
void *extra)
{
return (LC_CBRET_OKAY);
}
-int cf_callback_mode_option (const char *shortvar, const char *var,
+static int cf_callback_mode_option (const char *shortvar, const char *var,
const char *arguments, const char *value, lc_flags_t flags,
void *extra)
{
* LoadPlugin `value'
* </Mode>
*/
-int cf_callback_mode_loadmodule (const char *shortvar, const char *var,
+static int cf_callback_mode_loadmodule (const char *shortvar, const char *var,
const char *arguments, const char *value, lc_flags_t flags,
void *extra)
{
return (LC_CBRET_OKAY);
}
-/*
- * `cf_callback_mode_switch'
- * Change the contents of the global variable `operating_mode'
- *
- * This should be command line options. One *can* do this in the config
- * files, but I will not document this. Don't whine abount it not working as
- * you expect if you do it anyways.
- */
-int cf_callback_mode_switch (const char *shortvar, const char *var,
- const char *arguments, const char *value, lc_flags_t flags,
- void *extra)
-{
- DBG ("shortvar = %s, var = %s, arguments = %s, value = %s, ...",
- shortvar, var, arguments, value);
-
- if (strcasecmp (shortvar, "Client") == 0)
- operating_mode = MODE_CLIENT;
- else if (strcasecmp (shortvar, "Local") == 0)
- operating_mode = MODE_LOCAL;
- else if (strcasecmp (shortvar, "Server") == 0)
- operating_mode = MODE_SERVER;
- else
- {
- fprintf (stderr, "cf_callback_mode_switch: Wrong mode!\n");
- return (LC_CBRET_ERROR);
- }
-
- return (LC_CBRET_OKAY);
-}
-
-int cf_callback_socket (const char *shortvar, const char *var,
+static int cf_callback_socket (const char *shortvar, const char *var,
const char *arguments, const char *value, lc_flags_t flags,
void *extra)
{
* ...
* </Plugin>
*/
-int cf_callback_plugin (const char *shortvar, const char *var,
+static int cf_callback_plugin (const char *shortvar, const char *var,
const char *arguments, const char *value, lc_flags_t flags,
void *extra)
{
* `var' `value'
* </Plugin>
*/
-int cf_callback_plugin_dispatch (const char *shortvar, const char *var,
+static int cf_callback_plugin_dispatch (const char *shortvar, const char *var,
const char *arguments, const char *value, lc_flags_t flags,
void *extra)
{
return (LC_CBRET_OKAY);
}
-void cf_init (void)
+static void cf_init (void)
{
static int run_once = 0;
int i;