diff --git a/include/ctype.h b/include/ctype.h index dee281da..b0c7889f 100644 --- a/include/ctype.h +++ b/include/ctype.h @@ -31,6 +31,7 @@ #include int isdigit (int); int isxdigit (int); +int isspace (int); #endif // ! (__GNUC__ && POSIX) #endif // __MES_CTYPE_H diff --git a/lib/libc.c b/lib/libc.c index 0e889feb..bfef3eec 100644 --- a/lib/libc.c +++ b/lib/libc.c @@ -41,6 +41,12 @@ isxdigit (int c) return isdigit (c) || (c>='a') && (c<='f'); } +int +isspace (int c) +{ + return (c == '\t' || c == '\n' || c == '\v' || c == '\f' || c == '\r' || c == ' '); +} + int isnumber (int c, int base) {