Change #include filenames from <foo.h> to <openssl.h>.
[openssl.git] / crypto / bio / bf_null.c
index 9864f4a03cc500cad58d47da24a3d2bd94d681d8..c2e782f1ea7d01d21cec8139d531a7e0c8a56e08 100644 (file)
@@ -1,5 +1,5 @@
 /* crypto/bio/bf_null.c */
-/* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com)
+/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
  * All rights reserved.
  *
  * This package is an SSL implementation written
@@ -59,8 +59,8 @@
 #include <stdio.h>
 #include <errno.h>
 #include "cryptlib.h"
-#include "bio.h"
-#include "evp.h"
+#include <openssl/bio.h>
+#include <openssl/evp.h>
 
 /* BIO_put and BIO_get both add to the digest,
  * BIO_gets returns the digest */
@@ -85,7 +85,8 @@ static int nullf_free();
 
 static BIO_METHOD methods_nullf=
        {
-       BIO_TYPE_NULL_FILTER,"NULL filter",
+       BIO_TYPE_NULL_FILTER,
+       "NULL filter",
        nullf_write,
        nullf_read,
        nullf_puts,
@@ -95,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;
@@ -109,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;
@@ -119,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;
  
@@ -134,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;
 
@@ -149,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;
 
@@ -166,6 +155,7 @@ char *ptr;
                BIO_copy_next_retry(b);
                break;
        case BIO_CTRL_DUP:
+               ret=0L;
                break;
        default:
                ret=BIO_ctrl(b->next_bio,cmd,num,ptr);
@@ -173,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));