break;
default:
- if (ISPRINT (ch))
+ if (isprint (ch))
error (EXIT_FAILURE, 0,
_("invalid conversion specifier in suffix: %c"), ch);
else
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. */
*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 == '#')
keyword_start = p;
- while (!ISSPACE (to_uchar (*p)) && *p != '\0')
+ while (!isspace (to_uchar (*p)) && *p != '\0')
{
++p;
}
{
++p;
}
- while (ISSPACE (to_uchar (*p)));
+ while (isspace (to_uchar (*p)));
if (*p == '\0' || *p == '#')
return;
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);
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);
while (logical_end)
{
--logical_end;
- if (ISBLANK (line_out[logical_end]))
+ if (isblank (to_uchar (line_out[logical_end])))
{
found_blank = true;
break;
while (p < plimit)
{
- if (! ISPRINT (to_uchar (*p)))
+ if (! isprint (to_uchar (*p)))
*p = '?';
p++;
}
displayed_width = 0;
while (p < plimit)
{
- if (ISPRINT (to_uchar (*p)))
+ if (isprint (to_uchar (*p)))
displayed_width++;
p++;
}
{
while (*s)
{
- if (!ISXDIGIT (*s))
+ if (!isxdigit (*s))
return false;
++s;
}
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;
}
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 ('<');
break;
default:
- sprintf (buf, (ISPRINT (c) ? " %c" : "%03o"), c);
+ sprintf (buf, (isprint (c) ? " %c" : "%03o"), c);
s = buf;
}
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;
}
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. */
}
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;
}
}
- else if (!ISPRINT (uc))
+ else if (! isprint (uc))
{
if (use_esc_sequence)
{
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;
}
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 == '+')
{
while (ISDIGIT (*p))
p++;
- while (ISBLANK (to_uchar (*p)))
+ while (isblank (to_uchar (*p)))
p++;
if (!*p)
return number_start;
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++;
}
#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"
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;
}