Change functions to ANSI C.
[openssl.git] / crypto / evp / e_cbc_r2.c
index 57d46129b615566398c4d4439d3b5605974fe183..b30ff665924dcd722e38662a0ce98f94e90a47fe 100644 (file)
@@ -126,26 +126,23 @@ static EVP_CIPHER r2_40_cbc_cipher=
        rc2_get_asn1_type_and_iv,
        };
 
-EVP_CIPHER *EVP_rc2_cbc()
+EVP_CIPHER *EVP_rc2_cbc(void)
        {
        return(&r2_cbc_cipher);
        }
 
-EVP_CIPHER *EVP_rc2_64_cbc()
+EVP_CIPHER *EVP_rc2_64_cbc(void)
        {
        return(&r2_64_cbc_cipher);
        }
 
-EVP_CIPHER *EVP_rc2_40_cbc()
+EVP_CIPHER *EVP_rc2_40_cbc(void)
        {
        return(&r2_40_cbc_cipher);
        }
        
-static void rc2_cbc_init_key(ctx,key,iv,enc)
-EVP_CIPHER_CTX *ctx;
-unsigned char *key;
-unsigned char *iv;
-int enc;
+static void rc2_cbc_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key,
+            unsigned char *iv, int enc)
        {
        if (iv != NULL)
                memcpy(&(ctx->oiv[0]),iv,8);
@@ -155,11 +152,8 @@ int enc;
                        key,EVP_CIPHER_CTX_key_length(ctx)*8);
        }
 
-static void rc2_cbc_cipher(ctx,out,in,inl)
-EVP_CIPHER_CTX *ctx;
-unsigned char *out;
-unsigned char *in;
-unsigned int inl;
+static void rc2_cbc_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
+            unsigned char *in, unsigned int inl)
        {
        RC2_cbc_encrypt(
                in,out,(long)inl,
@@ -167,8 +161,7 @@ unsigned int inl;
                ctx->encrypt);
        }
 
-static int rc2_meth_to_magic(e)
-const EVP_CIPHER *e;
+static int rc2_meth_to_magic(const EVP_CIPHER *e)
        {
        int i;
 
@@ -179,8 +172,7 @@ const EVP_CIPHER *e;
        else return(0);
        }
 
-static EVP_CIPHER *rc2_magic_to_meth(i)
-int i;
+static EVP_CIPHER *rc2_magic_to_meth(int i)
        {
        if      (i == RC2_128_MAGIC) return(EVP_rc2_cbc());
        else if (i == RC2_64_MAGIC)  return(EVP_rc2_64_cbc());
@@ -192,9 +184,7 @@ int i;
                }
        }
 
-static int rc2_get_asn1_type_and_iv(c,type)
-EVP_CIPHER_CTX *c;
-ASN1_TYPE *type;
+static int rc2_get_asn1_type_and_iv(EVP_CIPHER_CTX *c, ASN1_TYPE *type)
        {
        long num=0;
        int i=0,l;
@@ -220,9 +210,7 @@ ASN1_TYPE *type;
        return(i);
        }
 
-static int rc2_set_asn1_type_and_iv(c,type)
-EVP_CIPHER_CTX *c;
-ASN1_TYPE *type;
+static int rc2_set_asn1_type_and_iv(EVP_CIPHER_CTX *c, ASN1_TYPE *type)
        {
        long num;
        int i=0,j;