comparison src/core/ngx_conf_file.h @ 314:d71c87d11b16

nginx-0.0.3-2004-04-14-09:57:36 import
author Igor Sysoev <igor@sysoev.ru>
date Wed, 14 Apr 2004 05:57:36 +0000
parents 11ff50a35d6d
children 8733703a37f3
comparison
equal deleted inserted replaced
313:98f1a8028067 314:d71c87d11b16
40 #define NGX_MAIN_CONF 0x01000000 40 #define NGX_MAIN_CONF 0x01000000
41 41
42 42
43 43
44 #define NGX_CONF_UNSET -1 44 #define NGX_CONF_UNSET -1
45 #define NGX_CONF_UNSET_UINT (ngx_uint_t) -1
45 #define NGX_CONF_UNSET_SIZE (size_t) -1 46 #define NGX_CONF_UNSET_SIZE (size_t) -1
46 #define NGX_CONF_UNSET_MSEC (ngx_msec_t) -1 47 #define NGX_CONF_UNSET_MSEC (ngx_msec_t) -1
47 48
48 49
49 #define NGX_CONF_OK NULL 50 #define NGX_CONF_OK NULL
149 int low; 150 int low;
150 int high; 151 int high;
151 } ngx_conf_num_bounds_t; 152 } ngx_conf_num_bounds_t;
152 153
153 154
155 typedef struct {
156 ngx_str_t name;
157 ngx_uint_t value;
158 } ngx_conf_enum_t;
159
160
154 #define NGX_CONF_BITMASK_SET 1 161 #define NGX_CONF_BITMASK_SET 1
155 162
156 typedef struct { 163 typedef struct {
157 ngx_str_t name; 164 ngx_str_t name;
158 int mask; 165 ngx_uint_t mask;
159 } ngx_conf_bitmask_t; 166 } ngx_conf_bitmask_t;
160 167
161 168
162 char *ngx_conf_check_num_bounds(ngx_conf_t *cf, void *post, void *data); 169 char *ngx_conf_check_num_bounds(ngx_conf_t *cf, void *post, void *data);
163 170
192 } 199 }
193 200
194 #define ngx_conf_merge_value(conf, prev, default) \ 201 #define ngx_conf_merge_value(conf, prev, default) \
195 if (conf == NGX_CONF_UNSET) { \ 202 if (conf == NGX_CONF_UNSET) { \
196 conf = (prev == NGX_CONF_UNSET) ? default : prev; \ 203 conf = (prev == NGX_CONF_UNSET) ? default : prev; \
204 }
205
206 #define ngx_conf_merge_unsigned_value(conf, prev, default) \
207 if (conf == NGX_CONF_UNSET_UINT) { \
208 conf = (prev == NGX_CONF_UNSET_UINT) ? default : prev; \
197 } 209 }
198 210
199 #define ngx_conf_merge_msec_value(conf, prev, default) \ 211 #define ngx_conf_merge_msec_value(conf, prev, default) \
200 if (conf == NGX_CONF_UNSET_MSEC) { \ 212 if (conf == NGX_CONF_UNSET_MSEC) { \
201 conf = (prev == NGX_CONF_UNSET_MSEC) ? default : prev; \ 213 conf = (prev == NGX_CONF_UNSET_MSEC) ? default : prev; \
256 char *ngx_conf_set_size_slot(ngx_conf_t *cf, ngx_command_t *cmd, void *conf); 268 char *ngx_conf_set_size_slot(ngx_conf_t *cf, ngx_command_t *cmd, void *conf);
257 char *ngx_conf_set_msec_slot(ngx_conf_t *cf, ngx_command_t *cmd, void *conf); 269 char *ngx_conf_set_msec_slot(ngx_conf_t *cf, ngx_command_t *cmd, void *conf);
258 char *ngx_conf_set_sec_slot(ngx_conf_t *cf, ngx_command_t *cmd, void *conf); 270 char *ngx_conf_set_sec_slot(ngx_conf_t *cf, ngx_command_t *cmd, void *conf);
259 char *ngx_conf_set_time_slot(ngx_conf_t *cf, ngx_command_t *cmd, void *conf); 271 char *ngx_conf_set_time_slot(ngx_conf_t *cf, ngx_command_t *cmd, void *conf);
260 char *ngx_conf_set_bufs_slot(ngx_conf_t *cf, ngx_command_t *cmd, void *conf); 272 char *ngx_conf_set_bufs_slot(ngx_conf_t *cf, ngx_command_t *cmd, void *conf);
273 char *ngx_conf_set_enum_slot(ngx_conf_t *cf, ngx_command_t *cmd, void *conf);
261 char *ngx_conf_set_bitmask_slot(ngx_conf_t *cf, ngx_command_t *cmd, void *conf); 274 char *ngx_conf_set_bitmask_slot(ngx_conf_t *cf, ngx_command_t *cmd, void *conf);
262 275
263 276
264 extern ngx_int_t ngx_max_module; 277 extern ngx_int_t ngx_max_module;
265 extern ngx_module_t *ngx_modules[]; 278 extern ngx_module_t *ngx_modules[];