diff options
Diffstat (limited to 'usr.bin/cksum')
-rw-r--r-- | usr.bin/cksum/crc.c | 10 | ||||
-rw-r--r-- | usr.bin/cksum/sum1.c | 12 | ||||
-rw-r--r-- | usr.bin/cksum/sum2.c | 12 |
3 files changed, 23 insertions, 11 deletions
diff --git a/usr.bin/cksum/crc.c b/usr.bin/cksum/crc.c index 64f545abe9d..7301e342f50 100644 --- a/usr.bin/cksum/crc.c +++ b/usr.bin/cksum/crc.c @@ -1,4 +1,5 @@ -/* $NetBSD: crc.c,v 1.5 1995/03/26 05:15:18 glass Exp $ */ +/* $OpenBSD: crc.c,v 1.2 1996/03/27 19:32:21 niklas Exp $ */ +/* $NetBSD: crc.c,v 1.7 1996/02/27 21:29:53 jtc Exp $ */ /*- * Copyright (c) 1991, 1993 @@ -39,15 +40,18 @@ #ifndef lint #if 0 static char sccsid[] = "@(#)crc.c 8.1 (Berkeley) 6/17/93"; +static char rcsid[] = "$NetBSD: crc.c,v 1.7 1996/02/27 21:29:53 jtc Exp $"; #else -static char rcsid[] = "$NetBSD: crc.c,v 1.5 1995/03/26 05:15:18 glass Exp $"; +static char rcsid[] = "$OpenBSD: crc.c,v 1.2 1996/03/27 19:32:21 niklas Exp $"; #endif #endif /* not lint */ #include <sys/types.h> #include <unistd.h> -static u_int32_t crctab[] = { +#include "extern.h" + +static const u_int32_t crctab[] = { 0x0, 0x04c11db7, 0x09823b6e, 0x0d4326d9, 0x130476dc, 0x17c56b6b, 0x1a864db2, 0x1e475005, 0x2608edb8, 0x22c9f00f, 0x2f8ad6d6, diff --git a/usr.bin/cksum/sum1.c b/usr.bin/cksum/sum1.c index a3de50f7518..73850d4829b 100644 --- a/usr.bin/cksum/sum1.c +++ b/usr.bin/cksum/sum1.c @@ -1,4 +1,5 @@ -/* $NetBSD: sum1.c,v 1.4 1995/03/26 05:15:23 glass Exp $ */ +/* $OpenBSD: sum1.c,v 1.2 1996/03/27 19:32:22 niklas Exp $ */ +/* $NetBSD: sum1.c,v 1.5 1996/02/27 21:17:27 cgd Exp $ */ /*- * Copyright (c) 1991, 1993 @@ -36,20 +37,23 @@ #ifndef lint #if 0 static char sccsid[] = "@(#)sum1.c 8.1 (Berkeley) 6/6/93"; +static char rcsid[] = "$NetBSD: sum1.c,v 1.5 1996/02/27 21:17:27 cgd Exp $"; #else -static char rcsid[] = "$NetBSD: sum1.c,v 1.4 1995/03/26 05:15:23 glass Exp $"; +static char rcsid[] = "$OpenBSD: sum1.c,v 1.2 1996/03/27 19:32:22 niklas Exp $"; #endif #endif /* not lint */ #include <sys/types.h> #include <unistd.h> +#include "extern.h" + int csum1(fd, cval, clen) register int fd; - u_long *cval, *clen; + u_int32_t *cval, *clen; { - register u_long total; + register u_int32_t total; register int nr; register u_int crc; register u_char *p; diff --git a/usr.bin/cksum/sum2.c b/usr.bin/cksum/sum2.c index 9fc63f89485..d07b9740ce6 100644 --- a/usr.bin/cksum/sum2.c +++ b/usr.bin/cksum/sum2.c @@ -1,4 +1,5 @@ -/* $NetBSD: sum2.c,v 1.4 1995/03/26 05:15:25 glass Exp $ */ +/* $OpenBSD: sum2.c,v 1.2 1996/03/27 19:32:23 niklas Exp $ */ +/* $NetBSD: sum2.c,v 1.5 1996/02/27 21:17:28 cgd Exp $ */ /*- * Copyright (c) 1991, 1993 @@ -36,20 +37,23 @@ #ifndef lint #if 0 static char sccsid[] = "@(#)sum2.c 8.1 (Berkeley) 6/6/93"; +static char rcsid[] = "$NetBSD: sum2.c,v 1.5 1996/02/27 21:17:28 cgd Exp $"; #else -static char rcsid[] = "$NetBSD: sum2.c,v 1.4 1995/03/26 05:15:25 glass Exp $"; +static char rcsid[] = "$OpenBSD: sum2.c,v 1.2 1996/03/27 19:32:23 niklas Exp $"; #endif #endif /* not lint */ #include <sys/types.h> #include <unistd.h> +#include "extern.h" + int csum2(fd, cval, clen) register int fd; - u_long *cval, *clen; + u_int32_t *cval, *clen; { - register u_long crc, total; + register u_int32_t crc, total; register int nr; register u_char *p; u_char buf[8192]; |