Get rid of more non-ANSI declarations.

This commit is contained in:
Ulf Möller
2000-05-15 22:54:43 +00:00
parent 0c109ea2cb
commit 0e1c06128a
33 changed files with 213 additions and 208 deletions

View File

@@ -74,12 +74,11 @@
const char *STACK_version="Stack" OPENSSL_VERSION_PTEXT;
#define FP_ICC (int (*)(const void *,const void *))
#include <errno.h>
int (*sk_set_cmp_func(STACK *sk, int (*c)()))(void)
int (*sk_set_cmp_func(STACK *sk, int (*c)(const void *,const void *)))(const void *, const void *)
{
int (*old)()=sk->comp;
int (*old)(const void *,const void *)=sk->comp;
if (sk->comp != c)
sk->sorted=0;
@@ -109,7 +108,7 @@ err:
return(NULL);
}
STACK *sk_new(int (*c)())
STACK *sk_new(int (*c)(const void *, const void *))
{
STACK *ret;
int i;
@@ -207,7 +206,7 @@ int sk_find(STACK *st, char *data)
{
char **r;
int i;
int (*comp_func)();
int (*comp_func)(const void *,const void *);
if(st == NULL) return -1;
if (st->comp == NULL)
@@ -219,9 +218,9 @@ int sk_find(STACK *st, char *data)
}
sk_sort(st);
if (data == NULL) return(-1);
comp_func=(int (*)())st->comp;
comp_func=st->comp;
r=(char **)bsearch(&data,(char *)st->data,
st->num,sizeof(char *),FP_ICC comp_func);
st->num,sizeof(char *), comp_func);
if (r == NULL) return(-1);
i=(int)(r-st->data);
for ( ; i>0; i--)
@@ -262,7 +261,7 @@ void sk_zero(STACK *st)
st->num=0;
}
void sk_pop_free(STACK *st, void (*func)())
void sk_pop_free(STACK *st, void (*func)(void *))
{
int i;
@@ -302,10 +301,10 @@ void sk_sort(STACK *st)
{
if (!st->sorted)
{
int (*comp_func)();
int (*comp_func)(const void *,const void *);
comp_func=(int (*)())st->comp;
qsort(st->data,st->num,sizeof(char *),FP_ICC comp_func);
comp_func=st->comp;
qsort(st->data,st->num,sizeof(char *), comp_func);
st->sorted=1;
}
}