Mercurial > hg > nginx
comparison src/core/ngx_conf_file.h @ 158:d377ee423603
nginx-0.0.1-2003-10-24-10:53:41 import
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Fri, 24 Oct 2003 06:53:41 +0000 |
parents | 70b36c805682 |
children | 389d7ee9fa60 |
comparison
equal
deleted
inserted
replaced
157:70b36c805682 | 158:d377ee423603 |
---|---|
49 | 49 |
50 #define NGX_CORE_MODULE 0x45524F43 /* "CORE" */ | 50 #define NGX_CORE_MODULE 0x45524F43 /* "CORE" */ |
51 #define NGX_CONF_MODULE 0x464E4F43 /* "CONF" */ | 51 #define NGX_CONF_MODULE 0x464E4F43 /* "CONF" */ |
52 | 52 |
53 | 53 |
54 typedef struct ngx_conf_bounds_s ngx_conf_bounds_t; | |
55 | |
56 struct ngx_conf_bounds_s { | |
57 char *(*check)(ngx_conf_t *cf, ngx_conf_bounds_t *bounds, void *conf); | |
58 | |
59 union { | |
60 struct { | |
61 int low; | |
62 int high; | |
63 } num; | |
64 | |
65 struct num { | |
66 int low_num; | |
67 int high_num; | |
68 int low_size; | |
69 int high_size; | |
70 } bufs; | |
71 } type; | |
72 }; | |
73 | |
74 | |
75 struct ngx_command_s { | 54 struct ngx_command_s { |
76 ngx_str_t name; | 55 ngx_str_t name; |
77 int type; | 56 int type; |
78 char *(*set)(ngx_conf_t *cf, ngx_command_t *cmd, void *conf); | 57 char *(*set)(ngx_conf_t *cf, ngx_command_t *cmd, void *conf); |
79 int conf; | 58 int conf; |
80 int offset; | 59 int offset; |
81 ngx_conf_bounds_t *bounds; | 60 void *post; |
82 }; | 61 }; |
83 | 62 |
84 #define ngx_null_command { ngx_null_string, 0, NULL, 0, 0, NULL } | 63 #define ngx_null_command { ngx_null_string, 0, NULL, 0, 0, NULL } |
85 | 64 |
86 | 65 |
154 ngx_conf_handler_pt handler; | 133 ngx_conf_handler_pt handler; |
155 char *handler_conf; | 134 char *handler_conf; |
156 }; | 135 }; |
157 | 136 |
158 | 137 |
138 typedef char *(*ngx_conf_post_handler_pt) (ngx_conf_t *cf, | |
139 void *data, void *conf); | |
140 | |
141 typedef struct { | |
142 ngx_conf_post_handler_pt post_handler; | |
143 } ngx_conf_post_t; | |
144 | |
145 | |
146 typedef struct { | |
147 ngx_conf_post_handler_pt post_handler; | |
148 int low; | |
149 int high; | |
150 } ngx_conf_num_bounds_t; | |
151 | |
152 | |
153 char *ngx_conf_check_num_bounds(ngx_conf_t *cf, void *post, void *data); | |
154 | |
155 | |
159 #define ngx_get_conf(conf_ctx, module) conf_ctx[module.index] | 156 #define ngx_get_conf(conf_ctx, module) conf_ctx[module.index] |
160 | 157 |
161 | 158 |
162 | 159 |
163 #define ngx_conf_init_value(conf, default) \ | 160 #define ngx_conf_init_value(conf, default) \ |
238 char *ngx_conf_set_bufs_slot(ngx_conf_t *cf, ngx_command_t *cmd, void *conf); | 235 char *ngx_conf_set_bufs_slot(ngx_conf_t *cf, ngx_command_t *cmd, void *conf); |
239 | 236 |
240 char *ngx_conf_set_core_flag_slot(ngx_conf_t *cf, ngx_command_t *cmd, | 237 char *ngx_conf_set_core_flag_slot(ngx_conf_t *cf, ngx_command_t *cmd, |
241 void *conf); | 238 void *conf); |
242 | 239 |
243 char *ngx_conf_check_num_bounds(ngx_conf_t *cf, ngx_conf_bounds_t *bounds, | |
244 void *conf); | |
245 | |
246 | 240 |
247 extern ngx_module_t *ngx_modules[]; | 241 extern ngx_module_t *ngx_modules[]; |
248 extern ngx_cycle_t *ngx_cycle; | 242 extern ngx_cycle_t *ngx_cycle; |
249 extern ngx_array_t ngx_old_cycles; | 243 extern ngx_array_t ngx_old_cycles; |
250 | 244 |