system.h (CTYPE_CONV, [...]): New macros.

* system.h (CTYPE_CONV, TOUPPER, TOLOWER): New macros.  Use
	CTYPE_CONV in all ctype macros.

	* cccp.c (initialize_char_syntax): Use uppercase ctype macro
	from system.h.

	* cexp.y (initialize_random_junk): Likewise.

	* c4x.c (c4x_interrupt_function_p, c4x_handle_pragma): Likewise.

	* i370.c (handle_pragma): Likewise.

	* i370.h (ASM_OUTPUT_LABELREF, ASM_OUTPUT_ASCII): Likewise.

	* v850.c (override_options): Likewise.

	* doprint.c (_doprnt): Likewise.

	* fixinc/fixincl.c (main, quoted_file_exists, extract_quoted_files):
	Likewise.

	* fixinc/server.c (load_data): Likewise.

	* fold-const.c (real_hex_to_f): Likewise.

	* genattr.c (write_upcase, gen_attr): Likewise.

	* genattrtab.c (convert_const_symbol_ref, evaluate_eq_attr,
	write_upcase): Likewise.

	* genemit.c (print_code): Likewise.

	* genopinit.c (gen_insn): Likewise.

	* genpeep.c (print_code): Likewise.

	* genrecog.c (print_code): Likewise.

	* optabs.c (init_libfuncs): Likewise.

ch:

	* lex.c (maybe_downcase, getlc, handle_generic_pragma,
	check_newline): Likewise.

f:

	* bad.c (ffebad_finish): Likewise.

	* fini.c (main): Likewise.

	* intrin.c (ffeintrin_init_0): Likewise.

	* lex.c (ffelex_hash_): Likewise.

	* src.c (ffesrc_init_1): Likewise.

From-SVN: r29463
This commit is contained in:
Kaveh R. Ghazi 1999-09-16 22:20:44 +00:00 committed by Kaveh Ghazi
parent 7bd41ea6c8
commit 92a438d13c
28 changed files with 166 additions and 103 deletions

View File

@ -1,3 +1,45 @@
Thu Sep 16 18:06:35 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* system.h (CTYPE_CONV, TOUPPER, TOLOWER): New macros. Use
CTYPE_CONV in all ctype macros.
* cccp.c (initialize_char_syntax): Use uppercase ctype macro
from system.h.
* cexp.y (initialize_random_junk): Likewise.
* c4x.c (c4x_interrupt_function_p, c4x_handle_pragma): Likewise.
* i370.c (handle_pragma): Likewise.
* i370.h (ASM_OUTPUT_LABELREF, ASM_OUTPUT_ASCII): Likewise.
* v850.c (override_options): Likewise.
* doprint.c (_doprnt): Likewise.
* fixinc/fixincl.c (main, quoted_file_exists, extract_quoted_files):
Likewise.
* fixinc/server.c (load_data): Likewise.
* fold-const.c (real_hex_to_f): Likewise.
* genattr.c (write_upcase, gen_attr): Likewise.
* genattrtab.c (convert_const_symbol_ref, evaluate_eq_attr,
write_upcase): Likewise.
* genemit.c (print_code): Likewise.
* genopinit.c (gen_insn): Likewise.
* genpeep.c (print_code): Likewise.
* genrecog.c (print_code): Likewise.
* optabs.c (init_libfuncs): Likewise.
Thu Sep 16 14:03:32 1999 Mark Mitchell <mark@codesourcery.com>
* haifa-sched.c (sched_analyze): Keep the list of notes organized

View File

@ -10131,9 +10131,9 @@ initialize_char_syntax ()
* refer to them.
*/
for (i = 'a'; i <= 'z'; i++) {
is_idchar[toupper(i)] = 1;
is_idchar[TOUPPER(i)] = 1;
is_idchar[i] = 1;
is_idstart[toupper(i)] = 1;
is_idstart[TOUPPER(i)] = 1;
is_idstart[i] = 1;
}
for (i = '0'; i <= '9'; i++)

View File

@ -2029,9 +2029,9 @@ initialize_random_junk ()
* refer to them.
*/
for (i = 'a'; i <= 'z'; i++) {
++is_idchar[toupper(i)];
++is_idchar[TOUPPER(i)];
++is_idchar[i];
++is_idstart[toupper(i)];
++is_idstart[TOUPPER(i)];
++is_idstart[i];
}
for (i = '0'; i <= '9'; i++)

