diff options
Diffstat (limited to 'lib/libc/ctype.c')
-rw-r--r-- | lib/libc/ctype.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/lib/libc/ctype.c b/lib/libc/ctype.c index 845440e9..06f12557 100644 --- a/lib/libc/ctype.c +++ b/lib/libc/ctype.c @@ -24,8 +24,6 @@ #if 0 /* XXX unimplemented for now */ -int iscntrl(int c); -int isgraph(int c); int ispunct(int c); #endif @@ -69,6 +67,16 @@ int isxdigit(int c) return isdigit(c) || ((c >= 'a') && (c <= 'f')) || ((c >= 'A') && (c <= 'F')); } +int isgraph(int c) +{ + return ((c > ' ') && (c < 0x7f)); +} + +int iscntrl(int c) +{ + return ((c < ' ') || (c == 0x7f)); +} + int isprint(int c) { return ((c >= 0x20) && (c < 0x7f)); |