Tor  0.4.7.0-alpha-dev
Functions
conffile.h File Reference

Read configuration files from disk, with full include support. More...

Go to the source code of this file.

Functions

int config_get_lines_include (const char *string, struct config_line_t **result, int extended, int *has_include, struct smartlist_t *opened_lst)
 

Detailed Description

Read configuration files from disk, with full include support.

Header for conffile.c.

Definition in file conffile.h.

Function Documentation

◆ config_get_lines_include()

int config_get_lines_include ( const char *  string,
config_line_t **  result,
int  extended,
int *  has_include,
smartlist_t opened_lst 
)

Helper: parse the config string and strdup into key/value strings. Set *result to the list, or NULL if parsing the string failed. Set *has_include to 1 if result has values from included files. opened_lst will have a list of opened files if provided. Return 0 on success, -1 on failure. Warn and ignore any misformatted lines.

If extended is set, then treat keys beginning with / and with + as indicating "clear" and "append" respectively.

Definition at line 49 of file conffile.c.