diff --git a/newlib/libc/ctype/Makefile.am b/newlib/libc/ctype/Makefile.am index 00b91bfe2..898693571 100644 --- a/newlib/libc/ctype/Makefile.am +++ b/newlib/libc/ctype/Makefile.am @@ -98,71 +98,38 @@ include $(srcdir)/../../Makefile.shared CHEWOUT_FILES= \ isalnum.def \ - isalnum_l.def \ isalpha.def \ - isalpha_l.def \ isascii.def \ - isascii_l.def \ isblank.def \ - isblank_l.def \ iscntrl.def \ - iscntrl_l.def \ isdigit.def \ - isdigit_l.def \ islower.def \ - islower_l.def \ isprint.def \ - isprint_l.def \ ispunct.def \ - ispunct_l.def \ isspace.def \ - isspace_l.def \ isupper.def \ - isupper_l.def \ iswalnum.def \ - iswalnum_l.def \ iswalpha.def \ - iswalpha_l.def \ iswblank.def \ - iswblank_l.def \ iswcntrl.def \ - iswcntrl_l.def \ iswctype.def \ - iswctype_l.def \ iswdigit.def \ - iswdigit_l.def \ iswgraph.def \ - iswgraph_l.def \ iswlower.def \ - iswlower_l.def \ iswprint.def \ - iswprint_l.def \ iswpunct.def \ - iswpunct_l.def \ iswspace.def \ - iswspace_l.def \ iswupper.def \ - iswupper_l.def \ iswxdigit.def \ - iswxdigit_l.def \ isxdigit.def \ - isxdigit_l.def \ toascii.def \ - toascii_l.def \ tolower.def \ - tolower_l.def \ toupper.def \ - toupper_l.def \ towctrans.def \ - towctrans_l.def \ towlower.def \ - towlower_l.def \ towupper.def \ - towupper_l.def \ wctrans.def \ - wctrans_l.def \ - wctype.def \ - wctype_l.def + wctype.def CHAPTERS = ctype.tex diff --git a/newlib/libc/ctype/Makefile.in b/newlib/libc/ctype/Makefile.in index 02f707162..b296feb2c 100644 --- a/newlib/libc/ctype/Makefile.in +++ b/newlib/libc/ctype/Makefile.in @@ -426,71 +426,38 @@ DOCBOOK_CHAPTERS = $(CHAPTERS:.tex=.xml) CLEANFILES = $(CHEWOUT_FILES) $(CHEWOUT_FILES:.def=.ref) $(DOCBOOK_OUT_FILES) CHEWOUT_FILES = \ isalnum.def \ - isalnum_l.def \ isalpha.def \ - isalpha_l.def \ isascii.def \ - isascii_l.def \ isblank.def \ - isblank_l.def \ iscntrl.def \ - iscntrl_l.def \ isdigit.def \ - isdigit_l.def \ islower.def \ - islower_l.def \ isprint.def \ - isprint_l.def \ ispunct.def \ - ispunct_l.def \ isspace.def \ - isspace_l.def \ isupper.def \ - isupper_l.def \ iswalnum.def \ - iswalnum_l.def \ iswalpha.def \ - iswalpha_l.def \ iswblank.def \ - iswblank_l.def \ iswcntrl.def \ - iswcntrl_l.def \ iswctype.def \ - iswctype_l.def \ iswdigit.def \ - iswdigit_l.def \ iswgraph.def \ - iswgraph_l.def \ iswlower.def \ - iswlower_l.def \ iswprint.def \ - iswprint_l.def \ iswpunct.def \ - iswpunct_l.def \ iswspace.def \ - iswspace_l.def \ iswupper.def \ - iswupper_l.def \ iswxdigit.def \ - iswxdigit_l.def \ isxdigit.def \ - isxdigit_l.def \ toascii.def \ - toascii_l.def \ tolower.def \ - tolower_l.def \ toupper.def \ - toupper_l.def \ towctrans.def \ - towctrans_l.def \ towlower.def \ - towlower_l.def \ towupper.def \ - towupper_l.def \ wctrans.def \ - wctrans_l.def \ - wctype.def \ - wctype_l.def + wctype.def CHAPTERS = ctype.tex all: all-am diff --git a/newlib/libc/ctype/isalnum.c b/newlib/libc/ctype/isalnum.c index 6c6aab850..113ef0232 100644 --- a/newlib/libc/ctype/isalnum.c +++ b/newlib/libc/ctype/isalnum.c @@ -1,34 +1,43 @@ /* FUNCTION - <>---alphanumeric character predicate + <>, <>---alphanumeric character predicate INDEX isalnum +INDEX + isalnum_l ANSI_SYNOPSIS #include int isalnum(int <[c]>); + #include + int isalnum_l(int <[c]>, locale_t <[locale]>); + TRAD_SYNOPSIS #include int isalnum(<[c]>); DESCRIPTION -<> is a macro which classifies ASCII integer values by table +<> is a macro which classifies singlebyte charset 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 only if <[c]> is representable as an unsigned char or if <[c]> is EOF. +<> is like <> but performs the check based on the +locale specified by the locale object locale. If <[locale]> is +LC_GLOBAL_LOCALE or not a valid locale object, the behaviour is undefined. + You can use a compiled subroutine instead of the macro definition by -undefining the macro using `<<#undef isalnum>>'. +undefining the macro using `<<#undef isalnum>>' or `<<#undef isalnum_l>>'. RETURNS -<> returns non-zero if <[c]> is a letter (<>--<> or -<>--<>) or a digit (<<0>>--<<9>>). +<>,<> return non-zero if <[c]> is a letter or a digit. PORTABILITY <> is ANSI C. +<> is POSIX-1.2008. No OS subroutines are required. */ @@ -43,4 +52,3 @@ _DEFUN(isalnum,(c),int c) { return(__CTYPE_PTR[c+1] & (_U|_L|_N)); } - diff --git a/newlib/libc/ctype/isalnum_l.c b/newlib/libc/ctype/isalnum_l.c index 23e8b26a1..dcb7e3652 100644 --- a/newlib/libc/ctype/isalnum_l.c +++ b/newlib/libc/ctype/isalnum_l.c @@ -1,37 +1,3 @@ -/* -FUNCTION - <>---alphanumeric character predicate - -INDEX - isalnum_l - -ANSI_SYNOPSIS - #include - int isalnum_l(int <[c]>, locale_t <[locale]>); - -DESCRIPTION -<> is a macro which classifies ASCII integer values by table -lookup in locale <[locale]>. It is a predicate returning non-zero for -alphabetic or numeric ASCII characters, and <<0>> for other arguments. -It is defined only if <[c]> is representable as an unsigned char or if -<[c]> is EOF. - -if <[locale]> is LC_GLOBAL_LOCALE or not a valid locale object, the behaviour -is undefined. - -You can use a compiled subroutine instead of the macro definition by -undefining the macro using `<<#undef isalnum_l>>'. - -RETURNS -<> returns non-zero if <[c]> is a letter (<>--<> or -<>--<>) or a digit (<<0>>--<<9>>). - -PORTABILITY -<> is POSIX-1.2008. - -No OS subroutines are required. -*/ - #include <_ansi.h> #include diff --git a/newlib/libc/ctype/isalpha.c b/newlib/libc/ctype/isalpha.c index 26e5d6c8a..221263c2d 100644 --- a/newlib/libc/ctype/isalpha.c +++ b/newlib/libc/ctype/isalpha.c @@ -1,33 +1,43 @@ /* FUNCTION - <>---alphabetic character predicate + <>, >---alphabetic character predicate INDEX isalpha +INDEX + isalpha_l + ANSI_SYNOPSIS #include int isalpha(int <[c]>); + #include + int isalpha_l(int <[c]>, locale_t <[locale]>); + TRAD_SYNOPSIS #include int isalpha(<[c]>); DESCRIPTION -<> is a macro which classifies ASCII integer values by table +<> is a macro which classifies singlebyte charset 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 if <[c]> is representable as an unsigned char or if <[c]> is EOF. +<> is like <> but performs the check based on the +locale specified by the locale object locale. If <[locale]> is +LC_GLOBAL_LOCALE or not a valid locale object, the behaviour is undefined. + You can use a compiled subroutine instead of the macro definition by -undefining the macro using `<<#undef isalpha>>'. +undefining the macro using `<<#undef isalpha>>' or `<<#undef isalpha_l>>'. RETURNS -<> returns non-zero if <[c]> is a letter (<>--<> or -<>--<>). +<>, <> return non-zero if <[c]> is a letter. PORTABILITY <> is ANSI C. +<> is POSIX-1.2008. No supporting OS subroutines are required. */ @@ -41,4 +51,3 @@ _DEFUN(isalpha,(c),int c) { return(__CTYPE_PTR[c+1] & (_U|_L)); } - diff --git a/newlib/libc/ctype/isalpha_l.c b/newlib/libc/ctype/isalpha_l.c index fd1228a58..dcae3ccb4 100644 --- a/newlib/libc/ctype/isalpha_l.c +++ b/newlib/libc/ctype/isalpha_l.c @@ -1,36 +1,3 @@ -/* -FUNCTION - <>---alphabetic character predicate - -INDEX - isalpha_l - -ANSI_SYNOPSIS - #include - int isalpha_l(int <[c]>, locale_t <[locale]>); - -DESCRIPTION -<> is a macro which classifies ASCII integer values by table -lookup in locale <[locale]>. It is a predicate returning non-zero when -<[c]> represents an alphabetic ASCII character, and 0 otherwise. It is -defined only if <[c]> is representable as an unsigned char or if <[c]> is EOF. - -if <[locale]> is LC_GLOBAL_LOCALE or not a valid locale object, the behaviour -is undefined. - -You can use a compiled subroutine instead of the macro definition by -undefining the macro using `<<#undef isalpha_l>>'. - -RETURNS -<> returns non-zero if <[c]> is a letter (<>--<> or -<>--<>). - -PORTABILITY -<> is POSIX-1.2008. - -No supporting OS subroutines are required. -*/ - #include <_ansi.h> #include diff --git a/newlib/libc/ctype/isascii.c b/newlib/libc/ctype/isascii.c index 109fd3ace..45e19efd3 100644 --- a/newlib/libc/ctype/isascii.c +++ b/newlib/libc/ctype/isascii.c @@ -1,14 +1,20 @@ /* FUNCTION - <>---ASCII character predicate + <>, <>---ASCII character predicate INDEX isascii +INDEX + isascii_l + ANSI_SYNOPSIS #include int isascii(int <[c]>); + #include + int isascii_l(int <[c]>, locale_t <[locale]>); + TRAD_SYNOPSIS #include int isascii(<[c]>); @@ -17,15 +23,20 @@ DESCRIPTION <> is a macro which returns non-zero when <[c]> is an ASCII character, and 0 otherwise. It is defined for all integer values. +<> is like <> but performs the check based on the +locale specified by the locale object locale. If <[locale]> is +LC_GLOBAL_LOCALE or not a valid locale object, the behaviour is undefined. + You can use a compiled subroutine instead of the macro definition by -undefining the macro using `<<#undef isascii>>'. +undefining the macro using `<<#undef isascii>>' or `<<#undef isascii_l>>'. RETURNS -<> returns non-zero if the low order byte of <[c]> is in the range -0 to 127 (<<0x00>>--<<0x7F>>). +<>, <> return non-zero if the low order byte of <[c]> +is in the range 0 to 127 (<<0x00>>--<<0x7F>>). PORTABILITY <> is ANSI C. +<> is a GNU extension. No supporting OS subroutines are required. */ diff --git a/newlib/libc/ctype/isascii_l.c b/newlib/libc/ctype/isascii_l.c index 29b62a1a9..59b5f954d 100644 --- a/newlib/libc/ctype/isascii_l.c +++ b/newlib/libc/ctype/isascii_l.c @@ -1,33 +1,3 @@ -/* -FUNCTION - <>---ASCII character predicate - -INDEX - isascii_l - -ANSI_SYNOPSIS - #include - int isascii_l(int <[c]>, locale_t <[locale]>); - -DESCRIPTION -<> is a macro which returns non-zero when <[c]> is an ASCII -character, and 0 otherwise. It is defined for all integer values. - -if <[locale]> is LC_GLOBAL_LOCALE or not a valid locale object, the behaviour -is undefined. - -You can use a compiled subroutine instead of the macro definition by -undefining the macro using `<<#undef isascii_l>>'. - -RETURNS -<> returns non-zero if the low order byte of <[c]> is in the range -0 to 127 (<<0x00>>--<<0x7F>>). - -PORTABILITY -<> is a GNU extension. - -No supporting OS subroutines are required. -*/ #include <_ansi.h> #include diff --git a/newlib/libc/ctype/isblank.c b/newlib/libc/ctype/isblank.c index ecde00b8e..db62a2681 100644 --- a/newlib/libc/ctype/isblank.c +++ b/newlib/libc/ctype/isblank.c @@ -1,30 +1,40 @@ - /* FUNCTION - <>---blank character predicate + <>, <>---blank character predicate INDEX isblank +INDEX + isblank_l + ANSI_SYNOPSIS #include int isblank(int <[c]>); + #include + int isblank_l(int <[c]>, locale_t <[locale]>); + TRAD_SYNOPSIS #include int isblank(<[c]>); DESCRIPTION -<> is a function which classifies ASCII integer values by table +<> is a function which classifies singlebyte charset values by table lookup. It is a predicate returning non-zero for blank characters, and 0 for other characters. It is defined only if <[c]> is representable as an unsigned char or if <[c]> is EOF. +<> is like <> but performs the check based on the +locale specified by the locale object locale. If <[locale]> is +LC_GLOBAL_LOCALE or not a valid locale object, the behaviour is undefined. + RETURNS -<> returns non-zero if <[c]> is a blank character. +<>, <> return non-zero if <[c]> is a blank character. PORTABILITY <> is C99. +<> is POSIX-1.2008. No supporting OS subroutines are required. */ diff --git a/newlib/libc/ctype/isblank_l.c b/newlib/libc/ctype/isblank_l.c index 3816a8b73..8bbb84e1f 100644 --- a/newlib/libc/ctype/isblank_l.c +++ b/newlib/libc/ctype/isblank_l.c @@ -1,32 +1,3 @@ -/* -FUNCTION - <>---blank character predicate - -INDEX - isblank_l - -ANSI_SYNOPSIS - #include - int isblank_l(int <[c]>, locale_t <[locale]>); - -DESCRIPTION -<> is a function which classifies ASCII integer values by table -lookup in locale <[locale]>. It is a predicate returning non-zero for blank -characters, and 0 for other characters. It is defined only if <[c]> is -representable as an unsigned char or if <[c]> is EOF. - -if <[locale]> is LC_GLOBAL_LOCALE or not a valid locale object, the behaviour -is undefined. - -RETURNS -<> returns non-zero if <[c]> is a blank character. - -PORTABILITY -<> is POSIX-1.2008. - -No supporting OS subroutines are required. -*/ - #include <_ansi.h> #include diff --git a/newlib/libc/ctype/iscntrl.c b/newlib/libc/ctype/iscntrl.c index 2984784a6..d78c957f8 100644 --- a/newlib/libc/ctype/iscntrl.c +++ b/newlib/libc/ctype/iscntrl.c @@ -1,34 +1,44 @@ - /* FUNCTION - <>---control character predicate + <>, <>---control character predicate INDEX iscntrl +INDEX + iscntrl_l + ANSI_SYNOPSIS #include int iscntrl(int <[c]>); + #include + int iscntrl_l(int <[c]>, locale_t <[locale]>); + TRAD_SYNOPSIS #include int iscntrl(<[c]>); DESCRIPTION -<> is a macro which classifies ASCII integer values by table +<> is a macro which classifies singlebyte charset values by table lookup. It is a predicate returning non-zero for control characters, and 0 for other characters. It is defined only if <[c]> is representable as an unsigned char or if <[c]> is EOF. +<> is like <> but performs the check based on the +locale specified by the locale object locale. If <[locale]> is +LC_GLOBAL_LOCALE or not a valid locale object, the behaviour is undefined. + You can use a compiled subroutine instead of the macro definition by -undefining the macro using `<<#undef iscntrl>>'. +undefining the macro using `<<#undef iscntrl>>' or `<<#undef iscntrl_l>>'. RETURNS -<> returns non-zero if <[c]> is a delete character or ordinary -control character (<<0x7F>> or <<0x00>>--<<0x1F>>). +<>, <> return non-zero if <[c]> is a delete character +or ordinary control character. PORTABILITY <> is ANSI C. +<> is POSIX-1.2008. No supporting OS subroutines are required. */ @@ -44,5 +54,3 @@ _DEFUN(iscntrl,(c),int c) { return(__CTYPE_PTR[c+1] & _C); } - - diff --git a/newlib/libc/ctype/iscntrl_l.c b/newlib/libc/ctype/iscntrl_l.c index 30a2234cb..0ae17c7f7 100644 --- a/newlib/libc/ctype/iscntrl_l.c +++ b/newlib/libc/ctype/iscntrl_l.c @@ -1,37 +1,3 @@ - -/* -FUNCTION - <>---control character predicate - -INDEX - iscntrl_l - -ANSI_SYNOPSIS - #include - int iscntrl_l(int <[c]>, locale_t <[locale]>); - -DESCRIPTION -<> is a macro which classifies ASCII integer values by table -lookup in locale <[locale]>. It is a predicate returning non-zero for -control characters, and 0 for other characters. It is defined only if -<[c]> is representable as an unsigned char or if <[c]> is EOF. - -if <[locale]> is LC_GLOBAL_LOCALE or not a valid locale object, the behaviour -is undefined. - -You can use a compiled subroutine instead of the macro definition by -undefining the macro using `<<#undef iscntrl_l>>'. - -RETURNS -<> returns non-zero if <[c]> is a delete character or ordinary -control character (<<0x7F>> or <<0x00>>--<<0x1F>>). - -PORTABILITY -<> is POSIX-1.2008. - -No supporting OS subroutines are required. -*/ - #include <_ansi.h> #include diff --git a/newlib/libc/ctype/isdigit.c b/newlib/libc/ctype/isdigit.c index 94daca512..06f14221d 100644 --- a/newlib/libc/ctype/isdigit.c +++ b/newlib/libc/ctype/isdigit.c @@ -1,32 +1,44 @@ /* FUNCTION -<>---decimal digit predicate + <>, <>---decimal digit predicate INDEX -isdigit + isdigit + +INDEX + isdigit_l ANSI_SYNOPSIS -#include -int isdigit(int <[c]>); + #include + int isdigit(int <[c]>); + + #include + int isdigit_l(int <[c]>, locale_t <[locale]>); TRAD_SYNOPSIS -#include -int isdigit(<[c]>); + #include + int isdigit(<[c]>); DESCRIPTION -<> is a macro which classifies ASCII integer values by table +<> is a macro which classifies singlebyte charset values by table lookup. It is a predicate returning non-zero for decimal digits, and 0 for other characters. It is defined only if <[c]> is representable as an unsigned char or if <[c]> is EOF. +<> is like <> but performs the check based on the +locale specified by the locale object locale. If <[locale]> is +LC_GLOBAL_LOCALE or not a valid locale object, the behaviour is undefined. + You can use a compiled subroutine instead of the macro definition by -undefining the macro using `<<#undef isdigit>>'. +undefining the macro using `<<#undef isdigit>>' or `<<#undef isdigit_l>>'. RETURNS -<> returns non-zero if <[c]> is a decimal digit (<<0>>--<<9>>). +<>, <> return non-zero if <[c]> is a decimal digit +(<<0>>--<<9>>). PORTABILITY <> is ANSI C. +<> is POSIX-1.2008. No supporting OS subroutines are required. */ diff --git a/newlib/libc/ctype/isdigit_l.c b/newlib/libc/ctype/isdigit_l.c index 7b350e77b..1fb79e000 100644 --- a/newlib/libc/ctype/isdigit_l.c +++ b/newlib/libc/ctype/isdigit_l.c @@ -1,35 +1,3 @@ -/* -FUNCTION -<>---decimal digit predicate - -INDEX -isdigit_l - -ANSI_SYNOPSIS -#include -int isdigit_l(int <[c]>, locale_t <[locale]>); - -DESCRIPTION -<> is a macro which classifies ASCII integer values by table -lookup in locale <[locale]>. It is a predicate returning non-zero for -decimal digits, and 0 for other characters. It is defined only if <[c]> -is representable as an unsigned char or if <[c]> is EOF. - -if <[locale]> is LC_GLOBAL_LOCALE or not a valid locale object, the behaviour -is undefined. - -You can use a compiled subroutine instead of the macro definition by -undefining the macro using `<<#undef isdigit_l>>'. - -RETURNS -<> returns non-zero if <[c]> is a decimal digit (<<0>>--<<9>>). - -PORTABILITY -<> is POSIX-1.2008. - -No supporting OS subroutines are required. -*/ - #include <_ansi.h> #include diff --git a/newlib/libc/ctype/islower.c b/newlib/libc/ctype/islower.c index 6d0eba8f3..466252a63 100644 --- a/newlib/libc/ctype/islower.c +++ b/newlib/libc/ctype/islower.c @@ -1,34 +1,44 @@ - /* FUNCTION -<>---lowercase character predicate + <>, <>---lowercase character predicate INDEX -islower + islower + +INDEX + islower_l ANSI_SYNOPSIS -#include -int islower(int <[c]>); + #include + int islower(int <[c]>); + + #include + int islower_l(int <[c]>, locale_t <[locale]>); TRAD_SYNOPSIS -#include -int islower(<[c]>); + #include + int islower(<[c]>); DESCRIPTION -<> is a macro which classifies ASCII integer values by table +<> is a macro which classifies singlebyte charset 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 if <[c]> is representable as an unsigned char or if <[c]> is EOF. +<> is like <> but performs the check based on the +locale specified by the locale object locale. If <[locale]> is +LC_GLOBAL_LOCALE or not a valid locale object, the behaviour is undefined. + You can use a compiled subroutine instead of the macro definition by -undefining the macro using `<<#undef islower>>'. +undefining the macro using `<<#undef islower>>' or `<<#undef islower_l>>'. RETURNS -<> returns non-zero if <[c]> is a lowercase letter (<>--<>). +<>, <> return non-zero if <[c]> is a lowercase letter. PORTABILITY <> is ANSI C. +<> is POSIX-1.2008. No supporting OS subroutines are required. */ @@ -41,4 +51,3 @@ _DEFUN(islower,(c),int c) { return ((__CTYPE_PTR[c+1] & (_U|_L)) == _L); } - diff --git a/newlib/libc/ctype/islower_l.c b/newlib/libc/ctype/islower_l.c index ff9f257bb..d1f3a82d8 100644 --- a/newlib/libc/ctype/islower_l.c +++ b/newlib/libc/ctype/islower_l.c @@ -1,36 +1,3 @@ - -/* -FUNCTION -<>---lowercase character predicate - -INDEX -islower_l - -ANSI_SYNOPSIS -#include -int islower_l(int <[c]>, locale_t <[locale]>); - -DESCRIPTION -<> is a macro which classifies ASCII integer values by table -lookup in locale <[locale]>. It is a predicate returning non-zero for -minuscules (lowercase alphabetic characters), and 0 for other characters. -It is defined only if <[c]> is representable as an unsigned char or if -<[c]> is EOF. - -if <[locale]> is LC_GLOBAL_LOCALE or not a valid locale object, the behaviour -is undefined. - -You can use a compiled subroutine instead of the macro definition by -undefining the macro using `<<#undef islower_l>>'. - -RETURNS -<> returns non-zero if <[c]> is a lowercase letter (<>--<>). - -PORTABILITY -<> is POSIX-1.2008. - -No supporting OS subroutines are required. -*/ #include <_ansi.h> #include diff --git a/newlib/libc/ctype/isprint.c b/newlib/libc/ctype/isprint.c index 172a2333b..1ad34c8f9 100644 --- a/newlib/libc/ctype/isprint.c +++ b/newlib/libc/ctype/isprint.c @@ -1,39 +1,55 @@ - /* FUNCTION - <>, <>---printable character predicates + <>, <>, <>, <>---printable character predicates INDEX isprint + INDEX isgraph +INDEX + isprint_l + +INDEX + isgraph_l + ANSI_SYNOPSIS #include int isprint(int <[c]>); int isgraph(int <[c]>); + #include + int isprint_l(int <[c]>, locale_t <[locale]>); + int isgraph_l(int <[c]>, locale_t <[locale]>); + TRAD_SYNOPSIS #include int isprint(<[c]>); int isgraph(<[c]>); - 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 if <[c]> is representable as an unsigned char or if -<[c]> is EOF. +<> is a macro which classifies singlebyte charset values by table +lookup. It is a predicate returning non-zero for printable characters, +and 0 for other character arguments. It is defined only if <[c]> is +representable as an unsigned char or if <[c]> is EOF. + +<> behaves identically to <>, except that space characters +are excluded. + +<>, <> are like <>, <> but perform +the check based on the locale specified by the locale object locale. If +<[locale]> is LC_GLOBAL_LOCALE or not a valid locale object, the behaviour +is undefined. You can use a compiled subroutine instead of the macro definition by -undefining either macro using `<<#undef isprint>>' or `<<#undef isgraph>>'. +undefining either macro using `<<#undef isprint>>' or `<<#undef isgraph>>', +or `<<#undef isprint_l>>' or `<<#undef isgraph_l>>'. RETURNS -<> returns non-zero if <[c]> is a printing character, -(<<0x20>>--<<0x7E>>). -<> behaves identically to <>, except that the space -character (<<0x20>>) is excluded. +<>, return non-zero if <[c]> is a printing character. +<>, < return non-zero if <[c]> is a printing character +except spaces. PORTABILITY <> and <> are ANSI C. @@ -58,4 +74,3 @@ _DEFUN(isprint,(c),int c) { return(__CTYPE_PTR[c+1] & (_P|_U|_L|_N|_B)); } - diff --git a/newlib/libc/ctype/isprint_l.c b/newlib/libc/ctype/isprint_l.c index 60fafcd59..535504f14 100644 --- a/newlib/libc/ctype/isprint_l.c +++ b/newlib/libc/ctype/isprint_l.c @@ -1,42 +1,3 @@ - -/* -FUNCTION - <>, <>---printable character predicates - -INDEX - isprint_l -INDEX - isgraph_l - -ANSI_SYNOPSIS - #include - int isprint_l(int <[c]>, locale_t <[locale]>); - int isgraph_l(int <[c]>, locale_t <[locale]>); - -DESCRIPTION -<> is a macro which classifies ASCII integer values by table -lookup in locale <[locale]>. It is a predicate returning non-zero for -printable characters, and 0 for other character arguments. It is defined -only if <[c]> is representable as an unsigned char or if <[c]> is EOF. - -if <[locale]> is LC_GLOBAL_LOCALE or not a valid locale object, the behaviour -is undefined. - -You can use a compiled subroutine instead of the macro definition by -undefining either macro using `<<#undef isprint_l>>' or `<<#undef isgraph_l>>'. - -RETURNS -<> returns non-zero if <[c]> is a printing character, -(<<0x20>>--<<0x7E>>). -<> behaves identically to <>, except that the space -character (<<0x20>>) is excluded. - -PORTABILITY -<> and <> are POSIX-1.2008. - -No supporting OS subroutines are required. -*/ - #include <_ansi.h> #include diff --git a/newlib/libc/ctype/ispunct.c b/newlib/libc/ctype/ispunct.c index 43571bbf0..4fb62197d 100644 --- a/newlib/libc/ctype/ispunct.c +++ b/newlib/libc/ctype/ispunct.c @@ -1,34 +1,44 @@ - /* FUNCTION -<>---punctuation character predicate + <>, <>---punctuation character predicate INDEX -ispunct + ispunct + +INDEX + ispunct_l ANSI_SYNOPSIS -#include -int ispunct(int <[c]>); + #include + int ispunct(int <[c]>); + + #include + int ispunct_l(int <[c]>, locale_t <[locale]>); TRAD_SYNOPSIS -#include -int ispunct(<[c]>); + #include + int ispunct(<[c]>); DESCRIPTION -<> is a macro which classifies ASCII integer values by table +<> is a macro which classifies singlebyte charset values by table lookup. It is a predicate returning non-zero for printable punctuation characters, and 0 for other characters. It is defined only if <[c]> is representable as an unsigned char or if <[c]> is EOF. +<> is like <> but performs the check based on the +locale specified by the locale object locale. If <[locale]> is +LC_GLOBAL_LOCALE or not a valid locale object, the behaviour is undefined. + You can use a compiled subroutine instead of the macro definition by -undefining the macro using `<<#undef ispunct>>'. +undefining the macro using `<<#undef ispunct>>' or `<<#undef ispunct_l>>'. RETURNS -<> returns non-zero if <[c]> is a printable punctuation character -(<) && !isalnum(<[c]>)>>). +<>, <> return non-zero if <[c]> is a printable +punctuation character. PORTABILITY <> is ANSI C. +<> is POSIX-1.2008. No supporting OS subroutines are required. */ @@ -43,4 +53,3 @@ _DEFUN(ispunct,(c),int c) { return(__CTYPE_PTR[c+1] & _P); } - diff --git a/newlib/libc/ctype/ispunct_l.c b/newlib/libc/ctype/ispunct_l.c index d49112942..eeba1f5ae 100644 --- a/newlib/libc/ctype/ispunct_l.c +++ b/newlib/libc/ctype/ispunct_l.c @@ -1,37 +1,3 @@ - -/* -FUNCTION -<>---punctuation character predicate - -INDEX -ispunct_l - -ANSI_SYNOPSIS -#include -int ispunct_l(int <[c]>, locale_t <[locale]>); - -DESCRIPTION -<> is a macro which classifies ASCII integer values by table -lookup in locale <[locale]>. It is a predicate returning non-zero for -printable punctuation characters, and 0 for other characters. It is -defined only if <[c]> is representable as an unsigned char or if <[c]> is EOF. - -if <[locale]> is LC_GLOBAL_LOCALE or not a valid locale object, the behaviour -is undefined. - -You can use a compiled subroutine instead of the macro definition by -undefining the macro using `<<#undef ispunct_l>>'. - -RETURNS -<> returns non-zero if <[c]> is a printable punctuation character -(<) && !isalnum(<[c]>)>>). - -PORTABILITY -<> is POSIX-1.2008 - -No supporting OS subroutines are required. -*/ - #include <_ansi.h> #include diff --git a/newlib/libc/ctype/isspace.c b/newlib/libc/ctype/isspace.c index 9e51a22fc..2a19518eb 100644 --- a/newlib/libc/ctype/isspace.c +++ b/newlib/libc/ctype/isspace.c @@ -1,33 +1,44 @@ - /* FUNCTION - <>---whitespace character predicate + <>, <>---whitespace character predicate INDEX isspace +INDEX + isspace_l + ANSI_SYNOPSIS #include int isspace(int <[c]>); + #include + int isspace_l(int <[c]>, locale_t <[locale]>); + TRAD_SYNOPSIS #include int isspace(<[c]>); DESCRIPTION -<> is a macro which classifies ASCII integer values by table +<> is a macro which classifies singlebyte charset values by table lookup. It is a predicate returning non-zero for whitespace characters, and 0 for other characters. It is defined only when <>(<[c]>) is true or <[c]> is EOF. +<> is like <> but performs the check based on the +locale specified by the locale object locale. If <[locale]> is +LC_GLOBAL_LOCALE or not a valid locale object, the behaviour is undefined. + You can use a compiled subroutine instead of the macro definition by -undefining the macro using `<<#undef isspace>>'. +undefining the macro using `<<#undef isspace>>' or `<<#undef isspace_l>>'. RETURNS -<> returns non-zero if <[c]> is a space, tab, carriage return, new -line, vertical tab, or formfeed (<<0x09>>--<<0x0D>>, <<0x20>>). +<>, <> return non-zero if <[c]> is a space, tab, +carriage return, new line, vertical tab, or formfeed (<<0x09>>--<<0x0D>>, +<<0x20>>), or one of the other space characters in non-ASCII charsets. PORTABILITY <> is ANSI C. +<> is POSIX-1.2008. No supporting OS subroutines are required. */ @@ -41,4 +52,3 @@ _DEFUN(isspace,(c),int c) { return(__CTYPE_PTR[c+1] & _S); } - diff --git a/newlib/libc/ctype/isspace_l.c b/newlib/libc/ctype/isspace_l.c index 67eed23a9..bf4a36c3e 100644 --- a/newlib/libc/ctype/isspace_l.c +++ b/newlib/libc/ctype/isspace_l.c @@ -1,35 +1,3 @@ -/* -FUNCTION - <>---whitespace character predicate - -INDEX - isspace_l - -ANSI_SYNOPSIS - #include - int isspace_l(int <[c]>, locale_t *<[locale]>); - -DESCRIPTION -<> is a macro which classifies ASCII integer values by table -lookup in locale <[locale]>. It is a predicate returning non-zero for -whitespace characters, and 0 for other characters. It is defined only -when <>(<[c]>) is true or <[c]> is EOF. - -if <[locale]> is LC_GLOBAL_LOCALE or not a valid locale object, the behaviour -is undefined. - -You can use a compiled subroutine instead of the macro definition by -undefining the macro using `<<#undef isspace_l>>'. - -RETURNS -<> returns non-zero if <[c]> is a space, tab, carriage return, new -line, vertical tab, or formfeed (<<0x09>>--<<0x0D>>, <<0x20>>). - -PORTABILITY -<> is POSIX-1.2008. - -No supporting OS subroutines are required. -*/ #include <_ansi.h> #include diff --git a/newlib/libc/ctype/isupper.c b/newlib/libc/ctype/isupper.c index 4f491cc25..e36b3a35d 100644 --- a/newlib/libc/ctype/isupper.c +++ b/newlib/libc/ctype/isupper.c @@ -1,33 +1,42 @@ - /* FUNCTION -<>---uppercase character predicate + <>, <>---uppercase character predicate INDEX -isupper + isupper + +INDEX + isupper_l ANSI_SYNOPSIS -#include -int isupper(int <[c]>); + #include + int isupper(int <[c]>); + + #include + int isupper_l(int <[c]>, locale_t <[locale]>); TRAD_SYNOPSIS -#include -int isupper(<[c]>); + #include + int isupper(<[c]>); DESCRIPTION -<> is a macro which classifies ASCII integer values by table +<> is a macro which classifies singlebyte charset values by table lookup. It is a predicate returning non-zero for uppercase letters -(<>--<>), and 0 for other characters. It is defined only when -<>(<[c]>) is true or <[c]> is EOF. +(<>--<>), and 0 for other characters. + +<> is like <> but performs the check based on the +locale specified by the locale object locale. If <[locale]> is +LC_GLOBAL_LOCALE or not a valid locale object, the behaviour is undefined. You can use a compiled subroutine instead of the macro definition by -undefining the macro using `<<#undef isupper>>'. +undefining the macro using `<<#undef isupper>>' or `<<#undef isupper_l>>'. RETURNS -<> returns non-zero if <[c]> is a uppercase letter (A-Z). +<>, <> return non-zero if <[c]> is an uppercase letter. PORTABILITY <> is ANSI C. +<> is POSIX-1.2008. No supporting OS subroutines are required. */ @@ -40,4 +49,3 @@ _DEFUN(isupper,(c),int c) { return ((__CTYPE_PTR[c+1] & (_U|_L)) == _U); } - diff --git a/newlib/libc/ctype/isupper_l.c b/newlib/libc/ctype/isupper_l.c index 8ad760dc7..eb473a7a1 100644 --- a/newlib/libc/ctype/isupper_l.c +++ b/newlib/libc/ctype/isupper_l.c @@ -1,34 +1,3 @@ -/* -FUNCTION -<>---uppercase character predicate - -INDEX -isupper_l - -ANSI_SYNOPSIS -#include -int isupper_l(int <[c]>, locale_t <[locale]>); - -DESCRIPTION -<> is a macro which classifies ASCII integer values by table -lookup in locale <[locale]>. It is a predicate returning non-zero for -uppercase letters (<>--<>), and 0 for other characters. It is -defined only when <>(<[c]>) is true or <[c]> is EOF. - -if <[locale]> is LC_GLOBAL_LOCALE or not a valid locale object, the behaviour -is undefined. - -You can use a compiled subroutine instead of the macro definition by -undefining the macro using `<<#undef isupper_l>>'. - -RETURNS -<> returns non-zero if <[c]> is a uppercase letter (A-Z). - -PORTABILITY -<> is POSIX-1.2008. - -No supporting OS subroutines are required. -*/ #include <_ansi.h> #include diff --git a/newlib/libc/ctype/iswalnum.c b/newlib/libc/ctype/iswalnum.c index c417cb31e..76fa5042c 100644 --- a/newlib/libc/ctype/iswalnum.c +++ b/newlib/libc/ctype/iswalnum.c @@ -1,14 +1,20 @@ /* FUNCTION - <>---alphanumeric wide character test + <>, <>---alphanumeric wide character test INDEX iswalnum +INDEX + iswalnum_l + ANSI_SYNOPSIS #include int iswalnum(wint_t <[c]>); + #include + int iswalnum_l(wint_t <[c]>, locale_t <[locale]>); + TRAD_SYNOPSIS #include int iswalnum(<[c]>) @@ -18,11 +24,17 @@ DESCRIPTION <> is a function which classifies wide-character values that are alphanumeric. +<> is like <> but performs the check based on the +locale specified by the locale object locale. If <[locale]> is +LC_GLOBAL_LOCALE or not a valid locale object, the behaviour is undefined. + RETURNS -<> returns non-zero if <[c]> is a alphanumeric wide character. +<>, <> return non-zero if <[c]> is a alphanumeric +wide character. PORTABILITY <> is C99. +<> is POSIX-1.2008. No supporting OS subroutines are required. */ @@ -34,4 +46,3 @@ _DEFUN(iswalnum,(c),wint_t c) { return (iswalpha (c) || iswdigit (c)); } - diff --git a/newlib/libc/ctype/iswalnum_l.c b/newlib/libc/ctype/iswalnum_l.c index 4425014a3..e4ab3dd36 100644 --- a/newlib/libc/ctype/iswalnum_l.c +++ b/newlib/libc/ctype/iswalnum_l.c @@ -1,29 +1,3 @@ -/* -FUNCTION - <>---alphanumeric wide character test - -INDEX - iswalnum_l - -ANSI_SYNOPSIS - #include - int iswalnum_l(wint_t <[c]>, locale_t <[locale]>); - -DESCRIPTION -<> is a function which classifies wide-character values that -are alphanumeric in locale <[locale]>. - -if <[locale]> is LC_GLOBAL_LOCALE or not a valid locale object, the behaviour -is undefined. - -RETURNS -<> returns non-zero if <[c]> is a alphanumeric wide character. - -PORTABILITY -<> is POSIX-1.2008. - -No supporting OS subroutines are required. -*/ #include <_ansi.h> #include diff --git a/newlib/libc/ctype/iswalpha.c b/newlib/libc/ctype/iswalpha.c index 71f0e4a4b..92fad8e04 100644 --- a/newlib/libc/ctype/iswalpha.c +++ b/newlib/libc/ctype/iswalpha.c @@ -29,15 +29,21 @@ /* FUNCTION - <>---alphabetic wide character test + <>, <>---alphabetic wide character test INDEX iswalpha +INDEX + iswalpha_l + ANSI_SYNOPSIS #include int iswalpha(wint_t <[c]>); + #include + int iswalpha_l(wint_t <[c]>, locale_t <[locale]>); + TRAD_SYNOPSIS #include int iswalpha(<[c]>) @@ -47,11 +53,17 @@ DESCRIPTION <> is a function which classifies wide-character values that are alphabetic. +<> is like <> but performs the check based on the +locale specified by the locale object locale. If <[locale]> is +LC_GLOBAL_LOCALE or not a valid locale object, the behaviour is undefined. + RETURNS -<> returns non-zero if <[c]> is an alphabetic wide character. +<>, <> return non-zero if <[c]> is an alphabetic +wide character. PORTABILITY <> is C99. +<> is POSIX-1.2008. No supporting OS subroutines are required. */ @@ -430,4 +442,3 @@ _DEFUN(iswalpha,(c), wint_t c) return (c < (wint_t)0x100 ? isalpha (c) : 0); #endif /* _MB_CAPABLE */ } - diff --git a/newlib/libc/ctype/iswalpha_l.c b/newlib/libc/ctype/iswalpha_l.c index fa59898ab..efcb95afc 100644 --- a/newlib/libc/ctype/iswalpha_l.c +++ b/newlib/libc/ctype/iswalpha_l.c @@ -1,29 +1,3 @@ -/* -FUNCTION - <>---alphabetic wide character test - -INDEX - iswalpha_l - -ANSI_SYNOPSIS - #include - int iswalpha_l(wint_t <[c]>, locale_t <[locale]>); - -DESCRIPTION -<> is a function which classifies wide-character values that -are alphabetic. - -if <[locale]> is LC_GLOBAL_LOCALE or not a valid locale object, the behaviour -is undefined. - -RETURNS -<> returns non-zero if <[c]> is an alphabetic wide character. - -PORTABILITY -<> is POSIX-1.2008. - -No supporting OS subroutines are required. -*/ #include <_ansi.h> #include diff --git a/newlib/libc/ctype/iswblank.c b/newlib/libc/ctype/iswblank.c index 7ca2b6299..ca448a997 100644 --- a/newlib/libc/ctype/iswblank.c +++ b/newlib/libc/ctype/iswblank.c @@ -29,15 +29,21 @@ /* FUNCTION - <>---blank wide character test + <>, <>---blank wide character test INDEX iswblank +INDEX + iswblank_l + ANSI_SYNOPSIS #include int iswblank(wint_t <[c]>); + #include + int iswblank_l(wint_t <[c]>, locale_t <[locale]>); + TRAD_SYNOPSIS #include int iswblank(<[c]>) @@ -47,11 +53,16 @@ DESCRIPTION <> is a function which classifies wide-character values that are categorized as blank. +<> is like <> but performs the check based on the +locale specified by the locale object locale. If <[locale]> is +LC_GLOBAL_LOCALE or not a valid locale object, the behaviour is undefined. + RETURNS -<> returns non-zero if <[c]> is a blank wide character. +<>, <> return non-zero if <[c]> is a blank wide character. PORTABILITY <> is C99. +<> is POSIX-1.2008. No supporting OS subroutines are required. */ @@ -79,4 +90,3 @@ _DEFUN(iswblank,(c), wint_t c) return (c < 0x100 ? isblank (c) : 0); #endif /* _MB_CAPABLE */ } - diff --git a/newlib/libc/ctype/iswblank_l.c b/newlib/libc/ctype/iswblank_l.c index e19557cdf..696069378 100644 --- a/newlib/libc/ctype/iswblank_l.c +++ b/newlib/libc/ctype/iswblank_l.c @@ -1,29 +1,3 @@ -/* -FUNCTION - <>---blank wide character test - -INDEX - iswblank_l - -ANSI_SYNOPSIS - #include - int iswblank_l(wint_t <[c]>, locale_t <[locale]>); - -DESCRIPTION -<> is a function which classifies wide-character values that -are categorized as blank. - -if <[locale]> is LC_GLOBAL_LOCALE or not a valid locale object, the behaviour -is undefined. - -RETURNS -<> returns non-zero if <[c]> is a blank wide character. - -PORTABILITY -<> is POSIX-1.2008. - -No supporting OS subroutines are required. -*/ #include <_ansi.h> #include diff --git a/newlib/libc/ctype/iswcntrl.c b/newlib/libc/ctype/iswcntrl.c index 05b3ea99a..d094d19ed 100644 --- a/newlib/libc/ctype/iswcntrl.c +++ b/newlib/libc/ctype/iswcntrl.c @@ -29,15 +29,21 @@ /* FUNCTION - <>---control wide character test + <>, <>---control wide character test INDEX iswcntrl +INDEX + iswcntrl_l + ANSI_SYNOPSIS #include int iswcntrl(wint_t <[c]>); + #include + int iswcntrl_l(wint_t <[c]>, locale_t <[locale]>); + TRAD_SYNOPSIS #include int iswcntrl(<[c]>) @@ -47,11 +53,16 @@ DESCRIPTION <> is a function which classifies wide-character values that are categorized as control characters. +<> is like <> but performs the check based on the +locale specified by the locale object locale. If <[locale]> is +LC_GLOBAL_LOCALE or not a valid locale object, the behaviour is undefined. + RETURNS -<> returns non-zero if <[c]> is a control wide character. +<>, <> return non-zero if <[c]> is a control wide character. PORTABILITY <> is C99. +<> is POSIX-1.2008. No supporting OS subroutines are required. */ @@ -77,4 +88,3 @@ _DEFUN(iswcntrl,(c), wint_t c) return (c < 0x100 ? iscntrl (c) : 0); #endif /* _MB_CAPABLE */ } - diff --git a/newlib/libc/ctype/iswcntrl_l.c b/newlib/libc/ctype/iswcntrl_l.c index 9bc84e390..37caba876 100644 --- a/newlib/libc/ctype/iswcntrl_l.c +++ b/newlib/libc/ctype/iswcntrl_l.c @@ -1,29 +1,3 @@ -/* -FUNCTION - <>---control wide character test - -INDEX - iswcntrl_l - -ANSI_SYNOPSIS - #include - int iswcntrl_l(wint_t <[c]>, locale_t <[locale]>); - -DESCRIPTION -<> is a function which classifies wide-character values that -are categorized as control characters. - -if <[locale]> is LC_GLOBAL_LOCALE or not a valid locale object, the behaviour -is undefined. - -RETURNS -<> returns non-zero if <[c]> is a control wide character. - -PORTABILITY -<> is POSIX-1.2008. - -No supporting OS subroutines are required. -*/ #include <_ansi.h> #include diff --git a/newlib/libc/ctype/iswctype.c b/newlib/libc/ctype/iswctype.c index 3f3eadfe5..ff8e3246b 100644 --- a/newlib/libc/ctype/iswctype.c +++ b/newlib/libc/ctype/iswctype.c @@ -1,14 +1,20 @@ /* FUNCTION - <>---extensible wide-character test + <>, <>---extensible wide-character test INDEX iswctype +INDEX + iswctype_l + ANSI_SYNOPSIS #include int iswctype(wint_t <[c]>, wctype_t <[desc]>); + #include + int iswctype_l(wint_t <[c]>, wctype_t <[desc]>, locale_t <[locale]>); + TRAD_SYNOPSIS #include int iswctype(<[c]>, <[desc]>) @@ -19,12 +25,17 @@ DESCRIPTION <> is a function which classifies wide-character values using the wide-character test specified by <[desc]>. +<> is like <> but performs the check based on the +locale specified by the locale object locale. If <[locale]> is +LC_GLOBAL_LOCALE or not a valid locale object, the behaviour is undefined. + RETURNS -<> returns non-zero if and only if <[c]> matches the test specified by <[desc]>. -If <[desc]> is unknown, zero is returned. +<>, <> return non-zero if and only if <[c]> matches +the test specified by <[desc]>. If <[desc]> is unknown, zero is returned. PORTABILITY <> is C99. +<> is POSIX-1.2008. No supporting OS subroutines are required. */ @@ -68,4 +79,3 @@ _DEFUN(iswctype,(c, desc), wint_t c _AND wctype_t desc) /* otherwise unknown */ return 0; } - diff --git a/newlib/libc/ctype/iswctype_l.c b/newlib/libc/ctype/iswctype_l.c index bdf3895c4..d9e7b2e06 100644 --- a/newlib/libc/ctype/iswctype_l.c +++ b/newlib/libc/ctype/iswctype_l.c @@ -1,30 +1,3 @@ -/* -FUNCTION - <>---extensible wide-character test - -INDEX - iswctype_l - -ANSI_SYNOPSIS - #include - int iswctype_l(wint_t <[c]>, wctype_t <[desc]>, locale_t <[locale]>); - -DESCRIPTION -<> is a function which classifies wide-character values using the -wide-character test specified by <[desc]>. - -if <[locale]> is LC_GLOBAL_LOCALE or not a valid locale object, the behaviour -is undefined. - -RETURNS -<> returns non-zero if and only if <[c]> matches the test specified by <[desc]>. -If <[desc]> is unknown, zero is returned. - -PORTABILITY -<> is POSIX-1.2008. - -No supporting OS subroutines are required. -*/ #include <_ansi.h> #include diff --git a/newlib/libc/ctype/iswdigit.c b/newlib/libc/ctype/iswdigit.c index 8ba5d5f0e..7c3ad4be0 100644 --- a/newlib/libc/ctype/iswdigit.c +++ b/newlib/libc/ctype/iswdigit.c @@ -1,14 +1,20 @@ /* FUNCTION - <>---decimal digit wide character test + <>, <>---decimal digit wide character test INDEX iswdigit +INDEX + iswdigit_l + ANSI_SYNOPSIS #include int iswdigit(wint_t <[c]>); + #include + int iswdigit_l(wint_t <[c]>, locale_t <[locale]>); + TRAD_SYNOPSIS #include int iswdigit(<[c]>) @@ -18,11 +24,16 @@ DESCRIPTION <> is a function which classifies wide-character values that are decimal digits. +<> is like <> but performs the check based on the +locale specified by the locale object locale. If <[locale]> is +LC_GLOBAL_LOCALE or not a valid locale object, the behaviour is undefined. + RETURNS -<> returns non-zero if <[c]> is a decimal digit wide character. +<>, <> return non-zero if <[c]> is a decimal digit wide character. PORTABILITY <> is C99. +<> is POSIX-1.2008. No supporting OS subroutines are required. */ @@ -34,4 +45,3 @@ _DEFUN(iswdigit,(c), wint_t c) { return (c >= (wint_t)'0' && c <= (wint_t)'9'); } - diff --git a/newlib/libc/ctype/iswdigit_l.c b/newlib/libc/ctype/iswdigit_l.c index e368f00fa..98dd94edd 100644 --- a/newlib/libc/ctype/iswdigit_l.c +++ b/newlib/libc/ctype/iswdigit_l.c @@ -1,29 +1,3 @@ -/* -FUNCTION - <>---decimal digit wide character test - -INDEX - iswdigit_l - -ANSI_SYNOPSIS - #include - int iswdigit_l(wint_t <[c]>, locale_t <[locale]>); - -DESCRIPTION -<> is a function which classifies wide-character values that -are decimal digits. - -if <[locale]> is LC_GLOBAL_LOCALE or not a valid locale object, the behaviour -is undefined. - -RETURNS -<> returns non-zero if <[c]> is a decimal digit wide character. - -PORTABILITY -<> is POSIX-1.2008. - -No supporting OS subroutines are required. -*/ #include <_ansi.h> #include diff --git a/newlib/libc/ctype/iswgraph.c b/newlib/libc/ctype/iswgraph.c index bb1e519f1..17e3060e5 100644 --- a/newlib/libc/ctype/iswgraph.c +++ b/newlib/libc/ctype/iswgraph.c @@ -29,15 +29,21 @@ /* FUNCTION - <>---graphic wide character test + <>, <>---graphic wide character test INDEX iswgraph +INDEX + iswgraph_l + ANSI_SYNOPSIS #include int iswgraph(wint_t <[c]>); + #include + int iswgraph_l(wint_t <[c]>, locale_t <[locale]>); + TRAD_SYNOPSIS #include int iswgraph(<[c]>) @@ -47,11 +53,16 @@ DESCRIPTION <> is a function which classifies wide-character values that are graphic. +<> is like <> but performs the check based on the +locale specified by the locale object locale. If <[locale]> is +LC_GLOBAL_LOCALE or not a valid locale object, the behaviour is undefined. + RETURNS -<> returns non-zero if <[c]> is a graphic wide character. +<>, <> return non-zero if <[c]> is a graphic wide character. PORTABILITY <> is C99. +<> is POSIX-1.2008. No supporting OS subroutines are required. */ @@ -63,4 +74,3 @@ _DEFUN(iswgraph,(c),wint_t c) { return (iswprint (c) && !iswspace (c)); } - diff --git a/newlib/libc/ctype/iswgraph_l.c b/newlib/libc/ctype/iswgraph_l.c index 8b5e823a1..9803c1853 100644 --- a/newlib/libc/ctype/iswgraph_l.c +++ b/newlib/libc/ctype/iswgraph_l.c @@ -1,29 +1,3 @@ -/* -FUNCTION - <>---graphic wide character test - -INDEX - iswgraph_l - -ANSI_SYNOPSIS - #include - int iswgraph_l(wint_t <[c]>, locale_t <[locale]>); - -DESCRIPTION -<> is a function which classifies wide-character values that -are graphic. - -if <[locale]> is LC_GLOBAL_LOCALE or not a valid locale object, the behaviour -is undefined. - -RETURNS -<> returns non-zero if <[c]> is a graphic wide character. - -PORTABILITY -<> is POSIX-1.2008. - -No supporting OS subroutines are required. -*/ #include <_ansi.h> #include diff --git a/newlib/libc/ctype/iswlower.c b/newlib/libc/ctype/iswlower.c index 683a9cbb0..9d3b8441f 100644 --- a/newlib/libc/ctype/iswlower.c +++ b/newlib/libc/ctype/iswlower.c @@ -1,15 +1,20 @@ - /* FUNCTION - <>---lowercase wide character test + <>, <>---lowercase wide character test INDEX iswlower +INDEX + iswlower_l + ANSI_SYNOPSIS #include int iswlower(wint_t <[c]>); + #include + int iswlower_l(wint_t <[c]>, locale_t <[locale]>); + TRAD_SYNOPSIS #include int iswlower(<[c]>) @@ -19,11 +24,16 @@ DESCRIPTION <> is a function which classifies wide-character values that have uppercase translations. +<> is like <> but performs the check based on the +locale specified by the locale object locale. If <[locale]> is +LC_GLOBAL_LOCALE or not a valid locale object, the behaviour is undefined. + RETURNS -<> returns non-zero if <[c]> is a lowercase wide character. +<>, <> return non-zero if <[c]> is a lowercase wide character. PORTABILITY <> is C99. +<> is POSIX-1.2008. No supporting OS subroutines are required. */ @@ -35,4 +45,3 @@ _DEFUN(iswlower,(c),wint_t c) { return (towupper (c) != c); } - diff --git a/newlib/libc/ctype/iswlower_l.c b/newlib/libc/ctype/iswlower_l.c index a818faa31..d69615bed 100644 --- a/newlib/libc/ctype/iswlower_l.c +++ b/newlib/libc/ctype/iswlower_l.c @@ -1,30 +1,3 @@ - -/* -FUNCTION - <>---lowercase wide character test - -INDEX - iswlower_l - -ANSI_SYNOPSIS - #include - int iswlower_l(wint_t <[c]>, locale_t <[locale]>); - -DESCRIPTION -<> is a function which classifies wide-character values that -have uppercase translations. - -if <[locale]> is LC_GLOBAL_LOCALE or not a valid locale object, the behaviour -is undefined. - -RETURNS -<> returns non-zero if <[c]> is a lowercase wide character. - -PORTABILITY -<> is POSIX-1.2008. - -No supporting OS subroutines are required. -*/ #include <_ansi.h> #include diff --git a/newlib/libc/ctype/iswprint.c b/newlib/libc/ctype/iswprint.c index 0ab955975..aad34acab 100644 --- a/newlib/libc/ctype/iswprint.c +++ b/newlib/libc/ctype/iswprint.c @@ -29,15 +29,21 @@ /* FUNCTION - <>---printable wide character test + <>, <>---printable wide character test INDEX iswprint +INDEX + iswprint_l + ANSI_SYNOPSIS #include int iswprint(wint_t <[c]>); + #include + int iswprint_l(wint_t <[c]>, locale_t <[locale]>); + TRAD_SYNOPSIS #include int iswprint(<[c]>) @@ -47,11 +53,16 @@ DESCRIPTION <> is a function which classifies wide-character values that are printable. +<> is like <> but performs the check based on the +locale specified by the locale object locale. If <[locale]> is +LC_GLOBAL_LOCALE or not a valid locale object, the behaviour is undefined. + RETURNS -<> returns non-zero if <[c]> is a printable wide character. +<>, <> return non-zero if <[c]> is a printable wide character. PORTABILITY <> is C99. +<> is POSIX-1.2008. No supporting OS subroutines are required. */ @@ -493,4 +504,3 @@ _DEFUN(iswprint,(c), wint_t c) return (c < (wint_t)0x100 ? isprint (c) : 0); #endif /* _MB_CAPABLE */ } - diff --git a/newlib/libc/ctype/iswprint_l.c b/newlib/libc/ctype/iswprint_l.c index 03988fbde..a8d8686c9 100644 --- a/newlib/libc/ctype/iswprint_l.c +++ b/newlib/libc/ctype/iswprint_l.c @@ -1,29 +1,3 @@ -/* -FUNCTION - <>---printable wide character test - -INDEX - iswprint_l - -ANSI_SYNOPSIS - #include - int iswprint_l(wint_t <[c]>, locale_t <[locale]>); - -DESCRIPTION -<> is a function which classifies wide-character values that -are printable. - -if <[locale]> is LC_GLOBAL_LOCALE or not a valid locale object, the behaviour -is undefined. - -RETURNS -<> returns non-zero if <[c]> is a printable wide character. - -PORTABILITY -<> is POSIX-1.2008. - -No supporting OS subroutines are required. -*/ #include <_ansi.h> #include diff --git a/newlib/libc/ctype/iswpunct.c b/newlib/libc/ctype/iswpunct.c index e65771a70..8b1791b03 100644 --- a/newlib/libc/ctype/iswpunct.c +++ b/newlib/libc/ctype/iswpunct.c @@ -29,15 +29,21 @@ /* FUNCTION - <>---punctuation wide character test + <>, <>---punctuation wide character test INDEX iswpunct +INDEX + iswpunct_l + ANSI_SYNOPSIS #include int iswpunct(wint_t <[c]>); + #include + int iswpunct_l(wint_t <[c]>, locale_t <[locale]>); + TRAD_SYNOPSIS #include int iswpunct(<[c]>) @@ -47,11 +53,16 @@ DESCRIPTION <> is a function which classifies wide-character values that are punctuation. +<> is like <> but performs the check based on the +locale specified by the locale object locale. If <[locale]> is +LC_GLOBAL_LOCALE or not a valid locale object, the behaviour is undefined. + RETURNS -<> returns non-zero if <[c]> is a punctuation wide character. +<>, <> return non-zero if <[c]> is a punctuation wide character. PORTABILITY <> is C99. +<> is POSIX-1.2008. No supporting OS subroutines are required. */ @@ -67,4 +78,3 @@ _DEFUN(iswpunct,(c), wint_t c) { return (!iswalnum (c) && iswgraph (c)); } - diff --git a/newlib/libc/ctype/iswpunct_l.c b/newlib/libc/ctype/iswpunct_l.c index 567f3f1a3..c7acc4e72 100644 --- a/newlib/libc/ctype/iswpunct_l.c +++ b/newlib/libc/ctype/iswpunct_l.c @@ -1,29 +1,3 @@ -/* -FUNCTION - <>---punctuation wide character test - -INDEX - iswpunct_l - -ANSI_SYNOPSIS - #include - int iswpunct_l(wint_t <[c]>, locale_t <[locale]>); - -DESCRIPTION -<> is a function which classifies wide-character values that -are punctuation. - -if <[locale]> is LC_GLOBAL_LOCALE or not a valid locale object, the behaviour -is undefined. - -RETURNS -<> returns non-zero if <[c]> is a punctuation wide character. - -PORTABILITY -<> is POSIX-1.2008. - -No supporting OS subroutines are required. -*/ #include <_ansi.h> #include diff --git a/newlib/libc/ctype/iswspace.c b/newlib/libc/ctype/iswspace.c index e738cd61d..40a667cd4 100644 --- a/newlib/libc/ctype/iswspace.c +++ b/newlib/libc/ctype/iswspace.c @@ -29,15 +29,21 @@ /* FUNCTION - <>---whitespace wide character test + <>, <>---whitespace wide character test INDEX iswspace +INDEX + iswspace_l + ANSI_SYNOPSIS #include int iswspace(wint_t <[c]>); + #include + int iswspace_l(wint_t <[c]>, locale_t <[locale]>); + TRAD_SYNOPSIS #include int iswspace(<[c]>) @@ -47,11 +53,16 @@ DESCRIPTION <> is a function which classifies wide-character values that are categorized as whitespace. +<> is like <> but performs the check based on the +locale specified by the locale object locale. If <[locale]> is +LC_GLOBAL_LOCALE or not a valid locale object, the behaviour is undefined. + RETURNS -<> returns non-zero if <[c]> is a whitespace wide character. +<>, <> return non-zero if <[c]> is a whitespace wide character. PORTABILITY <> is C99. +<> is POSIX-1.2008. No supporting OS subroutines are required. */ @@ -80,4 +91,3 @@ _DEFUN(iswspace,(c), wint_t c) return (c < 0x100 ? isspace (c) : 0); #endif /* _MB_CAPABLE */ } - diff --git a/newlib/libc/ctype/iswspace_l.c b/newlib/libc/ctype/iswspace_l.c index c6bdba4b7..0c30242a9 100644 --- a/newlib/libc/ctype/iswspace_l.c +++ b/newlib/libc/ctype/iswspace_l.c @@ -1,29 +1,3 @@ -/* -FUNCTION - <>---whitespace wide character test - -INDEX - iswspace_l - -ANSI_SYNOPSIS - #include - int iswspace_l(wint_t <[c]>, locale_t <[locale]>); - -DESCRIPTION -<> is a function which classifies wide-character values that -are categorized as whitespace. - -if <[locale]> is LC_GLOBAL_LOCALE or not a valid locale object, the behaviour -is undefined. - -RETURNS -<> returns non-zero if <[c]> is a whitespace wide character. - -PORTABILITY -<> is POSIX-1.2008. - -No supporting OS subroutines are required. -*/ #include <_ansi.h> #include diff --git a/newlib/libc/ctype/iswupper.c b/newlib/libc/ctype/iswupper.c index 424d65240..588e7f173 100644 --- a/newlib/libc/ctype/iswupper.c +++ b/newlib/libc/ctype/iswupper.c @@ -1,15 +1,20 @@ - /* FUNCTION - <>---uppercase wide character test + <>, <>---uppercase wide character test INDEX iswupper +INDEX + iswupper_l + ANSI_SYNOPSIS #include int iswupper(wint_t <[c]>); + #include + int iswupper_l(wint_t <[c]>, locale_t <[locale]>); + TRAD_SYNOPSIS #include int iswupper(<[c]>) @@ -19,11 +24,16 @@ DESCRIPTION <> is a function which classifies wide-character values that have uppercase translations. +<> is like <> but performs the check based on the +locale specified by the locale object locale. If <[locale]> is +LC_GLOBAL_LOCALE or not a valid locale object, the behaviour is undefined. + RETURNS -<> returns non-zero if <[c]> is a uppercase wide character. +<>, <> return non-zero if <[c]> is a uppercase wide character. PORTABILITY <> is C99. +<> is POSIX-1.2008. No supporting OS subroutines are required. */ @@ -35,4 +45,3 @@ _DEFUN(iswupper,(c),wint_t c) { return (towlower (c) != c); } - diff --git a/newlib/libc/ctype/iswupper_l.c b/newlib/libc/ctype/iswupper_l.c index 52572de96..2555cd08a 100644 --- a/newlib/libc/ctype/iswupper_l.c +++ b/newlib/libc/ctype/iswupper_l.c @@ -1,29 +1,3 @@ -/* -FUNCTION - <>---uppercase wide character test - -INDEX - iswupper_l - -ANSI_SYNOPSIS - #include - int iswupper_l(wint_t <[c]>, locale_t <[locale]>); - -DESCRIPTION -<> is a function which classifies wide-character values that -have uppercase translations. - -if <[locale]> is LC_GLOBAL_LOCALE or not a valid locale object, the behaviour -is undefined. - -RETURNS -<> returns non-zero if <[c]> is a uppercase wide character. - -PORTABILITY -<> is POSIX-1.2008. - -No supporting OS subroutines are required. -*/ #include <_ansi.h> #include diff --git a/newlib/libc/ctype/iswxdigit.c b/newlib/libc/ctype/iswxdigit.c index 4cf76fa25..7cd3abbd5 100644 --- a/newlib/libc/ctype/iswxdigit.c +++ b/newlib/libc/ctype/iswxdigit.c @@ -1,14 +1,20 @@ /* FUNCTION - <>---hexadecimal digit wide character test + <>, <>---hexadecimal digit wide character test INDEX iswxdigit +INDEX + iswxdigit_l + ANSI_SYNOPSIS #include int iswxdigit(wint_t <[c]>); + #include + int iswxdigit_l(wint_t <[c]>, locale_t <[locale]>); + TRAD_SYNOPSIS #include int iswxdigit(<[c]>) @@ -18,11 +24,16 @@ DESCRIPTION <> is a function which classifies wide character values that are hexadecimal digits. +<> is like <> but performs the check based on the +locale specified by the locale object locale. If <[locale]> is +LC_GLOBAL_LOCALE or not a valid locale object, the behaviour is undefined. + RETURNS -<> returns non-zero if <[c]> is a hexadecimal digit wide character. +<>, <> return non-zero if <[c]> is a hexadecimal digit wide character. PORTABILITY <> is C99. +<> is POSIX-1.2008. No supporting OS subroutines are required. */ @@ -36,4 +47,3 @@ _DEFUN(iswxdigit,(c), wint_t c) (c >= (wint_t)'a' && c <= (wint_t)'f') || (c >= (wint_t)'A' && c <= (wint_t)'F')); } - diff --git a/newlib/libc/ctype/iswxdigit_l.c b/newlib/libc/ctype/iswxdigit_l.c index 39596dbc8..5a4c339d4 100644 --- a/newlib/libc/ctype/iswxdigit_l.c +++ b/newlib/libc/ctype/iswxdigit_l.c @@ -1,29 +1,3 @@ -/* -FUNCTION - <>---hexadecimal digit wide character test - -INDEX - iswxdigit_l - -ANSI_SYNOPSIS - #include - int iswxdigit_l(wint_t <[c]>, locale_t <[locale]>); - -DESCRIPTION -<> is a function which classifies wide character values that -are hexadecimal digits. - -if <[locale]> is LC_GLOBAL_LOCALE or not a valid locale object, the behaviour -is undefined. - -RETURNS -<> returns non-zero if <[c]> is a hexadecimal digit wide character. - -PORTABILITY -<> is POSIX-1.2008. - -No supporting OS subroutines are required. -*/ #include <_ansi.h> #include diff --git a/newlib/libc/ctype/isxdigit.c b/newlib/libc/ctype/isxdigit.c index 63cace047..b55ba9c13 100644 --- a/newlib/libc/ctype/isxdigit.c +++ b/newlib/libc/ctype/isxdigit.c @@ -1,34 +1,44 @@ - /* FUNCTION -<>---hexadecimal digit predicate + <>, <>---hexadecimal digit predicate INDEX -isxdigit + isxdigit + +INDEX + isxdigit_l ANSI_SYNOPSIS -#include -int isxdigit(int <[c]>); + #include + int isxdigit(int <[c]>); + + #include + int isxdigit_l(int <[c]>, locale_t <[locale]>); TRAD_SYNOPSIS -#include -int isxdigit(int <[c]>); + #include + int isxdigit(int <[c]>); DESCRIPTION -<> is a macro which classifies ASCII integer values by table +<> is a macro which classifies singlebyte charset values by table lookup. It is a predicate returning non-zero for hexadecimal digits, and <<0>> for other characters. It is defined only if <[c]> is representable as an unsigned char or if <[c]> is EOF. +<> is like <> but performs the check based on the +locale specified by the locale object locale. If <[locale]> is +LC_GLOBAL_LOCALE or not a valid locale object, the behaviour is undefined. + You can use a compiled subroutine instead of the macro definition by -undefining the macro using `<<#undef isxdigit>>'. +undefining the macro using `<<#undef isxdigit>>' or `<<#undef isxdigit_l>>'. RETURNS -<> returns non-zero if <[c]> is a hexadecimal digit +<>, <> return non-zero if <[c]> is a hexadecimal digit (<<0>>--<<9>>, <>--<>, or <>--<>). PORTABILITY <> is ANSI C. +<> is POSIX-1.2008. No supporting OS subroutines are required. */ @@ -42,4 +52,3 @@ _DEFUN(isxdigit,(c),int c) { return(__CTYPE_PTR[c+1] & ((_X)|(_N))); } - diff --git a/newlib/libc/ctype/isxdigit_l.c b/newlib/libc/ctype/isxdigit_l.c index 37e489ee6..726db3190 100644 --- a/newlib/libc/ctype/isxdigit_l.c +++ b/newlib/libc/ctype/isxdigit_l.c @@ -1,35 +1,3 @@ -/* -FUNCTION -<>---hexadecimal digit predicate - -INDEX -isxdigit_l - -ANSI_SYNOPSIS -#include -int isxdigit_l(int <[c]>, locale_t <[locale]>); - -DESCRIPTION -<> is a macro which classifies ASCII integer values by table -lookup in locale <[locale]>. It is a predicate returning non-zero for -hexadecimal digits, and <<0>> for other characters. It is defined only -if <[c]> is representable as an unsigned char or if <[c]> is EOF. - -if <[locale]> is LC_GLOBAL_LOCALE or not a valid locale object, the behaviour -is undefined. - -You can use a compiled subroutine instead of the macro definition by -undefining the macro using `<<#undef isxdigit_l>>'. - -RETURNS -<> returns non-zero if <[c]> is a hexadecimal digit -(<<0>>--<<9>>, <>--<>, or <>--<>). - -PORTABILITY -<> is POSIX-1.2008. - -No supporting OS subroutines are required. -*/ #include <_ansi.h> #include diff --git a/newlib/libc/ctype/toascii.c b/newlib/libc/ctype/toascii.c index 4506f355d..945e91883 100644 --- a/newlib/libc/ctype/toascii.c +++ b/newlib/libc/ctype/toascii.c @@ -1,14 +1,20 @@ /* FUNCTION - <>---force integers to ASCII range + <>, <>---force integers to ASCII range INDEX toascii +INDEX + toascii_l + ANSI_SYNOPSIS #include int toascii(int <[c]>); + #include + int toascii_l(int <[c]>, locale_t <[locale]>); + TRAD_SYNOPSIS #include int toascii(<[c]>); @@ -17,14 +23,20 @@ TRAD_SYNOPSIS DESCRIPTION <> is a macro which coerces integers to the ASCII range (0--127) by zeroing any higher-order bits. +<> is like <> but performs the function based on the +locale specified by the locale object locale. If <[locale]> is +LC_GLOBAL_LOCALE or not a valid locale object, the behaviour is undefined. + You can use a compiled subroutine instead of the macro definition by -undefining this macro using `<<#undef toascii>>'. +undefining this macro using `<<#undef toascii>>' or `<<#undef toascii_l>>'. RETURNS -<> returns integers between 0 and 127. +<>, <> return integers between 0 and 127. PORTABILITY -<> is not ANSI C. +<> is X/Open, BSD and POSIX-1.2001, but marked obsolete in +POSIX-1.2008. +<> is a GNU extension. No supporting OS subroutines are required. */ diff --git a/newlib/libc/ctype/toascii_l.c b/newlib/libc/ctype/toascii_l.c index fd58195fc..8781261fb 100644 --- a/newlib/libc/ctype/toascii_l.c +++ b/newlib/libc/ctype/toascii_l.c @@ -1,32 +1,3 @@ -/* -FUNCTION - <>---force integers to ASCII range - -INDEX - toascii_l - -ANSI_SYNOPSIS - #include - int toascii_l(int <[c]>, locale_t <[locale]>); - -DESCRIPTION -<> is a macro which coerces integers to the ASCII range (0--127) by zeroing any higher-order bits. - -if <[locale]> is LC_GLOBAL_LOCALE or not a valid locale object, the behaviour -is undefined. - -You can use a compiled subroutine instead of the macro definition by -undefining this macro using `<<#undef toascii_l>>'. - -RETURNS -<> returns integers between 0 and 127. - -PORTABILITY -<> is a GNU extension. - -No supporting OS subroutines are required. -*/ - #include <_ansi.h> #include diff --git a/newlib/libc/ctype/tolower.c b/newlib/libc/ctype/tolower.c index 8a3843ef2..d1850ede5 100644 --- a/newlib/libc/ctype/tolower.c +++ b/newlib/libc/ctype/tolower.c @@ -1,9 +1,13 @@ /* FUNCTION - <>---translate characters to lowercase + <>, <>---translate characters to lowercase INDEX tolower + +INDEX + tolower_l + INDEX _tolower @@ -12,6 +16,9 @@ ANSI_SYNOPSIS int tolower(int <[c]>); int _tolower(int <[c]>); + #include + int tolower_l(int <[c]>, locale_t <[locale]>); + TRAD_SYNOPSIS #include int tolower(<[c]>); @@ -23,23 +30,27 @@ DESCRIPTION leaving all other characters unchanged. It is only defined when <[c]> is an integer in the range <> to <<255>>. +<> is like <> but performs the function based on the +locale specified by the locale object locale. If <[locale]> is +LC_GLOBAL_LOCALE or not a valid locale object, the behaviour is undefined. + You can use a compiled subroutine instead of the macro definition by -undefining this macro using `<<#undef tolower>>'. +undefining this macro using `<<#undef tolower>>' or `<<#undef tolower_l>>'. <<_tolower>> performs the same conversion as <>, but should only be used when <[c]> is known to be an uppercase character (<>--<>). RETURNS -<> returns the lowercase equivalent of <[c]> when it is a -character between <> and <>, and <[c]> otherwise. +<>, <> return the lowercase equivalent of <[c]> when +<[c]> is an uppercase character, and <[c]> otherwise. <<_tolower>> returns the lowercase equivalent of <[c]> when it is a character between <> and <>. If <[c]> is not one of these characters, the behaviour of <<_tolower>> is undefined. PORTABILITY -<> is ANSI C. <<_tolower>> is not recommended for portable -programs. +<> is ANSI C. <<_tolower>> is not recommended for portable programs. +<> is POSIX-1.2008. No supporting OS subroutines are required. */ diff --git a/newlib/libc/ctype/tolower_l.c b/newlib/libc/ctype/tolower_l.c index cbb388d0e..3b196c8d2 100644 --- a/newlib/libc/ctype/tolower_l.c +++ b/newlib/libc/ctype/tolower_l.c @@ -1,33 +1,3 @@ -/* -FUNCTION - <>---translate characters to lowercase - -INDEX - tolower_l - -ANSI_SYNOPSIS - #include - int tolower_l(int <[c]>, locale_t <[locale]>); - -DESCRIPTION -<> is a macro which converts uppercase characters to lowercase, -leaving all other characters unchanged. It is only defined when -<[c]> is an integer in the range <> to <<255>>. - -if <[locale]> is LC_GLOBAL_LOCALE or not a valid locale object, the behaviour -is undefined. - -RETURNS -<> returns the lowercase equivalent of <[c]> when it is a -character between <> and <>, and <[c]> otherwise. - -PORTABILITY -<> is POSIX-1.2008. -programs. - -No supporting OS subroutines are required. -*/ - #include <_ansi.h> #include #if defined (_MB_EXTENDED_CHARSETS_ISO) || defined (_MB_EXTENDED_CHARSETS_WINDOWS) diff --git a/newlib/libc/ctype/toupper.c b/newlib/libc/ctype/toupper.c index 2527a69d3..dc800e449 100644 --- a/newlib/libc/ctype/toupper.c +++ b/newlib/libc/ctype/toupper.c @@ -1,9 +1,13 @@ /* FUNCTION - <>---translate characters to uppercase + <>, <>---translate characters to uppercase INDEX toupper + +INDEX + toupper_l + INDEX _toupper @@ -12,6 +16,9 @@ ANSI_SYNOPSIS int toupper(int <[c]>); int _toupper(int <[c]>); + #include + int toupper_l(int <[c]>, locale_t <[locale]>); + TRAD_SYNOPSIS #include int toupper(<[c]>); @@ -23,15 +30,19 @@ DESCRIPTION leaving all other characters unchanged. It is only defined when <[c]> is an integer in the range <> to <<255>>. +<> is like <> but performs the function based on the +locale specified by the locale object locale. If <[locale]> is +LC_GLOBAL_LOCALE or not a valid locale object, the behaviour is undefined. + You can use a compiled subroutine instead of the macro definition by -undefining this macro using `<<#undef toupper>>'. +undefining this macro using `<<#undef toupper>>' or `<<#undef toupper_l>>'. <<_toupper>> performs the same conversion as <>, but should only be used when <[c]> is known to be a lowercase character (<>--<>). RETURNS -<> returns the uppercase equivalent of <[c]> when it is a -character between <> and <>, and <[c]> otherwise. +<>, <> return the uppercase equivalent of <[c]> when +<[c]> is a lowercase character, and <[c]> otherwise. <<_toupper>> returns the uppercase equivalent of <[c]> when it is a character between <> and <>. If <[c]> is not one of these @@ -39,6 +50,7 @@ characters, the behaviour of <<_toupper>> is undefined. PORTABILITY <> is ANSI C. <<_toupper>> is not recommended for portable programs. +<> is POSIX-1.2008. No supporting OS subroutines are required. */ diff --git a/newlib/libc/ctype/toupper_l.c b/newlib/libc/ctype/toupper_l.c index 2eb6dbd06..b126c1e28 100644 --- a/newlib/libc/ctype/toupper_l.c +++ b/newlib/libc/ctype/toupper_l.c @@ -1,32 +1,3 @@ -/* -FUNCTION - <>---translate characters to uppercase - -INDEX - toupper_l - -ANSI_SYNOPSIS - #include - int toupper_l(int <[c]>, locale_t <[locale]>); - -DESCRIPTION -<> is a macro which converts lowercase characters to uppercase, -leaving all other characters unchanged. It is only defined when -<[c]> is an integer in the range <> to <<255>>. - -if <[locale]> is LC_GLOBAL_LOCALE or not a valid locale object, the behaviour -is undefined. - -RETURNS -<> returns the uppercase equivalent of <[c]> when it is a -character between <> and <>, and <[c]> otherwise. - -PORTABILITY -<> is POSIX-1.2008. - -No supporting OS subroutines are required. -*/ - #include <_ansi.h> #include #if defined (_MB_EXTENDED_CHARSETS_ISO) \ diff --git a/newlib/libc/ctype/towctrans.c b/newlib/libc/ctype/towctrans.c index 416a491d3..a9eaf495d 100644 --- a/newlib/libc/ctype/towctrans.c +++ b/newlib/libc/ctype/towctrans.c @@ -29,15 +29,21 @@ /* FUNCTION - <>---extensible wide-character translation + <>, <>---extensible wide-character translation INDEX towctrans +INDEX + towctrans_l + ANSI_SYNOPSIS #include wint_t towctrans(wint_t <[c]>, wctrans_t <[w]>); + #include + wint_t towctrans_l(wint_t <[c]>, wctrans_t <[w]>, locale_t <[locale]>); + TRAD_SYNOPSIS #include wint_t towctrans(<[c]>, <[w]>) @@ -51,13 +57,19 @@ a specified translation type <[w]>. If the translation type is invalid or cannot be applied to the current character, no change to the character is made. +<> is like <> but performs the function based on the +locale specified by the locale object locale. If <[locale]> is +LC_GLOBAL_LOCALE or not a valid locale object, the behaviour is undefined. + RETURNS -<> returns the translated equivalent of <[c]> when it is a -valid for the given translation, otherwise, it returns the input character. -When the translation type is invalid, <> is set <>. +<>, <> return the translated equivalent of <[c]> +when it is a valid for the given translation, otherwise, it returns the +input character. When the translation type is invalid, <> is +set to <>. PORTABILITY <> is C99. +<> is POSIX-1.2008. No supporting OS subroutines are required. */ diff --git a/newlib/libc/ctype/towctrans_l.c b/newlib/libc/ctype/towctrans_l.c index d74cc7923..d7369e16b 100644 --- a/newlib/libc/ctype/towctrans_l.c +++ b/newlib/libc/ctype/towctrans_l.c @@ -1,33 +1,3 @@ -/* -FUNCTION - <>---extensible wide-character translation - -INDEX - towctrans_l - -ANSI_SYNOPSIS - #include - wint_t towctrans_l(wint_t <[c]>, wctrans_t <[w]>, locale_t <[locale]>); - -DESCRIPTION -<> is a function which converts wide characters based on -a specified translation type <[w]>. If the translation type is -invalid or cannot be applied to the current character, no change -to the character is made. - -if <[locale]> is LC_GLOBAL_LOCALE or not a valid locale object, the behaviour -is undefined. - -RETURNS -<> returns the translated equivalent of <[c]> when it is a -valid for the given translation, otherwise, it returns the input character. -When the translation type is invalid, <> is set <>. - -PORTABILITY -<> is POSIX-1.2008. - -No supporting OS subroutines are required. -*/ #include <_ansi.h> #include diff --git a/newlib/libc/ctype/towlower.c b/newlib/libc/ctype/towlower.c index f4d70b69a..b69c8ffe5 100644 --- a/newlib/libc/ctype/towlower.c +++ b/newlib/libc/ctype/towlower.c @@ -29,15 +29,21 @@ /* FUNCTION - <>---translate wide characters to lowercase + <>, <>---translate wide characters to lowercase INDEX towlower +INDEX + towlower_l + ANSI_SYNOPSIS #include wint_t towlower(wint_t <[c]>); + #include + wint_t towlower_l(wint_t <[c]>, locale_t <[locale]>); + TRAD_SYNOPSIS #include wint_t towlower(<[c]>) @@ -48,12 +54,17 @@ DESCRIPTION <> is a function which converts uppercase wide characters to lowercase, leaving all other characters unchanged. +<> is like <> but performs the function based on the +locale specified by the locale object locale. If <[locale]> is +LC_GLOBAL_LOCALE or not a valid locale object, the behaviour is undefined. + RETURNS -<> returns the lowercase equivalent of <[c]> when it is a +<>, <> return the lowercase equivalent of <[c]> when it is a uppercase wide character; otherwise, it returns the input character. PORTABILITY <> is C99. +<> is POSIX-1.2008. No supporting OS subroutines are required. */ diff --git a/newlib/libc/ctype/towlower_l.c b/newlib/libc/ctype/towlower_l.c index 5b398f1dc..2e89ec9d0 100644 --- a/newlib/libc/ctype/towlower_l.c +++ b/newlib/libc/ctype/towlower_l.c @@ -1,31 +1,3 @@ -/* -FUNCTION - <>---translate wide characters to lowercase - -INDEX - towlower_l - -ANSI_SYNOPSIS - #include - wint_t towlower_l(wint_t <[c]>, local_t <[locale]>); - -DESCRIPTION -<> is a function which converts uppercase wide characters to -lowercase, leaving all other characters unchanged. - -if <[locale]> is LC_GLOBAL_LOCALE or not a valid locale object, the behaviour -is undefined. - -RETURNS -<> returns the lowercase equivalent of <[c]> when it is a -uppercase wide character; otherwise, it returns the input character. - -PORTABILITY -<> is POSIX-1.2008. - -No supporting OS subroutines are required. -*/ - #include <_ansi.h> #include #include diff --git a/newlib/libc/ctype/towupper.c b/newlib/libc/ctype/towupper.c index 8b1755b53..e2d80281f 100644 --- a/newlib/libc/ctype/towupper.c +++ b/newlib/libc/ctype/towupper.c @@ -29,15 +29,21 @@ /* FUNCTION - <>---translate wide characters to uppercase + <>, <>---translate wide characters to uppercase INDEX towupper +INDEX + towupper_l + ANSI_SYNOPSIS #include wint_t towupper(wint_t <[c]>); + #include + wint_t towupper_l(wint_t <[c]>, locale_t <[locale]>); + TRAD_SYNOPSIS #include wint_t towupper(<[c]>) @@ -48,12 +54,17 @@ DESCRIPTION <> is a function which converts lowercase wide characters to uppercase, leaving all other characters unchanged. +<> is like <> but performs the function based on the +locale specified by the locale object locale. If <[locale]> is +LC_GLOBAL_LOCALE or not a valid locale object, the behaviour is undefined. + RETURNS -<> returns the uppercase equivalent of <[c]> when it is a +<>, <> return the uppercase equivalent of <[c]> when it is a lowercase wide character, otherwise, it returns the input character. PORTABILITY <> is C99. +<> is POSIX-1.2008. No supporting OS subroutines are required. */ diff --git a/newlib/libc/ctype/towupper_l.c b/newlib/libc/ctype/towupper_l.c index 973fdc0ab..5a8384cfb 100644 --- a/newlib/libc/ctype/towupper_l.c +++ b/newlib/libc/ctype/towupper_l.c @@ -1,31 +1,3 @@ -/* -FUNCTION - <>---translate wide characters to uppercase - -INDEX - towupper_l - -ANSI_SYNOPSIS - #include - wint_t towupper_l(wint_t <[c]>, locale_t <[locale]>); - -DESCRIPTION -<> is a function which converts lowercase wide characters to -uppercase, leaving all other characters unchanged. - -if <[locale]> is LC_GLOBAL_LOCALE or not a valid locale object, the behaviour -is undefined. - -RETURNS -<> returns the uppercase equivalent of <[c]> when it is a -lowercase wide character, otherwise, it returns the input character. - -PORTABILITY -<> is POSIX-1.2008. - -No supporting OS subroutines are required. -*/ - #include <_ansi.h> #include diff --git a/newlib/libc/ctype/wctrans.c b/newlib/libc/ctype/wctrans.c index 75069831e..b3ad0bbdb 100644 --- a/newlib/libc/ctype/wctrans.c +++ b/newlib/libc/ctype/wctrans.c @@ -29,15 +29,21 @@ /* FUNCTION - <>---get wide-character translation type + <>, <>---get wide-character translation type INDEX wctrans +INDEX + wctrans_l + ANSI_SYNOPSIS #include wctrans_t wctrans(const char *<[c]>); + #include + wctrans_t wctrans_l(const char *<[c]>, locale_t <[locale]>); + TRAD_SYNOPSIS #include wctrans_t wctrans(<[c]>) @@ -50,13 +56,18 @@ the appropriate wctrans_t type value associated with the string, if one exists. The following values are guaranteed to be recognized: "tolower" and "toupper". +<> is like <> but performs the function based on the +locale specified by the locale object locale. If <[locale]> is +LC_GLOBAL_LOCALE or not a valid locale object, the behaviour is undefined. + RETURNS -<> returns 0 and sets <> to <> if the +<>, <> return 0 and sets <> to <> if the given name is invalid. Otherwise, it returns a valid non-zero wctrans_t value. PORTABILITY <> is C99. +<> is POSIX-1.2008. No supporting OS subroutines are required. */ diff --git a/newlib/libc/ctype/wctrans_l.c b/newlib/libc/ctype/wctrans_l.c index 2109711b1..30e61a472 100644 --- a/newlib/libc/ctype/wctrans_l.c +++ b/newlib/libc/ctype/wctrans_l.c @@ -1,33 +1,3 @@ -/* -FUNCTION - <>---get wide-character translation type - -INDEX - wctrans_l - -ANSI_SYNOPSIS - #include - wctrans_t wctrans_l(const char *<[c]>, locale_t <[locale]>); - -DESCRIPTION -<> is a function which takes a string <[c]> and gives back -the appropriate wctrans_t type value associated with the string, -if one exists. The following values are guaranteed to be recognized: -"tolower" and "toupper". - -if <[locale]> is LC_GLOBAL_LOCALE or not a valid locale object, the behaviour -is undefined. - -RETURNS -<> returns 0 and sets <> to <> if the -given name is invalid. Otherwise, it returns a valid non-zero wctrans_t -value. - -PORTABILITY -<> is POSIX-1.2008. - -No supporting OS subroutines are required. -*/ #include <_ansi.h> #include diff --git a/newlib/libc/ctype/wctype.c b/newlib/libc/ctype/wctype.c index dc400c422..f32c42151 100644 --- a/newlib/libc/ctype/wctype.c +++ b/newlib/libc/ctype/wctype.c @@ -29,15 +29,21 @@ /* FUNCTION - <>---get wide-character classification type + <>, <>---get wide-character classification type INDEX wctype +INDEX + wctype_l + ANSI_SYNOPSIS #include wctype_t wctype(const char *<[c]>); + #include + wctype_t wctype_l(const char *<[c]>, locale_t <[locale]>); + TRAD_SYNOPSIS #include wctype_t wctype(<[c]>) @@ -51,13 +57,18 @@ if one exists. The following values are guaranteed to be recognized: "alnum", "alpha", "blank", "cntrl", "digit", "graph", "lower", "print", "punct", "space", "upper", and "xdigit". +<> is like <> but performs the function based on the +locale specified by the locale object locale. If <[locale]> is +LC_GLOBAL_LOCALE or not a valid locale object, the behaviour is undefined. + RETURNS -<> returns 0 and sets <> to <> if the +<>, <> return 0 and sets <> to <> if the given name is invalid. Otherwise, it returns a valid non-zero wctype_t value. PORTABILITY <> is C99. +<> is POSIX-1.2008. No supporting OS subroutines are required. */ diff --git a/newlib/libc/ctype/wctype_l.c b/newlib/libc/ctype/wctype_l.c index 8b8d59d0f..c2793dd57 100644 --- a/newlib/libc/ctype/wctype_l.c +++ b/newlib/libc/ctype/wctype_l.c @@ -1,34 +1,3 @@ -/* -FUNCTION - <>---get wide-character classification type - -INDEX - wctype_l - -ANSI_SYNOPSIS - #include - wctype_t wctype_l(const char *<[c]>, locale_t <[locale]>); - -DESCRIPTION -<> is a function which takes a string <[c]> and gives back -the appropriate wctype_t type value associated with the string, -if one exists. The following values are guaranteed to be recognized: -"alnum", "alpha", "blank", "cntrl", "digit", "graph", "lower", "print", -"punct", "space", "upper", and "xdigit". - -if <[locale]> is LC_GLOBAL_LOCALE or not a valid locale object, the behaviour -is undefined. - -RETURNS -<> returns 0 and sets <> to <> if the -given name is invalid. Otherwise, it returns a valid non-zero wctype_t -value. - -PORTABILITY -<> is POSIX-1.2008. - -No supporting OS subroutines are required. -*/ #include <_ansi.h> #include