isblank() implementation.

This commit is contained in:
Ben Gras 2010-04-08 15:00:25 +00:00
parent 48c6bb79f4
commit 1c8c8aa4d8
3 changed files with 8 additions and 0 deletions

View File

@ -24,6 +24,7 @@ extern char __ctype[]; /* property array defined in chartab.c */
/* Function Prototypes (have to go before the macros). */
_PROTOTYPE( int isalnum, (int _c) ); /* alphanumeric [a-z], [A-Z], [0-9] */
_PROTOTYPE( int isalpha, (int _c) ); /* alphabetic */
_PROTOTYPE( int isblank, (int _c) ); /* blank space */
_PROTOTYPE( int iscntrl, (int _c) ); /* control characters */
_PROTOTYPE( int isdigit, (int _c) ); /* digit [0-9] */
_PROTOTYPE( int isgraph, (int _c) ); /* graphic character */
@ -51,6 +52,7 @@ _PROTOTYPE( int toascii, (int _c) ); /* convert to 7-bit ASCII */
#define isupper(c) ((unsigned) ((c)-'A') < 26)
#define isprint(c) ((unsigned) ((c)-' ') < 95)
#define isascii(c) ((unsigned) (c) < 128)
#define isblank(c) ((c) == ' ' || (c) == '\t')
#define toascii(c) ((c) & 0x7f)

View File

@ -22,6 +22,7 @@ SRCS+= \
isalnum.c \
isalpha.c \
isascii.c \
isblank.c \
iscntrl.c \
isdigit.c \
isgraph.c \

5
lib/libc/ansi/isblank.c Normal file
View File

@ -0,0 +1,5 @@
#include <ctype.h>
int (isblank)(int c) {
return isblank(c);
}