View File

@ -1113,9 +1113,9 @@ initialize_random_junk ()
* refer to them.
*/
for (i = 'a'; i <= 'z'; i++) {
++is_idchar[toupper(i)];
++is_idchar[TOUPPER(i)];
++is_idchar[i];
++is_idstart[toupper(i)];
++is_idstart[TOUPPER(i)];
++is_idstart[i];
}
for (i = '0'; i <= '9'; i++)

View File

@ -1,3 +1,8 @@
1999-09-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* lex.c (maybe_downcase, getlc, handle_generic_pragma,
check_newline): Use uppercase ctype macro from system.h.
1999-09-15 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* actions.c (warn_unhandled): Use xstrdup, not xmalloc/strcpy.

View File

@ -888,7 +888,7 @@ maybe_downcase (str)
while (*str)
{
if (ISUPPER ((unsigned char) *str))
*str = tolower ((unsigned char)*str);
*str = TOLOWER (*str);
str++;
}
}
@ -1470,8 +1470,8 @@ getlc (file)
register int c;
c = getc (file);
if (ISUPPER (c) && ignore_case)
c = tolower (c);
if (ignore_case)
c = TOLOWER (c);
return c;
}
@ -1524,7 +1524,7 @@ handle_generic_pragma (buffer)
* buff ++ = c;
c = getc (finput);
}
while (c != EOF && isascii (c) && ! isspace (c) && c != '\n'
while (c != EOF && isascii (c) && ! ISSPACE (c) && c != '\n'
&& buff < buffer + 128); /* XXX shared knowledge about size of buffer. */
ungetc (c, finput);
@ -1577,8 +1577,8 @@ check_newline ()
it and ignore it; otherwise, ignore the line, with an error
if the word isn't `pragma', `ident', `define', or `undef'. */
if (ISUPPER (c) && ignore_case)
c = tolower (c);
if (ignore_case)
c = TOLOWER (c);
if (c >= 'a' && c <= 'z')
{

View File

@ -682,8 +682,8 @@ c4x_interrupt_function_p ()
&& current_function_name[2] == 'i'
&& current_function_name[3] == 'n'
&& current_function_name[4] == 't'
&& isdigit (current_function_name[5])
&& isdigit (current_function_name[6]);
&& ISDIGIT (current_function_name[5])
&& ISDIGIT (current_function_name[6]);
}
@ -4193,13 +4193,13 @@ c4x_handle_pragma (p_getc, p_ungetc, pname)
c = p_getc ();
while (c == ' ' || c == '\t') c = p_getc ();
if (! (isalpha(c) || c == '_' || c == '$' || c == '@'))
if (! (ISALPHA(c) || c == '_' || c == '$' || c == '@'))
return 0;
i = 0;
namesize = 16;
name = xmalloc (namesize);
while (isalnum (c) || c == '_' || c == '$' || c == '@')
while (ISALNUM (c) || c == '_' || c == '$' || c == '@')
{
if (i >= namesize-1)
{

View File

@ -976,7 +976,7 @@ handle_pragma (finput, node)
do {
*s++ = c;
c = getc (finput);
} while (isalnum(c) || c == '_');
} while (ISALNUM(c) || c == '_');
if (c == '\n')
goto PRAGMA_WARNING;
*s = 0;
@ -1014,7 +1014,7 @@ handle_pragma (finput, node)
}
*s++ = c;
c = getc (finput);
if (isspace(c) || c == ')')
if (ISSPACE(c) || c == ')')
goto PRAGMA_WARNING;
} while (c != '"');
*s = 0;

View File

