From 9e4e7771662043a56f2588aff2d3263401bd0997 Mon Sep 17 00:00:00 2001 From: usa Date: Thu, 27 Oct 2016 07:38:12 +0000 Subject: merge revision(s) 55232: [Backport #12823] 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/branches/ruby_2_2@56503 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 fb3db160a7..0fe564c354 100644 --- a/missing/crypt.c +++ b/missing/crypt.c @@ -107,16 +107,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 /* ==================================== */ @@ -302,11 +299,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; @@ -322,6 +315,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--) { @@ -968,15 +948,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