|
@@ -48,6 +48,11 @@ typedef struct config_abbrev_t {
|
|
int warn;
|
|
int warn;
|
|
} config_abbrev_t;
|
|
} config_abbrev_t;
|
|
|
|
|
|
|
|
+typedef struct config_deprecation_t {
|
|
|
|
+ const char *name;
|
|
|
|
+ const char *why_deprecated;
|
|
|
|
+} config_deprecation_t;
|
|
|
|
+
|
|
/* Handy macro for declaring "In the config file or on the command line,
|
|
/* Handy macro for declaring "In the config file or on the command line,
|
|
* you can abbreviate <b>tok</b>s as <b>tok</b>". */
|
|
* you can abbreviate <b>tok</b>s as <b>tok</b>". */
|
|
#define PLURAL(tok) { #tok, #tok "s", 0, 0 }
|
|
#define PLURAL(tok) { #tok, #tok "s", 0, 0 }
|
|
@@ -76,6 +81,7 @@ typedef struct config_format_t {
|
|
off_t magic_offset; /**< Offset of the magic value within the struct. */
|
|
off_t magic_offset; /**< Offset of the magic value within the struct. */
|
|
config_abbrev_t *abbrevs; /**< List of abbreviations that we expand when
|
|
config_abbrev_t *abbrevs; /**< List of abbreviations that we expand when
|
|
* parsing this format. */
|
|
* parsing this format. */
|
|
|
|
+ config_deprecation_t *deprecations; /** List of deprecated options */
|
|
config_var_t *vars; /**< List of variables we recognize, their default
|
|
config_var_t *vars; /**< List of variables we recognize, their default
|
|
* values, and where we stick them in the structure. */
|
|
* values, and where we stick them in the structure. */
|
|
validate_fn_t validate_fn; /**< Function to validate config. */
|
|
validate_fn_t validate_fn; /**< Function to validate config. */
|
|
@@ -125,6 +131,8 @@ void config_free_lines(config_line_t *front);
|
|
const char *config_expand_abbrev(const config_format_t *fmt,
|
|
const char *config_expand_abbrev(const config_format_t *fmt,
|
|
const char *option,
|
|
const char *option,
|
|
int command_line, int warn_obsolete);
|
|
int command_line, int warn_obsolete);
|
|
|
|
+void warn_deprecated_option(const char *what, const char *why);
|
|
|
|
+
|
|
|
|
|
|
#endif
|
|
#endif
|
|
|
|
|