aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKarl Heuer1993-11-20 04:05:45 +0000
committerKarl Heuer1993-11-20 04:05:45 +0000
commit6b528f2f1863830670d0b0477209e4f47c213137 (patch)
tree29a1b13b9216855a894cf7fda39c6b3159db584d /src
parentc059b5eaa119e42de43b4fad3408b58f37a49147 (diff)
downloademacs-6b528f2f1863830670d0b0477209e4f47c213137.tar.gz
emacs-6b528f2f1863830670d0b0477209e4f47c213137.zip
*** empty log message ***
Diffstat (limited to 'src')
-rw-r--r--src/regex.c34
1 files changed, 18 insertions, 16 deletions
diff --git a/src/regex.c b/src/regex.c
index 3d4346949d1..2d28eda7016 100644
--- a/src/regex.c
+++ b/src/regex.c
@@ -148,32 +148,34 @@ init_syntax_once ()
148 macros don't need to be guarded with references to isascii. ... 148 macros don't need to be guarded with references to isascii. ...
149 Defining isascii to 1 should let any compiler worth its salt 149 Defining isascii to 1 should let any compiler worth its salt
150 eliminate the && through constant folding." */ 150 eliminate the && through constant folding." */
151#if ! defined (isascii) || defined (STDC_HEADERS) 151
152#undef isascii 152#if defined (STDC_HEADERS) || (!defined (isascii) && !defined (HAVE_ISASCII))
153#define isascii(c) 1 153#define ISASCII(c) 1
154#else
155#define ISASCII(c) isascii(c)
154#endif 156#endif
155 157
156#ifdef isblank 158#ifdef isblank
157#define ISBLANK(c) (isascii (c) && isblank (c)) 159#define ISBLANK(c) (ISASCII (c) && isblank (c))
158#else 160#else
159#define ISBLANK(c) ((c) == ' ' || (c) == '\t') 161#define ISBLANK(c) ((c) == ' ' || (c) == '\t')
160#endif 162#endif
161#ifdef isgraph 163#ifdef isgraph
162#define ISGRAPH(c) (isascii (c) && isgraph (c)) 164#define ISGRAPH(c) (ISASCII (c) && isgraph (c))
163#else 165#else
164#define ISGRAPH(c) (isascii (c) && isprint (c) && !isspace (c)) 166#define ISGRAPH(c) (ISASCII (c) && isprint (c) && !isspace (c))
165#endif 167#endif
166 168
167#define ISPRINT(c) (isascii (c) && isprint (c)) 169#define ISPRINT(c) (ISASCII (c) && isprint (c))
168#define ISDIGIT(c) (isascii (c) && isdigit (c)) 170#define ISDIGIT(c) (ISASCII (c) && isdigit (c))
169#define ISALNUM(c) (isascii (c) && isalnum (c)) 171#define ISALNUM(c) (ISASCII (c) && isalnum (c))
170#define ISALPHA(c) (isascii (c) && isalpha (c)) 172#define ISALPHA(c) (ISASCII (c) && isalpha (c))
171#define ISCNTRL(c) (isascii (c) && iscntrl (c)) 173#define ISCNTRL(c) (ISASCII (c) && iscntrl (c))
172#define ISLOWER(c) (isascii (c) && islower (c)) 174#define ISLOWER(c) (ISASCII (c) && islower (c))
173#define ISPUNCT(c) (isascii (c) && ispunct (c)) 175#define ISPUNCT(c) (ISASCII (c) && ispunct (c))
174#define ISSPACE(c) (isascii (c) && isspace (c)) 176#define ISSPACE(c) (ISASCII (c) && isspace (c))
175#define ISUPPER(c) (isascii (c) && isupper (c)) 177#define ISUPPER(c) (ISASCII (c) && isupper (c))
176#define ISXDIGIT(c) (isascii (c) && isxdigit (c)) 178#define ISXDIGIT(c) (ISASCII (c) && isxdigit (c))
177 179
178#ifndef NULL 180#ifndef NULL
179#define NULL 0 181#define NULL 0