and/or fold extra calls into fewer ones.
* collect2.c (dump_file): Likewise.
* cppexp.c (parse_number): Likewise.
* cpplex.c (_cpp_lex_direct): Likewise.
* final.c (output_asm_insn, asm_fprintf): Likewise.
* fix-header.c (inf_scan_ident, main): Likewise.
* fixinc/fixfixes.c (char_macro_use_fix, char_macro_def_fix):
Likewise.
* fold-const.c (real_hex_to_f): Likewise.
* gen-protos.c (parse_fn_proto): Likewise.
* genattrtab.c (check_attr_test, check_attr_value): Likewise.
* genrecog.c (change_state, write_action): Likewise.
* gensupport.c (shift_output_template): Likewise.
* local-alloc.c (requires_inout): Likewise.
* mips-tfile.c (IS_ASM_IDENT): Likewise.
* protoize.c (is_id_char, main): Likewise.
* real.c (asctoeg): Likewise.
* recog.c (asm_operand_ok): Likewise.
* reload.c (find_reloads): Likewise.
* scan.c (scan_identget_token): Likewise.
* sched-vis.c (print_value): Likewise.
* stringpool.c (ggc_alloc_string): Likewise.
* toplev.c (read_integral_parameter, decode_g_option): Likewise.
* tradcif.y (parse_number, yylex, parse_escape): Likewise.
* tradcpp.c (rescan): Likewise.
* tree.c (clean_symbol_name): Likewise.
* varasm.c (decode_reg_name): Likewise.
* alpha.h (ASM_OUTPUT_ASCII): Likewise.
* darwin.c (name_needs_quotes, func_name_maybe_scoped): Likewise.
* dsp16xx.h (ASM_OUTPUT_ASCII): Likewise.
* m88k.c (output_ascii): Likewise.
* m88k.h (OVERRIDE_OPTIONS): Likewise.
* mcore.h (REG_CLASS_FROM_LETTER): Likewise.
* ns32k/encore.h (ASM_OUTPUT_ASCII): Likewise.
* sh.h (REG_CLASS_FROM_LETTER): Likewise.
cp:
* xref.c (GNU_xref_member): Use safe-ctype macros and/or fold
extra calls into fewer ones.
f:
* bad.c (ffebad_finish): Use safe-ctype macros and/or fold extra
calls into fewer ones.
* implic.c (ffeimplic_lookup_): Likewise.
* intdoc.c (dumpimp): Likewise.
* intrin.c (ffeintrin_init_0): Likewise.
* lex.c (ffelex_backslash_, ffelex_cfebackslash_, ffelex_hash_):
Likewise.
* lex.h (ffelex_is_firstnamechar): Likewise.
* target.c (ffetarget_integerhex): Likewise.
java:
* gjavah.c (jni_print_char, decode_signature_piece): Use
safe-ctype macros and/or fold extra calls into fewer ones.
* lex.c (java_read_unicode, java_lex): Likewise.
* lex.h (JAVA_START_CHAR_P, JAVA_PART_CHAR_P, JAVA_ASCII_DIGIT,
JAVA_ASCII_HEXDIGIT, JAVA_ASCII_LETTER): Likewise.
* mangle_name.c (append_unicode_mangled_name,
unicode_mangling_length): Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@46397
138bc75d-0d04-0410-961f-
82ee72b054a4
+2001-10-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * c-format.c (maybe_read_dollar_number): Use safe-ctype macros
+ and/or fold extra calls into fewer ones.
+ * collect2.c (dump_file): Likewise.
+ * cppexp.c (parse_number): Likewise.
+ * cpplex.c (_cpp_lex_direct): Likewise.
+ * final.c (output_asm_insn, asm_fprintf): Likewise.
+ * fix-header.c (inf_scan_ident, main): Likewise.
+ * fixinc/fixfixes.c (char_macro_use_fix, char_macro_def_fix):
+ Likewise.
+ * fold-const.c (real_hex_to_f): Likewise.
+ * gen-protos.c (parse_fn_proto): Likewise.
+ * genattrtab.c (check_attr_test, check_attr_value): Likewise.
+ * genrecog.c (change_state, write_action): Likewise.
+ * gensupport.c (shift_output_template): Likewise.
+ * local-alloc.c (requires_inout): Likewise.
+ * mips-tfile.c (IS_ASM_IDENT): Likewise.
+ * protoize.c (is_id_char, main): Likewise.
+ * real.c (asctoeg): Likewise.
+ * recog.c (asm_operand_ok): Likewise.
+ * reload.c (find_reloads): Likewise.
+ * scan.c (scan_identget_token): Likewise.
+ * sched-vis.c (print_value): Likewise.
+ * stringpool.c (ggc_alloc_string): Likewise.
+ * toplev.c (read_integral_parameter, decode_g_option): Likewise.
+ * tradcif.y (parse_number, yylex, parse_escape): Likewise.
+ * tradcpp.c (rescan): Likewise.
+ * tree.c (clean_symbol_name): Likewise.
+ * varasm.c (decode_reg_name): Likewise.
+
+ * alpha.h (ASM_OUTPUT_ASCII): Likewise.
+ * darwin.c (name_needs_quotes, func_name_maybe_scoped): Likewise.
+ * dsp16xx.h (ASM_OUTPUT_ASCII): Likewise.
+ * m88k.c (output_ascii): Likewise.
+ * m88k.h (OVERRIDE_OPTIONS): Likewise.
+ * mcore.h (REG_CLASS_FROM_LETTER): Likewise.
+ * ns32k/encore.h (ASM_OUTPUT_ASCII): Likewise.
+ * sh.h (REG_CLASS_FROM_LETTER): Likewise.
+
2001-10-21 Neil Booth <neil@daikokuya.demon.co.uk>
* langhooks.c (lang_hook_default_do_nothing,
int argnum;
int overflow_flag;
const char *fcp = *format;
- if (*fcp < '0' || *fcp > '9')
+ if (! ISDIGIT (*fcp))
{
if (dollar_needed)
{
}
argnum = 0;
overflow_flag = 0;
- while (*fcp >= '0' && *fcp <= '9')
+ while (ISDIGIT (*fcp))
{
int nargnum;
nargnum = 10 * argnum + (*fcp - '0');
{
int c;
while (c = getc (stream),
- c != EOF && (ISALNUM (c) || c == '_' || c == '$' || c == '.'))
+ c != EOF && (ISIDNUM (c) || c == '$' || c == '.'))
obstack_1grow (&temporary_obstack, c);
if (obstack_object_size (&temporary_obstack) > 0)
{
The VAX assembler fails to stop reading the escape \
after three digits, so this is the only way we \
can get it to parse the data properly. */ \
- if (i < thissize - 1 \
- && p[i + 1] >= '0' && p[i + 1] <= '9') \
+ if (i < thissize - 1 && ISDIGIT (p[i + 1])) \
_size_so_far = 0, fprintf (asm_out_file, "\"\n\t.ascii \""); \
} \
} \
{
int c;
while ((c = *name++) != '\0')
- if (!isalnum (c) && c != '_')
+ if (! ISIDNUM (c))
return 1;
return 0;
}
while (*fname != 0)
{
if (fname[0] == '_' && fname[1] == '_'
- && (fname[2] == 'F' || (fname[2] >= '0' && fname[2] <= '9')))
+ && (fname[2] == 'F' || ISDIGIT (fname[2])))
return 0;
++fname;
}
The Vax assembler fails to stop reading the escape \
after three digits, so this is the only way we \
can get it to parse the data properly. \
- if (i < thissize - 1 \
- && p[i + 1] >= '0' && p[i + 1] <= '9') \
+ if (i < thissize - 1 && ISDIGIT (p[i + 1])) \
fprintf (asm_out_file, "\'\n\tint \'"); \
*/ \
} \
num += 2;
in_escape = 0;
}
- else if (in_escape && c >= '0' && c <= '9')
+ else if (in_escape && ISDIGIT (c))
{
/* If a digit follows an octal-escape, the VAX assembler fails
to stop reading the escape after three digits. Continue to
{ \
const char *p = m88k_short_data; \
while (*p) \
- if (*p >= '0' && *p <= '9') \
+ if (ISDIGIT (*p)) \
p++; \
else \
{ \
extern enum reg_class reg_class_from_letter[];
#define REG_CLASS_FROM_LETTER(C) \
- ( (C) >= 'a' && (C) <= 'z' ? reg_class_from_letter[(C) - 'a'] : NO_REGS )
+ ( ISLOWER (C) ? reg_class_from_letter[(C) - 'a'] : NO_REGS )
/* The letters I, J, K, L, M, N, O, and P in a register constraint string
can be used to stand for particular ranges of immediate operands.
else \
{ \
fprintf ((file), "\\%o", c); \
- if (i < (size) - 1 \
- && (p)[i + 1] >= '0' && (p)[i + 1] <= '9')\
+ if (i < (size) - 1 && ISDIGIT ((p)[i + 1])) \
fprintf ((file), "\"\n\t.ascii \""); \
} \
} \
extern enum reg_class reg_class_from_letter[];
#define REG_CLASS_FROM_LETTER(C) \
- ( (C) >= 'a' && (C) <= 'z' ? reg_class_from_letter[(C)-'a'] : NO_REGS )
+ ( ISLOWER (C) ? reg_class_from_letter[(C)-'a'] : NO_REGS )
\f
/* The letters I, J, K, L and M in a register constraint string
can be used to stand for particular ranges of immediate operands.
+2001-10-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * xref.c (GNU_xref_member): Use safe-ctype macros and/or fold
+ extra calls into fewer ones.
+
2001-10-18 Alexandre Oliva <aoliva@redhat.com>
* decl.c (duplicate_decls): Propagate DECL_UNINLINABLE.
#ifdef XREF_SHORT_MEMBER_NAMES
for (p = &bufa[1]; *p != 0; ++p)
{
- if (p[0] == '_' && p[1] == '_' && p[2] >= '0' && p[2] <= '9') {
+ if (p[0] == '_' && p[1] == '_' && ISDIGIT (p[2])) {
if (strncmp(&p[2], buf, i) == 0) *p = 0;
break;
}
- else if (p[0] == '_' && p[1] == '_' && p[2] == 'C' && p[3] >= '0' && p[3] <= '9') {
+ else if (p[0] == '_' && p[1] == '_' && p[2] == 'C' && ISDIGIT (p[3])) {
if (strncmp(&p[3], buf, i) == 0) *p = 0;
break;
}
{
c = *p;
- if (c >= '0' && c <= '9')
+ if (ISDIGIT (c))
digit = c - '0';
/* We believe that in all live character sets, a-f are
consecutive, and so are A-F. */
buffer->cur = pos - 1;
}
/* All known character sets have 0...9 contiguous. */
- else if (c >= '0' && c <= '9')
+ else if (ISDIGIT (c))
{
result->type = CPP_NUMBER;
parse_number (pfile, &result->val.str, c, 1);
+Sun Oct 21 17:28:17 2001 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * bad.c (ffebad_finish): Use safe-ctype macros and/or fold extra
+ calls into fewer ones.
+ * implic.c (ffeimplic_lookup_): Likewise.
+ * intdoc.c (dumpimp): Likewise.
+ * intrin.c (ffeintrin_init_0): Likewise.
+ * lex.c (ffelex_backslash_, ffelex_cfebackslash_, ffelex_hash_):
+ Likewise.
+ * lex.h (ffelex_is_firstnamechar): Likewise.
+ * target.c (ffetarget_integerhex): Likewise.
+
2001-10-21 Craig Prescott <prescott@phys.ufl.edu>
* target.h (FFETARGET_32bit_longs): Don't define
if (c == '%')
{
c = ffebad_message_[++i];
- if (ISALPHA (c) && ISUPPER (c))
+ if (ISUPPER (c))
{
index = c - 'A';
ffeimplic_lookup_ (unsigned char c)
{
/* NOTE: This is definitely ASCII-specific!! */
- if (ISALPHA (c) || (c == '_'))
+ if (ISIDST (c))
return &ffeimplic_table_[c - 'A'];
return NULL;
}
for (c = summaries[imp]; c[0] != '\0'; ++c)
{
- if ((c[0] == '@')
- && (c[1] >= '0')
- && (c[1] <= '9'))
+ if (c[0] == '@' && ISDIGIT (c[1]))
{
int argno = c[1] - '0';
c += 2;
- while ((c[0] >= '0')
- && (c[0] <= '9'))
+ while (ISDIGIT (c[0]))
{
argno = 10 * argno + (c[0] - '0');
++c;
const char *arg_string;
const char *arg_info;
- if ((c[colon + 1] >= '0')
- && (c[colon + 1] <= '9'))
+ if (ISDIGIT (c[colon + 1]))
{
other_arg = c[colon + 1] - '0';
arg_string = argument_name_string (imp, other_arg);
printf (", the exact type being wide enough to hold a pointer\n\
on the target system (typically @code{INTEGER(KIND=1)} or @code{INTEGER(KIND=4)}).\n\n");
#endif
- else if ((c[1] == '=')
- && (c[colon + 1] >= '0')
- && (c[colon + 1] <= '9'))
+ else if (c[1] == '=' && ISDIGIT (c[colon + 1]))
{
assert (other_arg >= 0);
while (c[0] != '\0')
{
- if ((c[0] == '@')
- && (c[1] >= '0')
- && (c[1] <= '9'))
+ if (c[0] == '@' && ISDIGIT (c[1]))
{
int argno = c[1] - '0';
c += 2;
- while ((c[0] >= '0')
- && (c[0] <= '9'))
+ while (ISDIGIT (c[0]))
{
argno = 10 * argno + (c[0] - '0');
++c;
}
if ((c[colon + 1] != '-')
&& (c[colon + 1] != '*')
- && ((c[colon + 1] < '0')
- || (c[colon + 1] > '9')))
+ && (! ISDIGIT (c[colon + 1])))
{
fprintf (stderr, "%s: bad COL-spec\n",
ffeintrin_imps_[i].name);
}
if (c[3] == '[')
{
- if (((c[4] < '0') || (c[4] > '9'))
+ if ((! ISDIGIT (c[4]))
|| ((c[5] != ']')
- && (++c, (c[4] < '0') || (c[4] > '9')
+ && (++c, ! ISDIGIT (c[4])
|| (c[5] != ']'))))
{
fprintf (stderr, "%s: bad arg-len\n",
}
if (c[3] == '(')
{
- if (((c[4] < '0') || (c[4] > '9'))
+ if ((! ISDIGIT (c[4]))
|| ((c[5] != ')')
- && (++c, (c[4] < '0') || (c[4] > '9')
+ && (++c, ! ISDIGIT (c[4])
|| (c[5] != ')'))))
{
fprintf (stderr, "%s: bad arg-rank\n",
return c;
case 2:
- if ((c >= 'a' && c <= 'f')
- || (c >= 'A' && c <= 'F')
- || (c >= '0' && c <= '9'))
+ if (ISXDIGIT (c))
{
code *= 16;
if (c >= 'a' && c <= 'f')
code += c - 'a' + 10;
if (c >= 'A' && c <= 'F')
code += c - 'A' + 10;
- if (c >= '0' && c <= '9')
+ if (ISDIGIT (c))
code += c - '0';
if (code != 0 || count != 0)
{
while (1)
{
c = getc (finput);
- if (!(c >= 'a' && c <= 'f')
- && !(c >= 'A' && c <= 'F')
- && !(c >= '0' && c <= '9'))
+ if (! ISXDIGIT (c))
{
*use_d = 1;
*d = c;
code += c - 'a' + 10;
if (c >= 'A' && c <= 'F')
code += c - 'A' + 10;
- if (c >= '0' && c <= '9')
+ if (ISDIGIT (c))
code += c - '0';
if (code != 0 || count != 0)
{
it and ignore it; otherwise, ignore the line, with an error
if the word isn't `pragma', `ident', `define', or `undef'. */
- if ((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z'))
+ if (ISALPHA(c))
{
if (c == 'p')
{
#define ffelex_init_2()
#define ffelex_init_3()
#define ffelex_init_4()
-#define ffelex_is_firstnamechar(c) \
- (ISALPHA ((c)) || ((c) == '_'))
+#define ffelex_is_firstnamechar(c) ISIDST (c)
#define ffelex_terminate_0()
#define ffelex_terminate_1()
#define ffelex_terminate_2()
c = c - 'A' + 10;
else if ((c >= 'a') && (c <= 'f'))
c = c - 'a' + 10;
- else if ((c >= '0') && (c <= '9'))
+ else if (ISDIGIT (c))
c -= '0';
else
{
Letters `acln' are implemented directly.
Other letters are passed to `output_operand' so that
the PRINT_OPERAND macro can define them. */
- else if (ISLOWER (*p) || ISUPPER (*p))
+ else if (ISALPHA (*p))
{
int letter = *p++;
c = atoi (p);
- if (! (*p >= '0' && *p <= '9'))
+ if (! ISDIGIT (*p))
output_operand_lossage ("operand number missing after %-letter");
else if (this_is_asm_operands
&& (c < 0 || (unsigned int) c >= insn_noperands))
oporder[ops++] = c;
opoutput[c] = 1;
- while ((c = *p) >= '0' && c <= '9')
+ while (ISDIGIT (c = *p))
p++;
}
/* % followed by a digit outputs an operand the default way. */
- else if (*p >= '0' && *p <= '9')
+ else if (ISDIGIT (*p))
{
c = atoi (p);
if (this_is_asm_operands
oporder[ops++] = c;
opoutput[c] = 1;
- while ((c = *p) >= '0' && c <= '9')
+ while (ISDIGIT (c = *p))
p++;
}
/* % followed by punctuation: output something for that
case '%':
c = *p++;
q = &buf[1];
- while ((c >= '0' && c <= '9') || c == '.')
+ while (ISDIGIT (c) || c == '.')
{
*q++ = c;
c = *p++;
int c;
{
s->ptr = s->base;
- if (ISALPHA (c) || c == '_')
+ if (ISIDST (c))
{
for (;;)
{
SSTRING_PUT (s, c);
c = INF_GET ();
- if (c == EOF || !(ISALNUM (c) || c == '_'))
+ if (c == EOF || !(ISIDNUM (c)))
break;
}
}
c = INF_GET ();
if (c == EOF)
break;
- if (ISALPHA (c) || c == '_')
+ if (ISIDST (c))
{
c = inf_scan_ident (&buf, c);
(void) INF_UNGET (c);
continue;
if (!ISALPHA (*p))
continue;
- if (ISALNUM (p[1]) || p[1] == '_')
+ if (ISIDNUM (p[1]))
continue;
/* Splat all preceding text into the output buffer,
goto found;
p++;
}
- while (ISALPHA (*p) || ISALNUM (*p) || *p == '_');
+ while (ISIDNUM (*p));
/* Hit end of macro name without finding the string. */
continue;
continue;
if (!ISALPHA (*p))
continue;
- if (ISALNUM (p[1]) || p[1] == '_')
+ if (ISIDNUM (p[1]))
continue;
/* The character at P is the one to look for in the following
shcount = 0;
while ((c = *p) != '\0')
{
- if ((c >= '0' && c <= '9') || (c >= 'A' && c <= 'F')
- || (c >= 'a' && c <= 'f'))
+ if (ISXDIGIT (c))
{
k = c & CHARMASK;
if (k >= 'a' && k <= 'f')
}
name_end = ptr+1;
- while (ISALNUM ((unsigned char)*ptr) || *ptr == '_') --ptr;
+ while (ISIDNUM (*ptr))
+ --ptr;
name_start = ptr+1;
while (*ptr == ' ' || *ptr == '\t') ptr--;
ptr[1] = 0;
if (attr->is_numeric)
{
for (p = XSTR (exp, 1); *p; p++)
- if (*p < '0' || *p > '9')
+ if (! ISDIGIT (*p))
fatal ("Attribute `%s' takes only numeric values",
XSTR (exp, 0));
}
if (attr && attr->negative_ok && *p == '-')
p++;
for (; *p; p++)
- if (*p > '9' || *p < '0')
+ if (! ISDIGIT (*p))
{
message_with_line (attr ? attr->lineno : 0,
"non-numeric value for numeric attribute %s",
/* Hunt for the last [A-Z] in both strings. */
for (old_has_insn = odepth - 1; old_has_insn >= 0; --old_has_insn)
- if (oldpos[old_has_insn] >= 'A' && oldpos[old_has_insn] <= 'Z')
+ if (ISUPPER (oldpos[old_has_insn]))
break;
for (new_has_insn = ndepth - 1; new_has_insn >= 0; --new_has_insn)
- if (newpos[new_has_insn] >= 'A' && newpos[new_has_insn] <= 'Z')
+ if (ISUPPER (newpos[new_has_insn]))
break;
/* Go down to desired level. */
while (depth < ndepth)
{
/* It's a different insn from the first one. */
- if (newpos[depth] >= 'A' && newpos[depth] <= 'Z')
+ if (ISUPPER (newpos[depth]))
{
/* We can only fail if we're moving down the tree. */
if (old_has_insn >= 0 && oldpos[old_has_insn] >= newpos[depth])
}
printf ("%sx%d = PATTERN (tem);\n", indent, depth + 1);
}
- else if (newpos[depth] >= 'a' && newpos[depth] <= 'z')
+ else if (ISLOWER (newpos[depth]))
printf ("%sx%d = XVECEXP (x%d, 0, %d);\n",
indent, depth + 1, depth, newpos[depth] - 'a');
else
int match_len = 0, i;
for (i = strlen (p->position) - 1; i >= 0; --i)
- if (p->position[i] >= 'A' && p->position[i] <= 'Z')
+ if (ISUPPER (p->position[i]))
{
match_len = p->position[i] - 'A';
break;
c = *old++;
if (ISDIGIT ((unsigned char) c))
c += disp;
- else if (ISUPPER ((unsigned char) c)
- || ISLOWER ((unsigned char) c))
+ else if (ISALPHA (c))
{
*new++ = c;
c = *old++ + disp;
+2001-10-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * gjavah.c (jni_print_char, decode_signature_piece): Use
+ safe-ctype macros and/or fold extra calls into fewer ones.
+ * lex.c (java_read_unicode, java_lex): Likewise.
+ * lex.h (JAVA_START_CHAR_P, JAVA_PART_CHAR_P, JAVA_ASCII_DIGIT,
+ JAVA_ASCII_HEXDIGIT, JAVA_ASCII_LETTER): Likewise.
+ * mangle_name.c (append_unicode_mangled_name,
+ unicode_mangling_length): Likewise.
+
2001-10-17 Richard Henderson <rth@redhat.com>
* Make-lang.in (java/lang.o): Depend on langhooks.h.
fputs ("_3", stream);
else if (ch == '/')
fputs ("_", stream);
- else if ((ch >= '0' && ch <= '9')
- || (ch >= 'a' && ch <= 'z')
- || (ch >= 'A' && ch <= 'Z'))
+ else if (ISXDIGIT (ch))
fputc (ch, stream);
else
{
array_loop:
for (signature++; (signature < limit
- && *signature >= '0'
- && *signature <= '9'); signature++)
+ && ISDIGIT (*signature)); signature++)
;
switch (*signature)
{
{
if ((c = java_read_char (lex)) == UEOF)
return UEOF;
- if (c >= '0' && c <= '9')
+ if (ISDIGIT (c))
unicode |= (unicode_t)((c-'0') << shift);
else if ((c >= 'a' && c <= 'f') || (c >= 'A' && c <= 'F'))
unicode |= (unicode_t)((10+(c | 0x20)-'a') << shift);
{
/* We store in a string (in case it turns out to be a FP) and in
PARTS if we have to process a integer literal. */
- int numeric = (RANGE (c, '0', '9') ? c-'0' : 10 +(c|0x20)-'a');
+ int numeric = (ISDIGIT (c) ? c-'0' : 10 +(c|0x20)-'a');
int count;
/* Remember when we find a valid hexadecimal digit */
#define RANGE(c, l, h) (((c) >= l && (c) <= h))
#define JAVA_WHITE_SPACE_P(c) (c == ' ' || c == '\t' || c == '\f')
#define JAVA_START_CHAR_P(c) ((c < 128 \
- && (RANGE (c, 'A', 'Z') \
- || RANGE (c, 'a', 'z') \
- || c == '_' \
- || c == '$')) \
+ && (ISIDST (c) || c == '$')) \
|| (c >= 128 && java_start_char_p (c)))
#define JAVA_PART_CHAR_P(c) ((c < 128 \
- && (RANGE (c, 'A', 'Z') \
- || RANGE (c, 'a', 'z') \
- || RANGE (c, '0', '9') \
- || c == '_' \
+ && (ISIDNUM (c) \
|| c == '$' \
|| c == 0x0000 \
|| RANGE (c, 0x01, 0x08) \
|| RANGE (c, 0x0e, 0x1b) \
|| c == 0x7f)) \
|| (c >= 128 && java_part_char_p (c)))
-#define JAVA_ASCII_DIGIT(c) RANGE (c, '0', '9')
+#define JAVA_ASCII_DIGIT(c) ISDIGIT (c)
#define JAVA_ASCII_OCTDIGIT(c) RANGE (c, '0', '7')
-#define JAVA_ASCII_HEXDIGIT(c) (RANGE (c, '0', '9') || \
- RANGE (c, 'a', 'f') || \
- RANGE (c, 'A', 'F'))
+#define JAVA_ASCII_HEXDIGIT(c) ISXDIGIT (c)
#define JAVA_ASCII_FPCHAR(c) (RANGE (c, 'd', 'f') || RANGE (c, 'D', 'F') || \
c == '.' || JAVA_ASCII_DIGIT (c))
#define JAVA_FP_SUFFIX(c) (c == 'D' || c == 'd' || c == 'f' || c == 'F')
#define JAVA_FP_EXP(c) (c == 'E' || c == 'F')
#define JAVA_FP_PM(c) (c == '-' || c == '+')
-#define JAVA_ASCII_LETTER(c) (RANGE (c, 'a', 'z') || RANGE (c, 'A', 'Z'))
+#define JAVA_ASCII_LETTER(c) ISALPHA (c)
/* Constants */
#define JAVA_READ_BUFFER 256
{
int ch = UTF8_GET(ptr, limit);
- if ((ch >= '0' && ch <= '9')
+ if ((ISALNUM (ch) && ch != 'U')
#ifndef NO_DOLLAR_IN_LABEL
|| ch == '$'
#endif
- || (ch >= 'a' && ch <= 'z')
- || (ch >= 'A' && ch <= 'Z' && ch != 'U'))
+ )
obstack_1grow (mangle_obstack, ch);
/* Everything else needs encoding */
else
if (ch < 0)
error ("internal error - invalid Utf8 name");
- if ((ch >= '0' && ch <= '9')
+ if ((ISALNUM (ch) && ch != 'U')
#ifndef NO_DOLLAR_IN_LABEL
|| ch == '$'
#endif
- || (ch >= 'a' && ch <= 'z')
- || (ch >= 'A' && ch <= 'Z' && ch != 'U'))
+ )
num_chars++;
/* Everything else needs encoding */
else
case '1': case '2': case '3': case '4': case '5':
case '6': case '7': case '8': case '9':
/* Skip the balance of the matching constraint. */
- while (*p >= '0' && *p <= '9')
+ while (ISDIGIT (*p))
p++;
break;
#endif
#define IS_ASM_IDENT(ch) \
- (ISALNUM (ch) || (ch) == '_' || (ch) == '.' || (ch) == '$')
+ (ISIDNUM (ch) || (ch) == '.' || (ch) == '$')
\f
/* Redefinition of storage classes as an enumeration for better
is_id_char (ch)
int ch;
{
- return (ISALNUM (ch) || (ch == '_') || (ch == '$'));
+ return (ISIDNUM (ch) || (ch == '$'));
}
/* Give a message indicating the proper way to invoke this program and then
{
const char *cp;
- for (cp = varargs_style_indicator;
- ISALNUM ((const unsigned char)*cp) || *cp == '_'; cp++)
+ for (cp = varargs_style_indicator; ISIDNUM (*cp); cp++)
continue;
if (*cp != 0)
varargs_style_indicator = savestring (varargs_style_indicator,
trail = 0;
nxtcom:
- if (*s >= '0' && *s <= '9')
+ if (ISDIGIT (*s))
k = *s - '0';
else if (*s >= 'a' && *s <= 'f')
k = 10 + *s - 'a';
if ((trail == 0) && (decflg != 0))
{
sp = s;
- while ((*sp >= '0' && *sp <= '9')
+ while (ISDIGIT (*sp)
|| (base == 16 && ((*sp >= 'a' && *sp <= 'f')
|| (*sp >= 'A' && *sp <= 'F'))))
++sp;
}
if (*s == '+')
++s;
- while ((*s >= '0') && (*s <= '9'))
+ while (ISDIGIT (*s))
{
exp *= 10;
exp += *s++ - '0';
proper matching constraint, but we can't actually fail
the check if they didn't. Indicate that results are
inconclusive. */
- while (*constraint >= '0' && *constraint <= '9')
+ while (ISDIGIT (*constraint))
constraint++;
result = -1;
break;
commutative = i;
}
- else if (c >= '0' && c <= '9')
+ else if (ISDIGIT (c))
{
c = strtoul (p - 1, &p, 10);
int c;
{
s->ptr = s->base;
- if (ISALPHA(c) || c == '_')
+ if (ISIDST(c))
{
for (;;)
{
SSTRING_PUT(s, c);
c = getc (fp);
- if (c == EOF || !(ISALNUM(c) || c == '_'))
+ if (c == EOF || ! ISIDNUM(c))
break;
}
}
c = INT_TOKEN;
goto done;
}
- if (ISALPHA (c) || c == '_')
+ if (ISIDST (c))
{
c = scan_ident (fp, s, c);
ungetc (c, fp);
if (REGNO (x) < FIRST_PSEUDO_REGISTER)
{
int c = reg_names[REGNO (x)][0];
- if (c >= '0' && c <= '9')
+ if (ISDIGIT (c))
cur = safe_concat (buf, cur, "%");
cur = safe_concat (buf, cur, reg_names[REGNO (x)]);
if (length == 0)
return empty_string;
- if (length == 1 && contents[0] >= '0' && contents[0] <= '9')
+ if (length == 1 && ISDIGIT (contents[0]))
return digit_string (contents[0] - '0');
obstack_grow0 (&string_stack, contents, length);
while (*endp)
{
- if (*endp >= '0' && *endp <= '9')
+ if (ISDIGIT (*endp))
endp++;
else
break;
enum debug_info_type type = da->debug_type;
const char *p = arg + da_len;
- if (*p && (*p < '0' || *p > '9'))
+ if (*p && ! ISDIGIT (*p))
continue;
/* A debug flag without a level defaults to level 2.
while (len > 0) {
c = *p++;
len--;
- if (c >= 'A' && c <= 'Z') c += 'a' - 'A';
+ if (ISUPPER (c))
+ c += 'a' - 'A';
- if (c >= '0' && c <= '9') {
+ if (ISDIGIT (c)) {
n *= base;
n += c - '0';
} else if (base == 16 && c >= 'a' && c <= 'f') {
yyerror ("double quoted strings not allowed in #if expressions");
return ERROR;
}
- if (c >= '0' && c <= '9') {
+ if (ISDIGIT (c)) {
/* It's a number */
for (namelen = 0;
c = tokstart[namelen], is_idchar (c) || c == '.';
for (;;)
{
c = *(*string_ptr)++;
- if (c >= '0' && c <= '9')
+ if (ISDIGIT (c))
i = (i << 4) + c - '0';
else if (c >= 'a' && c <= 'f')
i = (i << 4) + c - 'a' + 10;
ibp += 2;
}
c = *ibp++;
- if (!ISALNUM (c) && c != '.' && c != '_') {
+ if (! ISIDNUM (c) && c != '.') {
--ibp;
break;
}
char *p;
{
for (; *p; p++)
- if (! (ISDIGIT(*p)
+ if (! (ISALNUM (*p)
#ifndef NO_DOLLAR_IN_LABEL /* this for `$'; unlikely, but... -- kr */
|| *p == '$'
#endif
#ifndef NO_DOT_IN_LABEL /* this for `.'; unlikely, but... */
|| *p == '.'
#endif
- || ISUPPER (*p)
- || ISLOWER (*p)))
+ ))
*p = '_';
}
/* Allow a decimal number as a "register name". */
for (i = strlen (asmspec) - 1; i >= 0; i--)
- if (! (asmspec[i] >= '0' && asmspec[i] <= '9'))
+ if (! ISDIGIT (asmspec[i]))
break;
if (asmspec[0] != 0 && i < 0)
{