projects
/
openssl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Complete rewrite of the error code generation script. It now runs as a single
[openssl.git]
/
crypto
/
conf
/
conf.c
diff --git
a/crypto/conf/conf.c
b/crypto/conf/conf.c
index 861043c08df2511ca913d4ff90989a48c9350a0c..f2387098e64da5d6d865a7259aac170083232daa 100644
(file)
--- a/
crypto/conf/conf.c
+++ b/
crypto/conf/conf.c
@@
-59,11
+59,11
@@
#include <stdio.h>
#include <errno.h>
#include "cryptlib.h"
#include <stdio.h>
#include <errno.h>
#include "cryptlib.h"
-#include
"stack.h"
-#include
"lhash.h"
-#include
"conf.h"
-#include
"buffer.h"
-#include
"err.h"
+#include
<openssl/stack.h>
+#include
<openssl/lhash.h>
+#include
<openssl/conf.h>
+#include
<openssl/buffer.h>
+#include
<openssl/err.h>
#include "conf_lcl.h"
#include "conf_lcl.h"
@@
-95,12
+95,9
@@
static CONF_VALUE *get_section();
#define scan_esc(p) ((((p)[1] == '\0')?(p++):(p+=2)),p)
#define scan_esc(p) ((((p)[1] == '\0')?(p++):(p+=2)),p)
-c
har *CONF_version="CONF part of OpenSSL 0.9.2 31-Dec-1998"
;
+c
onst char *CONF_version="CONF" OPENSSL_VERSION_PTEXT
;
-LHASH *CONF_load(h,file,line)
-LHASH *h;
-char *file;
-long *line;
+LHASH *CONF_load(LHASH *h, char *file, long *line)
{
LHASH *ret=NULL;
FILE *in=NULL;
{
LHASH *ret=NULL;
FILE *in=NULL;
@@
-352,10
+349,7
@@
err:
return(NULL);
}
return(NULL);
}
-char *CONF_get_string(conf,section,name)
-LHASH *conf;
-char *section;
-char *name;
+char *CONF_get_string(LHASH *conf, char *section, char *name)
{
CONF_VALUE *v,vv;
char *p;
{
CONF_VALUE *v,vv;
char *p;
@@
-375,7
+369,7
@@
char *name;
if (p != NULL) return(p);
}
}
if (p != NULL) return(p);
}
}
- vv.section=
"default"
;
+ vv.section=
BUF_strdup("default")
;
vv.name=name;
v=(CONF_VALUE *)lh_retrieve(conf,(char *)&vv);
if (v != NULL)
vv.name=name;
v=(CONF_VALUE *)lh_retrieve(conf,(char *)&vv);
if (v != NULL)
@@
-387,9
+381,7
@@
char *name;
return(Getenv(name));
}
return(Getenv(name));
}
-static CONF_VALUE *get_section(conf,section)
-LHASH *conf;
-char *section;
+static CONF_VALUE *get_section(LHASH *conf, char *section)
{
CONF_VALUE *v,vv;
{
CONF_VALUE *v,vv;
@@
-400,9
+392,7
@@
char *section;
return(v);
}
return(v);
}
-STACK *CONF_get_section(conf,section)
-LHASH *conf;
-char *section;
+STACK *CONF_get_section(LHASH *conf, char *section)
{
CONF_VALUE *v;
{
CONF_VALUE *v;
@@
-413,10
+403,7
@@
char *section;
return(NULL);
}
return(NULL);
}
-long CONF_get_number(conf,section,name)
-LHASH *conf;
-char *section;
-char *name;
+long CONF_get_number(LHASH *conf, char *section, char *name)
{
char *str;
long ret=0;
{
char *str;
long ret=0;
@@
-433,8
+420,7
@@
char *name;
}
}
}
}
-void CONF_free(conf)
-LHASH *conf;
+void CONF_free(LHASH *conf)
{
if (conf == NULL) return;
{
if (conf == NULL) return;
@@
-449,9
+435,7
@@
LHASH *conf;
lh_free(conf);
}
lh_free(conf);
}
-static void value_free_hash(a,conf)
-CONF_VALUE *a;
-LHASH *conf;
+static void value_free_hash(CONF_VALUE *a, LHASH *conf)
{
if (a->name != NULL)
{
{
if (a->name != NULL)
{
@@
-459,9
+443,7
@@
LHASH *conf;
}
}
}
}
-static void value_free_stack(a,conf)
-CONF_VALUE *a;
-LHASH *conf;
+static void value_free_stack(CONF_VALUE *a, LHASH *conf)
{
CONF_VALUE *vv;
STACK *sk;
{
CONF_VALUE *vv;
STACK *sk;
@@
-482,8
+464,7
@@
LHASH *conf;
Free(a);
}
Free(a);
}
-static void clear_comments(p)
-char *p;
+static void clear_comments(char *p)
{
char *to;
{
char *to;
@@
-512,10
+493,7
@@
char *p;
}
}
}
}
-static int str_copy(conf,section,pto,from)
-LHASH *conf;
-char *section;
-char **pto,*from;
+static int str_copy(LHASH *conf, char *section, char **pto, char *from)
{
int q,r,rr=0,to=0,len=0;
char *s,*e,*rp,*p,*rrp,*np,*cp,v;
{
int q,r,rr=0,to=0,len=0;
char *s,*e,*rp,*p,*rrp,*np,*cp,v;
@@
-629,16
+607,14
@@
err:
return(0);
}
return(0);
}
-static char *eat_ws(p)
-char *p;
+static char *eat_ws(char *p)
{
while (IS_WS(*p) && (!IS_EOF(*p)))
p++;
return(p);
}
{
while (IS_WS(*p) && (!IS_EOF(*p)))
p++;
return(p);
}
-static char *eat_alpha_numeric(p)
-char *p;
+static char *eat_alpha_numeric(char *p)
{
for (;;)
{
{
for (;;)
{
@@
-653,14
+629,12
@@
char *p;
}
}
}
}
-static unsigned long hash(v)
-CONF_VALUE *v;
+static unsigned long hash(CONF_VALUE *v)
{
return((lh_strhash(v->section)<<2)^lh_strhash(v->name));
}
{
return((lh_strhash(v->section)<<2)^lh_strhash(v->name));
}
-static int cmp(a,b)
-CONF_VALUE *a,*b;
+static int cmp(CONF_VALUE *a, CONF_VALUE *b)
{
int i;
{
int i;
@@
-681,8
+655,7
@@
CONF_VALUE *a,*b;
return((a->name == NULL)?-1:1);
}
return((a->name == NULL)?-1:1);
}
-static char *scan_quote(p)
-char *p;
+static char *scan_quote(char *p)
{
int q= *p;
{
int q= *p;
@@
-700,9
+673,7
@@
char *p;
return(p);
}
return(p);
}
-static CONF_VALUE *new_section(conf,section)
-LHASH *conf;
-char *section;
+static CONF_VALUE *new_section(LHASH *conf, char *section)
{
STACK *sk=NULL;
int ok=0,i;
{
STACK *sk=NULL;
int ok=0,i;