diff options
-rw-r--r-- | gcc/ChangeLog | 19 | ||||
-rw-r--r-- | gcc/c-common.c | 10 | ||||
-rw-r--r-- | gcc/c-lex.c | 18 | ||||
-rw-r--r-- | gcc/cccp.c | 28 | ||||
-rw-r--r-- | gcc/collect2.c | 14 | ||||
-rw-r--r-- | gcc/config/rs6000/rs6000.c | 2 | ||||
-rw-r--r-- | gcc/cpplib.c | 8 | ||||
-rw-r--r-- | gcc/fix-header.c | 6 | ||||
-rw-r--r-- | gcc/gcc.c | 6 | ||||
-rw-r--r-- | gcc/gen-protos.c | 4 | ||||
-rw-r--r-- | gcc/pexecute.c | 2 | ||||
-rw-r--r-- | gcc/protoize.c | 54 | ||||
-rw-r--r-- | gcc/rtl.c | 4 | ||||
-rw-r--r-- | gcc/scan.c | 10 | ||||
-rw-r--r-- | gcc/stmt.c | 6 | ||||
-rw-r--r-- | gcc/tlink.c | 4 | ||||
-rw-r--r-- | gcc/toplev.c | 2 |
17 files changed, 109 insertions, 88 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 1ede466..4b8024b 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,22 @@ +Wed May 6 15:37:27 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> + + * c-common.c: Convert to using ctype macros defined in system.h. + * c-lex.c: Likewise. + * cccp.c: Likewise. + * collect2.c: Likewise. + * rs6000.c: Likewise. + * cpplib.c: Likewise. + * fix-header.c: Likewise. + * gcc.c: Likewise. + * gen-protos.c: Likewise. + * pexecute.c: Likewise. + * protoize.c: Likewise. + * rtl.c: Likewise. + * scan.c: Likewise. + * stmt.c: Likewise. + * tlink.c: Likewise. + * toplev.c: Likewise. + Wed May 6 14:44:14 1998 Gavin Koch <gavin@cygnus.com> * config/mips/r3900.h (SUBTARGET_ASM_DEBUGGING_SPEC) : diff --git a/gcc/c-common.c b/gcc/c-common.c index eacbdf5..d16bbc3 100644 --- a/gcc/c-common.c +++ b/gcc/c-common.c @@ -1356,7 +1356,7 @@ check_format_info (info, params) suppressed = *format_chars == '*'; if (suppressed) ++format_chars; - while (isdigit (*format_chars)) + while (ISDIGIT (*format_chars)) ++format_chars; } else if (info->format_type == strftime_format_type) @@ -1379,7 +1379,7 @@ check_format_info (info, params) flag_chars[i] = 0; } } - while (isdigit ((unsigned char) *format_chars)) + while (ISDIGIT ((unsigned char) *format_chars)) { wide = TRUE; ++format_chars; @@ -1480,7 +1480,7 @@ check_format_info (info, params) } else { - while (isdigit (*format_chars)) + while (ISDIGIT (*format_chars)) { wide = TRUE; ++format_chars; @@ -1490,7 +1490,7 @@ check_format_info (info, params) { precise = TRUE; ++format_chars; - if (*format_chars != '*' && !isdigit (*format_chars)) + if (*format_chars != '*' && !ISDIGIT (*format_chars)) warning ("`.' not followed by `*' or digit in format"); /* "...a...precision...may be indicated by an asterisk. In this case, an int argument supplies the...precision." */ @@ -1515,7 +1515,7 @@ check_format_info (info, params) } else { - while (isdigit (*format_chars)) + while (ISDIGIT (*format_chars)) ++format_chars; } } diff --git a/gcc/c-lex.c b/gcc/c-lex.c index 66623dd..e433d2f 100644 --- a/gcc/c-lex.c +++ b/gcc/c-lex.c @@ -1255,7 +1255,7 @@ yylex () case '$': letter: p = token_buffer; - while (isalnum (c) || c == '_' || c == '$' || c == '@') + while (ISALNUM (c) || c == '_' || c == '$' || c == '@') { /* Make sure this char really belongs in an identifier. */ if (c == '@' && ! doing_objc_thang) @@ -1367,7 +1367,7 @@ yylex () next_c = GETC (); UNGETC (next_c); /* Always undo this lookahead. */ - if (!isalnum (next_c) && next_c != '.') + if (!ISALNUM (next_c) && next_c != '.') { token_buffer[0] = (char)c, token_buffer[1] = '\0'; yylval.ttype = (c == '0') ? integer_zero_node : integer_one_node; @@ -1424,7 +1424,7 @@ yylex () /* Read all the digits-and-decimal-points. */ while (c == '.' - || (isalnum (c) && c != 'l' && c != 'L' + || (ISALNUM (c) && c != 'l' && c != 'L' && c != 'u' && c != 'U' && c != 'i' && c != 'I' && c != 'j' && c != 'J' && (floatflag == NOT_FLOAT || ((c != 'f') && (c != 'F'))))) @@ -1453,7 +1453,7 @@ yylex () only when it is followed by a digit. Otherwise, unread the following non-digit and use the '.' as a structural token. */ - if (p == token_buffer + 2 && !isdigit (c)) + if (p == token_buffer + 2 && !ISDIGIT (c)) { if (c == '.') { @@ -1477,7 +1477,7 @@ yylex () /* It is not a decimal point. It should be a digit (perhaps a hex digit). */ - if (isdigit (c)) + if (ISDIGIT (c)) { c = c - '0'; } @@ -1559,9 +1559,9 @@ yylex () *p++ = c; c = GETC(); } - if (! isdigit (c)) + if (! ISDIGIT (c)) error ("floating constant exponent has no digits"); - while (isdigit (c)) + while (ISDIGIT (c)) { if (p >= token_buffer + maxtoken - 3) p = extend_token_buffer (p); @@ -1876,7 +1876,7 @@ yylex () UNGETC (c); *p = 0; - if (isalnum (c) || c == '.' || c == '_' || c == '$' + if (ISALNUM (c) || c == '.' || c == '_' || c == '$' || (!flag_traditional && (c == '-' || c == '+') && (p[-1] == 'e' || p[-1] == 'E'))) error ("missing white space after number `%s'", token_buffer); @@ -1923,7 +1923,7 @@ yylex () && (unsigned) c >= (1 << width)) pedwarn ("escape sequence out of range for character"); #ifdef MAP_CHARACTER - if (isprint (c)) + if (ISPRINT (c)) c = MAP_CHARACTER (c); #endif } @@ -1750,7 +1750,7 @@ main (argc, argv) if (*vers == 'V') vers++; - if (isdigit (*vers)) + if (ISDIGIT (*vers)) { vms_version_value = (*vers - '0') * 10000000; } @@ -1758,7 +1758,7 @@ main (argc, argv) if (*vers == '.') { vers++; - if (isdigit (*vers)) + if (ISDIGIT (*vers)) { vms_version_value += (*vers - '0') * 100000; } @@ -2503,10 +2503,10 @@ get_lintcmd (ibp, limit, argstart, arglen, cmdlen) if ((linsize >= 7) && !bcmp (ibp, "VARARGS", 7)) { *cmdlen = 7; ibp += 7; linsize -= 7; - if ((linsize == 0) || ! isdigit (*ibp)) return "VARARGS"; + if ((linsize == 0) || ! ISDIGIT (*ibp)) return "VARARGS"; /* OK, read a number */ - for (numptr = *argstart = ibp; (numptr < limit) && isdigit (*numptr); + for (numptr = *argstart = ibp; (numptr < limit) && ISDIGIT (*numptr); numptr++); *arglen = numptr - *argstart; return "VARARGS"; @@ -4378,8 +4378,10 @@ get_filename: * code from case '<' is repeated here) and generates a warning. * (Note: macro expansion of `xyz' takes precedence.) */ - if (retried && isalpha(*(U_CHAR *) (--fbeg))) { - while (fin != limit && (!isspace(*fin))) + /* Note: The argument of ISALPHA() can be evaluated twice, so do + the pre-decrement outside of the macro. */ + if (retried && (--fbeg, ISALPHA(*(U_CHAR *) (fbeg)))) { + while (fin != limit && (!ISSPACE(*fin))) *fend++ = *fin++; warning ("VAX-C-style include specification found, use '#include <filename.h>' !"); vaxc_include = 1; @@ -4673,7 +4675,7 @@ base_name (fname) char *s = fname; char *p; #if defined (__MSDOS__) || defined (_WIN32) - if (isalpha (s[0]) && s[1] == ':') s += 2; + if (ISALPHA (s[0]) && s[1] == ':') s += 2; #endif #ifdef VMS if ((p = rindex (s, ':'))) s = p + 1; /* Skip device. */ @@ -4696,11 +4698,11 @@ absolute_filename (filename) char *filename; { #if defined (__MSDOS__) || (defined (_WIN32) && !defined (__CYGWIN32__)) - if (isalpha (filename[0]) && filename[1] == ':') filename += 2; + if (ISALPHA (filename[0]) && filename[1] == ':') filename += 2; #endif #if defined (__CYGWIN32__) /* At present, any path that begins with a drive spec is absolute. */ - if (isalpha (filename[0]) && filename[1] == ':') return 1; + if (ISALPHA (filename[0]) && filename[1] == ':') return 1; #endif if (filename[0] == '/') return 1; #ifdef DIR_SEPARATOR @@ -6628,7 +6630,7 @@ do_line (buf, limit, op, keyword) bp = tem.buf; SKIP_WHITE_SPACE (bp); - if (!isdigit (*bp)) { + if (!ISDIGIT (*bp)) { error ("invalid format `#line' directive"); return 0; } @@ -6643,7 +6645,7 @@ do_line (buf, limit, op, keyword) pedwarn ("line number out of range in `#line' directive"); /* skip over the line number. */ - while (isdigit (*bp)) + while (ISDIGIT (*bp)) bp++; #if 0 /* #line 10"foo.c" is supposed to be allowed. */ @@ -7128,7 +7130,7 @@ do_xifdef (buf, limit, op, keyword) HASHNODE *hp; if (! traditional) { - if (isdigit (buf[0])) + if (ISDIGIT (buf[0])) pedwarn ("`#%s' argument starts with a digit", keyword->name); else if (end != limit) pedwarn ("garbage at end of `#%s' argument", keyword->name); @@ -7871,7 +7873,7 @@ quote_string (dst, src, srclen) switch ((c = *src++)) { default: - if (isprint (c)) + if (ISPRINT (c)) *dst++ = c; else { diff --git a/gcc/collect2.c b/gcc/collect2.c index a1b7ddc..0cba7ef 100644 --- a/gcc/collect2.c +++ b/gcc/collect2.c @@ -565,7 +565,7 @@ dump_file (name) { int c; while (c = getc (stream), - c != EOF && (isalnum (c) || c == '_' || c == '$' || c == '.')) + c != EOF && (ISALNUM (c) || c == '_' || c == '$' || c == '.')) obstack_1grow (&temporary_obstack, c); if (obstack_object_size (&temporary_obstack) > 0) { @@ -1853,7 +1853,7 @@ write_c_file_stat (stream, name) strncpy (prefix, p, q - p); prefix[q - p] = 0; for (q = prefix; *q; q++) - if (!isalnum (*q)) + if (!ISALNUM (*q)) *q = '_'; if (debug) fprintf (stderr, "\nwrite_c_file - output name is %s, prefix is %s\n", @@ -2169,7 +2169,7 @@ scan_prog_file (prog_name, which_pass) name = p; /* Find the end of the symbol name. Do not include `|', because Encore nm can tack that on the end. */ - for (end = p; (ch2 = *end) != '\0' && !isspace (ch2) && ch2 != '|'; + for (end = p; (ch2 = *end) != '\0' && !ISSPACE (ch2) && ch2 != '|'; end++) continue; @@ -2303,7 +2303,7 @@ libcompare (d1, d2) char *e2 = (*d2)->d_name + i2; while (*e1 && *e2 && *e1 == '.' && *e2 == '.' - && e1[1] && isdigit (e1[1]) && e2[1] && isdigit (e2[1])) + && e1[1] && ISDIGIT (e1[1]) && e2[1] && ISDIGIT (e2[1])) { ++e1; ++e2; @@ -2316,7 +2316,7 @@ libcompare (d1, d2) if (*e1) { /* It has a valid numeric extension, prefer this one. */ - if (*e1 == '.' && e1[1] && isdigit (e1[1])) + if (*e1 == '.' && e1[1] && ISDIGIT (e1[1])) return 1; /* It has a invalid numeric extension, must prefer the other one. */ else @@ -2325,7 +2325,7 @@ libcompare (d1, d2) else if (*e2) { /* It has a valid numeric extension, prefer this one. */ - if (*e2 == '.' && e2[1] && isdigit (e2[1])) + if (*e2 == '.' && e2[1] && ISDIGIT (e2[1])) return -1; /* It has a invalid numeric extension, must prefer the other one. */ else @@ -2609,7 +2609,7 @@ scan_libraries (prog_name) /* Find the end of the symbol name. */ for (end = p; - (ch2 = *end) != '\0' && ch2 != '\n' && !isspace (ch2) && ch2 != '|'; + (ch2 = *end) != '\0' && ch2 != '\n' && !ISSPACE (ch2) && ch2 != '|'; end++) continue; *end = '\0'; diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index f901cb0..7d4d1f1 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -4450,7 +4450,7 @@ rs6000_gen_section_name (buf, filename, section_desc) p += strlen (section_desc); } - else if (isalnum (*q)) + else if (ISALNUM (*q)) *p++ = *q; } diff --git a/gcc/cpplib.c b/gcc/cpplib.c index 7fde93f..5eec64c 100644 --- a/gcc/cpplib.c +++ b/gcc/cpplib.c @@ -463,7 +463,7 @@ quote_string (pfile, src) switch ((c = *src++)) { default: - if (isprint (c)) + if (ISPRINT (c)) CPP_PUTC_Q (pfile, c); else { @@ -2770,7 +2770,7 @@ macroexpand (pfile, hp) /* Escape these chars */ if (c == '\"' || (in_string && c == '\\')) CPP_PUTC (pfile, '\\'); - if (isprint (c)) + if (ISPRINT (c)) CPP_PUTC (pfile, c); else { @@ -3683,7 +3683,7 @@ do_line (pfile, keyword) token = get_directive_token (pfile); if (token != CPP_NUMBER - || !isdigit(pfile->token_buffer[old_written])) + || !ISDIGIT(pfile->token_buffer[old_written])) { cpp_error (pfile, "invalid format `#line' command"); goto bad_line_directive; @@ -4920,7 +4920,7 @@ cpp_get_token (pfile) case '.': NEWLINE_FIX; c2 = PEEKC (); - if (isdigit(c2)) + if (ISDIGIT(c2)) { CPP_RESERVE(pfile, 2); CPP_PUTC_Q (pfile, '.'); diff --git a/gcc/fix-header.c b/gcc/fix-header.c index cb3238d..3456e53 100644 --- a/gcc/fix-header.c +++ b/gcc/fix-header.c @@ -956,13 +956,13 @@ inf_scan_ident (s, c) int c; { s->ptr = s->base; - if (isalpha (c) || c == '_') + if (ISALPHA (c) || c == '_') { for (;;) { SSTRING_PUT (s, c); c = INF_GET (); - if (c == EOF || !(isalnum (c) || c == '_')) + if (c == EOF || !(ISALNUM (c) || c == '_')) break; } } @@ -1273,7 +1273,7 @@ main (argc, argv) c = INF_GET (); if (c == EOF) break; - if (isalpha (c) || c == '_') + if (ISALPHA (c) || c == '_') { c = inf_scan_ident (&buf, c); (void) INF_UNGET (c); @@ -2768,21 +2768,21 @@ process_command (argc, argv) char *v = compiler_version; /* Ignore leading non-digits. i.e. "foo-" in "foo-2.7.2". */ - while (! isdigit (*v)) + while (! ISDIGIT (*v)) v++; if (v > compiler_version && v[-1] != '-') fatal ("invalid version number format"); /* Set V after the first period. */ - while (isdigit (*v)) + while (ISDIGIT (*v)) v++; if (*v != '.') fatal ("invalid version number format"); v++; - while (isdigit (*v)) + while (ISDIGIT (*v)) v++; if (*v != 0 && *v != ' ' && *v != '.' && *v != '-') diff --git a/gcc/gen-protos.c b/gcc/gen-protos.c index 2bec04c..f423b3f 100644 --- a/gcc/gen-protos.c +++ b/gcc/gen-protos.c @@ -109,7 +109,7 @@ parse_fn_proto (start, end, fn) ptr--; while (*ptr == ' ' || *ptr == '\t') ptr--; - if (!isalnum (*ptr)) + if (!ISALNUM (*ptr)) { if (verbose) fprintf (stderr, "%s: Can't handle this complex prototype: %s\n", @@ -118,7 +118,7 @@ parse_fn_proto (start, end, fn) } name_end = ptr+1; - while (isalnum (*ptr) || *ptr == '_') --ptr; + while (ISALNUM (*ptr) || *ptr == '_') --ptr; name_start = ptr+1; while (*ptr == ' ' || *ptr == '\t') ptr--; ptr[1] = 0; diff --git a/gcc/pexecute.c b/gcc/pexecute.c index 45a5a8e..2914815 100644 --- a/gcc/pexecute.c +++ b/gcc/pexecute.c @@ -165,7 +165,7 @@ pexecute (program, argv, this_pname, temp_base, errmsg_fmt, errmsg_arg, flags) char *cp; for (cp = argv[i]; *cp; cp++) { - if (*cp == '"' || *cp == '\'' || *cp == '\\' || isspace (*cp)) + if (*cp == '"' || *cp == '\'' || *cp == '\\' || ISSPACE (*cp)) fputc ('\\', argfile); fputc (*cp, argfile); } diff --git a/gcc/protoize.c b/gcc/protoize.c index 7d81aea..4b5b13f 100644 --- a/gcc/protoize.c +++ b/gcc/protoize.c @@ -845,7 +845,7 @@ static int is_id_char (ch) char ch; { - return (isalnum (ch) || (ch == '_') || (ch == '$')); + return (ISALNUM (ch) || (ch == '_') || (ch == '$')); } /* Give a message indicating the proper way to invoke this program and then @@ -2021,12 +2021,12 @@ munge_compile_params (params_list) temp_params[param_count++] = compiler_file_name; for (;;) { - while (isspace (*params_list)) + while (ISSPACE (*params_list)) params_list++; if (!*params_list) break; param = params_list; - while (*params_list && !isspace (*params_list)) + while (*params_list && !ISSPACE (*params_list)) params_list++; if (param[0] != '-') temp_params[param_count++] @@ -2041,9 +2041,9 @@ munge_compile_params (params_list) case 'c': break; /* Don't copy these. */ case 'o': - while (isspace (*params_list)) + while (ISSPACE (*params_list)) params_list++; - while (*params_list && !isspace (*params_list)) + while (*params_list && !ISSPACE (*params_list)) params_list++; break; default: @@ -2974,7 +2974,7 @@ static const char * forward_to_next_token_char (ptr) const char *ptr; { - for (++ptr; isspace (*ptr); check_source (++ptr < clean_text_limit, 0)) + for (++ptr; ISSPACE (*ptr); check_source (++ptr < clean_text_limit, 0)) continue; return ptr; } @@ -3342,7 +3342,7 @@ edit_formals_lists (end_formals, f_list_count, def_dec_p) next_end = start_formals - 1; check_source (next_end > clean_read_ptr, 0); - while (isspace (*next_end)) + while (ISSPACE (*next_end)) check_source (--next_end > clean_read_ptr, 0); check_source (*next_end == ')', next_end); check_source (--next_end > clean_read_ptr, 0); @@ -3362,7 +3362,7 @@ edit_formals_lists (end_formals, f_list_count, def_dec_p) const char *func_name_limit; size_t func_name_len; - for (func_name_limit = start_formals-1; isspace (*func_name_limit); ) + for (func_name_limit = start_formals-1; ISSPACE (*func_name_limit); ) check_source (--func_name_limit > clean_read_ptr, 0); for (func_name_start = func_name_limit++; @@ -3458,8 +3458,8 @@ find_rightmost_formals_list (clean_text_p) while (*end_formals != ')') { - if (isspace (*end_formals)) - while (isspace (*end_formals)) + if (ISSPACE (*end_formals)) + while (ISSPACE (*end_formals)) check_source (--end_formals > clean_read_ptr, 0); else check_source (--end_formals > clean_read_ptr, 0); @@ -3488,8 +3488,8 @@ find_rightmost_formals_list (clean_text_p) while (*end_formals != ')') { - if (isspace (*end_formals)) - while (isspace (*end_formals)) + if (ISSPACE (*end_formals)) + while (ISSPACE (*end_formals)) check_source (--end_formals > clean_read_ptr, 0); else check_source (--end_formals > clean_read_ptr, 0); @@ -3507,7 +3507,7 @@ find_rightmost_formals_list (clean_text_p) by an alphabetic character, while others *cannot* validly be followed by such characters. */ - if ((ch == '{') || isalpha (ch)) + if ((ch == '{') || ISALPHA (ch)) break; /* At this point, we have found a right paren, but we know that it is @@ -3603,7 +3603,7 @@ add_local_decl (def_dec_p, clean_text_p) We can now just scan backwards and find the left end of the existing indentation string, and then copy it to the output buffer. */ - for (sp = ep; isspace (*sp) && *sp != '\n'; sp--) + for (sp = ep; ISSPACE (*sp) && *sp != '\n'; sp--) continue; /* Now write out the open { which began this block, and any following @@ -3684,7 +3684,7 @@ add_global_decls (file_p, clean_text_p) header. We will put in the added declarations just prior to that. */ scan_p++; - while (isspace (*scan_p)) + while (ISSPACE (*scan_p)) scan_p++; scan_p--; @@ -3853,7 +3853,7 @@ edit_fn_definition (def_dec_p, clean_text_p) { have_newlines |= (*scan_orig == '\n'); /* Leave identical whitespace alone. */ - if (!isspace (*scan_orig)) + if (!ISSPACE (*scan_orig)) *((NONCONST char *)scan_orig) = ' '; /* identical - so whiteout */ } else @@ -3897,7 +3897,7 @@ do_cleaning (new_clean_text_base, new_clean_text_limit) scan_p += 2; while (scan_p[1] != '/' || scan_p[0] != '*') { - if (!isspace (*scan_p)) + if (!ISSPACE (*scan_p)) *scan_p = ' '; if (++scan_p >= new_clean_text_limit) abort (); @@ -3912,7 +3912,7 @@ do_cleaning (new_clean_text_base, new_clean_text_limit) *scan_p = ' '; while (scan_p[1] != '\n' || scan_p[0] == '\\') { - if (!isspace (*scan_p)) + if (!ISSPACE (*scan_p)) *scan_p = ' '; if (++scan_p >= new_clean_text_limit) abort (); @@ -3924,9 +3924,9 @@ do_cleaning (new_clean_text_base, new_clean_text_limit) non_whitespace_since_newline = 1; while (scan_p[1] != '\'' || scan_p[0] == '\\') { - if (scan_p[0] == '\\' && !isspace (scan_p[1])) + if (scan_p[0] == '\\' && !ISSPACE (scan_p[1])) scan_p[1] = ' '; - if (!isspace (*scan_p)) + if (!ISSPACE (*scan_p)) *scan_p = ' '; if (++scan_p >= new_clean_text_limit) abort (); @@ -3938,14 +3938,14 @@ do_cleaning (new_clean_text_base, new_clean_text_limit) non_whitespace_since_newline = 1; while (scan_p[1] != '"' || scan_p[0] == '\\') { - if (scan_p[0] == '\\' && !isspace (scan_p[1])) + if (scan_p[0] == '\\' && !ISSPACE (scan_p[1])) scan_p[1] = ' '; - if (!isspace (*scan_p)) + if (!ISSPACE (*scan_p)) *scan_p = ' '; if (++scan_p >= new_clean_text_limit) abort (); } - if (!isspace (*scan_p)) + if (!ISSPACE (*scan_p)) *scan_p = ' '; scan_p++; break; @@ -4038,12 +4038,12 @@ scan_for_missed_items (file_p) last_r_paren = scan_p; - for (ahead_p = scan_p + 1; isspace (*ahead_p); ) + for (ahead_p = scan_p + 1; ISSPACE (*ahead_p); ) check_source (++ahead_p < limit, limit); scan_p = ahead_p - 1; - if (isalpha (*ahead_p) || *ahead_p == '{') + if (ISALPHA (*ahead_p) || *ahead_p == '{') { const char *last_l_paren; const int lineno = identify_lineno (ahead_p); @@ -4057,7 +4057,7 @@ scan_for_missed_items (file_p) do { last_l_paren = careful_find_l_paren (last_r_paren); - for (last_r_paren = last_l_paren-1; isspace (*last_r_paren); ) + for (last_r_paren = last_l_paren-1; ISSPACE (*last_r_paren); ) check_source (--last_r_paren >= backup_limit, backup_limit); } while (*last_r_paren == ')'); @@ -4696,7 +4696,7 @@ main (argc, argv) { const char *cp; - for (cp = varargs_style_indicator; isalnum (*cp) || *cp == '_'; cp++) + for (cp = varargs_style_indicator; ISALNUM (*cp) || *cp == '_'; cp++) continue; if (*cp != 0) varargs_style_indicator = savestring (varargs_style_indicator, @@ -561,7 +561,7 @@ atoll(p) int neg = 0; HOST_WIDE_INT tmp_wide; - while (isspace(*p)) + while (ISSPACE(*p)) p++; if (*p == '-') neg = 1, p++; @@ -569,7 +569,7 @@ atoll(p) p++; tmp_wide = 0; - while (isdigit(*p)) + while (ISDIGIT(*p)) { HOST_WIDE_INT new_wide = tmp_wide*10 + (*p - '0'); if (new_wide < tmp_wide) @@ -65,13 +65,13 @@ scan_ident (fp, s, c) int c; { s->ptr = s->base; - if (isalpha(c) || c == '_') + if (ISALPHA(c) || c == '_') { for (;;) { SSTRING_PUT(s, c); c = getc (fp); - if (c == EOF || !(isalnum(c) || c == '_')) + if (c == EOF || !(ISALNUM(c) || c == '_')) break; } } @@ -210,18 +210,18 @@ get_token (fp, s) } if (c == EOF) return EOF; - if (isdigit (c)) + if (ISDIGIT (c)) { do { SSTRING_PUT(s, c); c = getc (fp); - } while (c != EOF && isdigit(c)); + } while (c != EOF && ISDIGIT(c)); ungetc (c, fp); c = INT_TOKEN; goto done; } - if (isalpha (c) || c == '_') + if (ISALPHA (c) || c == '_') { c = scan_ident (fp, s, c); ungetc (c, fp); @@ -5055,11 +5055,11 @@ estimate_case_costs (node) for (i = 0; i < 128; i++) { - if (isalnum (i)) + if (ISALNUM (i)) cost_table[i] = 16; - else if (ispunct (i)) + else if (ISPUNCT (i)) cost_table[i] = 8; - else if (iscntrl (i)) + else if (ISCNTRL (i)) cost_table[i] = -1; } diff --git a/gcc/tlink.c b/gcc/tlink.c index c12e8c1..d5fa00c 100644 --- a/gcc/tlink.c +++ b/gcc/tlink.c @@ -530,13 +530,13 @@ scan_linker_output (fname) symbol *sym; int end; - while (*p && isspace (*p)) + while (*p && ISSPACE (*p)) ++p; if (! *p) continue; - for (q = p; *q && ! isspace (*q); ++q) + for (q = p; *q && ! ISSPACE (*q); ++q) ; /* Try the first word on the line. */ diff --git a/gcc/toplev.c b/gcc/toplev.c index 22c139f..eabff92 100644 --- a/gcc/toplev.c +++ b/gcc/toplev.c @@ -1344,7 +1344,7 @@ v_message_with_decl (decl, prefix, s, ap) while (*p) { ++p; - if (isalpha (*(p - 1) & 0xFF)) + if (ISALPHA (*(p - 1) & 0xFF)) break; } } |