From 3bd332e0480039351f7af17df00264bf5ee732d7 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Sat, 9 Sep 2000 15:56:26 +0000 Subject: [PATCH] Rename ISASCII to IN_CTYPE_DOMAIN. --- lib/fnmatch.c | 6 +++--- lib/mbswidth.c | 8 +++----- lib/quotearg.c | 9 ++++----- lib/regex.c | 31 +++++++++++++++---------------- 4 files changed, 25 insertions(+), 29 deletions(-) diff --git a/lib/fnmatch.c b/lib/fnmatch.c index d99363312..eb45e0197 100644 --- a/lib/fnmatch.c +++ b/lib/fnmatch.c @@ -40,12 +40,12 @@ # if defined STDC_HEADERS || !defined isascii -# define ISASCII(c) 1 +# define IN_CTYPE_DOMAIN(c) 1 # else -# define ISASCII(c) isascii(c) +# define IN_CTYPE_DOMAIN(c) isascii(c) # endif -# define ISUPPER(c) (ISASCII (c) && isupper (c)) +# define ISUPPER(c) (IN_CTYPE_DOMAIN (c) && isupper (c)) # ifndef errno diff --git a/lib/mbswidth.c b/lib/mbswidth.c index d187bc068..f196ac18d 100644 --- a/lib/mbswidth.c +++ b/lib/mbswidth.c @@ -74,15 +74,13 @@ int wcwidth (); /* Get ISPRINT. */ #if defined (STDC_HEADERS) || (!defined (isascii) && !defined (HAVE_ISASCII)) -/* Undefine to protect against the definition in wctype.h of solaris2.6. */ -# undef ISASCII -# define ISASCII(c) 1 +# define IN_CTYPE_DOMAIN(c) 1 #else -# define ISASCII(c) isascii (c) +# define IN_CTYPE_DOMAIN(c) isascii(c) #endif /* Undefine to protect against the definition in wctype.h of solaris2.6. */ #undef ISPRINT -#define ISPRINT(c) (ISASCII (c) && isprint (c)) +#define ISPRINT(c) (IN_CTYPE_DOMAIN (c) && isprint (c)) #include "mbswidth.h" diff --git a/lib/quotearg.c b/lib/quotearg.c index 68458940a..d5fbc9e60 100644 --- a/lib/quotearg.c +++ b/lib/quotearg.c @@ -92,15 +92,14 @@ size_t mbrtowc (); #define INT_BITS (sizeof (int) * CHAR_BIT) #if defined (STDC_HEADERS) || (!defined (isascii) && !defined (HAVE_ISASCII)) -/* Undefine to protect against the definition in wctype.h of solaris2.6. */ -# undef ISASCII -# define ISASCII(c) 1 +# define IN_CTYPE_DOMAIN(c) 1 #else -# define ISASCII(c) isascii (c) +# define IN_CTYPE_DOMAIN(c) isascii(c) #endif + /* Undefine to protect against the definition in wctype.h of solaris2.6. */ #undef ISPRINT -#define ISPRINT(c) (ISASCII (c) && isprint (c)) +#define ISPRINT(c) (IN_CTYPE_DOMAIN (c) && isprint (c)) struct quoting_options { diff --git a/lib/regex.c b/lib/regex.c index 8a20da182..d4c273961 100644 --- a/lib/regex.c +++ b/lib/regex.c @@ -197,35 +197,34 @@ char *realloc (); eliminate the && through constant folding." Solaris defines some of these symbols so we must undefine them first. */ -#undef ISASCII #if defined STDC_HEADERS || (!defined isascii && !defined HAVE_ISASCII) -# define ISASCII(c) 1 +# define IN_CTYPE_DOMAIN(c) 1 #else -# define ISASCII(c) isascii(c) +# define IN_CTYPE_DOMAIN(c) isascii(c) #endif #ifdef isblank -# define ISBLANK(c) (ISASCII (c) && isblank (c)) +# define ISBLANK(c) (IN_CTYPE_DOMAIN (c) && isblank (c)) #else # define ISBLANK(c) ((c) == ' ' || (c) == '\t') #endif #ifdef isgraph -# define ISGRAPH(c) (ISASCII (c) && isgraph (c)) +# define ISGRAPH(c) (IN_CTYPE_DOMAIN (c) && isgraph (c)) #else -# define ISGRAPH(c) (ISASCII (c) && isprint (c) && !isspace (c)) +# define ISGRAPH(c) (IN_CTYPE_DOMAIN (c) && isprint (c) && !isspace (c)) #endif #undef ISPRINT -#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) (IN_CTYPE_DOMAIN (c) && isprint (c)) +#define ISDIGIT(c) (IN_CTYPE_DOMAIN (c) && isdigit (c)) +#define ISALNUM(c) (IN_CTYPE_DOMAIN (c) && isalnum (c)) +#define ISALPHA(c) (IN_CTYPE_DOMAIN (c) && isalpha (c)) +#define ISCNTRL(c) (IN_CTYPE_DOMAIN (c) && iscntrl (c)) +#define ISLOWER(c) (IN_CTYPE_DOMAIN (c) && islower (c)) +#define ISPUNCT(c) (IN_CTYPE_DOMAIN (c) && ispunct (c)) +#define ISSPACE(c) (IN_CTYPE_DOMAIN (c) && isspace (c)) +#define ISUPPER(c) (IN_CTYPE_DOMAIN (c) && isupper (c)) +#define ISXDIGIT(c) (IN_CTYPE_DOMAIN (c) && isxdigit (c)) #ifdef _tolower # define TOLOWER(c) _tolower(c) -- 2.11.0