From 4cec7e8e35af8dda5d8044f7cf87dd863d8b6b13 Mon Sep 17 00:00:00 2001 From: nobu Date: Tue, 31 May 2016 16:49:32 +0000 Subject: crypt.c: protoize * missing/crypt.c: protoize function definitions and make always-zero functions void. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55232 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- missing/crypt.c | 84 +++++++++++++++++++++------------------------------------ 1 file changed, 30 insertions(+), 54 deletions(-) (limited to 'missing') diff --git a/missing/crypt.c b/missing/crypt.c index 97acbb9210..e2dda3ca08 100644 --- a/missing/crypt.c +++ b/missing/crypt.c @@ -108,16 +108,13 @@ static char sccsid[] = "@(#)crypt.c 8.1 (Berkeley) 6/4/93"; #define LARGEDATA #endif -int des_setkey(), des_cipher(); +void des_setkey(const char *key); +void des_cipher(const char *in, char *out, long salt, int num_iter); /* compile with "-DSTATIC=int" when profiling */ #ifndef STATIC #define STATIC static #endif -STATIC void init_des(), init_perm(), permute(); -#ifdef DEBUG -STATIC void prtab(); -#endif /* ==================================== */ @@ -303,11 +300,7 @@ typedef union { { C_block tblk; permute((cpp),&tblk,(p),4); LOAD ((d),(d0),(d1),tblk); } STATIC void -permute(cp, out, p, chars_in) - unsigned char *cp; - C_block *out; - register C_block *p; - int chars_in; +permute(unsigned char *cp, C_block *out, register C_block *p, int chars_in) { register DCL_BLOCK(D,D0,D1); register C_block *tp; @@ -323,6 +316,12 @@ permute(cp, out, p, chars_in) } #endif /* LARGEDATA */ +STATIC void init_des(void); +STATIC void init_perm(C_block perm[64/CHUNKBITS][1<= 0; i--) { k = cblock.b[i]; for (j = 7; j >= 0; j--) { @@ -969,15 +949,11 @@ encrypt(block, flag) k >>= 1; } } - return (0); } #ifdef DEBUG STATIC void -prtab(s, t, num_rows) - char *s; - unsigned char *t; - int num_rows; +prtab(const char *s, const unsigned char *t, int num_rows) { register int i, j; -- cgit v1.2.3