summaryrefslogtreecommitdiffstats
path: root/contrib/awk/dfa.c
diff options
context:
space:
mode:
authorache <ache@FreeBSD.org>1997-10-23 01:29:44 +0000
committerache <ache@FreeBSD.org>1997-10-23 01:29:44 +0000
commitcca19fe7264e46e7cdd694359b93d7816d7978ce (patch)
tree64ed6da5e6cc049afd114c3f5552481d08f991f7 /contrib/awk/dfa.c
parent251c8be0fea380036a44081998448805786b16fb (diff)
downloadFreeBSD-src-cca19fe7264e46e7cdd694359b93d7816d7978ce.zip
FreeBSD-src-cca19fe7264e46e7cdd694359b93d7816d7978ce.tar.gz
Add (unsigned char) cast to all ctype macros
Diffstat (limited to 'contrib/awk/dfa.c')
-rw-r--r--contrib/awk/dfa.c46
1 files changed, 23 insertions, 23 deletions
diff --git a/contrib/awk/dfa.c b/contrib/awk/dfa.c
index c806bea..88e8e3e 100644
--- a/contrib/awk/dfa.c
+++ b/contrib/awk/dfa.c
@@ -48,33 +48,33 @@ extern void free();
#endif /* DEBUG */
#ifndef isgraph
-#define isgraph(C) (isprint(C) && !isspace(C))
+#define isgraph(C) (isprint((unsigned char)C) && !isspace((unsigned char)C))
#endif
#if defined (STDC_HEADERS) || (!defined (isascii) && !defined (HAVE_ISASCII))
-#define ISALPHA(C) isalpha(C)
-#define ISUPPER(C) isupper(C)
-#define ISLOWER(C) islower(C)
-#define ISDIGIT(C) isdigit(C)
-#define ISXDIGIT(C) isxdigit(C)
-#define ISSPACE(C) isspace(C)
-#define ISPUNCT(C) ispunct(C)
-#define ISALNUM(C) isalnum(C)
-#define ISPRINT(C) isprint(C)
-#define ISGRAPH(C) isgraph(C)
-#define ISCNTRL(C) iscntrl(C)
+#define ISALPHA(C) isalpha((unsigned char)C)
+#define ISUPPER(C) isupper((unsigned char)C)
+#define ISLOWER(C) islower((unsigned char)C)
+#define ISDIGIT(C) isdigit((unsigned char)C)
+#define ISXDIGIT(C) isxdigit((unsigned char)C)
+#define ISSPACE(C) isspace((unsigned char)C)
+#define ISPUNCT(C) ispunct((unsigned char)C)
+#define ISALNUM(C) isalnum((unsigned char)C)
+#define ISPRINT(C) isprint((unsigned char)C)
+#define ISGRAPH(C) isgraph((unsigned char)C)
+#define ISCNTRL(C) iscntrl((unsigned char)C)
#else
-#define ISALPHA(C) (isascii(C) && isalpha(C))
-#define ISUPPER(C) (isascii(C) && isupper(C))
-#define ISLOWER(C) (isascii(C) && islower(C))
-#define ISDIGIT(C) (isascii(C) && isdigit(C))
-#define ISXDIGIT(C) (isascii(C) && isxdigit(C))
-#define ISSPACE(C) (isascii(C) && isspace(C))
-#define ISPUNCT(C) (isascii(C) && ispunct(C))
-#define ISALNUM(C) (isascii(C) && isalnum(C))
-#define ISPRINT(C) (isascii(C) && isprint(C))
-#define ISGRAPH(C) (isascii(C) && isgraph(C))
-#define ISCNTRL(C) (isascii(C) && iscntrl(C))
+#define ISALPHA(C) (isascii((unsigned char)C) && isalpha(C))
+#define ISUPPER(C) (isascii((unsigned char)C) && isupper(C))
+#define ISLOWER(C) (isascii((unsigned char)C) && islower(C))
+#define ISDIGIT(C) (isascii((unsigned char)C) && isdigit(C))
+#define ISXDIGIT(C) (isascii((unsigned char)C) && isxdigit(C))
+#define ISSPACE(C) (isascii((unsigned char)C) && isspace(C))
+#define ISPUNCT(C) (isascii((unsigned char)C) && ispunct(C))
+#define ISALNUM(C) (isascii((unsigned char)C) && isalnum(C))
+#define ISPRINT(C) (isascii((unsigned char)C) && isprint(C))
+#define ISGRAPH(C) (isascii((unsigned char)C) && isgraph(C))
+#define ISCNTRL(C) (isascii((unsigned char)C) && iscntrl(C))
#endif
#ifndef __FreeBSD__
OpenPOWER on IntegriCloud