diff options
author | Ulf Möller <ulf@openssl.org> | 1999-04-19 21:31:43 +0000 |
---|---|---|
committer | Ulf Möller <ulf@openssl.org> | 1999-04-19 21:31:43 +0000 |
commit | 6b691a5c85ddc4e407e32781841fee5c029506cd (patch) | |
tree | 436f1127406e1cacfe83dfcbfff824d89c47d834 /crypto/md2 | |
parent | 3edd7ed15de229230f74c79c3d71e7c9c674cf4f (diff) | |
download | openssl-new-6b691a5c85ddc4e407e32781841fee5c029506cd.tar.gz |
Change functions to ANSI C.
Diffstat (limited to 'crypto/md2')
-rw-r--r-- | crypto/md2/md2.c | 10 | ||||
-rw-r--r-- | crypto/md2/md2_dgst.c | 18 | ||||
-rw-r--r-- | crypto/md2/md2_one.c | 5 | ||||
-rw-r--r-- | crypto/md2/md2test.c | 7 |
4 files changed, 11 insertions, 29 deletions
diff --git a/crypto/md2/md2.c b/crypto/md2/md2.c index 7f3ab64a43..8b34e1defb 100644 --- a/crypto/md2/md2.c +++ b/crypto/md2/md2.c @@ -74,9 +74,7 @@ int read(); void exit(); #endif -int main(argc, argv) -int argc; -char *argv[]; +int main(int argc, char *argv[]) { int i,err=0; FILE *IN; @@ -105,8 +103,7 @@ char *argv[]; return(err); } -void do_fp(f) -FILE *f; +void do_fp(FILE *f) { MD2_CTX c; unsigned char md[MD2_DIGEST_LENGTH]; @@ -125,8 +122,7 @@ FILE *f; pt(md); } -void pt(md) -unsigned char *md; +void pt(unsigned char *md) { int i; diff --git a/crypto/md2/md2_dgst.c b/crypto/md2/md2_dgst.c index a1eb553b35..c1a0b5e680 100644 --- a/crypto/md2/md2_dgst.c +++ b/crypto/md2/md2_dgst.c @@ -112,7 +112,7 @@ static MD2_INT S[256]={ 0xDB, 0x99, 0x8D, 0x33, 0x9F, 0x11, 0x83, 0x14, }; -const char *MD2_options() +const char *MD2_options(void) { if (sizeof(MD2_INT) == 1) return("md2(char)"); @@ -120,8 +120,7 @@ const char *MD2_options() return("md2(int)"); } -void MD2_Init(c) -MD2_CTX *c; +void MD2_Init(MD2_CTX *c) { c->num=0; memset(c->state,0,MD2_BLOCK*sizeof(MD2_INT)); @@ -129,10 +128,7 @@ MD2_CTX *c; memset(c->data,0,MD2_BLOCK); } -void MD2_Update(c, data, len) -MD2_CTX *c; -register unsigned char *data; -unsigned long len; +void MD2_Update(MD2_CTX *c, register unsigned char *data, unsigned long len) { register UCHAR *p; @@ -170,9 +166,7 @@ unsigned long len; c->num=(int)len; } -static void md2_block(c, d) -MD2_CTX *c; -unsigned char *d; +static void md2_block(MD2_CTX *c, unsigned char *d) { register MD2_INT t,*sp1,*sp2; register int i,j; @@ -208,9 +202,7 @@ unsigned char *d; memset(state,0,48*sizeof(MD2_INT)); } -void MD2_Final(md, c) -unsigned char *md; -MD2_CTX *c; +void MD2_Final(unsigned char *md, MD2_CTX *c) { int i,v; register UCHAR *cp; diff --git a/crypto/md2/md2_one.c b/crypto/md2/md2_one.c index 513bf62fdb..389c1f79f2 100644 --- a/crypto/md2/md2_one.c +++ b/crypto/md2/md2_one.c @@ -63,10 +63,7 @@ /* This is a separate file so that #defines in cryptlib.h can * map my MD functions to different names */ -unsigned char *MD2(d, n, md) -unsigned char *d; -unsigned long n; -unsigned char *md; +unsigned char *MD2(unsigned char *d, unsigned long n, unsigned char *md) { MD2_CTX c; static unsigned char m[MD2_DIGEST_LENGTH]; diff --git a/crypto/md2/md2test.c b/crypto/md2/md2test.c index 55924d44cd..688815dcfe 100644 --- a/crypto/md2/md2test.c +++ b/crypto/md2/md2test.c @@ -88,9 +88,7 @@ static char *pt(unsigned char *md); static char *pt(); #endif -int main(argc,argv) -int argc; -char *argv[]; +int main(int argc, char *argv[]) { int i,err=0; char **P,**R; @@ -118,8 +116,7 @@ char *argv[]; return(0); } -static char *pt(md) -unsigned char *md; +static char *pt(unsigned char *md) { int i; static char buf[80]; |