Remove NOPROTO definitions and error code comments.
[openssl.git] / crypto / evp / bio_enc.c
index e1443d684da113484ffe17a09068de318f934f08..0a7b1ecf07cb11309e1321992c494daeea1649b2 100644 (file)
 #include <stdio.h>
 #include <errno.h>
 #include "cryptlib.h"
-#include "buffer.h"
-#include "evp.h"
+#include <openssl/buffer.h>
+#include <openssl/evp.h>
 
-#ifndef NOPROTO
 static int enc_write(BIO *h,char *buf,int num);
 static int enc_read(BIO *h,char *buf,int size);
 /*static int enc_puts(BIO *h,char *str); */
@@ -70,16 +69,6 @@ static int enc_read(BIO *h,char *buf,int size);
 static long enc_ctrl(BIO *h,int cmd,long arg1,char *arg2);
 static int enc_new(BIO *h);
 static int enc_free(BIO *data);
-#else
-static int enc_write();
-static int enc_read();
-/*static int enc_puts(); */
-/*static int enc_gets(); */
-static long enc_ctrl();
-static int enc_new();
-static int enc_free();
-#endif
-
 #define ENC_BLOCK_SIZE (1024*4)
 
 typedef struct enc_struct
@@ -105,13 +94,12 @@ static BIO_METHOD methods_enc=
        enc_free,
        };
 
-BIO_METHOD *BIO_f_cipher()
+BIO_METHOD *BIO_f_cipher(void)
        {
        return(&methods_enc);
        }
 
-static int enc_new(bi)
-BIO *bi;
+static int enc_new(BIO *bi)
        {
        BIO_ENC_CTX *ctx;
 
@@ -131,8 +119,7 @@ BIO *bi;
        return(1);
        }
 
-static int enc_free(a)
-BIO *a;
+static int enc_free(BIO *a)
        {
        BIO_ENC_CTX *b;
 
@@ -147,10 +134,7 @@ BIO *a;
        return(1);
        }
        
-static int enc_read(b,out,outl)
-BIO *b;
-char *out;
-int outl;
+static int enc_read(BIO *b, char *out, int outl)
        {
        int ret=0,i;
        BIO_ENC_CTX *ctx;
@@ -230,10 +214,7 @@ int outl;
        return((ret == 0)?ctx->cont:ret);
        }
 
-static int enc_write(b,in,inl)
-BIO *b;
-char *in;
-int inl;
+static int enc_write(BIO *b, char *in, int inl)
        {
        int ret=0,n,i;
        BIO_ENC_CTX *ctx;
@@ -288,11 +269,7 @@ int inl;
        return(ret);
        }
 
-static long enc_ctrl(b,cmd,num,ptr)
-BIO *b;
-int cmd;
-long num;
-char *ptr;
+static long enc_ctrl(BIO *b, int cmd, long num, char *ptr)
        {
        BIO *dbio;
        BIO_ENC_CTX *ctx,*dctx;
@@ -403,12 +380,8 @@ EVP_CIPHER_ctx *c;
        }
 */
 
-void BIO_set_cipher(b,c,k,i,e)
-BIO *b;
-const EVP_CIPHER *c;
-unsigned char *k;
-unsigned char *i;
-int e;
+void BIO_set_cipher(BIO *b, const EVP_CIPHER *c, unsigned char *k,
+            unsigned char *i, int e)
        {
        BIO_ENC_CTX *ctx;