@ -1138,7 +1138,7 @@ enum reg_class
ch = '@'; \
for (bp = temp; *bp; bp++) \
{ \
if (islower (*bp)) *bp = toupper (*bp); \
*bp = TOUPPER (*bp); \
else if (*bp == '_') *bp = ch; \
} \
fprintf (FILE, "%s", temp); \
@ -1256,7 +1256,7 @@ enum reg_class
for (j = 0, i = 0; i < LEN; j++, i++) \
{ \
c = PTR[i]; \
if (iscntrl (c) || c == '&') \
if (ISCNTRL (c) || c == '&') \
{ \
if (j % MVS_ASCII_TEXT_LENGTH != 0 ) \
fprintf (FILE, "'\n"); \

View File

@ -134,7 +134,7 @@ override_options ()
{
if (small_memory[i].value)
{
if (!isdigit (*small_memory[i].value))
if (!ISDIGIT (*small_memory[i].value))
error ("%s=%s is not numeric.",
small_memory[i].name,
small_memory[i].value);
@ -3022,8 +3022,7 @@ v850_handle_pragma (p_getc, p_ungetc, name)
/* Read string. */
do
* buff ++ = (c = p_getc ());
while (c != EOF && isascii (c)
&& (isalnum (c) || c == '_' || c == '.' || c == ' ')
while (c != EOF && (ISALNUM (c) || c == '_' || c == '.' || c == ' ')
&& (buff < buffer + 126));
if (c != '"')
@ -3033,8 +3032,7 @@ v850_handle_pragma (p_getc, p_ungetc, name)
break;
default:
while (c != EOF && isascii (c)
&& (isalnum (c) || c == '_' || c == '.')
while (c != EOF && (ISALNUM (c) || c == '_' || c == '.')
&& (buff < buffer + 126))
* buff ++ = (c = p_getc ());
break;

View File

@ -88,7 +88,7 @@ _doprnt (format, ap, stream)
if (*ptr == '*')
COPY_VA_INT;
else
while (isdigit(*ptr)) /* Handle explicit numeric value. */
while (ISDIGIT(*ptr)) /* Handle explicit numeric value. */
*sptr++ = *ptr++;
if (*ptr == '.')
@ -97,7 +97,7 @@ _doprnt (format, ap, stream)
if (*ptr == '*')
COPY_VA_INT;
else
while (isdigit(*ptr)) /* Handle explicit numeric value. */
while (ISDIGIT(*ptr)) /* Handle explicit numeric value. */
*sptr++ = *ptr++;
}
while (strchr ("hlL", *ptr))

View File

@ -1,3 +1,15 @@
Thu Sep 16 18:07:11 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* bad.c (ffebad_finish): Use uppercase ctype macro from system.h.
* fini.c (main): Likewise.
* intrin.c (ffeintrin_init_0): Likewise.
* lex.c (ffelex_hash_): Likewise.
* src.c (ffesrc_init_1): Likewise.
Tue Sep 14 12:14:28 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* g77spec.c (lang_specific_driver): Remove unnecessary argument in

View File

@ -461,7 +461,7 @@ ffebad_finish ()
{
char c;
c = toupper (s[0]);
c = TOUPPER (s[0]);
fprintf (stderr, "%c%s ", c, &s[1]);
}
else if (s[0] != '\0')

View File

@ -381,8 +381,8 @@ main (int argc, char **argv)
cc = buf[i];
if (ISALPHA (cc))
{
newname->name_uc[i] = toupper (cc);
newname->name_lc[i] = tolower (cc);
newname->name_uc[i] = TOUPPER (cc);
newname->name_lc[i] = TOLOWER (cc);
newname->name_ic[i] = cc;
}
else

View File

@ -1588,7 +1588,7 @@ ffeintrin_init_0 ()
if ((ISDIGIT (*p1) || (*p1 == '_')) && (*p1 == *p2) && (*p1 == *p3))
continue;
if (! ISUPPER ((unsigned char)*p1) || ! ISLOWER ((unsigned char)*p2)
|| (*p1 != toupper ((unsigned char)*p2))
|| (*p1 != TOUPPER (*p2))
|| ((*p3 != *p1) && (*p3 != *p2)))
break;
}

View File

@ -1126,8 +1126,9 @@ ffelex_hash_ (FILE *finput)
static char buffer [128];
char * buff = buffer;
/* Read the pragma name into a buffer. */
while (isspace (c = getc (finput)))
/* Read the pragma name into a buffer.
ISSPACE() may evaluate its argument more than once! */
while (((c = getc (finput)), ISSPACE(c)))
continue;
do
@ -1135,7 +1136,7 @@ ffelex_hash_ (FILE *finput)
* buff ++ = c;
c = getc (finput);
}
while (c != EOF && ! isspace (c) && c != '\n'
while (c != EOF && ! ISSPACE (c) && c != '\n'
&& buff < buffer + 128);
pragma_ungetc (c);

View File

@ -120,10 +120,10 @@ ffesrc_init_1 ()
}
for (i = 'A'; i <= 'Z'; ++i)
ffesrc_tolower_[i] = tolower (i);
ffesrc_tolower_[i] = TOLOWER (i);
for (i = 'a'; i <= 'z'; ++i)
ffesrc_toupper_[i] = toupper (i);
ffesrc_toupper_[i] = TOUPPER (i);
ffesrc_check_symbol_ = (ffe_case_symbol () != FFE_caseNONE);
@ -153,7 +153,7 @@ ffesrc_init_1 ()
if (ffesrc_ok_match_init_lower_)
for (i = 'a'; i <= 'z'; ++i)
ffesrc_char_match_init_[i] = toupper (i);
ffesrc_char_match_init_[i] = TOUPPER (i);
else
for (i = 'a'; i <= 'z'; ++i)
ffesrc_char_match_init_[i] = FFESRC_INVALID_SYMBOL_CHAR_;
@ -164,21 +164,21 @@ ffesrc_init_1 ()
if (ffesrc_ok_match_noninit_lower_)
for (i = 'a'; i <= 'z'; ++i)
ffesrc_char_match_noninit_[i] = toupper (i);
ffesrc_char_match_noninit_[i] = TOUPPER (i);
else
for (i = 'a'; i <= 'z'; ++i)
ffesrc_char_match_noninit_[i] = FFESRC_INVALID_SYMBOL_CHAR_;
if (ffe_case_source () == FFE_caseLOWER)
for (i = 'A'; i <= 'Z'; ++i)
ffesrc_char_source_[i] = tolower (i);
ffesrc_char_source_[i] = TOLOWER (i);
else if (ffe_case_source () == FFE_caseUPPER)
for (i = 'a'; i <= 'z'; ++i)
ffesrc_char_source_[i] = toupper (i);
ffesrc_char_source_[i] = TOUPPER (i);
if (ffe_case_match () == FFE_caseLOWER)
for (i = 'A'; i <= 'Z'; ++i)
ffesrc_char_internal_init_[i] = tolower (i);
ffesrc_char_internal_init_[i] = TOLOWER (i);
switch (ffe_case_symbol ())
{

View File

@ -221,13 +221,13 @@ main (argc, argv)
{
if (fgets (pz_buf, MAXPATHLEN, stdin) == (char *) NULL)
break;
while (isspace (*pz_buf))
while (ISSPACE (*pz_buf))
pz_buf++;
if ((*pz_buf == '\0') || (*pz_buf == '#'))
continue;
apz_names[file_name_ct++] = pz_buf;
pz_buf += strlen (pz_buf);
while (isspace (pz_buf[-1]))
while (ISSPACE (pz_buf[-1]))
pz_buf--;
*pz_buf++ = '\0';
}
@ -813,7 +813,7 @@ quoted_file_exists (pz_src_path, pz_file_path, pz_file)
for (;;) {
char ch = *pz_file++;
if (! isgraph( ch ))
if (! ISGRAPH(ch))
return 0;
if (ch == '"')
break;
@ -875,9 +875,10 @@ extract_quoted_files (pz_data, pz_file_name, p_re_match)
pz_incl_quot += p_re_match->rm_so;
/* Skip forward to the included file name */
while (isspace (*pz_incl_quot))
while (ISSPACE (*pz_incl_quot))
pz_incl_quot++;
while (isspace (*++pz_incl_quot))
/* ISSPACE() may evaluate is argument more than once! */
while ((++pz_incl_quot, ISSPACE (*pz_incl_quot)))
;
pz_incl_quot += sizeof ("include") - 1;
while (*pz_incl_quot++ != '"')

View File

@ -163,7 +163,7 @@ load_data (fp)
return (char *) NULL;
}
while ((pz_scan > pz_text) && isspace (pz_scan[-1]))
while ((pz_scan > pz_text) && ISSPACE (pz_scan[-1]))
pz_scan--;
*pz_scan = NUL;
return realloc ((void *) pz_text, strlen (pz_text) + 1);

View File

@ -1072,7 +1072,7 @@ real_hex_to_f (s, mode)
}
/* Value of exponent.
The exponent field is a decimal integer. */
while (isdigit(*p))
while (ISDIGIT(*p))
{
k = (*p++ & 0x7f) - '0';
expon = 10 * expon + k;

View File

@ -56,7 +56,7 @@ struct function_unit
static void extend_range PROTO((struct range *, int, int));
static void init_range PROTO((struct range *));
static void write_upcase PROTO((char *));
static void write_upcase PROTO((const char *));
static void gen_attr PROTO((rtx));
static void write_units PROTO((int, struct range *, struct range *,
struct range *, struct range *,
@ -81,13 +81,10 @@ init_range (range)
static void
write_upcase (str)
char *str;
const char *str;
{
for (; *str; str++)
if (ISLOWER(*str))
printf ("%c", toupper(*str));
else
printf ("%c", *str);
putchar (TOUPPER(*str));
}
static void
@ -117,10 +114,8 @@ gen_attr (attr)
write_upcase (XSTR (attr, 0));
printf ("_");
}
else if (ISLOWER(*p))
printf ("%c", toupper(*p));
else
printf ("%c", *p);
putchar (TOUPPER(*p));
}
printf ("};\n");

View File

@ -434,7 +434,7 @@ static void write_attr_case PROTO((struct attr_desc *, struct attr_value *,
static void write_unit_name PROTO((const char *, int, const char *));
static void write_attr_valueq PROTO((struct attr_desc *, char *));
static void write_attr_value PROTO((struct attr_desc *, rtx));
static void write_upcase PROTO((char *));
static void write_upcase PROTO((const char *));
static void write_indent PROTO((int));
static void write_eligible_delay PROTO((const char *));
static void write_function_unit_info PROTO((void));
@ -1354,8 +1354,7 @@ convert_const_symbol_ref (exp, attr)
strcat (p, "_");
strcat (p, XSTR (av->value, 0));
for (; *p != '\0'; p++)
if (ISLOWER(*p))
*p = toupper (*p);
*p = TOUPPER (*p);
value = attr_rtx (SYMBOL_REF, string);
RTX_UNCHANGING_P (value) = 1;
@ -2838,8 +2837,7 @@ evaluate_eq_attr (exp, value, insn_code, insn_index)
strcat (string, "_");
strcat (string, XSTR (exp, 1));
for (p = string; *p ; p++)
if (ISLOWER(*p))
*p = toupper (*p);
*p = TOUPPER (*p);
newexp = attr_rtx (EQ, value,
attr_rtx (SYMBOL_REF,
@ -5351,13 +5349,14 @@ write_attr_value (attr, value)
static void
write_upcase (str)
char *str;
const char *str;
{
while (*str)
if (ISLOWER(*str))
printf ("%c", toupper(*str++));
else
printf ("%c", *str++);
{
/* The argument of TOUPPER should not have side effects. */
putchar (TOUPPER(*str));
str++;
}
}
static void

View File

@ -135,12 +135,7 @@ print_code (code)
{
register const char *p1;
for (p1 = GET_RTX_NAME (code); *p1; p1++)
{
if (ISLOWER(*p1))
putchar (toupper(*p1));
else
putchar (*p1);
}
putchar (TOUPPER(*p1));
}
static void

View File

@ -195,7 +195,7 @@ gen_insn (insn)
for (i = ((int) MAX_MACHINE_MODE) - 1; i >= 0; i--)
{
for (p = GET_MODE_NAME(i), q = np; *p; p++, q++)
if (tolower ((unsigned char)*p) != *q)
if (TOLOWER (*p) != *q)
break;
if (*p == 0
@ -249,11 +249,11 @@ gen_insn (insn)
break;
case 'a':
for (np = GET_MODE_NAME(m1); *np; np++)
printf ("%c", tolower ((unsigned char)*np));
putchar (TOLOWER (*np));
break;
case 'b':
for (np = GET_MODE_NAME(m2); *np; np++)
printf ("%c", tolower ((unsigned char)*np));
putchar (TOLOWER (*np));
break;
case 'A':
printf ("%smode", GET_MODE_NAME(m1));
@ -266,7 +266,7 @@ gen_insn (insn)
break;
case 'C':
for (np = GET_RTX_NAME(op); *np; np++)
printf ("%c", toupper ((unsigned char)*np));
putchar (TOUPPER (*np));
break;
}
}

View File

@ -370,12 +370,7 @@ print_code (code)
{
register const char *p1;
for (p1 = GET_RTX_NAME (code); *p1; p1++)
{
if (ISLOWER(*p1))
putchar (toupper(*p1));
else
putchar (*p1);
}
putchar (TOUPPER(*p1));
}
PTR

View File

@ -1639,12 +1639,7 @@ print_code (code)
{
register const char *p1;
for (p1 = GET_RTX_NAME (code); *p1; p1++)
{
if (ISLOWER(*p1))
putchar (toupper(*p1));
else
putchar (*p1);
}
putchar (TOUPPER(*p1));
}
static int

View File

@ -4324,7 +4324,7 @@ init_libfuncs (optable, first_mode, last_mode, opname, suffix)
for (q = opname; *q; )
*p++ = *q++;
for (q = mname; *q; q++)
*p++ = tolower ((unsigned char)*q);
*p++ = TOLOWER (*q);
*p++ = suffix;
*p++ = '\0';

View File

@ -89,27 +89,52 @@ extern int fputs_unlocked PROTO ((const char *, FILE *));
# define IN_CTYPE_DOMAIN(c) isascii(c)
#endif
/* The ctype functions are often implemented as macros which do
lookups in arrays using the parameter as the offset. If the ctype
function parameter is a char, then gcc will (appropriately) warn
that a "subscript has type char". Using a (signed) char as a subscript
is bad because you may get negative offsets and thus it is not 8-bit
safe. The CTYPE_CONV macro ensures that the parameter is cast to an
unsigned char when a char is passed in. When an int is passed in, the
parameter is left alone so we don't lose EOF.
*/
#define CTYPE_CONV(CH) \
(sizeof(CH) == sizeof(unsigned char) ? (int)(unsigned char)(CH) : (int)(CH))
/* WARNING! The argument to the ctype replacement macros below is
evaluated more than once so it must not have side effects! */
#ifdef isblank
# define ISBLANK(c) (IN_CTYPE_DOMAIN (c) && isblank (c))
# define ISBLANK(c) (IN_CTYPE_DOMAIN (c) && isblank (CTYPE_CONV(c)))
#else
# define ISBLANK(c) ((c) == ' ' || (c) == '\t')
#endif
#ifdef isgraph
# define ISGRAPH(c) (IN_CTYPE_DOMAIN (c) && isgraph (c))
# define ISGRAPH(c) (IN_CTYPE_DOMAIN (c) && isgraph (CTYPE_CONV(c)))
#else
# define ISGRAPH(c) (IN_CTYPE_DOMAIN (c) && isprint (c) && !isspace (c))
# define ISGRAPH(c) (IN_CTYPE_DOMAIN (c) && isprint (CTYPE_CONV(c)) && !isspace (CTYPE_CONV(c)))
#endif
#define ISPRINT(c) (IN_CTYPE_DOMAIN (c) && isprint (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))
#define ISDIGIT_LOCALE(c) (IN_CTYPE_DOMAIN (c) && isdigit (c))
#define ISPRINT(c) (IN_CTYPE_DOMAIN (c) && isprint (CTYPE_CONV(c)))
#define ISALNUM(c) (IN_CTYPE_DOMAIN (c) && isalnum (CTYPE_CONV(c)))
#define ISALPHA(c) (IN_CTYPE_DOMAIN (c) && isalpha (CTYPE_CONV(c)))
#define ISCNTRL(c) (IN_CTYPE_DOMAIN (c) && iscntrl (CTYPE_CONV(c)))
#define ISLOWER(c) (IN_CTYPE_DOMAIN (c) && islower (CTYPE_CONV(c)))
#define ISPUNCT(c) (IN_CTYPE_DOMAIN (c) && ispunct (CTYPE_CONV(c)))
#define ISSPACE(c) (IN_CTYPE_DOMAIN (c) && isspace (CTYPE_CONV(c)))
#define ISUPPER(c) (IN_CTYPE_DOMAIN (c) && isupper (CTYPE_CONV(c)))
#define ISXDIGIT(c) (IN_CTYPE_DOMAIN (c) && isxdigit (CTYPE_CONV(c)))
#define ISDIGIT_LOCALE(c) (IN_CTYPE_DOMAIN (c) && isdigit (CTYPE_CONV(c)))
#if STDC_HEADERS
# define TOLOWER(c) (tolower (CTYPE_CONV(c)))
# define TOUPPER(c) (toupper (CTYPE_CONV(c)))
#else
# define TOLOWER(c) (ISUPPER (c) ? tolower (CTYPE_CONV(c)) : (c))
# define TOUPPER(c) (ISLOWER (c) ? toupper (CTYPE_CONV(c)) : (c))
#endif
/* ISDIGIT differs from ISDIGIT_LOCALE, as follows:
- Its arg may be any int or unsigned int; it need not be an unsigned char.