Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/make Fully avoid the nonstandard types u_char, u_int...



details:   https://anonhg.NetBSD.org/src/rev/c837bf76b4cc
branches:  trunk
changeset: 344600:c837bf76b4cc
user:      gson <gson%NetBSD.org@localhost>
date:      Wed Apr 06 09:57:00 2016 +0000

description:
Fully avoid the nonstandard types u_char, u_int, and u_long, which
were only used inconsistently in a few places anyway.

diffstat:

 usr.bin/make/arch.c  |  10 +++++-----
 usr.bin/make/parse.c |  12 ++++++------
 usr.bin/make/str.c   |   8 ++++----
 3 files changed, 15 insertions(+), 15 deletions(-)

diffs (120 lines):

diff -r 9b582f2b7770 -r c837bf76b4cc usr.bin/make/arch.c
--- a/usr.bin/make/arch.c       Wed Apr 06 08:45:46 2016 +0000
+++ b/usr.bin/make/arch.c       Wed Apr 06 09:57:00 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: arch.c,v 1.68 2016/02/18 18:29:14 christos Exp $       */
+/*     $NetBSD: arch.c,v 1.69 2016/04/06 09:57:00 gson Exp $   */
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -69,14 +69,14 @@
  */
 
 #ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: arch.c,v 1.68 2016/02/18 18:29:14 christos Exp $";
+static char rcsid[] = "$NetBSD: arch.c,v 1.69 2016/04/06 09:57:00 gson Exp $";
 #else
 #include <sys/cdefs.h>
 #ifndef lint
 #if 0
 static char sccsid[] = "@(#)arch.c     8.2 (Berkeley) 1/2/94";
 #else
-__RCSID("$NetBSD: arch.c,v 1.68 2016/02/18 18:29:14 christos Exp $");
+__RCSID("$NetBSD: arch.c,v 1.69 2016/04/06 09:57:00 gson Exp $");
 #endif
 #endif /* not lint */
 #endif
@@ -785,7 +785,7 @@
            }
        if (DEBUG(ARCH)) {
            fprintf(debug_file, "Found svr4 archive name table with %lu entries\n",
-                   (u_long)entry);
+                   (unsigned long)entry);
        }
        return 0;
     }
@@ -803,7 +803,7 @@
     if (entry >= ar->fnamesize) {
        if (DEBUG(ARCH)) {
            fprintf(debug_file, "SVR4 entry offset %s is greater than %lu\n",
-                  name, (u_long)ar->fnamesize);
+                  name, (unsigned long)ar->fnamesize);
        }
        return 2;
     }
diff -r 9b582f2b7770 -r c837bf76b4cc usr.bin/make/parse.c
--- a/usr.bin/make/parse.c      Wed Apr 06 08:45:46 2016 +0000
+++ b/usr.bin/make/parse.c      Wed Apr 06 09:57:00 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: parse.c,v 1.213 2016/03/11 13:54:47 matthias Exp $     */
+/*     $NetBSD: parse.c,v 1.214 2016/04/06 09:57:00 gson Exp $ */
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -69,14 +69,14 @@
  */
 
 #ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: parse.c,v 1.213 2016/03/11 13:54:47 matthias Exp $";
+static char rcsid[] = "$NetBSD: parse.c,v 1.214 2016/04/06 09:57:00 gson Exp $";
 #else
 #include <sys/cdefs.h>
 #ifndef lint
 #if 0
 static char sccsid[] = "@(#)parse.c    8.3 (Berkeley) 3/19/94";
 #else
-__RCSID("$NetBSD: parse.c,v 1.213 2016/03/11 13:54:47 matthias Exp $");
+__RCSID("$NetBSD: parse.c,v 1.214 2016/04/06 09:57:00 gson Exp $");
 #endif
 #endif /* not lint */
 #endif
@@ -795,11 +795,11 @@
        return FALSE;
     }
 
-    while (isalpha((u_char)*line))
+    while (isalpha((unsigned char)*line))
        line++;
-    if (!isspace((u_char)*line))
+    if (!isspace((unsigned char)*line))
        return FALSE;                   /* not for us */
-    while (isspace((u_char)*line))
+    while (isspace((unsigned char)*line))
        line++;
 
     line = Var_Subst(NULL, line, VAR_CMD, VARF_WANTRES);
diff -r 9b582f2b7770 -r c837bf76b4cc usr.bin/make/str.c
--- a/usr.bin/make/str.c        Wed Apr 06 08:45:46 2016 +0000
+++ b/usr.bin/make/str.c        Wed Apr 06 09:57:00 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: str.c,v 1.35 2014/02/12 01:35:56 sjg Exp $     */
+/*     $NetBSD: str.c,v 1.36 2016/04/06 09:57:00 gson Exp $    */
 
 /*-
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -69,14 +69,14 @@
  */
 
 #ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: str.c,v 1.35 2014/02/12 01:35:56 sjg Exp $";
+static char rcsid[] = "$NetBSD: str.c,v 1.36 2016/04/06 09:57:00 gson Exp $";
 #else
 #include <sys/cdefs.h>
 #ifndef lint
 #if 0
 static char     sccsid[] = "@(#)str.c  5.8 (Berkeley) 6/1/90";
 #else
-__RCSID("$NetBSD: str.c,v 1.35 2014/02/12 01:35:56 sjg Exp $");
+__RCSID("$NetBSD: str.c,v 1.36 2016/04/06 09:57:00 gson Exp $");
 #endif
 #endif                         /* not lint */
 #endif
@@ -102,7 +102,7 @@
        len2 = strlen(s2);
 
        /* allocate length plus separator plus EOS */
-       result = bmake_malloc((u_int)(len1 + len2 + 2));
+       result = bmake_malloc((unsigned int)(len1 + len2 + 2));
 
        /* copy first string into place */
        memcpy(result, s1, len1);



Home | Main Index | Thread Index | Old Index