aboutsummaryrefslogtreecommitdiff
path: root/src/core/ngx_conf_file.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/ngx_conf_file.h')
-rw-r--r--src/core/ngx_conf_file.h36
1 files changed, 28 insertions, 8 deletions
diff --git a/src/core/ngx_conf_file.h b/src/core/ngx_conf_file.h
index 5426f59e9..cc25deaf1 100644
--- a/src/core/ngx_conf_file.h
+++ b/src/core/ngx_conf_file.h
@@ -12,6 +12,12 @@
#include <ngx_array.h>
+/*
+ * AAAA number of agruments
+ * TT command flags
+ * LL command location
+ */
+
#define NGX_CONF_NOARGS 1
#define NGX_CONF_TAKE1 2
#define NGX_CONF_TAKE2 4
@@ -20,6 +26,9 @@
#define NGX_CONF_BLOCK 0x020000
#define NGX_CONF_FLAG 0x040000
+#define NGX_MAIN_CONF 0x1000000
+
+
#define NGX_CONF_UNSET -1
@@ -65,17 +74,24 @@ typedef struct {
} ngx_conf_file_t;
+typedef char *(*ngx_conf_handler_pt)(ngx_conf_t *cf,
+ ngx_command_t *dummy, char *conf);
+
+
struct ngx_conf_s {
- char *name;
- ngx_array_t *args;
+ char *name;
+ ngx_array_t *args;
- ngx_pool_t *pool;
- ngx_conf_file_t *conf_file;
- ngx_log_t *log;
+ ngx_pool_t *pool;
+ ngx_conf_file_t *conf_file;
+ ngx_log_t *log;
- void *ctx;
- int type;
- char *(*handler)(ngx_conf_t *cf);
+ void *ctx;
+ int module_type;
+ int cmd_type;
+
+ ngx_conf_handler_pt handler;
+ char *handler_conf;
};
@@ -84,6 +100,10 @@ struct ngx_conf_s {
conf = (prev == NGX_CONF_UNSET) ? default : prev; \
}
+#define ngx_conf_msec_merge(conf, prev, default) \
+ if (conf == NGX_CONF_UNSET) { \
+ conf = (prev == NGX_CONF_UNSET) ? default : prev; \
+ }
#define ngx_conf_size_merge(conf, prev, default) \
if (conf == (size_t) NGX_CONF_UNSET) { \