diff options
Diffstat (limited to 'src/lib/libcrypto/conf/conf.c')
-rw-r--r-- | src/lib/libcrypto/conf/conf.c | 211 |
1 files changed, 108 insertions, 103 deletions
diff --git a/src/lib/libcrypto/conf/conf.c b/src/lib/libcrypto/conf/conf.c index 9e84300c5e..7d8b89168a 100644 --- a/src/lib/libcrypto/conf/conf.c +++ b/src/lib/libcrypto/conf/conf.c | |||
@@ -59,19 +59,18 @@ | |||
59 | #include <stdio.h> | 59 | #include <stdio.h> |
60 | #include <errno.h> | 60 | #include <errno.h> |
61 | #include "cryptlib.h" | 61 | #include "cryptlib.h" |
62 | #include "stack.h" | 62 | #include <openssl/stack.h> |
63 | #include "lhash.h" | 63 | #include <openssl/lhash.h> |
64 | #include "conf.h" | 64 | #include <openssl/conf.h> |
65 | #include "buffer.h" | 65 | #include <openssl/buffer.h> |
66 | #include "err.h" | 66 | #include <openssl/err.h> |
67 | 67 | ||
68 | #include "conf_lcl.h" | 68 | #include "conf_lcl.h" |
69 | 69 | ||
70 | #ifndef NOPROTO | ||
71 | static void value_free_hash(CONF_VALUE *a, LHASH *conf); | 70 | static void value_free_hash(CONF_VALUE *a, LHASH *conf); |
72 | static void value_free_stack(CONF_VALUE *a,LHASH *conf); | 71 | static void value_free_stack(CONF_VALUE *a,LHASH *conf); |
73 | static unsigned long hash(CONF_VALUE *v); | 72 | static unsigned long hash(CONF_VALUE *v); |
74 | static int cmp(CONF_VALUE *a,CONF_VALUE *b); | 73 | static int cmp_conf(CONF_VALUE *a,CONF_VALUE *b); |
75 | static char *eat_ws(char *p); | 74 | static char *eat_ws(char *p); |
76 | static char *eat_alpha_numeric(char *p); | 75 | static char *eat_alpha_numeric(char *p); |
77 | static void clear_comments(char *p); | 76 | static void clear_comments(char *p); |
@@ -79,71 +78,84 @@ static int str_copy(LHASH *conf,char *section,char **to, char *from); | |||
79 | static char *scan_quote(char *p); | 78 | static char *scan_quote(char *p); |
80 | static CONF_VALUE *new_section(LHASH *conf,char *section); | 79 | static CONF_VALUE *new_section(LHASH *conf,char *section); |
81 | static CONF_VALUE *get_section(LHASH *conf,char *section); | 80 | static CONF_VALUE *get_section(LHASH *conf,char *section); |
81 | #define scan_esc(p) ((((p)[1] == '\0')?(p++):(p+=2)),p) | ||
82 | |||
83 | const char *CONF_version="CONF" OPENSSL_VERSION_PTEXT; | ||
84 | |||
85 | |||
86 | LHASH *CONF_load(LHASH *h, const char *file, long *line) | ||
87 | { | ||
88 | LHASH *ltmp; | ||
89 | FILE *in=NULL; | ||
90 | |||
91 | #ifdef VMS | ||
92 | in=fopen(file,"r"); | ||
82 | #else | 93 | #else |
83 | static void value_free_hash(); | 94 | in=fopen(file,"rb"); |
84 | static void value_free_stack(); | ||
85 | static unsigned long hash(); | ||
86 | static int cmp(); | ||
87 | static char *eat_ws(); | ||
88 | static char *eat_alpha_numeric(); | ||
89 | static void clear_comments(); | ||
90 | static int str_copy(); | ||
91 | static char *scan_quote(); | ||
92 | static CONF_VALUE *new_section(); | ||
93 | static CONF_VALUE *get_section(); | ||
94 | #endif | 95 | #endif |
96 | if (in == NULL) | ||
97 | { | ||
98 | SYSerr(SYS_F_FOPEN,get_last_sys_error()); | ||
99 | ERR_set_error_data(BUF_strdup(file), | ||
100 | ERR_TXT_MALLOCED|ERR_TXT_STRING); | ||
101 | CONFerr(CONF_F_CONF_LOAD,ERR_R_SYS_LIB); | ||
102 | return NULL; | ||
103 | } | ||
95 | 104 | ||
96 | #define scan_esc(p) ((*(++p) == '\0')?(p):(++p)) | 105 | ltmp = CONF_load_fp(h, in, line); |
106 | fclose(in); | ||
97 | 107 | ||
98 | char *CONF_version="CONF part of SSLeay 0.9.0b 29-Jun-1998"; | 108 | return ltmp; |
109 | } | ||
110 | |||
111 | LHASH *CONF_load_fp(LHASH *h, FILE *in, long *line) | ||
112 | { | ||
113 | BIO *btmp; | ||
114 | LHASH *ltmp; | ||
115 | if(!(btmp = BIO_new_fp(in, BIO_NOCLOSE))) { | ||
116 | CONFerr(CONF_F_CONF_LOAD_FP,ERR_R_BUF_LIB); | ||
117 | return NULL; | ||
118 | } | ||
119 | ltmp = CONF_load_bio(h, btmp, line); | ||
120 | BIO_free(btmp); | ||
121 | return ltmp; | ||
122 | } | ||
99 | 123 | ||
100 | LHASH *CONF_load(h,file,line) | 124 | LHASH *CONF_load_bio(LHASH *h, BIO *in, long *line) |
101 | LHASH *h; | ||
102 | char *file; | ||
103 | long *line; | ||
104 | { | 125 | { |
105 | LHASH *ret=NULL; | 126 | LHASH *ret=NULL; |
106 | FILE *in=NULL; | ||
107 | #define BUFSIZE 512 | 127 | #define BUFSIZE 512 |
128 | char btmp[16]; | ||
108 | int bufnum=0,i,ii; | 129 | int bufnum=0,i,ii; |
109 | BUF_MEM *buff=NULL; | 130 | BUF_MEM *buff=NULL; |
110 | char *s,*p,*end; | 131 | char *s,*p,*end; |
111 | int again,n,eline=0; | 132 | int again,n; |
133 | long eline=0; | ||
112 | CONF_VALUE *v=NULL,*vv,*tv; | 134 | CONF_VALUE *v=NULL,*vv,*tv; |
113 | CONF_VALUE *sv=NULL; | 135 | CONF_VALUE *sv=NULL; |
114 | char *section=NULL,*buf; | 136 | char *section=NULL,*buf; |
115 | STACK *section_sk=NULL,*ts; | 137 | STACK_OF(CONF_VALUE) *section_sk=NULL,*ts; |
116 | char *start,*psection,*pname; | 138 | char *start,*psection,*pname; |
117 | 139 | ||
118 | if ((buff=BUF_MEM_new()) == NULL) | 140 | if ((buff=BUF_MEM_new()) == NULL) |
119 | { | 141 | { |
120 | CONFerr(CONF_F_CONF_LOAD,ERR_R_BUF_LIB); | 142 | CONFerr(CONF_F_CONF_LOAD_BIO,ERR_R_BUF_LIB); |
121 | goto err; | ||
122 | } | ||
123 | |||
124 | in=fopen(file,"rb"); | ||
125 | if (in == NULL) | ||
126 | { | ||
127 | SYSerr(SYS_F_FOPEN,get_last_sys_error()); | ||
128 | ERR_set_error_data(BUF_strdup(file), | ||
129 | ERR_TXT_MALLOCED|ERR_TXT_STRING); | ||
130 | CONFerr(CONF_F_CONF_LOAD,ERR_R_SYS_LIB); | ||
131 | goto err; | 143 | goto err; |
132 | } | 144 | } |
133 | 145 | ||
134 | section=(char *)Malloc(10); | 146 | section=(char *)Malloc(10); |
135 | if (section == NULL) | 147 | if (section == NULL) |
136 | { | 148 | { |
137 | CONFerr(CONF_F_CONF_LOAD,ERR_R_MALLOC_FAILURE); | 149 | CONFerr(CONF_F_CONF_LOAD_BIO,ERR_R_MALLOC_FAILURE); |
138 | goto err; | 150 | goto err; |
139 | } | 151 | } |
140 | strcpy(section,"default"); | 152 | strcpy(section,"default"); |
141 | 153 | ||
142 | if (h == NULL) | 154 | if (h == NULL) |
143 | { | 155 | { |
144 | if ((ret=lh_new(hash,cmp)) == NULL) | 156 | if ((ret=lh_new(hash,cmp_conf)) == NULL) |
145 | { | 157 | { |
146 | CONFerr(CONF_F_CONF_LOAD,ERR_R_MALLOC_FAILURE); | 158 | CONFerr(CONF_F_CONF_LOAD_BIO,ERR_R_MALLOC_FAILURE); |
147 | goto err; | 159 | goto err; |
148 | } | 160 | } |
149 | } | 161 | } |
@@ -153,10 +165,11 @@ long *line; | |||
153 | sv=new_section(ret,section); | 165 | sv=new_section(ret,section); |
154 | if (sv == NULL) | 166 | if (sv == NULL) |
155 | { | 167 | { |
156 | CONFerr(CONF_F_CONF_LOAD,CONF_R_UNABLE_TO_CREATE_NEW_SECTION); | 168 | CONFerr(CONF_F_CONF_LOAD_BIO, |
169 | CONF_R_UNABLE_TO_CREATE_NEW_SECTION); | ||
157 | goto err; | 170 | goto err; |
158 | } | 171 | } |
159 | section_sk=(STACK *)sv->value; | 172 | section_sk=(STACK_OF(CONF_VALUE) *)sv->value; |
160 | 173 | ||
161 | bufnum=0; | 174 | bufnum=0; |
162 | for (;;) | 175 | for (;;) |
@@ -164,12 +177,12 @@ long *line; | |||
164 | again=0; | 177 | again=0; |
165 | if (!BUF_MEM_grow(buff,bufnum+BUFSIZE)) | 178 | if (!BUF_MEM_grow(buff,bufnum+BUFSIZE)) |
166 | { | 179 | { |
167 | CONFerr(CONF_F_CONF_LOAD,ERR_R_BUF_LIB); | 180 | CONFerr(CONF_F_CONF_LOAD_BIO,ERR_R_BUF_LIB); |
168 | goto err; | 181 | goto err; |
169 | } | 182 | } |
170 | p= &(buff->data[bufnum]); | 183 | p= &(buff->data[bufnum]); |
171 | *p='\0'; | 184 | *p='\0'; |
172 | fgets(p,BUFSIZE-1,in); | 185 | BIO_gets(in, p, BUFSIZE-1); |
173 | p[BUFSIZE-1]='\0'; | 186 | p[BUFSIZE-1]='\0'; |
174 | ii=i=strlen(p); | 187 | ii=i=strlen(p); |
175 | if (i == 0) break; | 188 | if (i == 0) break; |
@@ -219,13 +232,23 @@ long *line; | |||
219 | if (IS_EOF(*s)) continue; /* blank line */ | 232 | if (IS_EOF(*s)) continue; /* blank line */ |
220 | if (*s == '[') | 233 | if (*s == '[') |
221 | { | 234 | { |
235 | char *ss; | ||
236 | |||
222 | s++; | 237 | s++; |
223 | start=eat_ws(s); | 238 | start=eat_ws(s); |
224 | end=eat_alpha_numeric(start); | 239 | ss=start; |
240 | again: | ||
241 | end=eat_alpha_numeric(ss); | ||
225 | p=eat_ws(end); | 242 | p=eat_ws(end); |
226 | if (*p != ']') | 243 | if (*p != ']') |
227 | { | 244 | { |
228 | CONFerr(CONF_F_CONF_LOAD,CONF_R_MISSING_CLOSE_SQUARE_BRACKET); | 245 | if (*p != '\0') |
246 | { | ||
247 | ss=p; | ||
248 | goto again; | ||
249 | } | ||
250 | CONFerr(CONF_F_CONF_LOAD_BIO, | ||
251 | CONF_R_MISSING_CLOSE_SQUARE_BRACKET); | ||
229 | goto err; | 252 | goto err; |
230 | } | 253 | } |
231 | *end='\0'; | 254 | *end='\0'; |
@@ -234,10 +257,11 @@ long *line; | |||
234 | sv=new_section(ret,section); | 257 | sv=new_section(ret,section); |
235 | if (sv == NULL) | 258 | if (sv == NULL) |
236 | { | 259 | { |
237 | CONFerr(CONF_F_CONF_LOAD,CONF_R_UNABLE_TO_CREATE_NEW_SECTION); | 260 | CONFerr(CONF_F_CONF_LOAD_BIO, |
261 | CONF_R_UNABLE_TO_CREATE_NEW_SECTION); | ||
238 | goto err; | 262 | goto err; |
239 | } | 263 | } |
240 | section_sk=(STACK *)sv->value; | 264 | section_sk=(STACK_OF(CONF_VALUE) *)sv->value; |
241 | continue; | 265 | continue; |
242 | } | 266 | } |
243 | else | 267 | else |
@@ -256,7 +280,8 @@ long *line; | |||
256 | p=eat_ws(end); | 280 | p=eat_ws(end); |
257 | if (*p != '=') | 281 | if (*p != '=') |
258 | { | 282 | { |
259 | CONFerr(CONF_F_CONF_LOAD,CONF_R_MISSING_EQUAL_SIGN); | 283 | CONFerr(CONF_F_CONF_LOAD_BIO, |
284 | CONF_R_MISSING_EQUAL_SIGN); | ||
260 | goto err; | 285 | goto err; |
261 | } | 286 | } |
262 | *end='\0'; | 287 | *end='\0'; |
@@ -270,9 +295,10 @@ long *line; | |||
270 | p++; | 295 | p++; |
271 | *p='\0'; | 296 | *p='\0'; |
272 | 297 | ||
273 | if ((v=(CONF_VALUE *)Malloc(sizeof(CONF_VALUE))) == NULL) | 298 | if (!(v=(CONF_VALUE *)Malloc(sizeof(CONF_VALUE)))) |
274 | { | 299 | { |
275 | CONFerr(CONF_F_CONF_LOAD,ERR_R_MALLOC_FAILURE); | 300 | CONFerr(CONF_F_CONF_LOAD_BIO, |
301 | ERR_R_MALLOC_FAILURE); | ||
276 | goto err; | 302 | goto err; |
277 | } | 303 | } |
278 | if (psection == NULL) psection=section; | 304 | if (psection == NULL) psection=section; |
@@ -280,7 +306,8 @@ long *line; | |||
280 | v->value=NULL; | 306 | v->value=NULL; |
281 | if (v->name == NULL) | 307 | if (v->name == NULL) |
282 | { | 308 | { |
283 | CONFerr(CONF_F_CONF_LOAD,ERR_R_MALLOC_FAILURE); | 309 | CONFerr(CONF_F_CONF_LOAD_BIO, |
310 | ERR_R_MALLOC_FAILURE); | ||
284 | goto err; | 311 | goto err; |
285 | } | 312 | } |
286 | strcpy(v->name,pname); | 313 | strcpy(v->name,pname); |
@@ -293,10 +320,11 @@ long *line; | |||
293 | tv=new_section(ret,psection); | 320 | tv=new_section(ret,psection); |
294 | if (tv == NULL) | 321 | if (tv == NULL) |
295 | { | 322 | { |
296 | CONFerr(CONF_F_CONF_LOAD,CONF_R_UNABLE_TO_CREATE_NEW_SECTION); | 323 | CONFerr(CONF_F_CONF_LOAD_BIO, |
324 | CONF_R_UNABLE_TO_CREATE_NEW_SECTION); | ||
297 | goto err; | 325 | goto err; |
298 | } | 326 | } |
299 | ts=(STACK *)tv->value; | 327 | ts=(STACK_OF(CONF_VALUE) *)tv->value; |
300 | } | 328 | } |
301 | else | 329 | else |
302 | { | 330 | { |
@@ -304,15 +332,16 @@ long *line; | |||
304 | ts=section_sk; | 332 | ts=section_sk; |
305 | } | 333 | } |
306 | v->section=tv->section; | 334 | v->section=tv->section; |
307 | if (!sk_push(ts,(char *)v)) | 335 | if (!sk_CONF_VALUE_push(ts,v)) |
308 | { | 336 | { |
309 | CONFerr(CONF_F_CONF_LOAD,ERR_R_MALLOC_FAILURE); | 337 | CONFerr(CONF_F_CONF_LOAD_BIO, |
338 | ERR_R_MALLOC_FAILURE); | ||
310 | goto err; | 339 | goto err; |
311 | } | 340 | } |
312 | vv=(CONF_VALUE *)lh_insert(ret,(char *)v); | 341 | vv=(CONF_VALUE *)lh_insert(ret,(char *)v); |
313 | if (vv != NULL) | 342 | if (vv != NULL) |
314 | { | 343 | { |
315 | sk_delete_ptr(ts,(char *)vv); | 344 | sk_CONF_VALUE_delete_ptr(ts,vv); |
316 | Free(vv->name); | 345 | Free(vv->name); |
317 | Free(vv->value); | 346 | Free(vv->value); |
318 | Free(vv); | 347 | Free(vv); |
@@ -322,13 +351,13 @@ long *line; | |||
322 | } | 351 | } |
323 | if (buff != NULL) BUF_MEM_free(buff); | 352 | if (buff != NULL) BUF_MEM_free(buff); |
324 | if (section != NULL) Free(section); | 353 | if (section != NULL) Free(section); |
325 | if (in != NULL) fclose(in); | ||
326 | return(ret); | 354 | return(ret); |
327 | err: | 355 | err: |
328 | if (buff != NULL) BUF_MEM_free(buff); | 356 | if (buff != NULL) BUF_MEM_free(buff); |
329 | if (section != NULL) Free(section); | 357 | if (section != NULL) Free(section); |
330 | if (line != NULL) *line=eline; | 358 | if (line != NULL) *line=eline; |
331 | if (in != NULL) fclose(in); | 359 | sprintf(btmp,"%ld",eline); |
360 | ERR_add_error_data(2,"line ",btmp); | ||
332 | if ((h != ret) && (ret != NULL)) CONF_free(ret); | 361 | if ((h != ret) && (ret != NULL)) CONF_free(ret); |
333 | if (v != NULL) | 362 | if (v != NULL) |
334 | { | 363 | { |
@@ -338,11 +367,8 @@ err: | |||
338 | } | 367 | } |
339 | return(NULL); | 368 | return(NULL); |
340 | } | 369 | } |
341 | 370 | ||
342 | char *CONF_get_string(conf,section,name) | 371 | char *CONF_get_string(LHASH *conf, char *section, char *name) |
343 | LHASH *conf; | ||
344 | char *section; | ||
345 | char *name; | ||
346 | { | 372 | { |
347 | CONF_VALUE *v,vv; | 373 | CONF_VALUE *v,vv; |
348 | char *p; | 374 | char *p; |
@@ -374,9 +400,7 @@ char *name; | |||
374 | return(Getenv(name)); | 400 | return(Getenv(name)); |
375 | } | 401 | } |
376 | 402 | ||
377 | static CONF_VALUE *get_section(conf,section) | 403 | static CONF_VALUE *get_section(LHASH *conf, char *section) |
378 | LHASH *conf; | ||
379 | char *section; | ||
380 | { | 404 | { |
381 | CONF_VALUE *v,vv; | 405 | CONF_VALUE *v,vv; |
382 | 406 | ||
@@ -387,23 +411,18 @@ char *section; | |||
387 | return(v); | 411 | return(v); |
388 | } | 412 | } |
389 | 413 | ||
390 | STACK *CONF_get_section(conf,section) | 414 | STACK_OF(CONF_VALUE) *CONF_get_section(LHASH *conf, char *section) |
391 | LHASH *conf; | ||
392 | char *section; | ||
393 | { | 415 | { |
394 | CONF_VALUE *v; | 416 | CONF_VALUE *v; |
395 | 417 | ||
396 | v=get_section(conf,section); | 418 | v=get_section(conf,section); |
397 | if (v != NULL) | 419 | if (v != NULL) |
398 | return((STACK *)v->value); | 420 | return((STACK_OF(CONF_VALUE) *)v->value); |
399 | else | 421 | else |
400 | return(NULL); | 422 | return(NULL); |
401 | } | 423 | } |
402 | 424 | ||
403 | long CONF_get_number(conf,section,name) | 425 | long CONF_get_number(LHASH *conf, char *section, char *name) |
404 | LHASH *conf; | ||
405 | char *section; | ||
406 | char *name; | ||
407 | { | 426 | { |
408 | char *str; | 427 | char *str; |
409 | long ret=0; | 428 | long ret=0; |
@@ -420,8 +439,7 @@ char *name; | |||
420 | } | 439 | } |
421 | } | 440 | } |
422 | 441 | ||
423 | void CONF_free(conf) | 442 | void CONF_free(LHASH *conf) |
424 | LHASH *conf; | ||
425 | { | 443 | { |
426 | if (conf == NULL) return; | 444 | if (conf == NULL) return; |
427 | 445 | ||
@@ -436,9 +454,7 @@ LHASH *conf; | |||
436 | lh_free(conf); | 454 | lh_free(conf); |
437 | } | 455 | } |
438 | 456 | ||
439 | static void value_free_hash(a,conf) | 457 | static void value_free_hash(CONF_VALUE *a, LHASH *conf) |
440 | CONF_VALUE *a; | ||
441 | LHASH *conf; | ||
442 | { | 458 | { |
443 | if (a->name != NULL) | 459 | if (a->name != NULL) |
444 | { | 460 | { |
@@ -446,9 +462,7 @@ LHASH *conf; | |||
446 | } | 462 | } |
447 | } | 463 | } |
448 | 464 | ||
449 | static void value_free_stack(a,conf) | 465 | static void value_free_stack(CONF_VALUE *a, LHASH *conf) |
450 | CONF_VALUE *a; | ||
451 | LHASH *conf; | ||
452 | { | 466 | { |
453 | CONF_VALUE *vv; | 467 | CONF_VALUE *vv; |
454 | STACK *sk; | 468 | STACK *sk; |
@@ -469,8 +483,7 @@ LHASH *conf; | |||
469 | Free(a); | 483 | Free(a); |
470 | } | 484 | } |
471 | 485 | ||
472 | static void clear_comments(p) | 486 | static void clear_comments(char *p) |
473 | char *p; | ||
474 | { | 487 | { |
475 | char *to; | 488 | char *to; |
476 | 489 | ||
@@ -499,10 +512,7 @@ char *p; | |||
499 | } | 512 | } |
500 | } | 513 | } |
501 | 514 | ||
502 | static int str_copy(conf,section,pto,from) | 515 | static int str_copy(LHASH *conf, char *section, char **pto, char *from) |
503 | LHASH *conf; | ||
504 | char *section; | ||
505 | char **pto,*from; | ||
506 | { | 516 | { |
507 | int q,r,rr=0,to=0,len=0; | 517 | int q,r,rr=0,to=0,len=0; |
508 | char *s,*e,*rp,*p,*rrp,*np,*cp,v; | 518 | char *s,*e,*rp,*p,*rrp,*np,*cp,v; |
@@ -616,16 +626,14 @@ err: | |||
616 | return(0); | 626 | return(0); |
617 | } | 627 | } |
618 | 628 | ||
619 | static char *eat_ws(p) | 629 | static char *eat_ws(char *p) |
620 | char *p; | ||
621 | { | 630 | { |
622 | while (IS_WS(*p) && (!IS_EOF(*p))) | 631 | while (IS_WS(*p) && (!IS_EOF(*p))) |
623 | p++; | 632 | p++; |
624 | return(p); | 633 | return(p); |
625 | } | 634 | } |
626 | 635 | ||
627 | static char *eat_alpha_numeric(p) | 636 | static char *eat_alpha_numeric(char *p) |
628 | char *p; | ||
629 | { | 637 | { |
630 | for (;;) | 638 | for (;;) |
631 | { | 639 | { |
@@ -640,14 +648,12 @@ char *p; | |||
640 | } | 648 | } |
641 | } | 649 | } |
642 | 650 | ||
643 | static unsigned long hash(v) | 651 | static unsigned long hash(CONF_VALUE *v) |
644 | CONF_VALUE *v; | ||
645 | { | 652 | { |
646 | return((lh_strhash(v->section)<<2)^lh_strhash(v->name)); | 653 | return((lh_strhash(v->section)<<2)^lh_strhash(v->name)); |
647 | } | 654 | } |
648 | 655 | ||
649 | static int cmp(a,b) | 656 | static int cmp_conf(CONF_VALUE *a, CONF_VALUE *b) |
650 | CONF_VALUE *a,*b; | ||
651 | { | 657 | { |
652 | int i; | 658 | int i; |
653 | 659 | ||
@@ -668,8 +674,7 @@ CONF_VALUE *a,*b; | |||
668 | return((a->name == NULL)?-1:1); | 674 | return((a->name == NULL)?-1:1); |
669 | } | 675 | } |
670 | 676 | ||
671 | static char *scan_quote(p) | 677 | static char *scan_quote(char *p) |
672 | char *p; | ||
673 | { | 678 | { |
674 | int q= *p; | 679 | int q= *p; |
675 | 680 | ||
@@ -687,9 +692,7 @@ char *p; | |||
687 | return(p); | 692 | return(p); |
688 | } | 693 | } |
689 | 694 | ||
690 | static CONF_VALUE *new_section(conf,section) | 695 | static CONF_VALUE *new_section(LHASH *conf, char *section) |
691 | LHASH *conf; | ||
692 | char *section; | ||
693 | { | 696 | { |
694 | STACK *sk=NULL; | 697 | STACK *sk=NULL; |
695 | int ok=0,i; | 698 | int ok=0,i; |
@@ -725,3 +728,5 @@ err: | |||
725 | } | 728 | } |
726 | return(v); | 729 | return(v); |
727 | } | 730 | } |
731 | |||
732 | IMPLEMENT_STACK_OF(CONF_VALUE) | ||