ec/ecp_nistz256.c: harmonize with latest indent script.
[oweals/openssl.git] / crypto / bio / bf_null.c
index 0d183a6d9a46796e0b1d2000cb30795a9576144a..e179e6d0f5f155a0492514859d1129c7d994e251 100644 (file)
 #include <errno.h>
 #include "cryptlib.h"
 #include <openssl/bio.h>
-#include <openssl/evp.h>
 
 /* BIO_put and BIO_get both add to the digest,
  * BIO_gets returns the digest */
 
-static int nullf_write(BIO *h,char *buf,int num);
-static int nullf_read(BIO *h,char *buf,int size);
-static int nullf_puts(BIO *h,char *str);
-static int nullf_gets(BIO *h,char *str,int size);
-static long nullf_ctrl(BIO *h,int cmd,long arg1,char *arg2);
+static int nullf_write(BIO *h, const char *buf, int num);
+static int nullf_read(BIO *h, char *buf, int size);
+static int nullf_puts(BIO *h, const char *str);
+static int nullf_gets(BIO *h, char *str, int size);
+static long nullf_ctrl(BIO *h, int cmd, long arg1, void *arg2);
 static int nullf_new(BIO *h);
 static int nullf_free(BIO *data);
-static long nullf_callback_ctrl(BIO *h,int cmd,void (*fp)());
+static long nullf_callback_ctrl(BIO *h, int cmd, bio_info_cb *fp);
 static BIO_METHOD methods_nullf=
        {
        BIO_TYPE_NULL_FILTER,
@@ -103,9 +102,11 @@ static int nullf_new(BIO *bi)
 static int nullf_free(BIO *a)
        {
        if (a == NULL) return(0);
-/*     a->ptr=NULL;
+       /*-
+       a->ptr=NULL;
        a->init=0;
-       a->flags=0;*/
+       a->flags=0;
+       */
        return(1);
        }
        
@@ -121,7 +122,7 @@ static int nullf_read(BIO *b, char *out, int outl)
        return(ret);
        }
 
-static int nullf_write(BIO *b, char *in, int inl)
+static int nullf_write(BIO *b, const char *in, int inl)
        {
        int ret=0;
 
@@ -133,7 +134,7 @@ static int nullf_write(BIO *b, char *in, int inl)
        return(ret);
        }
 
-static long nullf_ctrl(BIO *b, int cmd, long num, char *ptr)
+static long nullf_ctrl(BIO *b, int cmd, long num, void *ptr)
        {
        long ret;
 
@@ -154,7 +155,7 @@ static long nullf_ctrl(BIO *b, int cmd, long num, char *ptr)
        return(ret);
        }
 
-static long nullf_callback_ctrl(BIO *b, int cmd, void (*fp)())
+static long nullf_callback_ctrl(BIO *b, int cmd, bio_info_cb *fp)
        {
        long ret=1;
 
@@ -175,7 +176,7 @@ static int nullf_gets(BIO *bp, char *buf, int size)
        }
 
 
-static int nullf_puts(BIO *bp, char *str)
+static int nullf_puts(BIO *bp, const char *str)
        {
        if (bp->next_bio == NULL) return(0);
        return(BIO_puts(bp->next_bio,str));