svn commit: r246167 - head/bin/sh

Jilles Tjoelker jilles at FreeBSD.org
Thu Jan 31 22:10:58 UTC 2013


Author: jilles
Date: Thu Jan 31 22:10:57 2013
New Revision: 246167
URL: http://svnweb.freebsd.org/changeset/base/246167

Log:
  sh: Prefer our character classification functions to <ctype.h>.

Modified:
  head/bin/sh/miscbltin.c
  head/bin/sh/mksyntax.c

Modified: head/bin/sh/miscbltin.c
==============================================================================
--- head/bin/sh/miscbltin.c	Thu Jan 31 22:09:53 2013	(r246166)
+++ head/bin/sh/miscbltin.c	Thu Jan 31 22:10:57 2013	(r246167)
@@ -47,7 +47,6 @@ __FBSDID("$FreeBSD$");
 #include <sys/time.h>
 #include <sys/resource.h>
 #include <unistd.h>
-#include <ctype.h>
 #include <errno.h>
 #include <stdint.h>
 #include <stdio.h>
@@ -60,6 +59,7 @@ __FBSDID("$FreeBSD$");
 #include "memalloc.h"
 #include "error.h"
 #include "mystring.h"
+#include "syntax.h"
 
 #undef eflag
 
@@ -307,7 +307,7 @@ umaskcmd(int argc __unused, char **argv 
 			out1fmt("%.4o\n", mask);
 		}
 	} else {
-		if (isdigit(*ap)) {
+		if (is_digit(*ap)) {
 			mask = 0;
 			do {
 				if (*ap >= '8' || *ap < '0')

Modified: head/bin/sh/mksyntax.c
==============================================================================
--- head/bin/sh/mksyntax.c	Thu Jan 31 22:09:53 2013	(r246166)
+++ head/bin/sh/mksyntax.c	Thu Jan 31 22:10:57 2013	(r246167)
@@ -165,7 +165,6 @@ main(int argc __unused, char **argv __un
 	}
 
 	fputs("#include <sys/cdefs.h>\n", hfile);
-	fputs("#include <ctype.h>\n", hfile);
 
 	/* Generate the #define statements in the header file */
 	fputs("/* Syntax classes */\n", hfile);


More information about the svn-src-all mailing list