80 if (rv < 0 && *errmsg != NULL) {
83 char *oldmsg = *errmsg;
84 tor_asprintf(errmsg,
"Could not parse %s: %s", line->key, oldmsg);
142 result->key = tor_strdup(key);
143 result->value = encoded_value;
160 return def->
fns->
copy(dest, src, def);
173 log_warn(
LD_BUG,
"Encoded value %s was not parseable as a %s: %s",
Types used to specify configurable options.
const char * escaped(const char *s)
Headers for util_malloc.c.
int tor_asprintf(char **strp, const char *fmt,...)
const struct var_type_fns_t * fns
bool(* eq)(const void *a, const void *b, const void *params)
char *(* encode)(const void *value, const void *params)
int(* copy)(void *target, const void *value, const void *params)
int(* parse)(void *target, const char *value, char **errmsg, const void *params)
bool(* ok)(const void *value, const void *params)
struct config_line_t *(* kv_encode)(const char *key, const void *value, const void *params)
int(* kv_parse)(void *target, const struct config_line_t *line, char **errmsg, const void *params)
void(* mark_fragile)(void *value, const void *params)
void(* clear)(void *arg, const void *params)
Header for lib/confmgt/type_defs.c.
void typed_var_mark_fragile(void *value, const var_type_def_t *def)
void typed_var_free(void *target, const var_type_def_t *def)
config_line_t * typed_var_kvencode(const char *key, const void *value, const var_type_def_t *def)
bool typed_var_eq(const void *a, const void *b, const var_type_def_t *def)
int typed_var_assign(void *target, const char *value, char **errmsg, const var_type_def_t *def)
bool typed_var_ok(const void *value, const var_type_def_t *def)
int typed_var_kvassign(void *target, const config_line_t *line, char **errmsg, const var_type_def_t *def)
char * typed_var_encode(const void *value, const var_type_def_t *def)
int typed_var_copy(void *dest, const void *src, const var_type_def_t *def)
Header for lib/confmgt/typedvar.c.
Macros to manage assertions, fatal and non-fatal.
int strcmp_opt(const char *s1, const char *s2)
Header for util_string.c.
Structure declarations for typedvar type definitions.