From cc88e009edc0ac57241551c8bff2ee21269a2fb6 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Thu, 23 May 2013 14:46:51 +0000 Subject: [PATCH] * libc/ctype/isalnum.c: Correct domain of definition to SUSv4 wording. * libc/ctype/isalpha.c: Ditto. * libc/ctype/isblank.c: Ditto. * libc/ctype/iscntrl.c: Ditto. * libc/ctype/isdigit.c: Ditto. * libc/ctype/islower.c: Ditto. * libc/ctype/isprint.c: Ditto. * libc/ctype/ispunct.c: Ditto. * libc/ctype/isxdigit.c: Ditto. --- newlib/ChangeLog | 12 ++++++++++++ newlib/libc/ctype/isalnum.c | 2 +- newlib/libc/ctype/isalpha.c | 4 ++-- newlib/libc/ctype/isblank.c | 3 ++- newlib/libc/ctype/iscntrl.c | 4 ++-- newlib/libc/ctype/isdigit.c | 4 ++-- newlib/libc/ctype/islower.c | 3 ++- newlib/libc/ctype/isprint.c | 3 ++- newlib/libc/ctype/ispunct.c | 4 ++-- newlib/libc/ctype/isxdigit.c | 4 ++-- 10 files changed, 29 insertions(+), 14 deletions(-) diff --git a/newlib/ChangeLog b/newlib/ChangeLog index dc77b7e9a..c8d18ca65 100644 --- a/newlib/ChangeLog +++ b/newlib/ChangeLog @@ -1,3 +1,15 @@ +2013-05-22 Corinna Vinschen + + * libc/ctype/isalnum.c: Correct domain of definition to SUSv4 wording. + * libc/ctype/isalpha.c: Ditto. + * libc/ctype/isblank.c: Ditto. + * libc/ctype/iscntrl.c: Ditto. + * libc/ctype/isdigit.c: Ditto. + * libc/ctype/islower.c: Ditto. + * libc/ctype/isprint.c: Ditto. + * libc/ctype/ispunct.c: Ditto. + * libc/ctype/isxdigit.c: Ditto. + 2013-05-22 Corinna Vinschen * libc/include/sys/cdefs.h (_Static_assert): Accommodate gcc >= 4.6. diff --git a/newlib/libc/ctype/isalnum.c b/newlib/libc/ctype/isalnum.c index 3fd5f9515..8bc2897c9 100644 --- a/newlib/libc/ctype/isalnum.c +++ b/newlib/libc/ctype/isalnum.c @@ -18,7 +18,7 @@ DESCRIPTION <> is a macro which classifies ASCII integer values by table lookup. It is a predicate returning non-zero for alphabetic or numeric ASCII characters, and <<0>> for other arguments. It is defined -for all integer values. +only if <[c]> is representable as an unsigned char or if <[c]> is EOF. You can use a compiled subroutine instead of the macro definition by undefining the macro using `<<#undef isalnum>>'. diff --git a/newlib/libc/ctype/isalpha.c b/newlib/libc/ctype/isalpha.c index a30ca9e19..d25a8fa27 100644 --- a/newlib/libc/ctype/isalpha.c +++ b/newlib/libc/ctype/isalpha.c @@ -16,8 +16,8 @@ TRAD_SYNOPSIS DESCRIPTION <> is a macro which classifies ASCII integer values by table lookup. It is a predicate returning non-zero when <[c]> represents an -alphabetic ASCII character, and 0 otherwise. It is defined only when -<>(<[c]>) is true or <[c]> is EOF. +alphabetic ASCII character, and 0 otherwise. It is defined only if +<[c]> is representable as an unsigned char or if <[c]> is EOF. You can use a compiled subroutine instead of the macro definition by undefining the macro using `<<#undef isalpha>>'. diff --git a/newlib/libc/ctype/isblank.c b/newlib/libc/ctype/isblank.c index f4d38b95c..896a00768 100644 --- a/newlib/libc/ctype/isblank.c +++ b/newlib/libc/ctype/isblank.c @@ -17,7 +17,8 @@ TRAD_SYNOPSIS DESCRIPTION <> is a function which classifies ASCII integer values by table lookup. It is a predicate returning non-zero for blank characters, and 0 -for other characters. +for other characters. It is defined only if <[c]> is representable as an +unsigned char or if <[c]> is EOF. RETURNS <> returns non-zero if <[c]> is a blank character. diff --git a/newlib/libc/ctype/iscntrl.c b/newlib/libc/ctype/iscntrl.c index a4fdff178..76b0f55de 100644 --- a/newlib/libc/ctype/iscntrl.c +++ b/newlib/libc/ctype/iscntrl.c @@ -17,8 +17,8 @@ TRAD_SYNOPSIS DESCRIPTION <> is a macro which classifies ASCII integer values by table lookup. It is a predicate returning non-zero for control characters, and 0 -for other characters. It is defined only when <>(<[c]>) is -true or <[c]> is EOF. +for other characters. It is defined only if <[c]> is representable as an +unsigned char or if <[c]> is EOF. You can use a compiled subroutine instead of the macro definition by undefining the macro using `<<#undef iscntrl>>'. diff --git a/newlib/libc/ctype/isdigit.c b/newlib/libc/ctype/isdigit.c index 18383ee45..9db2700b7 100644 --- a/newlib/libc/ctype/isdigit.c +++ b/newlib/libc/ctype/isdigit.c @@ -16,8 +16,8 @@ int isdigit(<[c]>); DESCRIPTION <> is a macro which classifies ASCII integer values by table lookup. It is a predicate returning non-zero for decimal digits, and 0 for -other characters. It is defined only when <>(<[c]>) is true -or <[c]> is EOF. +other characters. It is defined only if <[c]> is representable as an +unsigned char or if <[c]> is EOF. You can use a compiled subroutine instead of the macro definition by undefining the macro using `<<#undef isdigit>>'. diff --git a/newlib/libc/ctype/islower.c b/newlib/libc/ctype/islower.c index bef010b8b..ec4309610 100644 --- a/newlib/libc/ctype/islower.c +++ b/newlib/libc/ctype/islower.c @@ -18,7 +18,8 @@ DESCRIPTION <> is a macro which classifies ASCII integer values by table lookup. It is a predicate returning non-zero for minuscules (lowercase alphabetic characters), and 0 for other characters. -It is defined only when <>(<[c]>) is true or <[c]> is EOF. +It is defined only if <[c]> is representable as an unsigned char or if +<[c]> is EOF. You can use a compiled subroutine instead of the macro definition by undefining the macro using `<<#undef islower>>'. diff --git a/newlib/libc/ctype/isprint.c b/newlib/libc/ctype/isprint.c index 2f317a291..b95aedd16 100644 --- a/newlib/libc/ctype/isprint.c +++ b/newlib/libc/ctype/isprint.c @@ -23,7 +23,8 @@ DESCRIPTION <> is a macro which classifies ASCII integer values by table lookup. It is a predicate returning non-zero for printable characters, and 0 for other character arguments. -It is defined only when <>(<[c]>) is true or <[c]> is EOF. +It is defined only if <[c]> is representable as an unsigned char or if +<[c]> is EOF. You can use a compiled subroutine instead of the macro definition by undefining either macro using `<<#undef isprint>>' or `<<#undef isgraph>>'. diff --git a/newlib/libc/ctype/ispunct.c b/newlib/libc/ctype/ispunct.c index 9b9c9c0bc..9ca674975 100644 --- a/newlib/libc/ctype/ispunct.c +++ b/newlib/libc/ctype/ispunct.c @@ -17,8 +17,8 @@ int ispunct(<[c]>); DESCRIPTION <> is a macro which classifies ASCII integer values by table lookup. It is a predicate returning non-zero for printable -punctuation characters, and 0 for other characters. It is defined -only when <>(<[c]>) is true or <[c]> is EOF. +punctuation characters, and 0 for other characters. It is defined only +if <[c]> is representable as an unsigned char or if <[c]> is EOF. You can use a compiled subroutine instead of the macro definition by undefining the macro using `<<#undef ispunct>>'. diff --git a/newlib/libc/ctype/isxdigit.c b/newlib/libc/ctype/isxdigit.c index 9748eb4b5..314f74e7e 100644 --- a/newlib/libc/ctype/isxdigit.c +++ b/newlib/libc/ctype/isxdigit.c @@ -17,8 +17,8 @@ int isxdigit(int <[c]>); DESCRIPTION <> is a macro which classifies ASCII integer values by table lookup. It is a predicate returning non-zero for hexadecimal digits, -and <<0>> for other characters. It is defined only when -<>(<[c]>) is true or <[c]> is EOF. +and <<0>> for other characters. It is defined only if <[c]> is +representable as an unsigned char or if <[c]> is EOF. You can use a compiled subroutine instead of the macro definition by undefining the macro using `<<#undef isxdigit>>'. -- 2.43.5