Module Name:    src
Committed By:   lukem
Date:           Wed Mar 20 23:44:47 UTC 2013

Modified Files:
        src/lib/libc/gen: glob.c

Log Message:
Use "unsigned FOO" instead of less-portable "u_FOO".


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 src/lib/libc/gen/glob.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/libc/gen/glob.c
diff -u src/lib/libc/gen/glob.c:1.34 src/lib/libc/gen/glob.c:1.35
--- src/lib/libc/gen/glob.c:1.34	Thu Feb 21 18:17:43 2013
+++ src/lib/libc/gen/glob.c	Wed Mar 20 23:44:47 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: glob.c,v 1.34 2013/02/21 18:17:43 christos Exp $	*/
+/*	$NetBSD: glob.c,v 1.35 2013/03/20 23:44:47 lukem Exp $	*/
 
 /*
  * Copyright (c) 1989, 1993
@@ -37,7 +37,7 @@
 #if 0
 static char sccsid[] = "@(#)glob.c	8.3 (Berkeley) 10/13/93";
 #else
-__RCSID("$NetBSD: glob.c,v 1.34 2013/02/21 18:17:43 christos Exp $");
+__RCSID("$NetBSD: glob.c,v 1.35 2013/03/20 23:44:47 lukem Exp $");
 #endif
 #endif /* LIBC_SCCS and not lint */
 
@@ -132,7 +132,7 @@ struct glob_limit {
 #define	M_MASK		0xffff
 #define	M_ASCII		0x00ff
 
-typedef u_short Char;
+typedef unsigned short Char;
 
 #else
 
@@ -183,14 +183,14 @@ int
 glob(const char * __restrict pattern, int flags, int (*errfunc)(const char *,
     int), glob_t * __restrict pglob)
 {
-	const u_char *patnext;
+	const unsigned char *patnext;
 	int c;
 	Char *bufnext, *bufend, patbuf[MAXPATHLEN+1];
 	struct glob_limit limit = { 0, 0, 0, 0 };
 
 	_DIAGASSERT(pattern != NULL);
 
-	patnext = (const u_char *) pattern;
+	patnext = (const unsigned char *) pattern;
 	if (!(flags & GLOB_APPEND)) {
 		pglob->gl_pathc = 0;
 		pglob->gl_pathv = NULL;
@@ -770,7 +770,7 @@ glob3(Char *pathbuf, Char *pathend, Char
 	else
 		readdirfunc = (struct dirent *(*)(void *)) readdir;
 	while ((dp = (*readdirfunc)(dirp)) != NULL) {
-		u_char *sc;
+		unsigned char *sc;
 		Char *dc;
 
 		if ((pglob->gl_flags & GLOB_LIMIT) &&
@@ -801,7 +801,7 @@ glob3(Char *pathbuf, Char *pathend, Char
 		 * The resulting string contains EOS, so we can
 		 * use the pathlim character, if it is the nul
 		 */
-		for (sc = (u_char *) dp->d_name, dc = pathend; 
+		for (sc = (unsigned char *) dp->d_name, dc = pathend; 
 		     dc <= pathlim && (*dc++ = *sc++) != EOS;)
 			continue;
 

Reply via email to