From f0d1e456d7c57ea4c1fec2b778ba06739a999610 Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Sat, 11 Feb 2012 19:31:41 +0100 Subject: [PATCH] Conf: DEFAULT_CONFIG and ENV_VAR_CONFIG got a CONFIG_UCW_ prefix --- ucw/conf-input.c | 12 ++++++------ ucw/default.cfg | 4 ++-- ucw/getopt.h | 6 +++--- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/ucw/conf-input.c b/ucw/conf-input.c index fffc6d57..ad8bfc8e 100644 --- a/ucw/conf-input.c +++ b/ucw/conf-input.c @@ -281,16 +281,16 @@ error: return "included from here"; } -#ifndef DEFAULT_CONFIG -#define DEFAULT_CONFIG NULL +#ifndef CONFIG_UCW_DEFAULT_CONFIG +#define CONFIG_UCW_DEFAULT_CONFIG NULL #endif -char *cf_def_file = DEFAULT_CONFIG; +char *cf_def_file = CONFIG_UCW_DEFAULT_CONFIG; static int cf_def_loaded; -#ifndef ENV_VAR_CONFIG -#define ENV_VAR_CONFIG NULL +#ifndef CONFIG_UCW_ENV_VAR_CONFIG +#define CONFIG_UCW_ENV_VAR_CONFIG NULL #endif -char *cf_env_file = ENV_VAR_CONFIG; +char *cf_env_file = CONFIG_UCW_ENV_VAR_CONFIG; static uns postpone_commit; // only for cf_getopt() static uns everything_committed; // after the 1st load, this flag is set on diff --git a/ucw/default.cfg b/ucw/default.cfg index 91e0289e..778cbaab 100644 --- a/ucw/default.cfg +++ b/ucw/default.cfg @@ -44,10 +44,10 @@ Set("CONFIG_UCW_SHELL_UTILS" => 1); Set("CONFIG_UCW_UTILS" => 1); # Default configuration file -UnSet("DEFAULT_CONFIG"); +UnSet("CONFIG_UCW_DEFAULT_CONFIG"); # Environment variable with configuration file -UnSet("ENV_VAR_CONFIG"); +UnSet("CONFIG_UCW_ENV_VAR_CONFIG"); # Allow use of direct IO on files Set("CONFIG_DIRECT_IO"); diff --git a/ucw/getopt.h b/ucw/getopt.h index 5fe66cea..eb350012 100644 --- a/ucw/getopt.h +++ b/ucw/getopt.h @@ -28,13 +28,13 @@ void reset_getopt(void); /** If you want to start parsing of the arguments from */ /** - * The default config (DEFAULT_CONFIG config option) or NULL if already loaded. + * The default config (as set by `CONFIG_UCW_DEFAULT_CONFIG`) or NULL if already loaded. * You can set it to something else manually. */ extern char *cf_def_file; /** - * Name of environment variable that can override what configuration - * is loaded. + * Name of environment variable that can override what configuration is loaded. + * Defaults to `CONFIG_UCW_ENV_VAR_CONFIG`. **/ extern char *cf_env_file; int cf_reload(const char *file); /** Reload configuration from @file, replace the old one. **/ -- 2.39.2