summaryrefslogtreecommitdiff
path: root/src/configfile.h
diff options
context:
space:
mode:
authorGlenn Strauss <gstrauss@gluelogic.com>2019-10-22 21:16:03 -0400
committerGlenn Strauss <gstrauss@gluelogic.com>2020-05-23 17:59:29 -0400
commitb87e8783c486aa6ca813552f90e12dfa205b5f4e (patch)
treec282c15e6fe8227db268d8965b14875558938e39 /src/configfile.h
parentaba290e0bd06aeb5b6bd3777bfe1d1ad183796d0 (diff)
downloadlighttpd-git-b87e8783c486aa6ca813552f90e12dfa205b5f4e.tar.gz
[core] config_plugin_values_init() new interface
new data structures and interface for processing config directives (towards more efficient approach to config merging) continue work to isolate data_config
Diffstat (limited to 'src/configfile.h')
-rw-r--r--src/configfile.h30
1 files changed, 29 insertions, 1 deletions
diff --git a/src/configfile.h b/src/configfile.h
index 6c4647ee..2fc4124e 100644
--- a/src/configfile.h
+++ b/src/configfile.h
@@ -126,12 +126,13 @@ typedef enum { T_CONFIG_UNSET,
T_CONFIG_STRING,
T_CONFIG_SHORT,
T_CONFIG_INT,
- T_CONFIG_BOOLEAN,
+ T_CONFIG_BOOL,
T_CONFIG_ARRAY,
T_CONFIG_LOCAL,
T_CONFIG_DEPRECATED,
T_CONFIG_UNSUPPORTED
} config_values_type_t;
+#define T_CONFIG_BOOLEAN T_CONFIG_BOOL
typedef enum { T_CONFIG_SCOPE_UNSET,
T_CONFIG_SCOPE_SERVER,
@@ -139,6 +140,33 @@ typedef enum { T_CONFIG_SCOPE_UNSET,
} config_scope_type_t;
typedef struct {
+ int k_id;
+ config_values_type_t vtype;
+ union v_u {
+ void *v;
+ const array *a;
+ const buffer *b;
+ const char *s;
+ unsigned int u;
+ unsigned short int shrt;
+ double d;
+ off_t o;
+ uint32_t u2[2];
+ } v;
+} config_plugin_value_t;
+
+typedef struct {
+ const char *k;
+ uint32_t klen;
+ /*uint32_t k_id;*//*(array index is used for k_id)*/
+ config_values_type_t ktype;
+ config_scope_type_t scope;
+} config_plugin_keys_t;
+
+__attribute_cold__
+int config_plugin_values_init(server *srv, void *p_d, const config_plugin_keys_t *cpk, const char *mname);
+
+typedef struct {
const char *key;
void *destination;