Update documentation for config parsing
This commit is contained in:
parent
f5507c8412
commit
3cf84b44ec
1 changed files with 8 additions and 11 deletions
19
src/config.h
19
src/config.h
|
@ -34,17 +34,14 @@ typedef struct C_SIMPLE_HTTP_ParsedConfig {
|
||||||
typedef C_SIMPLE_HTTP_ParsedConfig C_SIMPLE_HTTP_HashMapWrapper;
|
typedef C_SIMPLE_HTTP_ParsedConfig C_SIMPLE_HTTP_HashMapWrapper;
|
||||||
|
|
||||||
/// Each line in the config should be a key-value pair separated by an equals
|
/// Each line in the config should be a key-value pair separated by an equals
|
||||||
/// sign. All whitespace is ignored unless if the value is quoted. A part of a
|
/// sign "=". All whitespace is ignored unless if the value is "quoted". A part
|
||||||
/// string can be "quoted" if it is surrounded by three single-quotes or three
|
/// of a string can be "quoted" if it is surrounded by three single-quotes or
|
||||||
/// double-quotes. If there exists a line with the key "PATH", then the value
|
/// three double-quotes. The "separating_key" separates lines of config into
|
||||||
/// must be a path like "/cache" and all the following key-value pairs are
|
/// sections such that each key with the "separating_key" is the start of a new
|
||||||
/// associated with that PATH until the next "PATH" key or EOF. Each "PATH"
|
/// section. All key-value pairs after a "separating_key" belongs to that
|
||||||
/// "block" should have a "HTML" key-value pair where the value is a HTML
|
/// section. "required_names" is an optional list of c-strings that defines
|
||||||
/// template. Inside such HTML templates should be strings like
|
/// required keys for each section. If it is not desired to use
|
||||||
/// "{{{{example_key}}}}" which will be replaced by the string value of the key
|
/// "required_names", then pass NULL instead of a pointer.
|
||||||
/// name deliminated by the four curly braces. "HTML_FILE" specifies a filename
|
|
||||||
/// to read instead of using a literal string in the config file. It will store
|
|
||||||
/// the contents of the specified file with the "HTML" key internally.
|
|
||||||
C_SIMPLE_HTTP_ParsedConfig c_simple_http_parse_config(
|
C_SIMPLE_HTTP_ParsedConfig c_simple_http_parse_config(
|
||||||
const char *config_filename,
|
const char *config_filename,
|
||||||
const char *separating_key,
|
const char *separating_key,
|
||||||
|
|
Loading…
Reference in a new issue