summaryrefslogtreecommitdiff
path: root/src/or/confparse.h
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2016-08-03 12:52:26 -0400
committerNick Mathewson <nickm@torproject.org>2016-08-03 12:52:26 -0400
commitf5dcab8072e4f8471cc0d4d8a28c79272467fb92 (patch)
treeb5ea4d3611c535bd5c617b06dcab4595f6adc3e1 /src/or/confparse.h
parentf3314aa6e1e307467a684f1477e2af1568a728b6 (diff)
downloadtor-f5dcab8072e4f8471cc0d4d8a28c79272467fb92.tar.gz
tor-f5dcab8072e4f8471cc0d4d8a28c79272467fb92.zip
Add new warn_deprecated option to config_assign*().
Also, collapse all the config_assign*() options into a flags argument, since having two boolean arguments was already confusing.
Diffstat (limited to 'src/or/confparse.h')
-rw-r--r--src/or/confparse.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/or/confparse.h b/src/or/confparse.h
index 87dd6d8210..cf92ac4dc1 100644
--- a/src/or/confparse.h
+++ b/src/or/confparse.h
@@ -98,6 +98,10 @@ typedef struct config_format_t {
*(uint32_t*)STRUCT_VAR_P(cfg,fmt->magic_offset)); \
STMT_END
+#define CAL_USE_DEFAULTS (1u<<0)
+#define CAL_CLEAR_FIRST (1u<<1)
+#define CAL_WARN_DEPRECATIONS (1u<<2)
+
void *config_new(const config_format_t *fmt);
void config_line_append(config_line_t **lst,
const char *key, const char *val);
@@ -120,7 +124,7 @@ char *config_dump(const config_format_t *fmt, const void *default_options,
int comment_defaults);
int config_assign(const config_format_t *fmt, void *options,
config_line_t *list,
- int use_defaults, int clear_first, char **msg);
+ unsigned flags, char **msg);
config_var_t *config_find_option_mutable(config_format_t *fmt,
const char *key);
const config_var_t *config_find_option(const config_format_t *fmt,