diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 1998-05-18 06:03:37 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 1998-05-18 06:03:37 +0000 |
commit | 41c6972dd515d42a321ce0dbd329b1aec5fe5185 (patch) | |
tree | 3b415bb320c629f5748262d8a3e395f08fda31de | |
parent | c0e5ea941820076461beabe6c8342b8a47484319 (diff) |
isascii() removed
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/v1_1r@217 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | regex.c | 31 |
1 files changed, 13 insertions, 18 deletions
@@ -195,32 +195,27 @@ init_syntax_once() macros don't need to be guarded with references to isascii. ... Defining isascii to 1 should let any compiler worth its salt eliminate the && through constant folding." */ -#if ! defined (isascii) || defined (STDC_HEADERS) -#undef isascii -#define isascii(c) 1 -#endif - #ifdef isblank -#define ISBLANK(c) (isascii (c) && isblank (c)) +#define ISBLANK(c) isblank ((unsigned char)c) #else #define ISBLANK(c) ((c) == ' ' || (c) == '\t') #endif #ifdef isgraph -#define ISGRAPH(c) (isascii (c) && isgraph (c)) +#define ISGRAPH(c) isgraph ((unsigned char)c) #else -#define ISGRAPH(c) (isascii (c) && isprint (c) && !isspace (c)) +#define ISGRAPH(c) (isprint ((unsigned char)c) && !isspace ((unsigned char)c)) #endif -#define ISPRINT(c) (isascii (c) && isprint (c)) -#define ISDIGIT(c) (isascii (c) && isdigit (c)) -#define ISALNUM(c) (isascii (c) && isalnum (c)) -#define ISALPHA(c) (isascii (c) && isalpha (c)) -#define ISCNTRL(c) (isascii (c) && iscntrl (c)) -#define ISLOWER(c) (isascii (c) && islower (c)) -#define ISPUNCT(c) (isascii (c) && ispunct (c)) -#define ISSPACE(c) (isascii (c) && isspace (c)) -#define ISUPPER(c) (isascii (c) && isupper (c)) -#define ISXDIGIT(c) (isascii (c) && isxdigit (c)) +#define ISPRINT(c) isprint ((unsigned char)c) +#define ISDIGIT(c) isdigit ((unsigned char)c) +#define ISALNUM(c) isalnum ((unsigned char)c) +#define ISALPHA(c) isalpha ((unsigned char)c) +#define ISCNTRL(c) iscntrl ((unsigned char)c) +#define ISLOWER(c) islower ((unsigned char)c) +#define ISPUNCT(c) ispunct ((unsigned char)c) +#define ISSPACE(c) isspace ((unsigned char)c) +#define ISUPPER(c) isupper ((unsigned char)c) +#define ISXDIGIT(c) isxdigit ((unsigned char)c) /* These are the command codes that appear in compiled regular expressions, one per byte. Some command codes are followed by |