Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/cksum cksum: use POSIX type uint32_t instead of u_in...
details: https://anonhg.NetBSD.org/src/rev/34e14ba3e7fd
branches: trunk
changeset: 953715:34e14ba3e7fd
user: cheusov <cheusov%NetBSD.org@localhost>
date: Thu Mar 18 18:12:35 2021 +0000
description:
cksum: use POSIX type uint32_t instead of u_int32_t
diffstat:
usr.bin/cksum/cksum.c | 12 ++++++------
usr.bin/cksum/crc.c | 10 +++++-----
usr.bin/cksum/crc_extern.h | 4 ++--
usr.bin/cksum/extern.h | 14 +++++++-------
usr.bin/cksum/print.c | 10 +++++-----
usr.bin/cksum/sum1.c | 6 +++---
usr.bin/cksum/sum2.c | 8 ++++----
7 files changed, 32 insertions(+), 32 deletions(-)
diffs (231 lines):
diff -r e33832ec012f -r 34e14ba3e7fd usr.bin/cksum/cksum.c
--- a/usr.bin/cksum/cksum.c Thu Mar 18 14:58:44 2021 +0000
+++ b/usr.bin/cksum/cksum.c Thu Mar 18 18:12:35 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cksum.c,v 1.48 2015/06/16 22:54:10 christos Exp $ */
+/* $NetBSD: cksum.c,v 1.49 2021/03/18 18:12:35 cheusov Exp $ */
/*-
* Copyright (c) 1991, 1993
@@ -81,7 +81,7 @@
#if 0
static char sccsid[] = "@(#)cksum.c 8.2 (Berkeley) 4/28/95";
#endif
-__RCSID("$NetBSD: cksum.c,v 1.48 2015/06/16 22:54:10 christos Exp $");
+__RCSID("$NetBSD: cksum.c,v 1.49 2021/03/18 18:12:35 cheusov Exp $");
#endif /* not lint */
#include <sys/types.h>
@@ -153,12 +153,12 @@
main(int argc, char **argv)
{
int ch, fd, rval, pflag, nohashstdin;
- u_int32_t val;
+ uint32_t val;
off_t len;
char *fn;
const char *progname;
- int (*cfncn) (int, u_int32_t *, off_t *);
- void (*pfncn) (char *, u_int32_t, off_t);
+ int (*cfncn) (int, uint32_t *, off_t *);
+ void (*pfncn) (char *, uint32_t, off_t);
const struct hash *hash;
int i, check_warn, do_check;
int print_flags;
@@ -436,7 +436,7 @@
if (cfncn(fd, &val, &len))
ok = 0;
else {
- u_int32_t should_val;
+ uint32_t should_val;
should_val =
strtoul(cksum, NULL, 10);
diff -r e33832ec012f -r 34e14ba3e7fd usr.bin/cksum/crc.c
--- a/usr.bin/cksum/crc.c Thu Mar 18 14:58:44 2021 +0000
+++ b/usr.bin/cksum/crc.c Thu Mar 18 18:12:35 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: crc.c,v 1.21 2020/04/27 07:30:54 martin Exp $ */
+/* $NetBSD: crc.c,v 1.22 2021/03/18 18:12:35 cheusov Exp $ */
/*-
* Copyright (c) 1991, 1993
@@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)crc.c 8.1 (Berkeley) 6/17/93";
#else
-__RCSID("$NetBSD: crc.c,v 1.21 2020/04/27 07:30:54 martin Exp $");
+__RCSID("$NetBSD: crc.c,v 1.22 2021/03/18 18:12:35 cheusov Exp $");
#endif
#endif /* not lint */
@@ -52,7 +52,7 @@
#include "extern.h"
-static const u_int32_t crctab[] = {
+static const uint32_t crctab[] = {
0x0,
0x04c11db7, 0x09823b6e, 0x0d4326d9, 0x130476dc, 0x17c56b6b,
0x1a864db2, 0x1e475005, 0x2608edb8, 0x22c9f00f, 0x2f8ad6d6,
@@ -114,10 +114,10 @@
* success and 1 on failure. Errno is set on failure.
*/
int
-crc(int fd, u_int32_t *cval, off_t *clen)
+crc(int fd, uint32_t *cval, off_t *clen)
{
ssize_t nr;
- u_int32_t thecrc;
+ uint32_t thecrc;
off_t len;
u_char buf[16 * 1024];
diff -r e33832ec012f -r 34e14ba3e7fd usr.bin/cksum/crc_extern.h
--- a/usr.bin/cksum/crc_extern.h Thu Mar 18 14:58:44 2021 +0000
+++ b/usr.bin/cksum/crc_extern.h Thu Mar 18 18:12:35 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: crc_extern.h,v 1.1 2006/09/04 20:01:10 dsl Exp $ */
+/* $NetBSD: crc_extern.h,v 1.2 2021/03/18 18:12:35 cheusov Exp $ */
/*-
* Copyright (c) 1991, 1993
@@ -32,7 +32,7 @@
*/
__BEGIN_DECLS
-int crc(int, u_int32_t *, off_t *);
+int crc(int, uint32_t *, off_t *);
uint32_t crc_buf(uint32_t, const void *, size_t);
uint32_t crc_byte(uint32_t, unsigned int);
__END_DECLS
diff -r e33832ec012f -r 34e14ba3e7fd usr.bin/cksum/extern.h
--- a/usr.bin/cksum/extern.h Thu Mar 18 14:58:44 2021 +0000
+++ b/usr.bin/cksum/extern.h Thu Mar 18 18:12:35 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: extern.h,v 1.19 2006/09/04 20:01:10 dsl Exp $ */
+/* $NetBSD: extern.h,v 1.20 2021/03/18 18:12:35 cheusov Exp $ */
/*-
* Copyright (c) 1991, 1993
@@ -39,12 +39,12 @@
#include "crc_extern.h"
__BEGIN_DECLS
-void pcrc(char *, u_int32_t, off_t);
-void psum1(char *, u_int32_t, off_t);
-void psum2(char *, u_int32_t, off_t);
-int csum1(int, u_int32_t *, off_t *);
-int csum2(int, u_int32_t *, off_t *);
-int md5(int, u_int32_t *, u_int32_t *);
+void pcrc(char *, uint32_t, off_t);
+void psum1(char *, uint32_t, off_t);
+void psum2(char *, uint32_t, off_t);
+int csum1(int, uint32_t *, off_t *);
+int csum2(int, uint32_t *, off_t *);
+int md5(int, uint32_t *, uint32_t *);
void MD2String(const char *);
void MD2TimeTrial(void);
diff -r e33832ec012f -r 34e14ba3e7fd usr.bin/cksum/print.c
--- a/usr.bin/cksum/print.c Thu Mar 18 14:58:44 2021 +0000
+++ b/usr.bin/cksum/print.c Thu Mar 18 18:12:35 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: print.c,v 1.11 2005/01/12 17:04:35 xtraeme Exp $ */
+/* $NetBSD: print.c,v 1.12 2021/03/18 18:12:35 cheusov Exp $ */
/*-
* Copyright (c) 1991, 1993
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)print.c 8.1 (Berkeley) 6/6/93";
#else
-__RCSID("$NetBSD: print.c,v 1.11 2005/01/12 17:04:35 xtraeme Exp $");
+__RCSID("$NetBSD: print.c,v 1.12 2021/03/18 18:12:35 cheusov Exp $");
#endif
#endif /* not lint */
@@ -47,7 +47,7 @@
#include "extern.h"
void
-pcrc(char *fn, u_int32_t val, off_t len)
+pcrc(char *fn, uint32_t val, off_t len)
{
(void)printf("%lu %lld", (unsigned long)val, (long long)len);
if (fn)
@@ -56,7 +56,7 @@
}
void
-psum1(char *fn, u_int32_t val, off_t len)
+psum1(char *fn, uint32_t val, off_t len)
{
(void)printf("%lu %lld", (unsigned long)val,
(long long)(len + 1023) / 1024);
@@ -66,7 +66,7 @@
}
void
-psum2(char *fn, u_int32_t val, off_t len)
+psum2(char *fn, uint32_t val, off_t len)
{
(void)printf("%lu %lld", (unsigned long)val,
(long long)(len + 511) / 512);
diff -r e33832ec012f -r 34e14ba3e7fd usr.bin/cksum/sum1.c
--- a/usr.bin/cksum/sum1.c Thu Mar 18 14:58:44 2021 +0000
+++ b/usr.bin/cksum/sum1.c Thu Mar 18 18:12:35 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sum1.c,v 1.13 2005/02/05 00:13:34 simonb Exp $ */
+/* $NetBSD: sum1.c,v 1.14 2021/03/18 18:12:35 cheusov Exp $ */
/*-
* Copyright (c) 1991, 1993
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)sum1.c 8.1 (Berkeley) 6/6/93";
#else
-__RCSID("$NetBSD: sum1.c,v 1.13 2005/02/05 00:13:34 simonb Exp $");
+__RCSID("$NetBSD: sum1.c,v 1.14 2021/03/18 18:12:35 cheusov Exp $");
#endif
#endif /* not lint */
@@ -48,7 +48,7 @@
#include "extern.h"
int
-csum1(int fd, u_int32_t *cval, off_t *clen)
+csum1(int fd, uint32_t *cval, off_t *clen)
{
off_t total;
int nr;
diff -r e33832ec012f -r 34e14ba3e7fd usr.bin/cksum/sum2.c
--- a/usr.bin/cksum/sum2.c Thu Mar 18 14:58:44 2021 +0000
+++ b/usr.bin/cksum/sum2.c Thu Mar 18 18:12:35 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sum2.c,v 1.13 2005/02/05 00:13:34 simonb Exp $ */
+/* $NetBSD: sum2.c,v 1.14 2021/03/18 18:12:35 cheusov Exp $ */
/*-
* Copyright (c) 1991, 1993
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)sum2.c 8.1 (Berkeley) 6/6/93";
#else
-__RCSID("$NetBSD: sum2.c,v 1.13 2005/02/05 00:13:34 simonb Exp $");
+__RCSID("$NetBSD: sum2.c,v 1.14 2021/03/18 18:12:35 cheusov Exp $");
#endif
#endif /* not lint */
@@ -48,9 +48,9 @@
#include "extern.h"
int
-csum2(int fd, u_int32_t *cval, off_t *clen)
+csum2(int fd, uint32_t *cval, off_t *clen)
{
- u_int32_t thecrc;
+ uint32_t thecrc;
off_t total;
int nr;
u_char *p;
Home |
Main Index |
Thread Index |
Old Index