diff options
author | Ulf Möller <ulf@openssl.org> | 1999-04-19 21:31:43 +0000 |
---|---|---|
committer | Ulf Möller <ulf@openssl.org> | 1999-04-19 21:31:43 +0000 |
commit | 6b691a5c85ddc4e407e32781841fee5c029506cd (patch) | |
tree | 436f1127406e1cacfe83dfcbfff824d89c47d834 /crypto/lhash | |
parent | 3edd7ed15de229230f74c79c3d71e7c9c674cf4f (diff) |
Change functions to ANSI C.
Diffstat (limited to 'crypto/lhash')
-rw-r--r-- | crypto/lhash/lh_stats.c | 36 | ||||
-rw-r--r-- | crypto/lhash/lhash.c | 42 |
2 files changed, 20 insertions, 58 deletions
diff --git a/crypto/lhash/lh_stats.c b/crypto/lhash/lh_stats.c index 23fe82f777..44ddff56c4 100644 --- a/crypto/lhash/lh_stats.c +++ b/crypto/lhash/lh_stats.c @@ -67,9 +67,7 @@ #ifndef HEADER_BIO_H -void lh_stats(lh, out) -LHASH *lh; -FILE *out; +void lh_stats(LHASH *lh, FILE *out) { fprintf(out,"num_items = %lu\n",lh->num_items); fprintf(out,"num_nodes = %u\n",lh->num_nodes); @@ -95,9 +93,7 @@ FILE *out; #endif } -void lh_node_stats(lh, out) -LHASH *lh; -FILE *out; +void lh_node_stats(LHASH *lh, FILE *out) { LHASH_NODE *n; unsigned int i,num; @@ -110,9 +106,7 @@ FILE *out; } } -void lh_node_usage_stats(lh, out) -LHASH *lh; -FILE *out; +void lh_node_usage_stats(LHASH *lh, FILE *out) { LHASH_NODE *n; unsigned long num; @@ -142,9 +136,7 @@ FILE *out; #else #ifndef NO_FP_API -void lh_stats(lh,fp) -LHASH *lh; -FILE *fp; +void lh_stats(LHASH *lh, FILE *fp) { BIO *bp; @@ -156,9 +148,7 @@ FILE *fp; end:; } -void lh_node_stats(lh,fp) -LHASH *lh; -FILE *fp; +void lh_node_stats(LHASH *lh, FILE *fp) { BIO *bp; @@ -170,9 +160,7 @@ FILE *fp; end:; } -void lh_node_usage_stats(lh,fp) -LHASH *lh; -FILE *fp; +void lh_node_usage_stats(LHASH *lh, FILE *fp) { BIO *bp; @@ -186,9 +174,7 @@ end:; #endif -void lh_stats_bio(lh, out) -LHASH *lh; -BIO *out; +void lh_stats_bio(LHASH *lh, BIO *out) { char buf[128]; @@ -236,9 +222,7 @@ BIO *out; #endif } -void lh_node_stats_bio(lh, out) -LHASH *lh; -BIO *out; +void lh_node_stats_bio(LHASH *lh, BIO *out) { LHASH_NODE *n; unsigned int i,num; @@ -253,9 +237,7 @@ BIO *out; } } -void lh_node_usage_stats_bio(lh, out) -LHASH *lh; -BIO *out; +void lh_node_usage_stats_bio(LHASH *lh, BIO *out) { LHASH_NODE *n; unsigned long num; diff --git a/crypto/lhash/lhash.c b/crypto/lhash/lhash.c index cd56515df7..29e091525c 100644 --- a/crypto/lhash/lhash.c +++ b/crypto/lhash/lhash.c @@ -125,9 +125,7 @@ static LHASH_NODE **getrn(); #endif -LHASH *lh_new(h, c) -unsigned long (*h)(); -int (*c)(); +LHASH *lh_new(unsigned long (*h)(), int (*c)()) { LHASH *ret; int i; @@ -170,8 +168,7 @@ err0: return(NULL); } -void lh_free(lh) -LHASH *lh; +void lh_free(LHASH *lh) { unsigned int i; LHASH_NODE *n,*nn; @@ -193,9 +190,7 @@ LHASH *lh; Free((char *)lh); } -char *lh_insert(lh, data) -LHASH *lh; -char *data; +char *lh_insert(LHASH *lh, char *data) { unsigned long hash; LHASH_NODE *nn,**rn; @@ -233,9 +228,7 @@ char *data; return(ret); } -char *lh_delete(lh, data) -LHASH *lh; -char *data; +char *lh_delete(LHASH *lh, char *data) { unsigned long hash; LHASH_NODE *nn,**rn; @@ -266,9 +259,7 @@ char *data; return(ret); } -char *lh_retrieve(lh, data) -LHASH *lh; -char *data; +char *lh_retrieve(LHASH *lh, char *data) { unsigned long hash; LHASH_NODE **rn; @@ -290,17 +281,12 @@ char *data; return(ret); } -void lh_doall(lh, func) -LHASH *lh; -void (*func)(); +void lh_doall(LHASH *lh, void (*func)()) { lh_doall_arg(lh,func,NULL); } -void lh_doall_arg(lh, func, arg) -LHASH *lh; -void (*func)(); -char *arg; +void lh_doall_arg(LHASH *lh, void (*func)(), char *arg) { int i; LHASH_NODE *a,*n; @@ -321,8 +307,7 @@ char *arg; } } -static void expand(lh) -LHASH *lh; +static void expand(LHASH *lh) { LHASH_NODE **n,**n1,**n2,*np; unsigned int p,i,j; @@ -378,8 +363,7 @@ LHASH *lh; } } -static void contract(lh) -LHASH *lh; +static void contract(LHASH *lh) { LHASH_NODE **n,*n1,*np; @@ -418,10 +402,7 @@ LHASH *lh; } } -static LHASH_NODE **getrn(lh, data, rhash) -LHASH *lh; -char *data; -unsigned long *rhash; +static LHASH_NODE **getrn(LHASH *lh, char *data, unsigned long *rhash) { LHASH_NODE **ret,*n1; unsigned long hash,nn; @@ -475,8 +456,7 @@ char *str; * no collisions on /usr/dict/words and it distributes on %2^n quite * well, not as good as MD5, but still good. */ -unsigned long lh_strhash(c) -const char *c; +unsigned long lh_strhash(const char *c) { unsigned long ret=0; long n; |