diff options
author | Thomas Fitzsimmons <fitzsim@redhat.com> | 2002-06-18 22:49:17 +0400 |
---|---|---|
committer | Thomas Fitzsimmons <fitzsim@redhat.com> | 2002-06-18 22:49:17 +0400 |
commit | af1c257a9b6453c9364fa3bf301fb236fe90e664 (patch) | |
tree | 78d27e798c0c64be185c17fb76782835f96dbd60 /newlib/libc/ctype/isblank.c | |
parent | 4e04fa902a3117ff9f2f81237a19e892314e924f (diff) |
* libc/include/ctype.h: Remove isblank macro.
* libc/ctype/Makefile.am (LIB_SOURCES): Add isblank.c.
* libc/ctype/isblank.c: New file.
* libc/include/ctype.h [!__STRICT_ANSI__]: Add isblank
declaration. Add isblank macro.
Diffstat (limited to 'newlib/libc/ctype/isblank.c')
-rw-r--r-- | newlib/libc/ctype/isblank.c | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/newlib/libc/ctype/isblank.c b/newlib/libc/ctype/isblank.c new file mode 100644 index 000000000..c75d8ab02 --- /dev/null +++ b/newlib/libc/ctype/isblank.c @@ -0,0 +1,40 @@ + +/* +FUNCTION + <<isblank>>---blank character predicate + +INDEX + isblank + +ANSI_SYNOPSIS + #include <ctype.h> + int isblank(int <[c]>); + +TRAD_SYNOPSIS + #include <ctype.h> + int isblank(<[c]>); + +DESCRIPTION +<<isblank>> is a macro which classifies ASCII integer values by table +lookup. It is a predicate returning non-zero for blank characters, and 0 +for other characters. + +You can use a compiled subroutine instead of the macro definition by +undefining the macro using `<<#undef isblank>>'. + +RETURNS +<<isblank>> returns non-zero if <[c]> is a blank character. + +*/ + +#include <_ansi.h> +#include <ctype.h> + + + +#undef isblank +int +_DEFUN(isblank,(c),int c) +{ + return (c == ' ' || c == '\t'); +} |