Ultrix compatibility.
[oweals/openssl.git] / crypto / bio / bss_file.c
index 1484cf849eed9d7fe2a104f4ac0c8ea378745a35..3ed5dab90427c79349f105688f6af34d02390b50 100644 (file)
@@ -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;
@@ -214,12 +198,14 @@ char *ptr;
 
        switch (cmd)
                {
+       case BIO_C_FILE_SEEK:
        case BIO_CTRL_RESET:
                ret=(long)fseek(fp,num,0);
                break;
        case BIO_CTRL_EOF:
                ret=(long)feof(fp);
                break;
+       case BIO_C_FILE_TELL:
        case BIO_CTRL_INFO:
                ret=ftell(fp);
                break;
@@ -307,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;
 
@@ -321,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;