diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2006-07-09 17:08:55 +0000 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2006-07-09 17:08:55 +0000 |
commit | 197b96d06916887c4c167a3ee25edfdb3631ac71 (patch) | |
tree | a80b97e630d7ad60e5479022aef34f3ace3105ab | |
parent | b3e1ad7a5d972ee947831e9d943a12c239864e72 (diff) | |
download | coreutils-197b96d06916887c4c167a3ee25edfdb3631ac71.tar.xz |
Adjust to today's renaming changes in system.h.
-rw-r--r-- | src/csplit.c | 2 | ||||
-rw-r--r-- | src/cut.c | 2 | ||||
-rw-r--r-- | src/dircolors.c | 14 | ||||
-rw-r--r-- | src/echo.c | 4 | ||||
-rw-r--r-- | src/fold.c | 2 | ||||
-rw-r--r-- | src/ls.c | 4 | ||||
-rw-r--r-- | src/md5sum.c | 6 | ||||
-rw-r--r-- | src/od.c | 8 | ||||
-rw-r--r-- | src/pr.c | 4 | ||||
-rw-r--r-- | src/pwd.c | 2 | ||||
-rw-r--r-- | src/test.c | 4 | ||||
-rw-r--r-- | src/uniq.c | 4 | ||||
-rw-r--r-- | src/wc.c | 10 |
13 files changed, 30 insertions, 36 deletions
diff --git a/src/csplit.c b/src/csplit.c index 3fdc3f061..1d0119868 100644 --- a/src/csplit.c +++ b/src/csplit.c @@ -1273,7 +1273,7 @@ get_format_conv_type (char **format_ptr) break; default: - if (ISPRINT (ch)) + if (isprint (ch)) error (EXIT_FAILURE, 0, _("invalid conversion specifier in suffix: %c"), ch); else @@ -372,7 +372,7 @@ set_fields (const char *fieldstr) else initial = 1; } - else if (*fieldstr == ',' || ISBLANK (*fieldstr) || *fieldstr == '\0') + else if (*fieldstr == ',' || isblank (*fieldstr) || *fieldstr == '\0') { in_digits = false; /* Ending the string, or this field/byte sublist. */ diff --git a/src/dircolors.c b/src/dircolors.c index 7c388f06c..e30774ab2 100644 --- a/src/dircolors.c +++ b/src/dircolors.c @@ -155,8 +155,8 @@ parse_line (char const *line, char **keyword, char **arg) *keyword = NULL; *arg = NULL; - for (p = line; ISSPACE (to_uchar (*p)); ++p) - ; + for (p = line; isspace (to_uchar (*p)); ++p) + continue; /* Ignore blank lines and shell-style comments. */ if (*p == '\0' || *p == '#') @@ -164,7 +164,7 @@ parse_line (char const *line, char **keyword, char **arg) keyword_start = p; - while (!ISSPACE (to_uchar (*p)) && *p != '\0') + while (!isspace (to_uchar (*p)) && *p != '\0') { ++p; } @@ -177,7 +177,7 @@ parse_line (char const *line, char **keyword, char **arg) { ++p; } - while (ISSPACE (to_uchar (*p))); + while (isspace (to_uchar (*p))); if (*p == '\0' || *p == '#') return; @@ -187,10 +187,8 @@ parse_line (char const *line, char **keyword, char **arg) while (*p != '\0' && *p != '#') ++p; - for (--p; ISSPACE (to_uchar (*p)); --p) - { - /* empty */ - } + for (--p; isspace (to_uchar (*p)); --p) + continue; ++p; *arg = xstrndup (arg_start, p - arg_start); diff --git a/src/echo.c b/src/echo.c index a286a5189..5f8582cc0 100644 --- a/src/echo.c +++ b/src/echo.c @@ -218,12 +218,12 @@ just_echo: case 'x': { unsigned char ch = *s; - if (! ISXDIGIT (ch)) + if (! isxdigit (ch)) goto not_an_escape; s++; c = hextobin (ch); ch = *s; - if (ISXDIGIT (ch)) + if (isxdigit (ch)) { s++; c = c * 16 + hextobin (ch); diff --git a/src/fold.c b/src/fold.c index cc5424dee..cef98c1a8 100644 --- a/src/fold.c +++ b/src/fold.c @@ -176,7 +176,7 @@ fold_file (char *filename, size_t width) while (logical_end) { --logical_end; - if (ISBLANK (line_out[logical_end])) + if (isblank (to_uchar (line_out[logical_end]))) { found_blank = true; break; @@ -3659,7 +3659,7 @@ quote_name (FILE *out, const char *name, struct quoting_options const *options, while (p < plimit) { - if (! ISPRINT (to_uchar (*p))) + if (! isprint (to_uchar (*p))) *p = '?'; p++; } @@ -3680,7 +3680,7 @@ quote_name (FILE *out, const char *name, struct quoting_options const *options, displayed_width = 0; while (p < plimit) { - if (ISPRINT (to_uchar (*p))) + if (isprint (to_uchar (*p))) displayed_width++; p++; } diff --git a/src/md5sum.c b/src/md5sum.c index cdd74921b..1ecd672b5 100644 --- a/src/md5sum.c +++ b/src/md5sum.c @@ -348,7 +348,7 @@ hex_digits (unsigned char const *s) { while (*s) { - if (!ISXDIGIT (*s)) + if (!isxdigit (*s)) return false; ++s; } @@ -513,9 +513,9 @@ digest_check (const char *checkfile_name) in check file. Ignore case of hex digits. */ for (cnt = 0; cnt < digest_bin_bytes; ++cnt) { - if (TOLOWER (hex_digest[2 * cnt]) + if (tolower (hex_digest[2 * cnt]) != bin2hex[bin_buffer[cnt] >> 4] - || (TOLOWER (hex_digest[2 * cnt + 1]) + || (tolower (hex_digest[2 * cnt + 1]) != (bin2hex[bin_buffer[cnt] & 0xf]))) break; } @@ -497,7 +497,7 @@ dump_hexl_mode_trailer (size_t n_bytes, const char *block) for (i = n_bytes; i > 0; i--) { unsigned char c = *block++; - unsigned char c2 = (ISPRINT(c) ? c : '.'); + unsigned char c2 = (isprint (c) ? c : '.'); putchar (c2); } putchar ('<'); @@ -576,7 +576,7 @@ print_ascii (size_t n_bytes, void const *block, break; default: - sprintf (buf, (ISPRINT (c) ? " %c" : "%03o"), c); + sprintf (buf, (isprint (c) ? " %c" : "%03o"), c); s = buf; } @@ -1469,7 +1469,7 @@ dump_strings (void) free (buf); return ok; } - if (!ISPRINT (c)) + if (! isprint (c)) /* Found a non-printing. Try again starting with next char. */ goto tryline; buf[i] = c; @@ -1492,7 +1492,7 @@ dump_strings (void) } if (c == '\0') break; /* It is; print this string. */ - if (!ISPRINT (c)) + if (! isprint (c)) goto tryline; /* It isn't; give up on this string. */ buf[i++] = c; /* String continues; store it all. */ } @@ -2326,7 +2326,7 @@ print_char (char c) print_white_space (); /* Nonprintables are assumed to have width 0, except '\b'. */ - if (!ISPRINT (to_uchar (c))) + if (! isprint (to_uchar (c))) { if (c == '\b') --output_position; @@ -2685,7 +2685,7 @@ char_to_clump (char c) } } - else if (!ISPRINT (uc)) + else if (! isprint (uc)) { if (use_esc_sequence) { @@ -210,7 +210,7 @@ find_dir_entry (struct stat *dot_sb, struct file_name *file_name, match is enough. */ if ( ! use_lstat || ent_sb.st_dev == dot_sb->st_dev) { - file_name_prepend (file_name, dp->d_name, NLENGTH (dp)); + file_name_prepend (file_name, dp->d_name, _D_EXACT_NAMLEN (dp)); found = true; break; } diff --git a/src/test.c b/src/test.c index d6ae03611..b25436b1f 100644 --- a/src/test.c +++ b/src/test.c @@ -134,7 +134,7 @@ find_int (char const *string) char const *p; char const *number_start; - for (p = string; ISBLANK (to_uchar (*p)); p++) + for (p = string; isblank (to_uchar (*p)); p++) continue; if (*p == '+') @@ -152,7 +152,7 @@ find_int (char const *string) { while (ISDIGIT (*p)) p++; - while (ISBLANK (to_uchar (*p))) + while (isblank (to_uchar (*p))) p++; if (!*p) return number_start; diff --git a/src/uniq.c b/src/uniq.c index 4ea3fdeee..0d60961f6 100644 --- a/src/uniq.c +++ b/src/uniq.c @@ -198,9 +198,9 @@ find_field (const struct linebuffer *line) for (count = 0; count < skip_fields && i < size; count++) { - while (i < size && ISBLANK (lp[i])) + while (i < size && isblank (lp[i])) i++; - while (i < size && !ISBLANK (lp[i])) + while (i < size && !isblank (lp[i])) i++; } @@ -38,14 +38,10 @@ #endif #if !defined iswspace && !HAVE_ISWSPACE # define iswspace(wc) \ - ((wc) == to_uchar (wc) && ISSPACE (to_uchar (wc))) + ((wc) == to_uchar (wc) && isspace (to_uchar (wc))) #endif -/* Include this after wctype.h so that we `#undef' ISPRINT - (from Solaris's euc.h, from widec.h, from wctype.h) before - redefining and using it. */ #include "system.h" - #include "error.h" #include "inttostr.h" #include "quote.h" @@ -474,10 +470,10 @@ wc (int fd, char const *file_x, struct fstatus *fstatus) in_word = false; break; default: - if (ISPRINT (to_uchar (p[-1]))) + if (isprint (to_uchar (p[-1]))) { linepos++; - if (ISSPACE (to_uchar (p[-1]))) + if (isspace (to_uchar (p[-1]))) goto word_separator; in_word = true; } |