Update dependencies.
[openssl.git] / crypto / bio / bss_mem.c
index 8a2efb938cd198a917bc88630dcfd97988a12c15..7e749a503ef370913b87c8675a062374470d5ad2 100644 (file)
@@ -59,9 +59,8 @@
 #include <stdio.h>
 #include <errno.h>
 #include "cryptlib.h"
-#include "bio.h"
+#include <openssl/bio.h>
 
-#ifndef NOPROTO
 static int mem_write(BIO *h,char *buf,int num);
 static int mem_read(BIO *h,char *buf,int size);
 static int mem_puts(BIO *h,char *str);
@@ -69,16 +68,6 @@ static int mem_gets(BIO *h,char *str,int size);
 static long mem_ctrl(BIO *h,int cmd,long arg1,char *arg2);
 static int mem_new(BIO *h);
 static int mem_free(BIO *data);
-#else
-static int mem_write();
-static int mem_read();
-static int mem_puts();
-static int mem_gets();
-static long mem_ctrl();
-static int mem_new();
-static int mem_free();
-#endif
-
 static BIO_METHOD mem_method=
        {
        BIO_TYPE_MEM,
@@ -95,13 +84,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 +102,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 +116,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 +145,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 +168,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 +234,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 +264,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;