blank.h (691B)
1 /* 2 * isblank() and iswblank() are not available with many pre-XSH6 3 * systems. Check whether isblank was defined, and assume it is 4 * not available if not. 5 */ 6 /* Sccsid @(#)blank.h 1.3 (gritter) 5/1/04 */ 7 8 #ifndef __dietlibc__ 9 #ifndef LIBCOMMON_BLANK_H 10 #define LIBCOMMON_BLANK_H 1 11 12 #include <ctype.h> 13 #include <wctype.h> 14 15 #ifndef isblank 16 17 static 18 #ifdef __GNUC__ 19 __inline__ 20 #endif /* __GNUC__ */ 21 int 22 my_isblank(int c) 23 { 24 return c == ' ' || c == '\t'; 25 } 26 #define isblank(c) my_isblank(c) 27 28 static int 29 my_iswblank(wint_t c) 30 { 31 return c == L' ' || c == L'\t'; 32 } 33 #undef iswblank 34 #define iswblank(c) my_iswblank(c) 35 36 #endif /* !isblank */ 37 #endif /* !LIBCOMMON_BLANK_H */ 38 #endif /* !__dietlibc__ */