From: Ben Pfaff Date: Fri, 1 Apr 2005 18:43:22 +0000 (+0000) Subject: 127 is a control character. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=399d2a1d044a1c8789ee6c1bea54c57cffa710f9;p=pintos-anon 127 is a control character. --- diff --git a/src/lib/ctype.h b/src/lib/ctype.h index adc96be..7a2c52d 100644 --- a/src/lib/ctype.h +++ b/src/lib/ctype.h @@ -14,9 +14,9 @@ static inline int isspace (int c) { || c == '\r' || c == '\t' || c == '\v'); } static inline int isblank (int c) { return c == ' ' || c == '\t'; } -static inline int isgraph (int c) { return c >= 33 && c < 127; } +static inline int isgraph (int c) { return c > 32 && c < 127; } static inline int isprint (int c) { return c >= 32 && c < 127; } -static inline int iscntrl (int c) { return c >= 0 && c < 32; } +static inline int iscntrl (int c) { return c >= 0 && c < 32 || c == 127; } static inline int isascii (int c) { return c >= 0 && c < 128; } static inline int ispunct (int c) { return isprint (c) && !isalnum (c) && !isspace (c);