summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjilles <jilles@FreeBSD.org>2013-01-31 22:10:57 +0000
committerjilles <jilles@FreeBSD.org>2013-01-31 22:10:57 +0000
commit43d0e150913fc1c4eca911f11806ec0230ab8a55 (patch)
tree4dc4f6d90c4b56739b09ffccc8d6fa1ff54f2626
parent577b42d393006042797668cd419aef5a2e419bb9 (diff)
downloadFreeBSD-src-43d0e150913fc1c4eca911f11806ec0230ab8a55.zip
FreeBSD-src-43d0e150913fc1c4eca911f11806ec0230ab8a55.tar.gz
sh: Prefer our character classification functions to <ctype.h>.
-rw-r--r--bin/sh/miscbltin.c4
-rw-r--r--bin/sh/mksyntax.c1
2 files changed, 2 insertions, 3 deletions
diff --git a/bin/sh/miscbltin.c b/bin/sh/miscbltin.c
index f602177..b81cc82 100644
--- a/bin/sh/miscbltin.c
+++ b/bin/sh/miscbltin.c
@@ -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 __unused)
out1fmt("%.4o\n", mask);
}
} else {
- if (isdigit(*ap)) {
+ if (is_digit(*ap)) {
mask = 0;
do {
if (*ap >= '8' || *ap < '0')
diff --git a/bin/sh/mksyntax.c b/bin/sh/mksyntax.c
index 07dc2f1..2b8ecdb 100644
--- a/bin/sh/mksyntax.c
+++ b/bin/sh/mksyntax.c
@@ -165,7 +165,6 @@ main(int argc __unused, char **argv __unused)
}
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);
OpenPOWER on IntegriCloud