summaryrefslogtreecommitdiff
path: root/lib/libcrypt
diff options
context:
space:
mode:
authorperry <perry@NetBSD.org>2009-05-01 00:28:17 +0000
committerperry <perry@NetBSD.org>2009-05-01 00:28:17 +0000
commit591534100f878693af804b0993080e2035c73645 (patch)
treea1dd4e0451abea68aea9b3a9b2d703f8a0ba9064 /lib/libcrypt
parentb34e9d9fea4156797d841bfadc8fcabaff3e9c3d (diff)
ANSI function prototypes
Diffstat (limited to 'lib/libcrypt')
-rw-r--r--lib/libcrypt/crypt.c45
1 files changed, 13 insertions, 32 deletions
diff --git a/lib/libcrypt/crypt.c b/lib/libcrypt/crypt.c
index 2b0efbe82e3..6050963a642 100644
--- a/lib/libcrypt/crypt.c
+++ b/lib/libcrypt/crypt.c
@@ -1,4 +1,4 @@
-/* $NetBSD: crypt.c,v 1.27 2009/05/01 00:20:08 perry Exp $ */
+/* $NetBSD: crypt.c,v 1.28 2009/05/01 00:28:17 perry Exp $ */
/*
* Copyright (c) 1989, 1993
@@ -37,7 +37,7 @@
#if 0
static char sccsid[] = "@(#)crypt.c 8.1.1.1 (Berkeley) 8/18/93";
#else
-__RCSID("$NetBSD: crypt.c,v 1.27 2009/05/01 00:20:08 perry Exp $");
+__RCSID("$NetBSD: crypt.c,v 1.28 2009/05/01 00:28:17 perry Exp $");
#endif
#endif /* not lint */
@@ -300,11 +300,7 @@ STATIC prtab(const char *, unsigned char *, int);
#ifndef LARGEDATA
STATIC
-permute(cp, out, p, chars_in)
- const unsigned char *cp;
- C_block *out;
- C_block *p;
- int chars_in;
+permute(const unsigned char *cp, C_block *out, C_block *p, int chars_in)
{
DCL_BLOCK(D,D0,D1);
C_block *tp;
@@ -479,9 +475,7 @@ static char cryptresult[1+4+4+11+1]; /* encrypted result */
* followed by an encryption produced by the "key" and "setting".
*/
char *
-crypt(key, setting)
- const char *key;
- const char *setting;
+crypt(const char *key, const char *setting)
{
char *encp;
int32_t i;
@@ -597,8 +591,7 @@ static C_block KS[KS_SIZE];
* Set up the key schedule from the key.
*/
int
-des_setkey(key)
- const char *key;
+des_setkey(const char *key)
{
DCL_BLOCK(K, K0, K1);
C_block *help, *ptabp;
@@ -632,11 +625,7 @@ des_setkey(key)
* compiler and machine architecture.
*/
int
-des_cipher(in, out, salt, num_iter)
- const char *in;
- char *out;
- long salt;
- int num_iter;
+des_cipher(const char *in, char *out, long salt, int num_iter)
{
/* variables that we want in registers, most important first */
#if defined(pdp11)
@@ -754,7 +743,7 @@ des_cipher(in, out, salt, num_iter)
* done at compile time, if the compiler were capable of that sort of thing.
*/
STATIC
-init_des()
+init_des(void)
{
int i, j;
int32_t k;
@@ -898,10 +887,8 @@ init_des()
* "perm" must be all-zeroes on entry to this routine.
*/
STATIC
-init_perm(perm, p, chars_in, chars_out)
- C_block perm[64/CHUNKBITS][1<<CHUNKBITS];
- const unsigned char p[64];
- int chars_in, chars_out;
+init_perm(C_block perm[64/CHUNKBITS][1<<CHUNKBITS], const unsigned char p[64],
+ int chars_in, int chars_out)
{
int i, j, k, l;
@@ -922,8 +909,7 @@ init_perm(perm, p, chars_in, chars_out)
* "setkey" routine (for backwards compatibility)
*/
int
-setkey(key)
- const char *key;
+setkey(const char *key)
{
int i, j, k;
C_block keyblock;
@@ -943,9 +929,7 @@ setkey(key)
* "encrypt" routine (for backwards compatibility)
*/
int
-encrypt(block, flag)
- char *block;
- int flag;
+encrypt(char *block, int flag)
{
int i, j, k;
C_block cblock;
@@ -972,10 +956,7 @@ encrypt(block, flag)
#ifdef DEBUG
STATIC
-prtab(s, t, num_rows)
- const char *s;
- unsigned char *t;
- int num_rows;
+prtab(const char *s, unsigned char *t, int num_rows)
{
int i, j;
@@ -994,7 +975,7 @@ prtab(s, t, num_rows)
#include <err.h>
int
-main (int argc, char *argv[])
+main(int argc, char *argv[])
{
if (argc < 2)
errx(1, "Usage: %s password [salt]\n", argv[0]);