From 6b691a5c85ddc4e407e32781841fee5c029506cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ulf=20M=C3=B6ller?= Date: Mon, 19 Apr 1999 21:31:43 +0000 Subject: Change functions to ANSI C. --- crypto/comp/c_rle.c | 18 +++++------------- crypto/comp/c_zlib.c | 25 +++++++------------------ crypto/comp/comp_err.c | 2 +- crypto/comp/comp_lib.c | 22 ++++++---------------- 4 files changed, 19 insertions(+), 48 deletions(-) (limited to 'crypto/comp') diff --git a/crypto/comp/c_rle.c b/crypto/comp/c_rle.c index b8b9b3e1bc..32fa05fa9a 100644 --- a/crypto/comp/c_rle.c +++ b/crypto/comp/c_rle.c @@ -19,17 +19,13 @@ static COMP_METHOD rle_method={ NULL, }; -COMP_METHOD *COMP_rle() +COMP_METHOD *COMP_rle(void) { return(&rle_method); } -static int rle_compress_block(ctx,out,olen,in,ilen) -COMP_CTX *ctx; -unsigned char *out; -unsigned int olen; -unsigned char *in; -unsigned int ilen; +static int rle_compress_block(COMP_CTX *ctx, unsigned char *out, + unsigned int olen, unsigned char *in, unsigned int ilen) { /* int i; */ @@ -44,12 +40,8 @@ unsigned int ilen; return(ilen+1); } -static int rle_expand_block(ctx,out,olen,in,ilen) -COMP_CTX *ctx; -unsigned char *out; -unsigned int olen; -unsigned char *in; -unsigned int ilen; +static int rle_expand_block(COMP_CTX *ctx, unsigned char *out, + unsigned int olen, unsigned char *in, unsigned int ilen) { int i; diff --git a/crypto/comp/c_zlib.c b/crypto/comp/c_zlib.c index 35ab0c63dc..49be818dc7 100644 --- a/crypto/comp/c_zlib.c +++ b/crypto/comp/c_zlib.c @@ -40,12 +40,8 @@ static COMP_METHOD zlib_method={ NULL, }; -static int zlib_compress_block(ctx,out,olen,in,ilen) -COMP_CTX *ctx; -unsigned char *out; -unsigned int olen; -unsigned char *in; -unsigned int ilen; +static int zlib_compress_block(COMP_CTX *ctx, unsigned char *out, + unsigned int olen, unsigned char *in, unsigned int ilen) { unsigned long l; int i; @@ -74,12 +70,8 @@ fprintf(stderr,"compress(%4d)->%4d %s\n",ilen,(int)l,(clear)?"clear":"zlib"); return((int)l); } -static int zlib_expand_block(ctx,out,olen,in,ilen) -COMP_CTX *ctx; -unsigned char *out; -unsigned int olen; -unsigned char *in; -unsigned int ilen; +static int zlib_expand_block(COMP_CTX *ctx, unsigned char *out, + unsigned int olen, unsigned char *in, unsigned int ilen) { unsigned long l; int i; @@ -100,11 +92,8 @@ unsigned int ilen; return((int)l); } -static int zz_uncompress (dest, destLen, source, sourceLen) - Bytef *dest; - uLongf *destLen; - const Bytef *source; - uLong sourceLen; +static int zz_uncompress (Bytef *dest, uLongf *destLen, const Bytef *source, + uLong sourceLen) { z_stream stream; int err; @@ -137,7 +126,7 @@ static int zz_uncompress (dest, destLen, source, sourceLen) #endif -COMP_METHOD *COMP_zlib() +COMP_METHOD *COMP_zlib(void) { return(&zlib_method); } diff --git a/crypto/comp/comp_err.c b/crypto/comp/comp_err.c index e6881591d4..3202068b0e 100644 --- a/crypto/comp/comp_err.c +++ b/crypto/comp/comp_err.c @@ -63,7 +63,7 @@ #ifndef NO_ERR #endif -void ERR_load__strings() +void ERR_load__strings(void) { static int init=1; diff --git a/crypto/comp/comp_lib.c b/crypto/comp/comp_lib.c index dcacb5557d..dec3b1fc77 100644 --- a/crypto/comp/comp_lib.c +++ b/crypto/comp/comp_lib.c @@ -4,8 +4,7 @@ #include "objects.h" #include "comp.h" -COMP_CTX *COMP_CTX_new(meth) -COMP_METHOD *meth; +COMP_CTX *COMP_CTX_new(COMP_METHOD *meth) { COMP_CTX *ret; @@ -28,8 +27,7 @@ COMP_METHOD *meth; return(ret); } -void COMP_CTX_free(ctx) -COMP_CTX *ctx; +void COMP_CTX_free(COMP_CTX *ctx) { /* CRYPTO_free_ex_data(rsa_meth,(char *)ctx,&ctx->ex_data); */ @@ -42,12 +40,8 @@ COMP_CTX *ctx; Free(ctx); } -int COMP_compress_block(ctx,out,olen,in,ilen) -COMP_CTX *ctx; -unsigned char *out; -int olen; -unsigned char *in; -int ilen; +int COMP_compress_block(COMP_CTX *ctx, unsigned char *out, int olen, + unsigned char *in, int ilen) { int ret; if (ctx->meth->compress == NULL) @@ -64,12 +58,8 @@ int ilen; return(ret); } -int COMP_expand_block(ctx,out,olen,in,ilen) -COMP_CTX *ctx; -unsigned char *out; -int olen; -unsigned char *in; -int ilen; +int COMP_expand_block(COMP_CTX *ctx, unsigned char *out, int olen, + unsigned char *in, int ilen) { int ret; -- cgit v1.2.3