comparison src/core/ngx_conf_file.h @ 507:cd3117ad9aab release-0.1.28

nginx-0.1.28-RELEASE import *) Bugfix: nginx hogs CPU while proxying the huge files. *) Bugfix: nginx could not be built by gcc 4.0 on Linux.
author Igor Sysoev <igor@sysoev.ru>
date Fri, 08 Apr 2005 15:18:55 +0000
parents b1648294f693
children 9b8c906f6e63
comparison
equal deleted inserted replaced
506:005e65646622 507:cd3117ad9aab
71 71
72 #define NGX_MAX_CONF_ERRSTR 256 72 #define NGX_MAX_CONF_ERRSTR 256
73 73
74 74
75 struct ngx_command_s { 75 struct ngx_command_s {
76 ngx_str_t name; 76 ngx_str_t name;
77 int type; 77 ngx_uint_t type;
78 char *(*set)(ngx_conf_t *cf, ngx_command_t *cmd, void *conf); 78 char *(*set)(ngx_conf_t *cf, ngx_command_t *cmd, void *conf);
79 int conf; 79 ngx_uint_t conf;
80 int offset; 80 ngx_uint_t offset;
81 void *post; 81 void *post;
82 }; 82 };
83 83
84 #define ngx_null_command { ngx_null_string, 0, NULL, 0, 0, NULL } 84 #define ngx_null_command { ngx_null_string, 0, NULL, 0, 0, NULL }
85 85
86 86
87 struct ngx_open_file_s { 87 struct ngx_open_file_s {
88 ngx_fd_t fd; 88 ngx_fd_t fd;
89 ngx_str_t name; 89 ngx_str_t name;
90 #if 0 90 #if 0
91 /* e.g. append mode, error_log */ 91 /* e.g. append mode, error_log */
92 int flags; 92 ngx_uint_t flags;
93 /* e.g. reopen db file */ 93 /* e.g. reopen db file */
94 int (*handler)(void *data, ngx_open_file_t *file); 94 ngx_uint_t (*handler)(void *data, ngx_open_file_t *file);
95 void *data; 95 void *data;
96 #endif 96 #endif
97 }; 97 };
98 98
99 99
100 struct ngx_module_s { 100 struct ngx_module_s {
101 ngx_uint_t ctx_index; 101 ngx_uint_t ctx_index;
102 ngx_uint_t index; 102 ngx_uint_t index;
103 void *ctx; 103 void *ctx;
104 ngx_command_t *commands; 104 ngx_command_t *commands;
105 ngx_uint_t type; 105 ngx_uint_t type;
106 ngx_int_t (*init_module)(ngx_cycle_t *cycle); 106 ngx_int_t (*init_module)(ngx_cycle_t *cycle);
107 ngx_int_t (*init_process)(ngx_cycle_t *cycle); 107 ngx_int_t (*init_process)(ngx_cycle_t *cycle);
108 #if 0 108 #if 0
109 ngx_int_t (*init_thread)(ngx_cycle_t *cycle); 109 ngx_int_t (*init_thread)(ngx_cycle_t *cycle);
110 #endif 110 #endif
111 }; 111 };
112 112
113 113
114 typedef struct { 114 typedef struct {
115 ngx_str_t name; 115 ngx_str_t name;
116 void *(*create_conf)(ngx_cycle_t *cycle); 116 void *(*create_conf)(ngx_cycle_t *cycle);
117 char *(*init_conf)(ngx_cycle_t *cycle, void *conf); 117 char *(*init_conf)(ngx_cycle_t *cycle, void *conf);
118 } ngx_core_module_t; 118 } ngx_core_module_t;
119 119
120 120
121 typedef struct { 121 typedef struct {
122 ngx_file_t file; 122 ngx_file_t file;
123 ngx_buf_t *buffer; 123 ngx_buf_t *buffer;
124 ngx_uint_t line; 124 ngx_uint_t line;
125 } ngx_conf_file_t; 125 } ngx_conf_file_t;
126 126
127 127
128 typedef char *(*ngx_conf_handler_pt)(ngx_conf_t *cf, 128 typedef char *(*ngx_conf_handler_pt)(ngx_conf_t *cf,
129 ngx_command_t *dummy, void *conf); 129 ngx_command_t *dummy, void *conf);
130 130
131 131
132 struct ngx_conf_s { 132 struct ngx_conf_s {
133 char *name; 133 char *name;
134 ngx_array_t *args; 134 ngx_array_t *args;
155 } ngx_conf_post_t; 155 } ngx_conf_post_t;
156 156
157 157
158 typedef struct { 158 typedef struct {
159 ngx_conf_post_handler_pt post_handler; 159 ngx_conf_post_handler_pt post_handler;
160 int low; 160 ngx_int_t low;
161 int high; 161 ngx_int_t high;
162 } ngx_conf_num_bounds_t; 162 } ngx_conf_num_bounds_t;
163 163
164 164
165 typedef struct { 165 typedef struct {
166 ngx_str_t name; 166 ngx_str_t name;
167 ngx_uint_t value; 167 ngx_uint_t value;
168 } ngx_conf_enum_t; 168 } ngx_conf_enum_t;
169 169
170 170
171 #define NGX_CONF_BITMASK_SET 1 171 #define NGX_CONF_BITMASK_SET 1
172 172
173 typedef struct { 173 typedef struct {
174 ngx_str_t name; 174 ngx_str_t name;
175 ngx_uint_t mask; 175 ngx_uint_t mask;
176 } ngx_conf_bitmask_t; 176 } ngx_conf_bitmask_t;
177 177
178 178
179 char *ngx_conf_check_num_bounds(ngx_conf_t *cf, void *post, void *data); 179 char *ngx_conf_check_num_bounds(ngx_conf_t *cf, void *post, void *data);
180 180