comparison src/core/ngx_conf_file.c @ 59:e8cdc2989cee

nginx-0.0.1-2003-02-06-20:21:13 import
author Igor Sysoev <igor@sysoev.ru>
date Thu, 06 Feb 2003 17:21:13 +0000
parents a499e0d1f16e
children 34d647deb1da
comparison
equal deleted inserted replaced
58:6b13b1cadabe 59:e8cdc2989cee
60 for ( ;; ) { 60 for ( ;; ) {
61 rc = ngx_conf_read_token(cf); 61 rc = ngx_conf_read_token(cf);
62 62
63 /* NGX_OK, NGX_ERROR, NGX_CONF_FILE_DONE, NGX_CONF_BLOCK_DONE */ 63 /* NGX_OK, NGX_ERROR, NGX_CONF_FILE_DONE, NGX_CONF_BLOCK_DONE */
64 64
65 #if 0
65 ngx_log_debug(cf->log, "token %d" _ rc); 66 ngx_log_debug(cf->log, "token %d" _ rc);
67 #endif
66 68
67 if (rc == NGX_ERROR) { 69 if (rc == NGX_ERROR) {
68 return NGX_CONF_ERROR; 70 return NGX_CONF_ERROR;
69 } 71 }
70 72
99 while (cmd->name.len) { 101 while (cmd->name.len) {
100 if (name->len == cmd->name.len 102 if (name->len == cmd->name.len
101 && ngx_strcmp(name->data, cmd->name.data) == 0) 103 && ngx_strcmp(name->data, cmd->name.data) == 0)
102 { 104 {
103 105
106 #if 0
104 ngx_log_debug(cf->log, "command '%s'" _ cmd->name.data); 107 ngx_log_debug(cf->log, "command '%s'" _ cmd->name.data);
108 #endif
105 109
106 if (!(cmd->type & NGX_CONF_ANY) 110 if (!(cmd->type & NGX_CONF_ANY)
107 && !(cmd->type & argument_number[cf->args->nelts - 1])) 111 && !(cmd->type & argument_number[cf->args->nelts - 1]))
108 { 112 {
109 ngx_log_error(NGX_LOG_EMERG, cf->log, 0, 113 ngx_log_error(NGX_LOG_EMERG, cf->log, 0,
124 } 128 }
125 } 129 }
126 130
127 rv = cmd->set(cf, cmd, conf); 131 rv = cmd->set(cf, cmd, conf);
128 132
133 #if 0
129 ngx_log_debug(cf->log, "rv: %d" _ rv); 134 ngx_log_debug(cf->log, "rv: %d" _ rv);
135 #endif
130 136
131 if (rv == NGX_CONF_OK) { 137 if (rv == NGX_CONF_OK) {
132 found = 1; 138 found = 1;
133 break; 139 break;
134 140
190 196
191 cf->args->nelts = 0; 197 cf->args->nelts = 0;
192 h = cf->conf_file->hunk; 198 h = cf->conf_file->hunk;
193 start = h->pos.mem; 199 start = h->pos.mem;
194 200
201 #if 0
195 ngx_log_debug(cf->log, "TOKEN START"); 202 ngx_log_debug(cf->log, "TOKEN START");
203 #endif
196 204
197 for ( ;; ) { 205 for ( ;; ) {
198 206
199 if (h->pos.mem >= h->last.mem) { 207 if (h->pos.mem >= h->last.mem) {
200 if (cf->conf_file->file.offset 208 if (cf->conf_file->file.offset
358 *dst++ = *src++; 366 *dst++ = *src++;
359 } 367 }
360 *dst = '\0'; 368 *dst = '\0';
361 word->len = len; 369 word->len = len;
362 370
371 #if 0
363 ngx_log_debug(cf->log, "FOUND %d:'%s'" _ word->len _ word->data); 372 ngx_log_debug(cf->log, "FOUND %d:'%s'" _ word->len _ word->data);
373 #endif
364 374
365 if (ch == ';' || ch == '{') { 375 if (ch == ';' || ch == '{') {
366 return NGX_OK; 376 return NGX_OK;
367 } 377 }
368 378