Mercurial > hg > nginx
diff 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 |
line wrap: on
line diff
--- a/src/core/ngx_conf_file.h Tue Apr 13 15:08:48 2004 +0000 +++ b/src/core/ngx_conf_file.h Wed Apr 14 05:57:36 2004 +0000 @@ -42,6 +42,7 @@ #define NGX_CONF_UNSET -1 +#define NGX_CONF_UNSET_UINT (ngx_uint_t) -1 #define NGX_CONF_UNSET_SIZE (size_t) -1 #define NGX_CONF_UNSET_MSEC (ngx_msec_t) -1 @@ -151,11 +152,17 @@ } ngx_conf_num_bounds_t; +typedef struct { + ngx_str_t name; + ngx_uint_t value; +} ngx_conf_enum_t; + + #define NGX_CONF_BITMASK_SET 1 typedef struct { - ngx_str_t name; - int mask; + ngx_str_t name; + ngx_uint_t mask; } ngx_conf_bitmask_t; @@ -196,6 +203,11 @@ conf = (prev == NGX_CONF_UNSET) ? default : prev; \ } +#define ngx_conf_merge_unsigned_value(conf, prev, default) \ + if (conf == NGX_CONF_UNSET_UINT) { \ + conf = (prev == NGX_CONF_UNSET_UINT) ? default : prev; \ + } + #define ngx_conf_merge_msec_value(conf, prev, default) \ if (conf == NGX_CONF_UNSET_MSEC) { \ conf = (prev == NGX_CONF_UNSET_MSEC) ? default : prev; \ @@ -258,6 +270,7 @@ char *ngx_conf_set_sec_slot(ngx_conf_t *cf, ngx_command_t *cmd, void *conf); char *ngx_conf_set_time_slot(ngx_conf_t *cf, ngx_command_t *cmd, void *conf); char *ngx_conf_set_bufs_slot(ngx_conf_t *cf, ngx_command_t *cmd, void *conf); +char *ngx_conf_set_enum_slot(ngx_conf_t *cf, ngx_command_t *cmd, void *conf); char *ngx_conf_set_bitmask_slot(ngx_conf_t *cf, ngx_command_t *cmd, void *conf);