Skip to content
Snippets Groups Projects
Commit dac4e993 authored by Henrik (Grubba) Grubbström's avatar Henrik (Grubba) Grubbström
Browse files

Minor portability fix for WIDE_ISSPACE().

Rev: src/port.h:1.26
parent bbee34e4
Branches
No related tags found
No related merge requests found
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
\*/ \*/
/* /*
* $Id: port.h,v 1.25 2000/04/01 07:27:02 hubbe Exp $ * $Id: port.h,v 1.26 2000/04/01 11:50:58 grubba Exp $
*/ */
#ifndef PORT_H #ifndef PORT_H
#define PORT_H #define PORT_H
...@@ -16,14 +16,22 @@ ...@@ -16,14 +16,22 @@
#define STRUCT_TIMEVAL_DECLARED #define STRUCT_TIMEVAL_DECLARED
struct timeval; struct timeval;
#endif #endif
#ifdef HAVE_ISSPACE #ifdef HAVE_ISSPACE
#define ISSPACE(X) isspace(X) #define ISSPACE(X) isspace(X)
#else #else
#define ISSPACE(X) ("0012345678SSSSS456789012345678901S3456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789000000"[(X)+1] == 'S') #define ISSPACE(X) ("0012345678SSSSS456789012345678901" \
"S3456789012345678901234567890123" \
"45678901234567890123456789012345" \
"67890123456789012345678901234567" \
"89012345678901234567890123456789" \
"01234567890123456789012345678901" \
"23456789012345678901234567890123" \
"45678901234567890123456789000000"[(X)+1] == 'S')
#endif #endif
/* Warning, these run 'C' more than once */ /* Warning, these run 'C' more than once */
#define WIDE_ISSPACE(C) (((C) < 256)?isspace(C):0) #define WIDE_ISSPACE(C) (((C) < 256)?ISSPACE(C):0)
#define WIDE_ISIDCHAR(C) (((C) < 256)?isidchar(C):1) #define WIDE_ISIDCHAR(C) (((C) < 256)?isidchar(C):1)
#define WIDE_ISALNUM(C) (((C) < 256)?isalnum(C):0) #define WIDE_ISALNUM(C) (((C) < 256)?isalnum(C):0)
#define WIDE_ISDIGIT(C) (((C) < 256)?isdigit(C):0) #define WIDE_ISDIGIT(C) (((C) < 256)?isdigit(C):0)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment