=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/bdes/Attic/bdes.c,v retrieving revision 1.5 retrieving revision 1.6 diff -c -r1.5 -r1.6 *** src/usr.bin/bdes/Attic/bdes.c 2001/02/05 08:38:23 1.5 --- src/usr.bin/bdes/Attic/bdes.c 2001/11/19 19:02:13 1.6 *************** *** 1,4 **** ! /* $OpenBSD: bdes.c,v 1.5 2001/02/05 08:38:23 deraadt Exp $ */ /* $NetBSD: bdes.c,v 1.2 1995/03/26 03:33:19 glass Exp $ */ /*- --- 1,4 ---- ! /* $OpenBSD: bdes.c,v 1.6 2001/11/19 19:02:13 mpech Exp $ */ /* $NetBSD: bdes.c,v 1.2 1995/03/26 03:33:19 glass Exp $ */ /*- *************** *** 51,57 **** #if 0 static char sccsid[] = "@(#)bdes.c 8.1 (Berkeley) 6/6/93"; #else ! static char rcsid[] = "$OpenBSD: bdes.c,v 1.5 2001/02/05 08:38:23 deraadt Exp $"; #endif #endif /* not lint */ --- 51,57 ---- #if 0 static char sccsid[] = "@(#)bdes.c 8.1 (Berkeley) 6/6/93"; #else ! static char rcsid[] = "$OpenBSD: bdes.c,v 1.6 2001/11/19 19:02:13 mpech Exp $"; #endif #endif /* not lint */ *************** *** 191,198 **** { extern int optind; /* option (argument) number */ extern char *optarg; /* argument to option if any */ ! register int i; /* counter in a for loop */ ! register char *p; /* used to obtain the key */ Desbuf msgbuf; /* I/O buffer */ int kflag; /* command-line encryptiooon key */ int argc; /* the real arg count */ --- 191,198 ---- { extern int optind; /* option (argument) number */ extern char *optarg; /* argument to option if any */ ! int i; /* counter in a for loop */ ! char *p; /* used to obtain the key */ Desbuf msgbuf; /* I/O buffer */ int kflag; /* command-line encryptiooon key */ int argc; /* the real arg count */ *************** *** 395,401 **** char *obuf; /* bit pattern */ char *ibuf; /* the key itself */ { ! register int i, j; /* counter in a for loop */ int nbuf[64]; /* used for hex/key translation */ /* --- 395,401 ---- char *obuf; /* bit pattern */ char *ibuf; /* the key itself */ { ! int i, j; /* counter in a for loop */ int nbuf[64]; /* used for hex/key translation */ /* *************** *** 464,471 **** char *s; /* the ASCII string */ int mult; /* what it must be a multiple of */ { ! register char *p; /* pointer in a for loop */ ! register int n = 0; /* the integer collected */ /* * skip white space --- 464,471 ---- char *s; /* the ASCII string */ int mult; /* what it must be a multiple of */ { ! char *p; /* pointer in a for loop */ ! int n = 0; /* the integer collected */ /* * skip white space *************** *** 506,513 **** makekey(buf) Desbuf buf; /* key block */ { ! register int i, j; /* counter in a for loop */ ! register int par; /* parity counter */ /* * if the parity is not preserved, flip it --- 506,513 ---- makekey(buf) Desbuf buf; /* key block */ { ! int i, j; /* counter in a for loop */ ! int par; /* parity counter */ /* * if the parity is not preserved, flip it *************** *** 534,541 **** void ecbenc() { ! register int n; /* number of bytes actually read */ ! register int bn; /* block number */ Desbuf msgbuf; /* I/O buffer */ for (bn = 0; (n = READ(BUFFER(msgbuf), 8)) == 8; bn++) { --- 534,541 ---- void ecbenc() { ! int n; /* number of bytes actually read */ ! int bn; /* block number */ Desbuf msgbuf; /* I/O buffer */ for (bn = 0; (n = READ(BUFFER(msgbuf), 8)) == 8; bn++) { *************** *** 563,571 **** void ecbdec() { ! register int n; /* number of bytes actually read */ ! register int c; /* used to test for EOF */ ! register int bn; /* block number */ Desbuf msgbuf; /* I/O buffer */ for (bn = 1; (n = READ(BUFFER(msgbuf), 8)) == 8; bn++) { --- 563,571 ---- void ecbdec() { ! int n; /* number of bytes actually read */ ! int c; /* used to test for EOF */ ! int bn; /* block number */ Desbuf msgbuf; /* I/O buffer */ for (bn = 1; (n = READ(BUFFER(msgbuf), 8)) == 8; bn++) { *************** *** 595,602 **** void cbcenc() { ! register int n; /* number of bytes actually read */ ! register int bn; /* block number */ Desbuf msgbuf; /* I/O buffer */ /* --- 595,602 ---- void cbcenc() { ! int n; /* number of bytes actually read */ ! int bn; /* block number */ Desbuf msgbuf; /* I/O buffer */ /* *************** *** 629,639 **** void cbcdec() { ! register int n; /* number of bytes actually read */ Desbuf msgbuf; /* I/O buffer */ Desbuf ibuf; /* temp buffer for initialization vector */ ! register int c; /* used to test for EOF */ ! register int bn; /* block number */ for (bn = 0; (n = READ(BUFFER(msgbuf), 8)) == 8; bn++) { /* --- 629,639 ---- void cbcdec() { ! int n; /* number of bytes actually read */ Desbuf msgbuf; /* I/O buffer */ Desbuf ibuf; /* temp buffer for initialization vector */ ! int c; /* used to test for EOF */ ! int bn; /* block number */ for (bn = 0; (n = READ(BUFFER(msgbuf), 8)) == 8; bn++) { /* *************** *** 666,672 **** void cbcauth() { ! register int n, j; /* number of bytes actually read */ Desbuf msgbuf; /* I/O buffer */ Desbuf encbuf; /* encryption buffer */ --- 666,672 ---- void cbcauth() { ! int n, j; /* number of bytes actually read */ Desbuf msgbuf; /* I/O buffer */ Desbuf encbuf; /* encryption buffer */ *************** *** 711,719 **** void cfbenc() { ! register int n; /* number of bytes actually read */ ! register int nbytes; /* number of bytes to read */ ! register int bn; /* block number */ char ibuf[8]; /* input buffer */ Desbuf msgbuf; /* encryption buffer */ --- 711,719 ---- void cfbenc() { ! int n; /* number of bytes actually read */ ! int nbytes; /* number of bytes to read */ ! int bn; /* block number */ char ibuf[8]; /* input buffer */ Desbuf msgbuf; /* encryption buffer */ *************** *** 753,762 **** void cfbdec() { ! register int n; /* number of bytes actually read */ ! register int c; /* used to test for EOF */ ! register int nbytes; /* number of bytes to read */ ! register int bn; /* block number */ char ibuf[8]; /* input buffer */ char obuf[8]; /* output buffer */ Desbuf msgbuf; /* encryption buffer */ --- 753,762 ---- void cfbdec() { ! int n; /* number of bytes actually read */ ! int c; /* used to test for EOF */ ! int nbytes; /* number of bytes to read */ ! int bn; /* block number */ char ibuf[8]; /* input buffer */ char obuf[8]; /* output buffer */ Desbuf msgbuf; /* encryption buffer */ *************** *** 799,807 **** void cfbaenc() { ! register int n; /* number of bytes actually read */ ! register int nbytes; /* number of bytes to read */ ! register int bn; /* block number */ char ibuf[8]; /* input buffer */ char obuf[8]; /* output buffer */ Desbuf msgbuf; /* encryption buffer */ --- 799,807 ---- void cfbaenc() { ! int n; /* number of bytes actually read */ ! int nbytes; /* number of bytes to read */ ! int bn; /* block number */ char ibuf[8]; /* input buffer */ char obuf[8]; /* output buffer */ Desbuf msgbuf; /* encryption buffer */ *************** *** 845,854 **** void cfbadec() { ! register int n; /* number of bytes actually read */ ! register int c; /* used to test for EOF */ ! register int nbytes; /* number of bytes to read */ ! register int bn; /* block number */ char ibuf[8]; /* input buffer */ char obuf[8]; /* output buffer */ Desbuf msgbuf; /* encryption buffer */ --- 845,854 ---- void cfbadec() { ! int n; /* number of bytes actually read */ ! int c; /* used to test for EOF */ ! int nbytes; /* number of bytes to read */ ! int bn; /* block number */ char ibuf[8]; /* input buffer */ char obuf[8]; /* output buffer */ Desbuf msgbuf; /* encryption buffer */ *************** *** 892,901 **** void ofbenc() { ! register int n; /* number of bytes actually read */ ! register int c; /* used to test for EOF */ ! register int nbytes; /* number of bytes to read */ ! register int bn; /* block number */ char ibuf[8]; /* input buffer */ char obuf[8]; /* output buffer */ Desbuf msgbuf; /* encryption buffer */ --- 892,901 ---- void ofbenc() { ! int n; /* number of bytes actually read */ ! int c; /* used to test for EOF */ ! int nbytes; /* number of bytes to read */ ! int bn; /* block number */ char ibuf[8]; /* input buffer */ char obuf[8]; /* output buffer */ Desbuf msgbuf; /* encryption buffer */ *************** *** 938,947 **** void ofbdec() { ! register int n; /* number of bytes actually read */ ! register int c; /* used to test for EOF */ ! register int nbytes; /* number of bytes to read */ ! register int bn; /* block number */ char ibuf[8]; /* input buffer */ char obuf[8]; /* output buffer */ Desbuf msgbuf; /* encryption buffer */ --- 938,947 ---- void ofbdec() { ! int n; /* number of bytes actually read */ ! int c; /* used to test for EOF */ ! int nbytes; /* number of bytes to read */ ! int bn; /* block number */ char ibuf[8]; /* input buffer */ char obuf[8]; /* output buffer */ Desbuf msgbuf; /* encryption buffer */ *************** *** 987,994 **** void cfbauth() { ! register int n, j; /* number of bytes actually read */ ! register int nbytes; /* number of bytes to read */ char ibuf[8]; /* input buffer */ Desbuf msgbuf; /* encryption buffer */ --- 987,994 ---- void cfbauth() { ! int n, j; /* number of bytes actually read */ ! int nbytes; /* number of bytes to read */ char ibuf[8]; /* input buffer */ Desbuf msgbuf; /* encryption buffer */ *************** *** 1040,1046 **** Desbuf from; /* 8bit/unsigned char string */ char *to; /* 1bit/char string */ { ! register int i, j; /* counters in for loop */ for (i = 0; i < 8; i++) for (j = 0; j < 8; j++) --- 1040,1046 ---- Desbuf from; /* 8bit/unsigned char string */ char *to; /* 1bit/char string */ { ! int i, j; /* counters in for loop */ for (i = 0; i < 8; i++) for (j = 0; j < 8; j++) *************** *** 1054,1060 **** char *from; /* 1bit/char string */ Desbuf to; /* 8bit/unsigned char string */ { ! register int i, j; /* counters in for loop */ for (i = 0; i < 8; i++) { CHAR(to, i) = 0; --- 1054,1060 ---- char *from; /* 1bit/char string */ Desbuf to; /* 8bit/unsigned char string */ { ! int i, j; /* counters in for loop */ for (i = 0; i < 8; i++) { CHAR(to, i) = 0;