* gettext-tools/src/format-awk.c (isdigit): Remove macro.
(format_parse): Use c_isdigit instead.
* gettext-tools/src/format-boost.c (isdigit): Remove macro.
(format_parse): Use c_isdigit instead.
* gettext-tools/src/format-c-parse.h (isdigit): Remove macro.
(format_parse_entrails): Use c_isdigit instead.
* gettext-tools/src/format-c++-brace.c (isdigit): Remove macro.
(format_parse): Use c_isdigit instead.
* gettext-tools/src/format-elisp.c (isdigit): Remove macro.
(format_parse): Use c_isdigit instead.
* gettext-tools/src/format-gcc-internal.c (isdigit): Remove macro.
(format_parse): Use c_isdigit instead.
* gettext-tools/src/format-gfc-internal.c (isdigit): Remove macro.
(format_parse): Use c_isdigit instead.
* gettext-tools/src/format-go.c (isdigit): Remove macro.
(format_parse): Use c_isdigit instead.
* gettext-tools/src/format-java-printf.c (isdigit): Remove macro.
(format_parse): Use c_isdigit instead.
* gettext-tools/src/format-javascript.c (isdigit): Remove macro.
(format_parse): Use c_isdigit instead.
* gettext-tools/src/format-librep.c (isdigit): Remove macro.
(format_parse): Use c_isdigit instead.
* gettext-tools/src/format-lua.c (isdigit): Remove macro.
(format_parse): Use c_isdigit instead.
* gettext-tools/src/format-pascal.c (isdigit): Remove macro.
(format_parse): Use c_isdigit instead.
* gettext-tools/src/format-perl.c (isdigit): Remove macro.
(c_isnonzerodigit): Renamed from isnonzerodigit.
(format_parse): Use c_isdigit instead of isdigit.
* gettext-tools/src/format-php.c (isdigit): Remove macro.
(format_parse): Use c_isdigit instead.
* gettext-tools/src/format-python.c (isdigit): Remove macro.
(format_parse): Use c_isdigit instead.
* gettext-tools/src/format-ruby.c (isdigit): Remove macro.
(format_parse): Use c_isdigit instead.
* gettext-tools/src/format-tcl.c (isdigit): Remove macro.
(format_parse): Use c_isdigit instead.
/* awk format strings.
- Copyright (C) 2001-2004, 2006-2007, 2009, 2019-2020, 2023 Free Software Foundation, Inc.
+ Copyright (C) 2001-2025 Free Software Foundation, Inc.
Written by Bruno Haible <haible@clisp.cons.org>, 2002.
This program is free software: you can redistribute it and/or modify
struct numbered_arg *numbered;
};
-/* Locale independent test for a decimal digit.
- Argument can be 'char' or 'unsigned char'. (Whereas the argument of
- <ctype.h> isdigit must be an 'unsigned char'.) */
-#undef isdigit
-#define isdigit(c) ((unsigned int) ((c) - '0') < 10)
-
static int
numbered_arg_compare (const void *p1, const void *p2)
FDI_SET (format - 1, FMTDIR_START);
spec.directives++;
- if (isdigit (*format))
+ if (c_isdigit (*format))
{
const char *f = format;
unsigned int m = 0;
m = 10 * m + (*f - '0');
f++;
}
- while (isdigit (*f));
+ while (c_isdigit (*f));
if (*f == '$')
{
format++;
- if (isdigit (*format))
+ if (c_isdigit (*format))
{
const char *f = format;
unsigned int m = 0;
m = 10 * m + (*f - '0');
f++;
}
- while (isdigit (*f));
+ while (c_isdigit (*f));
if (*f == '$')
{
unnumbered_arg_count++;
}
}
- else if (isdigit (*format))
+ else if (c_isdigit (*format))
{
- do format++; while (isdigit (*format));
+ do format++; while (c_isdigit (*format));
}
/* Parse precision. */
format++;
- if (isdigit (*format))
+ if (c_isdigit (*format))
{
const char *f = format;
unsigned int m = 0;
m = 10 * m + (*f - '0');
f++;
}
- while (isdigit (*f));
+ while (c_isdigit (*f));
if (*f == '$')
{
unnumbered_arg_count++;
}
}
- else if (isdigit (*format))
+ else if (c_isdigit (*format))
{
- do format++; while (isdigit (*format));
+ do format++; while (c_isdigit (*format));
}
}
/* Boost format strings.
- Copyright (C) 2001-2004, 2006-2007, 2009, 2019-2020, 2023 Free Software Foundation, Inc.
+ Copyright (C) 2001-2025 Free Software Foundation, Inc.
Written by Bruno Haible <haible@clisp.cons.org>, 2006.
This program is free software: you can redistribute it and/or modify
struct numbered_arg *numbered;
};
-/* Locale independent test for a decimal digit.
- Argument can be 'char' or 'unsigned char'. (Whereas the argument of
- <ctype.h> isdigit must be an 'unsigned char'.) */
-#undef isdigit
-#define isdigit(c) ((unsigned int) ((c) - '0') < 10)
-
static int
numbered_arg_compare (const void *p1, const void *p2)
brackets = true;
}
- if (isdigit (*format) && *format != '0')
+ if (c_isdigit (*format) && *format != '0')
{
const char *f = format;
unsigned int m = 0;
m = 10 * m + (*f - '0');
f++;
}
- while (isdigit (*f));
+ while (c_isdigit (*f));
if ((!brackets && *f == '%') || *f == '$')
{
format++;
- if (isdigit (*format))
+ if (c_isdigit (*format))
{
const char *f = format;
unsigned int m = 0;
m = 10 * m + (*f - '0');
f++;
}
- while (isdigit (*f));
+ while (c_isdigit (*f));
if (*f == '$')
{
unnumbered_arg_count++;
}
}
- else if (isdigit (*format))
+ else if (c_isdigit (*format))
{
- do format++; while (isdigit (*format));
+ do format++; while (c_isdigit (*format));
}
/* Parse precision. */
format++;
- if (isdigit (*format))
+ if (c_isdigit (*format))
{
const char *f = format;
unsigned int m = 0;
m = 10 * m + (*f - '0');
f++;
}
- while (isdigit (*f));
+ while (c_isdigit (*f));
if (*f == '$')
{
unnumbered_arg_count++;
}
}
- else if (isdigit (*format))
+ else if (c_isdigit (*format))
{
- do format++; while (isdigit (*format));
+ do format++; while (c_isdigit (*format));
}
}
/* C++ format strings.
- Copyright (C) 2003-2023 Free Software Foundation, Inc.
+ Copyright (C) 2003-2025 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2023.
This program is free software: you can redistribute it and/or modify
struct numbered_arg *numbered;
};
-/* Locale independent test for a decimal digit.
- Argument can be 'char' or 'unsigned char'. (Whereas the argument of
- <ctype.h> isdigit must be an 'unsigned char'.) */
-#undef isdigit
-#define isdigit(c) ((unsigned int) ((c) - '0') < 10)
-
static int
numbered_arg_compare (const void *p1, const void *p2)
unsigned int presentation;
/* Parse arg-id. */
- if (isdigit (*format))
+ if (c_isdigit (*format))
{
/* Numbered argument. */
unsigned int arg_id;
else
{
format++;
- while (isdigit (*format))
+ while (c_isdigit (*format))
{
if (arg_id >= UINT_MAX / 10)
{
}
/* Parse width. */
- if (isdigit (*format) && *format != '0')
+ if (c_isdigit (*format) && *format != '0')
{
do
format++;
- while (isdigit (*format));
+ while (c_isdigit (*format));
}
else if (*format == '{')
{
format++;
- if (isdigit (*format))
+ if (c_isdigit (*format))
{
/* Numbered argument. */
unsigned int width_arg_id;
else
{
format++;
- while (isdigit (*format))
+ while (c_isdigit (*format))
{
if (width_arg_id >= UINT_MAX / 10)
{
{
format++;
- if (isdigit (*format))
+ if (c_isdigit (*format))
{
do
format++;
- while (isdigit (*format));
+ while (c_isdigit (*format));
have_precision = true;
}
else if (*format == '{')
{
format++;
- if (isdigit (*format))
+ if (c_isdigit (*format))
{
/* Numbered argument. */
unsigned int precision_arg_id;
else
{
format++;
- while (isdigit (*format))
+ while (c_isdigit (*format))
{
if (precision_arg_id >= UINT_MAX / 10)
{
/* Parsing C format strings.
- Copyright (C) 2001-2004, 2006-2007, 2009-2010, 2018, 2020, 2022-2023 Free Software Foundation, Inc.
+ Copyright (C) 2001-2025 Free Software Foundation, Inc.
Written by Bruno Haible <haible@clisp.cons.org>, 2001.
This program is free software: you can redistribute it and/or modify
const char **sysdep_directives;
};
-/* Locale independent test for a decimal digit.
- Argument can be 'char' or 'unsigned char'. (Whereas the argument of
- <ctype.h> isdigit must be an 'unsigned char'.) */
-#undef isdigit
-#define isdigit(c) ((unsigned int) ((c) - '0') < 10)
-
/* Whether to recognize the 'I' flag. */
#if SYSDEP_SEGMENTS_PROCESSED
/* The 'I' flag can only occur in glibc >= 2.2. On other platforms, gettext()
FDI_SET (format - 1, FMTDIR_START);
spec.directives++;
- if (isdigit (*format))
+ if (c_isdigit (*format))
{
const char *f = format;
unsigned int m = 0;
m = 10 * m + (*f - '0');
f++;
}
- while (isdigit (*f));
+ while (c_isdigit (*f));
if (*f == '$')
{
format++;
- if (isdigit (*format))
+ if (c_isdigit (*format))
{
const char *f = format;
unsigned int m = 0;
m = 10 * m + (*f - '0');
f++;
}
- while (isdigit (*f));
+ while (c_isdigit (*f));
if (*f == '$')
{
spec.unnumbered_arg_count++;
}
}
- else if (isdigit (*format))
+ else if (c_isdigit (*format))
{
- do format++; while (isdigit (*format));
+ do format++; while (c_isdigit (*format));
}
/* Parse precision. */
format++;
- if (isdigit (*format))
+ if (c_isdigit (*format))
{
const char *f = format;
unsigned int m = 0;
m = 10 * m + (*f - '0');
f++;
}
- while (isdigit (*f));
+ while (c_isdigit (*f));
if (*f == '$')
{
spec.unnumbered_arg_count++;
}
}
- else if (isdigit (*format))
+ else if (c_isdigit (*format))
{
- do format++; while (isdigit (*format));
+ do format++; while (c_isdigit (*format));
}
}
/* Emacs Lisp format strings.
- Copyright (C) 2001-2023 Free Software Foundation, Inc.
+ Copyright (C) 2001-2025 Free Software Foundation, Inc.
Written by Bruno Haible <haible@clisp.cons.org>, 2002.
This program is free software: you can redistribute it and/or modify
struct numbered_arg *numbered;
};
-/* Locale independent test for a decimal digit.
- Argument can be 'char' or 'unsigned char'. (Whereas the argument of
- <ctype.h> isdigit must be an 'unsigned char'.) */
-#undef isdigit
-#define isdigit(c) ((unsigned int) ((c) - '0') < 10)
-
static int
numbered_arg_compare (const void *p1, const void *p2)
FDI_SET (format - 1, FMTDIR_START);
spec.directives++;
- if (isdigit (*format))
+ if (c_isdigit (*format))
{
const char *f = format;
unsigned int m = 0;
m = 10 * m + (*f - '0');
f++;
}
- while (isdigit (*f));
+ while (c_isdigit (*f));
if (*f == '$' && m > 0)
{
number++;
}
- else if (isdigit (*format))
+ else if (c_isdigit (*format))
{
- do format++; while (isdigit (*format));
+ do format++; while (c_isdigit (*format));
}
/* Parse precision. */
number++;
}
- else if (isdigit (*format))
+ else if (c_isdigit (*format))
{
- do format++; while (isdigit (*format));
+ do format++; while (c_isdigit (*format));
}
}
/* GCC internal format strings.
- Copyright (C) 2003-2009, 2019-2020, 2023 Free Software Foundation, Inc.
+ Copyright (C) 2003-2025 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2003.
This program is free software: you can redistribute it and/or modify
bool uses_err_no;
};
-/* Locale independent test for a decimal digit.
- Argument can be 'char' or 'unsigned char'. (Whereas the argument of
- <ctype.h> isdigit must be an 'unsigned char'.) */
-#undef isdigit
-#define isdigit(c) ((unsigned int) ((c) - '0') < 10)
-
static int
numbered_arg_compare (const void *p1, const void *p2)
format_arg_type_t size;
format_arg_type_t type;
- if (isdigit (*format))
+ if (c_isdigit (*format))
{
const char *f = format;
unsigned int m = 0;
m = 10 * m + (*f - '0');
f++;
}
- while (isdigit (*f));
+ while (c_isdigit (*f));
if (*f == '$')
{
{
format++;
- if (isdigit (*format))
+ if (c_isdigit (*format))
{
do
format++;
- while (isdigit (*format));
+ while (c_isdigit (*format));
if (*format != 's')
{
format++;
- if (isdigit (*format))
+ if (c_isdigit (*format))
{
const char *f = format;
unsigned int m = 0;
m = 10 * m + (*f - '0');
f++;
}
- while (isdigit (*f));
+ while (c_isdigit (*f));
if (*f == '$')
{
/* GFC (GNU Fortran Compiler) internal format strings.
- Copyright (C) 2003-2023 Free Software Foundation, Inc.
+ Copyright (C) 2003-2025 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2009.
This program is free software: you can redistribute it and/or modify
bool uses_currentloc;
};
-/* Locale independent test for a decimal digit.
- Argument can be 'char' or 'unsigned char'. (Whereas the argument of
- <ctype.h> isdigit must be an 'unsigned char'.) */
-#undef isdigit
-#define isdigit(c) ((unsigned int) ((c) - '0') < 10)
-
static int
numbered_arg_compare (const void *p1, const void *p2)
{
format_arg_type_t type;
- if (isdigit (*format))
+ if (c_isdigit (*format))
{
const char *f = format;
unsigned int m = 0;
m = 10 * m + (*f - '0');
f++;
}
- while (isdigit (*f));
+ while (c_isdigit (*f));
if (*f == '$')
{
struct numbered_arg *numbered;
};
-/* Locale independent test for a decimal digit.
- Argument can be 'char' or 'unsigned char'. (Whereas the argument of
- <ctype.h> isdigit must be an 'unsigned char'.) */
-#undef isdigit
-#define isdigit(c) ((unsigned int) ((c) - '0') < 10)
-
static int
numbered_arg_compare (const void *p1, const void *p2)
if (*format == '[')
{
- if (isdigit (format[1]))
+ if (c_isdigit (format[1]))
{
const char *f = format + 1;
unsigned int m = 0;
m = 10 * m + (*f - '0');
f++;
}
- while (isdigit (*f));
+ while (c_isdigit (*f));
if (*f == ']')
{
}
/* Parse width other than [m]*. */
- if (isdigit (*format))
+ if (c_isdigit (*format))
{
const char *f = format;
unsigned int width = 0;
width = 10 * width + (*f - '0');
f++;
}
- while (isdigit (*f));
+ while (c_isdigit (*f));
if (width > 1000000)
{
{
if (format[1] == '[')
{
- if (isdigit (format[2]))
+ if (c_isdigit (format[2]))
{
const char *f = format + 2;
unsigned int m = 0;
m = 10 * m + (*f - '0');
f++;
}
- while (isdigit (*f));
+ while (c_isdigit (*f));
if (*f == ']')
{
}
/* Parse precision other than [m]*. */
- if (isdigit (format[1]))
+ if (c_isdigit (format[1]))
{
const char *f = format + 1;
unsigned int precision = 0;
precision = 10 * precision + (*f - '0');
f++;
}
- while (isdigit (*f));
+ while (c_isdigit (*f));
if (precision > 1000000)
{
parse_value:
if (*format == '[')
{
- if (isdigit (format[1]))
+ if (c_isdigit (format[1]))
{
const char *f = format + 1;
unsigned int m = 0;
m = 10 * m + (*f - '0');
f++;
}
- while (isdigit (*f));
+ while (c_isdigit (*f));
if (*f == ']')
{
/* Java printf format strings.
- Copyright (C) 2001-2004, 2006-2007, 2009-2010, 2018-2020, 2023 Free Software Foundation, Inc.
+ Copyright (C) 2001-2025 Free Software Foundation, Inc.
Written by Bruno Haible <haible@clisp.cons.org>, 2001.
This program is free software: you can redistribute it and/or modify
struct numbered_arg *numbered;
};
-/* Locale independent test for a decimal digit.
- Argument can be 'char' or 'unsigned char'. (Whereas the argument of
- <ctype.h> isdigit must be an 'unsigned char'.) */
-#undef isdigit
-#define isdigit(c) ((unsigned int) ((c) - '0') < 10)
-
static int
numbered_arg_compare (const void *p1, const void *p2)
number = last_arg_number;
format++;
}
- else if (isdigit (*format))
+ else if (c_isdigit (*format))
{
const char *f = format;
unsigned int m = 0;
m = 10 * m + (*f - '0');
f++;
}
- while (isdigit (*f));
+ while (c_isdigit (*f));
if (*f == '$')
{
}
/* Parse width. */
- if (isdigit (*format))
+ if (c_isdigit (*format))
{
- do format++; while (isdigit (*format));
+ do format++; while (c_isdigit (*format));
flags |= FAT_WIDTH;
}
{
format++;
- if (!isdigit (*format))
+ if (!c_isdigit (*format))
{
if (*format == '\0')
{
goto bad_format;
}
- do format++; while (isdigit (*format));
+ do format++; while (c_isdigit (*format));
flags |= FAT_PRECISION;
}
/* JavaScript format strings.
- Copyright (C) 2001-2004, 2006-2010, 2013, 2016, 2019-2020, 2023 Free Software Foundation, Inc.
+ Copyright (C) 2001-2025 Free Software Foundation, Inc.
Written by Andreas Stricker <andy@knitter.ch>, 2010.
It's based on python format module from Bruno Haible.
struct numbered_arg *numbered;
};
-/* Locale independent test for a decimal digit.
- Argument can be 'char' or 'unsigned char'. (Whereas the argument of
- <ctype.h> isdigit must be an 'unsigned char'.) */
-#undef isdigit
-#define isdigit(c) ((unsigned int) ((c) - '0') < 10)
-
static int
numbered_arg_compare (const void *p1, const void *p2)
FDI_SET (format - 1, FMTDIR_START);
spec.directives++;
- if (isdigit (*format))
+ if (c_isdigit (*format))
{
const char *f = format;
unsigned int m = 0;
m = 10 * m + (*f - '0');
f++;
}
- while (isdigit (*f));
+ while (c_isdigit (*f));
if (*f == '$')
{
format++;
/* Parse width. */
- while (isdigit (*format))
+ while (c_isdigit (*format))
format++;
if (*format == '.')
{
format++;
- while (isdigit (*format))
+ while (c_isdigit (*format))
format++;
}
/* librep format strings.
- Copyright (C) 2001-2004, 2006-2007, 2009, 2019-2020, 2023 Free Software Foundation, Inc.
+ Copyright (C) 2001-2025 Free Software Foundation, Inc.
Written by Bruno Haible <haible@clisp.cons.org>, 2001.
This program is free software: you can redistribute it and/or modify
struct numbered_arg *numbered;
};
-/* Locale independent test for a decimal digit.
- Argument can be 'char' or 'unsigned char'. (Whereas the argument of
- <ctype.h> isdigit must be an 'unsigned char'.) */
-#undef isdigit
-#define isdigit(c) ((unsigned int) ((c) - '0') < 10)
-
static int
numbered_arg_compare (const void *p1, const void *p2)
FDI_SET (format - 1, FMTDIR_START);
spec.directives++;
- if (isdigit (*format))
+ if (c_isdigit (*format))
{
const char *f = format;
unsigned int m = 0;
m = 10 * m + (*f - '0');
f++;
}
- while (isdigit (*f));
+ while (c_isdigit (*f));
if (*f == '$' && m > 0)
{
format++;
/* Parse width. */
- if (isdigit (*format))
+ if (c_isdigit (*format))
{
- do format++; while (isdigit (*format));
+ do format++; while (c_isdigit (*format));
}
/* Parse precision. */
{
format++;
- if (isdigit (*format))
+ if (c_isdigit (*format))
{
- do format++; while (isdigit (*format));
+ do format++; while (c_isdigit (*format));
}
}
/* Lua format strings.
- Copyright (C) 2012-2023 Free Software Foundation, Inc.
+ Copyright (C) 2012-2025 Free Software Foundation, Inc.
Written by ĽubomÃr Remák <lubomirr@lubomirr.eu>, 2012.
This program is free software: you can redistribute it and/or modify
enum format_arg_type *format_args;
};
-/* Locale independent test for a decimal digit.
- Argument can be 'char' or 'unsigned char'. (Whereas the argument of
- <ctype.h> isdigit must be an 'unsigned char'.) */
-#undef isdigit
-#define isdigit(c) ((unsigned int) ((c) - '0') < 10)
-
static void format_free (void *descr);
static void *
enum format_arg_type type;
/* Remove width. */
- while (isdigit (*fatstr))
+ while (c_isdigit (*fatstr))
fatstr++;
if (*fatstr == '.')
fatstr++;
/* Remove precision. */
- while (isdigit (*fatstr))
+ while (c_isdigit (*fatstr))
fatstr++;
}
/* Object Pascal format strings.
- Copyright (C) 2001-2004, 2006-2007, 2009-2010, 2018-2020, 2023 Free Software Foundation, Inc.
+ Copyright (C) 2001-2025 Free Software Foundation, Inc.
Written by Bruno Haible <haible@clisp.cons.org>, 2001.
This program is free software: you can redistribute it and/or modify
struct numbered_arg *numbered;
};
-/* Locale independent test for a decimal digit.
- Argument can be 'char' or 'unsigned char'. (Whereas the argument of
- <ctype.h> isdigit must be an 'unsigned char'.) */
-#undef isdigit
-#define isdigit(c) ((unsigned int) ((c) - '0') < 10)
-
static int
numbered_arg_compare (const void *p1, const void *p2)
unsigned int main_number = 0;
enum format_arg_type type;
- if (isdigit (*format) || *format == ':')
+ if (c_isdigit (*format) || *format == ':')
{
const char *f = format;
unsigned int m = 0;
- while (isdigit (*f))
+ while (c_isdigit (*f))
{
m = 10 * m + (*f - '0');
f++;
format++;
/* Parse width. */
- if (isdigit (*format))
+ if (c_isdigit (*format))
{
do
format++;
- while (isdigit (*format));
+ while (c_isdigit (*format));
}
else if (*format == '*')
{
{
format++;
- if (isdigit (*format))
+ if (c_isdigit (*format))
{
do
format++;
- while (isdigit (*format));
+ while (c_isdigit (*format));
}
else if (*format == '*')
{
/* Perl format strings.
- Copyright (C) 2004, 2006-2007, 2009, 2019-2020, 2023 Free Software Foundation, Inc.
+ Copyright (C) 2004-2025 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2003.
This program is free software: you can redistribute it and/or modify
struct numbered_arg *numbered;
};
-/* Locale independent test for a decimal digit.
- Argument can be 'char' or 'unsigned char'. (Whereas the argument of
- <ctype.h> isdigit must be an 'unsigned char'.) */
-#undef isdigit
-#define isdigit(c) ((unsigned int) ((c) - '0') < 10)
-
/* Locale independent test for a nonzero decimal digit. */
-#define isnonzerodigit(c) ((unsigned int) ((c) - '1') < 9)
+#define c_isnonzerodigit(c) ((unsigned int) ((c) - '1') < 9)
static int
FDI_SET (format - 1, FMTDIR_START);
directives++;
- if (isnonzerodigit (*format))
+ if (c_isnonzerodigit (*format))
{
const char *f = format;
unsigned int m = 0;
m = 10 * m + (*f - '0');
f++;
}
- while (isdigit (*f));
+ while (c_isdigit (*f));
if (*f == '$')
{
numbered[numbered_arg_count].type = FAT_SCALAR_VECTOR; /* or FAT_STRING? */
numbered_arg_count++;
}
- else if (isnonzerodigit (*f))
+ else if (c_isnonzerodigit (*f))
{
unsigned int m = 0;
m = 10 * m + (*f - '0');
f++;
}
- while (isdigit (*f));
+ while (c_isdigit (*f));
if (*f == '$')
{
format++;
- if (isnonzerodigit (*format))
+ if (c_isnonzerodigit (*format))
{
const char *f = format;
unsigned int m = 0;
m = 10 * m + (*f - '0');
f++;
}
- while (isdigit (*f));
+ while (c_isdigit (*f));
if (*f == '$')
{
numbered[numbered_arg_count].type = FAT_INTEGER;
numbered_arg_count++;
}
- else if (isnonzerodigit (*format))
+ else if (c_isnonzerodigit (*format))
{
- do format++; while (isdigit (*format));
+ do format++; while (c_isdigit (*format));
}
/* Parse precision. */
format++;
- if (isnonzerodigit (*format))
+ if (c_isnonzerodigit (*format))
{
const char *f = format;
unsigned int m = 0;
m = 10 * m + (*f - '0');
f++;
}
- while (isdigit (*f));
+ while (c_isdigit (*f));
if (*f == '$')
{
}
else
{
- while (isdigit (*format)) format++;
+ while (c_isdigit (*format)) format++;
}
}
/* PHP format strings.
- Copyright (C) 2001-2024 Free Software Foundation, Inc.
+ Copyright (C) 2001-2025 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify
struct numbered_arg *numbered;
};
-/* Locale independent test for a decimal digit.
- Argument can be 'char' or 'unsigned char'. (Whereas the argument of
- <ctype.h> isdigit must be an 'unsigned char'.) */
-#undef isdigit
-#define isdigit(c) ((unsigned int) ((c) - '0') < 10)
-
static int
numbered_arg_compare (const void *p1, const void *p2)
enum format_arg_type type;
number = ++unnumbered_arg_count;
- if (isdigit (*format))
+ if (c_isdigit (*format))
{
const char *f = format;
unsigned int m = 0;
m = 10 * m + (*f - '0');
f++;
}
- while (isdigit (*f));
+ while (c_isdigit (*f));
if (*f == '$')
{
}
/* Parse width. */
- if (isdigit (*format))
+ if (c_isdigit (*format))
{
do
format++;
- while (isdigit (*format));
+ while (c_isdigit (*format));
}
/* Parse precision. */
{
format++;
- if (isdigit (*format))
+ if (c_isdigit (*format))
{
do
format++;
- while (isdigit (*format));
+ while (c_isdigit (*format));
}
else
--format; /* will jump to bad_format */
/* Python format strings.
- Copyright (C) 2001-2024 Free Software Foundation, Inc.
+ Copyright (C) 2001-2025 Free Software Foundation, Inc.
Written by Bruno Haible <haible@clisp.cons.org>, 2001.
This program is free software: you can redistribute it and/or modify
struct unnamed_arg *unnamed;
};
-/* Locale independent test for a decimal digit.
- Argument can be 'char' or 'unsigned char'. (Whereas the argument of
- <ctype.h> isdigit must be an 'unsigned char'.) */
-#undef isdigit
-#define isdigit(c) ((unsigned int) ((c) - '0') < 10)
-
static int
named_arg_compare (const void *p1, const void *p2)
spec.unnamed[spec.unnamed_arg_count].type = FAT_INTEGER;
spec.unnamed_arg_count++;
}
- else if (isdigit (*format))
+ else if (c_isdigit (*format))
{
- do format++; while (isdigit (*format));
+ do format++; while (c_isdigit (*format));
}
if (*format == '.')
spec.unnamed[spec.unnamed_arg_count].type = FAT_INTEGER;
spec.unnamed_arg_count++;
}
- else if (isdigit (*format))
+ else if (c_isdigit (*format))
{
zero_precision = true;
do
zero_precision = false;
format++;
}
- while (isdigit (*format));
+ while (c_isdigit (*format));
}
}
struct numbered_arg *numbered;
};
-/* Locale independent test for a decimal digit.
- Argument can be 'char' or 'unsigned char'. (Whereas the argument of
- <ctype.h> isdigit must be an 'unsigned char'.) */
-#undef isdigit
-#define isdigit(c) ((unsigned int) ((c) - '0') < 10)
-
static int
named_arg_compare (const void *p1, const void *p2)
continue;
}
- if (isdigit (*format))
+ if (c_isdigit (*format))
{
unsigned int m = 0;
m = UINT_MAX - 1;
format++;
}
- while (isdigit (*format));
+ while (c_isdigit (*format));
if (*format == '$')
{
/* Parse width. */
format++;
- if (isdigit (*format))
+ if (c_isdigit (*format))
{
const char *f = format;
unsigned int m = 0;
m = UINT_MAX - 1;
f++;
}
- while (isdigit (*f));
+ while (c_isdigit (*f));
if (*f == '$')
{
{
format++;
- if (isdigit (*format))
+ if (c_isdigit (*format))
{
const char *f = format;
unsigned int m = 0;
m = UINT_MAX - 1;
f++;
}
- while (isdigit (*f));
+ while (c_isdigit (*f));
if (*f == '$')
{
continue;
}
- while (isdigit (*format))
+ while (c_isdigit (*format))
format++;
/* Seen a constant precision. */
/* Tcl format strings.
- Copyright (C) 2001-2004, 2006-2007, 2009, 2019-2020, 2023 Free Software Foundation, Inc.
+ Copyright (C) 2001-2025 Free Software Foundation, Inc.
Written by Bruno Haible <haible@clisp.cons.org>, 2002.
This program is free software: you can redistribute it and/or modify
struct numbered_arg *numbered;
};
-/* Locale independent test for a decimal digit.
- Argument can be 'char' or 'unsigned char'. (Whereas the argument of
- <ctype.h> isdigit must be an 'unsigned char'.) */
-#undef isdigit
-#define isdigit(c) ((unsigned int) ((c) - '0') < 10)
-
static int
numbered_arg_compare (const void *p1, const void *p2)
enum format_arg_type type;
is_numbered_arg = false;
- if (isdigit (*format))
+ if (c_isdigit (*format))
{
const char *f = format;
unsigned int m = 0;
m = 10 * m + (*f - '0');
f++;
}
- while (isdigit (*f));
+ while (c_isdigit (*f));
if (*f == '$')
{
number++;
}
- else if (isdigit (*format))
+ else if (c_isdigit (*format))
{
- do format++; while (isdigit (*format));
+ do format++; while (c_isdigit (*format));
}
/* Parse precision. */
number++;
}
- else if (isdigit (*format))
+ else if (c_isdigit (*format))
{
- do format++; while (isdigit (*format));
+ do format++; while (c_isdigit (*format));
}
}