aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/bio
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/bio')
-rw-r--r--crypto/bio/b_dump.c5
-rw-r--r--crypto/bio/b_sock.c54
-rw-r--r--crypto/bio/bf_buff.c33
-rw-r--r--crypto/bio/bf_nbio.c33
-rw-r--r--crypto/bio/bf_null.c33
-rw-r--r--crypto/bio/bio_cb.c9
-rw-r--r--crypto/bio/bio_err.c2
-rw-r--r--crypto/bio/bio_lib.c89
-rw-r--r--crypto/bio/bss_acpt.c43
-rw-r--r--crypto/bio/bss_conn.c43
-rw-r--r--crypto/bio/bss_file.c41
-rw-r--r--crypto/bio/bss_log.c23
-rw-r--r--crypto/bio/bss_mem.c33
-rw-r--r--crypto/bio/bss_null.c33
-rw-r--r--crypto/bio/bss_rtcp.c33
-rw-r--r--crypto/bio/bss_sock.c63
16 files changed, 150 insertions, 420 deletions
diff --git a/crypto/bio/b_dump.c b/crypto/bio/b_dump.c
index 5e05af5b0c..839dfeb15e 100644
--- a/crypto/bio/b_dump.c
+++ b/crypto/bio/b_dump.c
@@ -67,10 +67,7 @@
#define TRUNCATE
#define DUMP_WIDTH 16
-int BIO_dump(bio,s,len)
-BIO *bio;
-const char *s;
-int len;
+int BIO_dump(BIO *bio, const char *s, int len)
{
int ret=0;
char buf[160+1],tmp[20];
diff --git a/crypto/bio/b_sock.c b/crypto/bio/b_sock.c
index a1a37605e3..d14a7797fd 100644
--- a/crypto/bio/b_sock.c
+++ b/crypto/bio/b_sock.c
@@ -106,9 +106,7 @@ static void ghbn_free();
static struct hostent *ghbn_dup();
#endif
-int BIO_get_host_ip(str,ip)
-const char *str;
-unsigned char *ip;
+int BIO_get_host_ip(const char *str, unsigned char *ip)
{
int i;
struct hostent *he;
@@ -146,9 +144,7 @@ unsigned char *ip;
return(1);
}
-int BIO_get_port(str,port_ptr)
-const char *str;
-unsigned short *port_ptr;
+int BIO_get_port(const char *str, unsigned short *port_ptr)
{
int i;
struct servent *s;
@@ -197,8 +193,7 @@ unsigned short *port_ptr;
return(1);
}
-int BIO_sock_error(sock)
-int sock;
+int BIO_sock_error(int sock)
{
int j,i,size;
@@ -211,10 +206,7 @@ int sock;
return(j);
}
-long BIO_ghbn_ctrl(cmd,iarg,parg)
-int cmd;
-int iarg;
-char *parg;
+long BIO_ghbn_ctrl(int cmd, int iarg, char *parg)
{
int i;
char **p;
@@ -252,8 +244,7 @@ char *parg;
return(1);
}
-static struct hostent *ghbn_dup(a)
-struct hostent *a;
+static struct hostent *ghbn_dup(struct hostent *a)
{
struct hostent *ret;
int i,j;
@@ -305,8 +296,7 @@ err:
return(ret);
}
-static void ghbn_free(a)
-struct hostent *a;
+static void ghbn_free(struct hostent *a)
{
int i;
@@ -329,8 +319,7 @@ struct hostent *a;
Free(a);
}
-struct hostent *BIO_gethostbyname(name)
-const char *name;
+struct hostent *BIO_gethostbyname(const char *name)
{
struct hostent *ret;
int i,lowi=0,j;
@@ -385,7 +374,7 @@ const char *name;
return(ret);
}
-int BIO_sock_init()
+int BIO_sock_init(void)
{
#ifdef WINDOWS
static struct WSAData wsa_state;
@@ -411,7 +400,7 @@ int BIO_sock_init()
return(1);
}
-void BIO_sock_cleanup()
+void BIO_sock_cleanup(void)
{
#ifdef WINDOWS
if (wsa_init_done)
@@ -423,10 +412,7 @@ void BIO_sock_cleanup()
#endif
}
-int BIO_socket_ioctl(fd,type,arg)
-int fd;
-long type;
-unsigned long *arg;
+int BIO_socket_ioctl(int fd, long type, unsigned long *arg)
{
int i;
@@ -438,9 +424,7 @@ unsigned long *arg;
/* The reason I have implemented this instead of using sscanf is because
* Visual C 1.52c gives an unresolved external when linking a DLL :-( */
-static int get_ip(str,ip)
-const char *str;
-unsigned char ip[4];
+static int get_ip(const char *str, unsigned char ip[4])
{
unsigned int tmp[4];
int num=0,c,ok=0;
@@ -475,9 +459,7 @@ unsigned char ip[4];
return(1);
}
-int BIO_get_accept_socket(host,bind_mode)
-char *host;
-int bind_mode;
+int BIO_get_accept_socket(char *host, int bind_mode)
{
int ret=0;
struct sockaddr_in server,client;
@@ -604,9 +586,7 @@ err:
return(s);
}
-int BIO_accept(sock,addr)
-int sock;
-char **addr;
+int BIO_accept(int sock, char **addr)
{
int ret=INVALID_SOCKET;
static struct sockaddr_in from;
@@ -648,9 +628,7 @@ end:
return(ret);
}
-int BIO_set_tcp_ndelay(s,on)
-int s;
-int on;
+int BIO_set_tcp_ndelay(int s, int on)
{
int ret=0;
#if defined(TCP_NODELAY) && (defined(IPPROTO_TCP) || defined(SOL_TCP))
@@ -670,9 +648,7 @@ int on;
}
#endif
-int BIO_socket_nbio(s,mode)
-int s;
-int mode;
+int BIO_socket_nbio(int s, int mode)
{
int ret= -1;
unsigned long l;
diff --git a/crypto/bio/bf_buff.c b/crypto/bio/bf_buff.c
index afa9cd27b7..c0f591880c 100644
--- a/crypto/bio/bf_buff.c
+++ b/crypto/bio/bf_buff.c
@@ -95,13 +95,12 @@ static BIO_METHOD methods_buffer=
buffer_free,
};
-BIO_METHOD *BIO_f_buffer()
+BIO_METHOD *BIO_f_buffer(void)
{
return(&methods_buffer);
}
-static int buffer_new(bi)
-BIO *bi;
+static int buffer_new(BIO *bi)
{
BIO_F_BUFFER_CTX *ctx;
@@ -124,8 +123,7 @@ BIO *bi;
return(1);
}
-static int buffer_free(a)
-BIO *a;
+static int buffer_free(BIO *a)
{
BIO_F_BUFFER_CTX *b;
@@ -140,10 +138,7 @@ BIO *a;
return(1);
}
-static int buffer_read(b,out,outl)
-BIO *b;
-char *out;
-int outl;
+static int buffer_read(BIO *b, char *out, int outl)
{
int i,num=0;
BIO_F_BUFFER_CTX *ctx;
@@ -209,10 +204,7 @@ start:
goto start;
}
-static int buffer_write(b,in,inl)
-BIO *b;
-char *in;
-int inl;
+static int buffer_write(BIO *b, char *in, int inl)
{
int i,num=0;
BIO_F_BUFFER_CTX *ctx;
@@ -285,11 +277,7 @@ start:
goto start;
}
-static long buffer_ctrl(b,cmd,num,ptr)
-BIO *b;
-int cmd;
-long num;
-char *ptr;
+static long buffer_ctrl(BIO *b, int cmd, long num, char *ptr)
{
BIO *dbio;
BIO_F_BUFFER_CTX *ctx;
@@ -450,10 +438,7 @@ malloc_error:
return(0);
}
-static int buffer_gets(b,buf,size)
-BIO *b;
-char *buf;
-int size;
+static int buffer_gets(BIO *b, char *buf, int size)
{
BIO_F_BUFFER_CTX *ctx;
int num=0,i,flag;
@@ -504,9 +489,7 @@ int size;
}
}
-static int buffer_puts(b,str)
-BIO *b;
-char *str;
+static int buffer_puts(BIO *b, char *str)
{
return(BIO_write(b,str,strlen(str)));
}
diff --git a/crypto/bio/bf_nbio.c b/crypto/bio/bf_nbio.c
index 034b3024df..502973808c 100644
--- a/crypto/bio/bf_nbio.c
+++ b/crypto/bio/bf_nbio.c
@@ -104,13 +104,12 @@ static BIO_METHOD methods_nbiof=
nbiof_free,
};
-BIO_METHOD *BIO_f_nbio_test()
+BIO_METHOD *BIO_f_nbio_test(void)
{
return(&methods_nbiof);
}
-static int nbiof_new(bi)
-BIO *bi;
+static int nbiof_new(BIO *bi)
{
NBIO_TEST *nt;
@@ -123,8 +122,7 @@ BIO *bi;
return(1);
}
-static int nbiof_free(a)
-BIO *a;
+static int nbiof_free(BIO *a)
{
if (a == NULL) return(0);
if (a->ptr != NULL)
@@ -135,10 +133,7 @@ BIO *a;
return(1);
}
-static int nbiof_read(b,out,outl)
-BIO *b;
-char *out;
-int outl;
+static int nbiof_read(BIO *b, char *out, int outl)
{
NBIO_TEST *nt;
int ret=0;
@@ -173,10 +168,7 @@ int outl;
return(ret);
}
-static int nbiof_write(b,in,inl)
-BIO *b;
-char *in;
-int inl;
+static int nbiof_write(BIO *b, char *in, int inl)
{
NBIO_TEST *nt;
int ret=0;
@@ -221,11 +213,7 @@ int inl;
return(ret);
}
-static long nbiof_ctrl(b,cmd,num,ptr)
-BIO *b;
-int cmd;
-long num;
-char *ptr;
+static long nbiof_ctrl(BIO *b, int cmd, long num, char *ptr)
{
long ret;
@@ -247,19 +235,14 @@ char *ptr;
return(ret);
}
-static int nbiof_gets(bp,buf,size)
-BIO *bp;
-char *buf;
-int size;
+static int nbiof_gets(BIO *bp, char *buf, int size)
{
if (bp->next_bio == NULL) return(0);
return(BIO_gets(bp->next_bio,buf,size));
}
-static int nbiof_puts(bp,str)
-BIO *bp;
-char *str;
+static int nbiof_puts(BIO *bp, char *str)
{
if (bp->next_bio == NULL) return(0);
return(BIO_puts(bp->next_bio,str));
diff --git a/crypto/bio/bf_null.c b/crypto/bio/bf_null.c
index a47a65741a..8bbf353146 100644
--- a/crypto/bio/bf_null.c
+++ b/crypto/bio/bf_null.c
@@ -96,13 +96,12 @@ static BIO_METHOD methods_nullf=
nullf_free,
};
-BIO_METHOD *BIO_f_null()
+BIO_METHOD *BIO_f_null(void)
{
return(&methods_nullf);
}
-static int nullf_new(bi)
-BIO *bi;
+static int nullf_new(BIO *bi)
{
bi->init=1;
bi->ptr=NULL;
@@ -110,8 +109,7 @@ BIO *bi;
return(1);
}
-static int nullf_free(a)
-BIO *a;
+static int nullf_free(BIO *a)
{
if (a == NULL) return(0);
/* a->ptr=NULL;
@@ -120,10 +118,7 @@ BIO *a;
return(1);
}
-static int nullf_read(b,out,outl)
-BIO *b;
-char *out;
-int outl;
+static int nullf_read(BIO *b, char *out, int outl)
{
int ret=0;
@@ -135,10 +130,7 @@ int outl;
return(ret);
}
-static int nullf_write(b,in,inl)
-BIO *b;
-char *in;
-int inl;
+static int nullf_write(BIO *b, char *in, int inl)
{
int ret=0;
@@ -150,11 +142,7 @@ int inl;
return(ret);
}
-static long nullf_ctrl(b,cmd,num,ptr)
-BIO *b;
-int cmd;
-long num;
-char *ptr;
+static long nullf_ctrl(BIO *b, int cmd, long num, char *ptr)
{
long ret;
@@ -175,19 +163,14 @@ char *ptr;
return(ret);
}
-static int nullf_gets(bp,buf,size)
-BIO *bp;
-char *buf;
-int size;
+static int nullf_gets(BIO *bp, char *buf, int size)
{
if (bp->next_bio == NULL) return(0);
return(BIO_gets(bp->next_bio,buf,size));
}
-static int nullf_puts(bp,str)
-BIO *bp;
-char *str;
+static int nullf_puts(BIO *bp, char *str)
{
if (bp->next_bio == NULL) return(0);
return(BIO_puts(bp->next_bio,str));
diff --git a/crypto/bio/bio_cb.c b/crypto/bio/bio_cb.c
index 32ae7be499..a37d8b4c29 100644
--- a/crypto/bio/bio_cb.c
+++ b/crypto/bio/bio_cb.c
@@ -63,13 +63,8 @@
#include "bio.h"
#include "err.h"
-long MS_CALLBACK BIO_debug_callback(bio,cmd,argp,argi,argl,ret)
-BIO *bio;
-int cmd;
-const char *argp;
-int argi;
-long argl;
-long ret;
+long MS_CALLBACK BIO_debug_callback(BIO *bio, int cmd, const char *argp,
+ int argi, long argl, long ret)
{
BIO *b;
MS_STATIC char buf[256];
diff --git a/crypto/bio/bio_err.c b/crypto/bio/bio_err.c
index 8fad0ff730..78c41fdbef 100644
--- a/crypto/bio/bio_err.c
+++ b/crypto/bio/bio_err.c
@@ -116,7 +116,7 @@ static ERR_STRING_DATA BIO_str_reasons[]=
#endif
-void ERR_load_BIO_strings()
+void ERR_load_BIO_strings(void)
{
static int init=1;
diff --git a/crypto/bio/bio_lib.c b/crypto/bio/bio_lib.c
index fc18409e1d..9b2577d7a9 100644
--- a/crypto/bio/bio_lib.c
+++ b/crypto/bio/bio_lib.c
@@ -66,8 +66,7 @@
static STACK *bio_meth=NULL;
static int bio_meth_num=0;
-BIO *BIO_new(method)
-BIO_METHOD *method;
+BIO *BIO_new(BIO_METHOD *method)
{
BIO *ret=NULL;
@@ -85,9 +84,7 @@ BIO_METHOD *method;
return(ret);
}
-int BIO_set(bio,method)
-BIO *bio;
-BIO_METHOD *method;
+int BIO_set(BIO *bio, BIO_METHOD *method)
{
bio->method=method;
bio->callback=NULL;
@@ -110,8 +107,7 @@ BIO_METHOD *method;
return(1);
}
-int BIO_free(a)
-BIO *a;
+int BIO_free(BIO *a)
{
int ret=0,i;
@@ -141,10 +137,7 @@ BIO *a;
return(1);
}
-int BIO_read(b,out,outl)
-BIO *b;
-char *out;
-int outl;
+int BIO_read(BIO *b, char *out, int outl)
{
int i;
long (*cb)();
@@ -176,10 +169,7 @@ int outl;
return(i);
}
-int BIO_write(b,in,inl)
-BIO *b;
-const char *in;
-int inl;
+int BIO_write(BIO *b, const char *in, int inl)
{
int i;
long (*cb)();
@@ -220,9 +210,7 @@ int inl;
return(i);
}
-int BIO_puts(b,in)
-BIO *b;
-const char *in;
+int BIO_puts(BIO *b, const char *in)
{
int i;
long (*cb)();
@@ -253,10 +241,7 @@ const char *in;
return(i);
}
-int BIO_gets(b,in,inl)
-BIO *b;
-char *in;
-int inl;
+int BIO_gets(BIO *b, char *in, int inl)
{
int i;
long (*cb)();
@@ -287,11 +272,7 @@ int inl;
return(i);
}
-long BIO_int_ctrl(b,cmd,larg,iarg)
-BIO *b;
-int cmd;
-long larg;
-int iarg;
+long BIO_int_ctrl(BIO *b, int cmd, long larg, int iarg)
{
int i;
@@ -299,10 +280,7 @@ int iarg;
return(BIO_ctrl(b,cmd,larg,(char *)&i));
}
-char *BIO_ptr_ctrl(b,cmd,larg)
-BIO *b;
-int cmd;
-long larg;
+char *BIO_ptr_ctrl(BIO *b, int cmd, long larg)
{
char *p=NULL;
@@ -312,11 +290,7 @@ long larg;
return(p);
}
-long BIO_ctrl(b,cmd,larg,parg)
-BIO *b;
-int cmd;
-long larg;
-char *parg;
+long BIO_ctrl(BIO *b, int cmd, long larg, char *parg)
{
long ret;
long (*cb)();
@@ -344,8 +318,7 @@ char *parg;
}
/* put the 'bio' on the end of b's list of operators */
-BIO *BIO_push(b,bio)
-BIO *b,*bio;
+BIO *BIO_push(BIO *b, BIO *bio)
{
BIO *lb;
@@ -362,8 +335,7 @@ BIO *b,*bio;
}
/* Remove the first and return the rest */
-BIO *BIO_pop(b)
-BIO *b;
+BIO *BIO_pop(BIO *b)
{
BIO *ret;
@@ -381,9 +353,7 @@ BIO *b;
return(ret);
}
-BIO *BIO_get_retry_BIO(bio,reason)
-BIO *bio;
-int *reason;
+BIO *BIO_get_retry_BIO(BIO *bio, int *reason)
{
BIO *b,*last;
@@ -399,15 +369,12 @@ int *reason;
return(last);
}
-int BIO_get_retry_reason(bio)
-BIO *bio;
+int BIO_get_retry_reason(BIO *bio)
{
return(bio->retry_reason);
}
-BIO *BIO_find_type(bio,type)
-BIO *bio;
-int type;
+BIO *BIO_find_type(BIO *bio, int type)
{
int mt,mask;
@@ -429,8 +396,7 @@ int type;
return(NULL);
}
-void BIO_free_all(bio)
-BIO *bio;
+void BIO_free_all(BIO *bio)
{
BIO *b;
int ref;
@@ -446,8 +412,7 @@ BIO *bio;
}
}
-BIO *BIO_dup_chain(in)
-BIO *in;
+BIO *BIO_dup_chain(BIO *in)
{
BIO *ret=NULL,*eoc=NULL,*bio,*new;
@@ -491,36 +456,26 @@ err:
return(NULL);
}
-void BIO_copy_next_retry(b)
-BIO *b;
+void BIO_copy_next_retry(BIO *b)
{
BIO_set_flags(b,BIO_get_retry_flags(b->next_bio));
b->retry_reason=b->next_bio->retry_reason;
}
-int BIO_get_ex_new_index(argl,argp,new_func,dup_func,free_func)
-long argl;
-char *argp;
-int (*new_func)();
-int (*dup_func)();
-void (*free_func)();
+int BIO_get_ex_new_index(long argl, char *argp, int (*new_func)(),
+ int (*dup_func)(), void (*free_func)())
{
bio_meth_num++;
return(CRYPTO_get_ex_new_index(bio_meth_num-1,&bio_meth,
argl,argp,new_func,dup_func,free_func));
}
-int BIO_set_ex_data(bio,idx,data)
-BIO *bio;
-int idx;
-char *data;
+int BIO_set_ex_data(BIO *bio, int idx, char *data)
{
return(CRYPTO_set_ex_data(&(bio->ex_data),idx,data));
}
-char *BIO_get_ex_data(bio,idx)
-BIO *bio;
-int idx;
+char *BIO_get_ex_data(BIO *bio, int idx)
{
return(CRYPTO_get_ex_data(&(bio->ex_data),idx));
}
diff --git a/crypto/bio/bss_acpt.c b/crypto/bio/bss_acpt.c
index ecdd1709d1..a179dfa3dd 100644
--- a/crypto/bio/bss_acpt.c
+++ b/crypto/bio/bss_acpt.c
@@ -136,13 +136,12 @@ static BIO_METHOD methods_acceptp=
acpt_free,
};
-BIO_METHOD *BIO_s_accept()
+BIO_METHOD *BIO_s_accept(void)
{
return(&methods_acceptp);
}
-static int acpt_new(bi)
-BIO *bi;
+static int acpt_new(BIO *bi)
{
BIO_ACCEPT *ba;
@@ -157,7 +156,7 @@ BIO *bi;
return(1);
}
-BIO_ACCEPT *BIO_ACCEPT_new()
+BIO_ACCEPT *BIO_ACCEPT_new(void)
{
BIO_ACCEPT *ret;
@@ -170,8 +169,7 @@ BIO_ACCEPT *BIO_ACCEPT_new()
return(ret);
}
-void BIO_ACCEPT_free(a)
-BIO_ACCEPT *a;
+void BIO_ACCEPT_free(BIO_ACCEPT *a)
{
if(a == NULL)
return;
@@ -182,8 +180,7 @@ BIO_ACCEPT *a;
Free(a);
}
-static void acpt_close_socket(bio)
-BIO *bio;
+static void acpt_close_socket(BIO *bio)
{
BIO_ACCEPT *c;
@@ -197,8 +194,7 @@ BIO *bio;
}
}
-static int acpt_free(a)
-BIO *a;
+static int acpt_free(BIO *a)
{
BIO_ACCEPT *data;
@@ -216,9 +212,7 @@ BIO *a;
return(1);
}
-static int acpt_state(b,c)
-BIO *b;
-BIO_ACCEPT *c;
+static int acpt_state(BIO *b, BIO_ACCEPT *c)
{
BIO *bio=NULL,*dbio;
int s= -1;
@@ -309,10 +303,7 @@ err:
}
-static int acpt_read(b,out,outl)
-BIO *b;
-char *out;
-int outl;
+static int acpt_read(BIO *b, char *out, int outl)
{
int ret=0;
BIO_ACCEPT *data;
@@ -331,10 +322,7 @@ int outl;
return(ret);
}
-static int acpt_write(b,in,inl)
-BIO *b;
-char *in;
-int inl;
+static int acpt_write(BIO *b, char *in, int inl)
{
int ret;
BIO_ACCEPT *data;
@@ -353,11 +341,7 @@ int inl;
return(ret);
}
-static long acpt_ctrl(b,cmd,num,ptr)
-BIO *b;
-int cmd;
-long num;
-char *ptr;
+static long acpt_ctrl(BIO *b, int cmd, long num, char *ptr)
{
BIO *dbio;
int *ip;
@@ -471,9 +455,7 @@ char *ptr;
return(ret);
}
-static int acpt_puts(bp,str)
-BIO *bp;
-char *str;
+static int acpt_puts(BIO *bp, char *str)
{
int n,ret;
@@ -482,8 +464,7 @@ char *str;
return(ret);
}
-BIO *BIO_new_accept(str)
-char *str;
+BIO *BIO_new_accept(char *str)
{
BIO *ret;
diff --git a/crypto/bio/bss_conn.c b/crypto/bio/bss_conn.c
index 9c84057e1b..4c5c3c67a3 100644
--- a/crypto/bio/bss_conn.c
+++ b/crypto/bio/bss_conn.c
@@ -139,9 +139,7 @@ static BIO_METHOD methods_connectp=
conn_free,
};
-static int conn_state(b,c)
-BIO *b;
-BIO_CONNECT *c;
+static int conn_state(BIO *b, BIO_CONNECT *c)
{
int ret= -1,i;
unsigned long l;
@@ -334,7 +332,7 @@ end:
return(ret);
}
-BIO_CONNECT *BIO_CONNECT_new()
+BIO_CONNECT *BIO_CONNECT_new(void)
{
BIO_CONNECT *ret;
@@ -354,8 +352,7 @@ BIO_CONNECT *BIO_CONNECT_new()
return(ret);
}
-void BIO_CONNECT_free(a)
-BIO_CONNECT *a;
+void BIO_CONNECT_free(BIO_CONNECT *a)
{
if(a == NULL)
return;
@@ -367,13 +364,12 @@ BIO_CONNECT *a;
Free(a);
}
-BIO_METHOD *BIO_s_connect()
+BIO_METHOD *BIO_s_connect(void)
{
return(&methods_connectp);
}
-static int conn_new(bi)
-BIO *bi;
+static int conn_new(BIO *bi)
{
bi->init=0;
bi->num=INVALID_SOCKET;
@@ -384,8 +380,7 @@ BIO *bi;
return(1);
}
-static void conn_close_socket(bio)
-BIO *bio;
+static void conn_close_socket(BIO *bio)
{
BIO_CONNECT *c;
@@ -400,8 +395,7 @@ BIO *bio;
}
}
-static int conn_free(a)
-BIO *a;
+static int conn_free(BIO *a)
{
BIO_CONNECT *data;
@@ -419,10 +413,7 @@ BIO *a;
return(1);
}
-static int conn_read(b,out,outl)
-BIO *b;
-char *out;
-int outl;
+static int conn_read(BIO *b, char *out, int outl)
{
int ret=0;
BIO_CONNECT *data;
@@ -449,10 +440,7 @@ int outl;
return(ret);
}
-static int conn_write(b,in,inl)
-BIO *b;
-char *in;
-int inl;
+static int conn_write(BIO *b, char *in, int inl)
{
int ret;
BIO_CONNECT *data;
@@ -475,11 +463,7 @@ int inl;
return(ret);
}
-static long conn_ctrl(b,cmd,num,ptr)
-BIO *b;
-int cmd;
-long num;
-char *ptr;
+static long conn_ctrl(BIO *b, int cmd, long num, char *ptr)
{
BIO *dbio;
int *ip;
@@ -622,9 +606,7 @@ char *ptr;
return(ret);
}
-static int conn_puts(bp,str)
-BIO *bp;
-char *str;
+static int conn_puts(BIO *bp, char *str)
{
int n,ret;
@@ -633,8 +615,7 @@ char *str;
return(ret);
}
-BIO *BIO_new_connect(str)
-char *str;
+BIO *BIO_new_connect(char *str)
{
BIO *ret;
diff --git a/crypto/bio/bss_file.c b/crypto/bio/bss_file.c
index 5068a7ca0d..3ed5dab904 100644
--- a/crypto/bio/bss_file.c
+++ b/crypto/bio/bss_file.c
@@ -104,9 +104,7 @@ static BIO_METHOD methods_filep=
file_free,
};
-BIO *BIO_new_file(filename,mode)
-char *filename;
-char *mode;
+BIO *BIO_new_file(char *filename, char *mode)
{
BIO *ret;
FILE *file;
@@ -125,9 +123,7 @@ char *mode;
return(ret);
}
-BIO *BIO_new_fp(stream,close_flag)
-FILE *stream;
-int close_flag;
+BIO *BIO_new_fp(FILE *stream, int close_flag)
{
BIO *ret;
@@ -138,13 +134,12 @@ int close_flag;
return(ret);
}
-BIO_METHOD *BIO_s_file()
+BIO_METHOD *BIO_s_file(void)
{
return(&methods_filep);
}
-static int MS_CALLBACK file_new(bi)
-BIO *bi;
+static int MS_CALLBACK file_new(BIO *bi)
{
bi->init=0;
bi->num=0;
@@ -152,8 +147,7 @@ BIO *bi;
return(1);
}
-static int MS_CALLBACK file_free(a)
-BIO *a;
+static int MS_CALLBACK file_free(BIO *a)
{
if (a == NULL) return(0);
if (a->shutdown)
@@ -168,10 +162,7 @@ BIO *a;
return(1);
}
-static int MS_CALLBACK file_read(b,out,outl)
-BIO *b;
-char *out;
-int outl;
+static int MS_CALLBACK file_read(BIO *b, char *out, int outl)
{
int ret=0;
@@ -182,10 +173,7 @@ int outl;
return(ret);
}
-static int MS_CALLBACK file_write(b,in,inl)
-BIO *b;
-char *in;
-int inl;
+static int MS_CALLBACK file_write(BIO *b, char *in, int inl)
{
int ret=0;
@@ -201,11 +189,7 @@ int inl;
return(ret);
}
-static long MS_CALLBACK file_ctrl(b,cmd,num,ptr)
-BIO *b;
-int cmd;
-long num;
-char *ptr;
+static long MS_CALLBACK file_ctrl(BIO *b, int cmd, long num, char *ptr)
{
long ret=1;
FILE *fp=(FILE *)b->ptr;
@@ -309,10 +293,7 @@ char *ptr;
return(ret);
}
-static int MS_CALLBACK file_gets(bp,buf,size)
-BIO *bp;
-char *buf;
-int size;
+static int MS_CALLBACK file_gets(BIO *bp, char *buf, int size)
{
int ret=0;
@@ -323,9 +304,7 @@ int size;
return(ret);
}
-static int MS_CALLBACK file_puts(bp,str)
-BIO *bp;
-char *str;
+static int MS_CALLBACK file_puts(BIO *bp, char *str)
{
int n,ret;
diff --git a/crypto/bio/bss_log.c b/crypto/bio/bss_log.c
index 89afb0e11c..b89e6e09e1 100644
--- a/crypto/bio/bss_log.c
+++ b/crypto/bio/bss_log.c
@@ -105,13 +105,12 @@ static BIO_METHOD methods_slg=
slg_free,
};
-BIO_METHOD *BIO_s_log()
+BIO_METHOD *BIO_s_log(void)
{
return(&methods_slg);
}
-static int MS_CALLBACK slg_new(bi)
-BIO *bi;
+static int MS_CALLBACK slg_new(BIO *bi)
{
bi->init=1;
bi->num=0;
@@ -124,18 +123,14 @@ BIO *bi;
return(1);
}
-static int MS_CALLBACK slg_free(a)
-BIO *a;
+static int MS_CALLBACK slg_free(BIO *a)
{
if (a == NULL) return(0);
xcloselog(a);
return(1);
}
-static int MS_CALLBACK slg_write(b,in,inl)
-BIO *b;
-char *in;
-int inl;
+static int MS_CALLBACK slg_write(BIO *b, char *in, int inl)
{
int ret= inl;
char* buf= in;
@@ -192,11 +187,7 @@ int inl;
return(ret);
}
-static long MS_CALLBACK slg_ctrl(b,cmd,num,ptr)
-BIO *b;
-int cmd;
-long num;
-char *ptr;
+static long MS_CALLBACK slg_ctrl(BIO *b, int cmd, long num, char *ptr)
{
switch (cmd)
{
@@ -210,9 +201,7 @@ char *ptr;
return(0);
}
-static int MS_CALLBACK slg_puts(bp,str)
-BIO *bp;
-char *str;
+static int MS_CALLBACK slg_puts(BIO *bp, char *str)
{
int n,ret;
diff --git a/crypto/bio/bss_mem.c b/crypto/bio/bss_mem.c
index 8a2efb938c..893664777c 100644
--- a/crypto/bio/bss_mem.c
+++ b/crypto/bio/bss_mem.c
@@ -95,13 +95,12 @@ static BIO_METHOD mem_method=
/* bio->num is used to hold the value to return on 'empty', if it is
* 0, should_retry is not set */
-BIO_METHOD *BIO_s_mem()
+BIO_METHOD *BIO_s_mem(void)
{
return(&mem_method);
}
-static int mem_new(bi)
-BIO *bi;
+static int mem_new(BIO *bi)
{
BUF_MEM *b;
@@ -114,8 +113,7 @@ BIO *bi;
return(1);
}
-static int mem_free(a)
-BIO *a;
+static int mem_free(BIO *a)
{
if (a == NULL) return(0);
if (a->shutdown)
@@ -129,10 +127,7 @@ BIO *a;
return(1);
}
-static int mem_read(b,out,outl)
-BIO *b;
-char *out;
-int outl;
+static int mem_read(BIO *b, char *out, int outl)
{
int ret= -1;
BUF_MEM *bm;
@@ -161,10 +156,7 @@ int outl;
return(ret);
}
-static int mem_write(b,in,inl)
-BIO *b;
-char *in;
-int inl;
+static int mem_write(BIO *b, char *in, int inl)
{
int ret= -1;
int blen;
@@ -187,11 +179,7 @@ end:
return(ret);
}
-static long mem_ctrl(b,cmd,num,ptr)
-BIO *b;
-int cmd;
-long num;
-char *ptr;
+static long mem_ctrl(BIO *b, int cmd, long num, char *ptr)
{
long ret=1;
char **pptr;
@@ -257,10 +245,7 @@ char *ptr;
return(ret);
}
-static int mem_gets(bp,buf,size)
-BIO *bp;
-char *buf;
-int size;
+static int mem_gets(BIO *bp, char *buf, int size)
{
int i,j;
int ret= -1;
@@ -290,9 +275,7 @@ int size;
return(ret);
}
-static int mem_puts(bp,str)
-BIO *bp;
-char *str;
+static int mem_puts(BIO *bp, char *str)
{
int n,ret;
diff --git a/crypto/bio/bss_null.c b/crypto/bio/bss_null.c
index 0791a2471a..52f5da8b12 100644
--- a/crypto/bio/bss_null.c
+++ b/crypto/bio/bss_null.c
@@ -92,13 +92,12 @@ static BIO_METHOD null_method=
null_free,
};
-BIO_METHOD *BIO_s_null()
+BIO_METHOD *BIO_s_null(void)
{
return(&null_method);
}
-static int null_new(bi)
-BIO *bi;
+static int null_new(BIO *bi)
{
bi->init=1;
bi->num=0;
@@ -106,34 +105,23 @@ BIO *bi;
return(1);
}
-static int null_free(a)
-BIO *a;
+static int null_free(BIO *a)
{
if (a == NULL) return(0);
return(1);
}
-static int null_read(b,out,outl)
-BIO *b;
-char *out;
-int outl;
+static int null_read(BIO *b, char *out, int outl)
{
return(0);
}
-static int null_write(b,in,inl)
-BIO *b;
-char *in;
-int inl;
+static int null_write(BIO *b, char *in, int inl)
{
return(inl);
}
-static long null_ctrl(b,cmd,num,ptr)
-BIO *b;
-int cmd;
-long num;
-char *ptr;
+static long null_ctrl(BIO *b, int cmd, long num, char *ptr)
{
long ret=1;
@@ -159,17 +147,12 @@ char *ptr;
return(ret);
}
-static int null_gets(bp,buf,size)
-BIO *bp;
-char *buf;
-int size;
+static int null_gets(BIO *bp, char *buf, int size)
{
return(0);
}
-static int null_puts(bp,str)
-BIO *bp;
-char *str;
+static int null_puts(BIO *bp, char *str)
{
if (str == NULL) return(0);
return(strlen(str));
diff --git a/crypto/bio/bss_rtcp.c b/crypto/bio/bss_rtcp.c
index 6eb434dee8..e07958cd77 100644
--- a/crypto/bio/bss_rtcp.c
+++ b/crypto/bio/bss_rtcp.c
@@ -107,7 +107,7 @@ static BIO_METHOD rtcp_method=
rtcp_free,
};
-BIO_METHOD *BIO_s_rtcp()
+BIO_METHOD *BIO_s_rtcp(void)
{
return(&rtcp_method);
}
@@ -136,8 +136,7 @@ static int put ( io_channel chan, char *buffer, int length )
}
/***************************************************************************/
-static int rtcp_new(bi)
-BIO *bi;
+static int rtcp_new(BIO *bi)
{
struct rpc_ctx *ctx;
bi->init=1;
@@ -150,8 +149,7 @@ BIO *bi;
return(1);
}
-static int rtcp_free(a)
-BIO *a;
+static int rtcp_free(BIO *a)
{
if (a == NULL) return(0);
if ( a->ptr ) Free ( a->ptr );
@@ -159,10 +157,7 @@ BIO *a;
return(1);
}
-static int rtcp_read(b,out,outl)
-BIO *b;
-char *out;
-int outl;
+static int rtcp_read(BIO *b, char *out, int outl)
{
int status, length;
struct rpc_ctx *ctx;
@@ -209,10 +204,7 @@ int outl;
return length;
}
-static int rtcp_write(b,in,inl)
-BIO *b;
-char *in;
-int inl;
+static int rtcp_write(BIO *b, char *in, int inl)
{
int status, i, segment, length;
struct rpc_ctx *ctx;
@@ -241,11 +233,7 @@ int inl;
return(i);
}
-static long rtcp_ctrl(b,cmd,num,ptr)
-BIO *b;
-int cmd;
-long num;
-char *ptr;
+static long rtcp_ctrl(BIO *b, int cmd, long num, char *ptr)
{
long ret=1;
@@ -276,17 +264,12 @@ char *ptr;
return(ret);
}
-static int rtcp_gets(bp,buf,size)
-BIO *bp;
-char *buf;
-int size;
+static int rtcp_gets(BIO *bp, char *buf, int size)
{
return(0);
}
-static int rtcp_puts(bp,str)
-BIO *bp;
-char *str;
+static int rtcp_puts(BIO *bp, char *str)
{
int length;
if (str == NULL) return(0);
diff --git a/crypto/bio/bss_sock.c b/crypto/bio/bss_sock.c
index cfd2f11992..049606ee5d 100644
--- a/crypto/bio/bss_sock.c
+++ b/crypto/bio/bss_sock.c
@@ -118,7 +118,7 @@ static BIO_METHOD methods_sockp=
sock_free,
};
-BIO_METHOD *BIO_s_socket()
+BIO_METHOD *BIO_s_socket(void)
{
return(&methods_sockp);
}
@@ -135,19 +135,17 @@ static BIO_METHOD methods_fdp=
fd_free,
};
-BIO_METHOD *BIO_s_fd()
+BIO_METHOD *BIO_s_fd(void)
{
return(&methods_fdp);
}
#endif
#ifndef BIO_FD
-BIO *BIO_new_socket(fd,close_flag)
+BIO *BIO_new_socket(int fd, int close_flag)
#else
-BIO *BIO_new_fd(fd,close_flag)
+BIO *BIO_new_fd(int fd,int close_flag)
#endif
-int fd;
-int close_flag;
{
BIO *ret;
@@ -162,11 +160,10 @@ int close_flag;
}
#ifndef BIO_FD
-static int sock_new(bi)
+static int sock_new(BIO *bi)
#else
-static int fd_new(bi)
+static int fd_new(BIO *bi)
#endif
-BIO *bi;
{
bi->init=0;
bi->num=0;
@@ -176,11 +173,10 @@ BIO *bi;
}
#ifndef BIO_FD
-static int sock_free(a)
+static int sock_free(BIO *a)
#else
-static int fd_free(a)
+static int fd_free(BIO *a)
#endif
-BIO *a;
{
if (a == NULL) return(0);
if (a->shutdown)
@@ -202,13 +198,10 @@ BIO *a;
}
#ifndef BIO_FD
-static int sock_read(b,out,outl)
+static int sock_read(BIO *b, char *out, int outl)
#else
-static int fd_read(b,out,outl)
+static int fd_read(BIO *b, char *out,int outl)
#endif
-BIO *b;
-char *out;
-int outl;
{
int ret=0;
@@ -236,13 +229,10 @@ int outl;
}
#ifndef BIO_FD
-static int sock_write(b,in,inl)
+static int sock_write(BIO *b, char *in, int inl)
#else
-static int fd_write(b,in,inl)
+static int fd_write(BIO *b, char *in, int inl)
#endif
-BIO *b;
-char *in;
-int inl;
{
int ret;
@@ -267,14 +257,10 @@ int inl;
}
#ifndef BIO_FD
-static long sock_ctrl(b,cmd,num,ptr)
+static long sock_ctrl(BIO *b, int cmd, long num, char *ptr)
#else
-static long fd_ctrl(b,cmd,num,ptr)
+static long fd_ctrl(BIO *b, int cmd, long num, char *ptr)
#endif
-BIO *b;
-int cmd;
-long num;
-char *ptr;
{
long ret=1;
int *ip;
@@ -340,22 +326,17 @@ char *ptr;
}
#ifdef undef
-static int sock_gets(bp,buf,size)
-BIO *bp;
-char *buf;
-int size;
+static int sock_gets(BIO *bp, char *buf,int size)
{
return(-1);
}
#endif
#ifndef BIO_FD
-static int sock_puts(bp,str)
+static int sock_puts(BIO *bp, char *str)
#else
-static int fd_puts(bp,str)
+static int fd_puts(BIO *bp, char *str)
#endif
-BIO *bp;
-char *str;
{
int n,ret;
@@ -369,11 +350,10 @@ char *str;
}
#ifndef BIO_FD
-int BIO_sock_should_retry(i)
+int BIO_sock_should_retry(int i)
#else
-int BIO_fd_should_retry(i)
+int BIO_fd_should_retry(int i)
#endif
-int i;
{
int err;
@@ -400,11 +380,10 @@ int i;
}
#ifndef BIO_FD
-int BIO_sock_non_fatal_error(err)
+int BIO_sock_non_fatal_error(int err)
#else
-int BIO_fd_non_fatal_error(err)
+int BIO_fd_non_fatal_error(int err)
#endif
-int err;
{
switch (err)
{