diff options
Diffstat (limited to 'lib/setup.h')
-rw-r--r-- | lib/setup.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/setup.h b/lib/setup.h index a02834ecd..4f1a3c1cd 100644 --- a/lib/setup.h +++ b/lib/setup.h @@ -348,6 +348,16 @@ int fileno( FILE *stream); #define DEBUGF(x) #endif +#ifndef ISSPACE +/* typecasting craze to avoid negative number inputs to these macros */ +#define ISSPACE(x) (isspace((int)((unsigned char)x))) +#define ISDIGIT(x) (isdigit((int)((unsigned char)x))) +#define ISALNUM(x) (isalnum((int)((unsigned char)x))) +#define ISXDIGIT(x) (isxdigit((int)((unsigned char)x))) +#define ISGRAPH(x) (isgraph((int)((unsigned char)x))) +#define ISALPHA(x) (isalpha((int)((unsigned char)x))) +#endif + /* * Include macros and defines that should only be processed once. */ |