#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);
/* 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;
return(1);
}
-static int mem_free(a)
-BIO *a;
+static int mem_free(BIO *a)
{
if (a == NULL) return(0);
if (a->shutdown)
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;
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;
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;
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;
return(ret);
}
-static int mem_puts(bp,str)
-BIO *bp;
-char *str;
+static int mem_puts(BIO *bp, char *str)
{
int n,ret;