#include "system.h"
#include "argmatch.h"
+#include "c-ctype.h"
#include "quote.h"
#include "xdectoint.h"
#include "xstrtol.h"
{
for (idx_t i = 0; i < digest_hex_bytes; i++)
{
- if (!isxdigit (*s))
+ if (!c_isxdigit (*s))
return false;
++s;
}
# endif
unsigned char const *hp = *digest;
digest_hex_bytes = 0;
- while (isxdigit (*hp++))
+ while (c_isxdigit (*hp++))
digest_hex_bytes++;
if (digest_hex_bytes < 2 || digest_hex_bytes % 2
|| BLAKE2B_MAX_LEN * 2 < digest_hex_bytes)
#include <sys/types.h>
#include "system.h"
#include "assure.h"
+#include "c-ctype.h"
/* The official name of this program (e.g., no 'g' prefix). */
#define PROGRAM_NAME "echo"
case 'x':
{
unsigned char ch = *s;
- if (! isxdigit (ch))
+ if (! c_isxdigit (ch))
goto not_an_escape;
s++;
c = hextobin (ch);
ch = *s;
- if (isxdigit (ch))
+ if (c_isxdigit (ch))
{
s++;
c = c * 16 + hextobin (ch);
#include <wchar.h>
#include "system.h"
+#include "c-ctype.h"
#include "cl-strtod.h"
#include "quote.h"
#include "unicodeio.h"
{
/* A hexadecimal \xhh escape sequence must have 1 or 2 hex. digits. */
for (esc_length = 0, ++p;
- esc_length < 2 && isxdigit (to_uchar (*p));
+ esc_length < 2 && c_isxdigit (to_uchar (*p));
++esc_length, ++p)
esc_value = esc_value * 16 + hextobin (*p);
if (esc_length == 0)
esc_length > 0;
--esc_length, ++p)
{
- if (! isxdigit (to_uchar (*p)))
+ if (! c_isxdigit (to_uchar (*p)))
error (EXIT_FAILURE, 0, _("missing hexadecimal number in escape"));
uni_value = uni_value * 16 + hextobin (*p);
}
#include "system.h"
#include <regex.h>
#include "argmatch.h"
+#include "c-ctype.h"
#include "fadvise.h"
#include "quote.h"
#include "read-file.h"
case 'x': /* \xhhh escape, 3 chars maximum */
value = 0;
for (length = 0, string++;
- length < 3 && isxdigit (to_uchar (*string));
+ length < 3 && c_isxdigit (to_uchar (*string));
length++, string++)
value = value * 16 + HEXTOBIN (*string);
if (length == 0)
#include "areadlink.h"
#include "argmatch.h"
+#include "c-ctype.h"
#include "file-type.h"
#include "filemode.h"
#include "fs.h"
putchar (esc_value);
--b;
}
- else if (*b == 'x' && isxdigit (to_uchar (b[1])))
+ else if (*b == 'x' && c_isxdigit (to_uchar (b[1])))
{
int esc_value = hextobin (b[1]); /* Value of \xhh escape. */
/* A hexadecimal \xhh escape sequence must have
1 or 2 hex. digits. */
++b;
- if (isxdigit (to_uchar (b[1])))
+ if (c_isxdigit (to_uchar (b[1])))
{
++b;
esc_value = esc_value * 16 + hextobin (*b);