summaryrefslogtreecommitdiffstats
path: root/newlib/libc
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2016-08-15 14:21:52 +0200
committerCorinna Vinschen <corinna@vinschen.de>2016-08-15 14:21:52 +0200
commitbaf0c9fcb56e5cf8f54357bf8d8646b51b236886 (patch)
tree677d36f48c776afcf3b4660c52ef3f3c4f7fafdc /newlib/libc
parent5bdf8cfa49d2ee9bb3c7c37ac59cc118371abb3b (diff)
downloadcygnal-baf0c9fcb56e5cf8f54357bf8d8646b51b236886.tar.gz
cygnal-baf0c9fcb56e5cf8f54357bf8d8646b51b236886.tar.bz2
cygnal-baf0c9fcb56e5cf8f54357bf8d8646b51b236886.zip
Fold documentation of is*_l funcs into documentation of non-l is* funcs
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
Diffstat (limited to 'newlib/libc')
-rw-r--r--newlib/libc/ctype/Makefile.am35
-rw-r--r--newlib/libc/ctype/Makefile.in35
-rw-r--r--newlib/libc/ctype/isalnum.c20
-rw-r--r--newlib/libc/ctype/isalnum_l.c34
-rw-r--r--newlib/libc/ctype/isalpha.c21
-rw-r--r--newlib/libc/ctype/isalpha_l.c33
-rw-r--r--newlib/libc/ctype/isascii.c19
-rw-r--r--newlib/libc/ctype/isascii_l.c30
-rw-r--r--newlib/libc/ctype/isblank.c18
-rw-r--r--newlib/libc/ctype/isblank_l.c29
-rw-r--r--newlib/libc/ctype/iscntrl.c24
-rw-r--r--newlib/libc/ctype/iscntrl_l.c34
-rw-r--r--newlib/libc/ctype/isdigit.c30
-rw-r--r--newlib/libc/ctype/isdigit_l.c32
-rw-r--r--newlib/libc/ctype/islower.c31
-rw-r--r--newlib/libc/ctype/islower_l.c33
-rw-r--r--newlib/libc/ctype/isprint.c43
-rw-r--r--newlib/libc/ctype/isprint_l.c39
-rw-r--r--newlib/libc/ctype/ispunct.c33
-rw-r--r--newlib/libc/ctype/ispunct_l.c34
-rw-r--r--newlib/libc/ctype/isspace.c24
-rw-r--r--newlib/libc/ctype/isspace_l.c32
-rw-r--r--newlib/libc/ctype/isupper.c34
-rw-r--r--newlib/libc/ctype/isupper_l.c31
-rw-r--r--newlib/libc/ctype/iswalnum.c17
-rw-r--r--newlib/libc/ctype/iswalnum_l.c26
-rw-r--r--newlib/libc/ctype/iswalpha.c17
-rw-r--r--newlib/libc/ctype/iswalpha_l.c26
-rw-r--r--newlib/libc/ctype/iswblank.c16
-rw-r--r--newlib/libc/ctype/iswblank_l.c26
-rw-r--r--newlib/libc/ctype/iswcntrl.c16
-rw-r--r--newlib/libc/ctype/iswcntrl_l.c26
-rw-r--r--newlib/libc/ctype/iswctype.c18
-rw-r--r--newlib/libc/ctype/iswctype_l.c27
-rw-r--r--newlib/libc/ctype/iswdigit.c16
-rw-r--r--newlib/libc/ctype/iswdigit_l.c26
-rw-r--r--newlib/libc/ctype/iswgraph.c16
-rw-r--r--newlib/libc/ctype/iswgraph_l.c26
-rw-r--r--newlib/libc/ctype/iswlower.c17
-rw-r--r--newlib/libc/ctype/iswlower_l.c27
-rw-r--r--newlib/libc/ctype/iswprint.c16
-rw-r--r--newlib/libc/ctype/iswprint_l.c26
-rw-r--r--newlib/libc/ctype/iswpunct.c16
-rw-r--r--newlib/libc/ctype/iswpunct_l.c26
-rw-r--r--newlib/libc/ctype/iswspace.c16
-rw-r--r--newlib/libc/ctype/iswspace_l.c26
-rw-r--r--newlib/libc/ctype/iswupper.c17
-rw-r--r--newlib/libc/ctype/iswupper_l.c26
-rw-r--r--newlib/libc/ctype/iswxdigit.c16
-rw-r--r--newlib/libc/ctype/iswxdigit_l.c26
-rw-r--r--newlib/libc/ctype/isxdigit.c31
-rw-r--r--newlib/libc/ctype/isxdigit_l.c32
-rw-r--r--newlib/libc/ctype/toascii.c20
-rw-r--r--newlib/libc/ctype/toascii_l.c29
-rw-r--r--newlib/libc/ctype/tolower.c23
-rw-r--r--newlib/libc/ctype/tolower_l.c30
-rw-r--r--newlib/libc/ctype/toupper.c20
-rw-r--r--newlib/libc/ctype/toupper_l.c29
-rw-r--r--newlib/libc/ctype/towctrans.c20
-rw-r--r--newlib/libc/ctype/towctrans_l.c30
-rw-r--r--newlib/libc/ctype/towlower.c15
-rw-r--r--newlib/libc/ctype/towlower_l.c28
-rw-r--r--newlib/libc/ctype/towupper.c15
-rw-r--r--newlib/libc/ctype/towupper_l.c28
-rw-r--r--newlib/libc/ctype/wctrans.c15
-rw-r--r--newlib/libc/ctype/wctrans_l.c30
-rw-r--r--newlib/libc/ctype/wctype.c15
-rw-r--r--newlib/libc/ctype/wctype_l.c31
68 files changed, 514 insertions, 1209 deletions
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
- <<isalnum>>---alphanumeric character predicate
+ <<isalnum>>, <<isalnum_l>>---alphanumeric character predicate
INDEX
isalnum
+INDEX
+ isalnum_l
ANSI_SYNOPSIS
#include <ctype.h>
int isalnum(int <[c]>);
+ #include <ctype.h>
+ int isalnum_l(int <[c]>, locale_t <[locale]>);
+
TRAD_SYNOPSIS
#include <ctype.h>
int isalnum(<[c]>);
DESCRIPTION
-<<isalnum>> is a macro which classifies ASCII integer values by table
+<<isalnum>> 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.
+<<isalnum_l>> is like <<isalnum>> 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
-<<isalnum>> returns non-zero if <[c]> is a letter (<<a>>--<<z>> or
-<<A>>--<<Z>>) or a digit (<<0>>--<<9>>).
+<<isalnum>>,<<isalnum_l>> return non-zero if <[c]> is a letter or a digit.
PORTABILITY
<<isalnum>> is ANSI C.
+<<isalnum_l>> 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
- <<isalnum_l>>---alphanumeric character predicate
-
-INDEX
- isalnum_l
-
-ANSI_SYNOPSIS
- #include <ctype.h>
- int isalnum_l(int <[c]>, locale_t <[locale]>);
-
-DESCRIPTION
-<<isalnum_l>> 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
-<<isalnum_l>> returns non-zero if <[c]> is a letter (<<a>>--<<z>> or
-<<A>>--<<Z>>) or a digit (<<0>>--<<9>>).
-
-PORTABILITY
-<<isalnum_l>> is POSIX-1.2008.
-
-No OS subroutines are required.
-*/
-
#include <_ansi.h>
#include <ctype.h>
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
- <<isalpha>>---alphabetic character predicate
+ <<isalpha>>, <isalpha_l>>---alphabetic character predicate
INDEX
isalpha
+INDEX
+ isalpha_l
+
ANSI_SYNOPSIS
#include <ctype.h>
int isalpha(int <[c]>);
+ #include <ctype.h>
+ int isalpha_l(int <[c]>, locale_t <[locale]>);
+
TRAD_SYNOPSIS
#include <ctype.h>
int isalpha(<[c]>);
DESCRIPTION
-<<isalpha>> is a macro which classifies ASCII integer values by table
+<<isalpha>> 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.
+<<isalpha_l>> is like <<isalpha>> 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
-<<isalpha>> returns non-zero if <[c]> is a letter (<<A>>--<<Z>> or
-<<a>>--<<z>>).
+<<isalpha>>, <<isalpha_l>> return non-zero if <[c]> is a letter.
PORTABILITY
<<isalpha>> is ANSI C.
+<<isalpha_l>> 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
- <<isalpha_l>>---alphabetic character predicate
-
-INDEX
- isalpha_l
-
-ANSI_SYNOPSIS
- #include <ctype.h>
- int isalpha_l(int <[c]>, locale_t <[locale]>);
-
-DESCRIPTION
-<<isalpha_l>> 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
-<<isalpha_l>> returns non-zero if <[c]> is a letter (<<A>>--<<Z>> or
-<<a>>--<<z>>).
-
-PORTABILITY
-<<isalpha_l>> is POSIX-1.2008.
-
-No supporting OS subroutines are required.
-*/
-
#include <_ansi.h>
#include <ctype.h>
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
- <<isascii>>---ASCII character predicate
+ <<isascii>>, <<isascii_l>>---ASCII character predicate
INDEX
isascii
+INDEX
+ isascii_l
+
ANSI_SYNOPSIS
#include <ctype.h>
int isascii(int <[c]>);
+ #include <ctype.h>
+ int isascii_l(int <[c]>, locale_t <[locale]>);
+
TRAD_SYNOPSIS
#include <ctype.h>
int isascii(<[c]>);
@@ -17,15 +23,20 @@ DESCRIPTION
<<isascii>> is a macro which returns non-zero when <[c]> is an ASCII
character, and 0 otherwise. It is defined for all integer values.
+<<isascii_l>> is like <<isascii>> 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
-<<isascii>> returns non-zero if the low order byte of <[c]> is in the range
-0 to 127 (<<0x00>>--<<0x7F>>).
+<<isascii>>, <<isascii_l>> return non-zero if the low order byte of <[c]>
+is in the range 0 to 127 (<<0x00>>--<<0x7F>>).
PORTABILITY
<<isascii>> is ANSI C.
+<<isascii_l>> 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
- <<isascii_l>>---ASCII character predicate
-
-INDEX
- isascii_l
-
-ANSI_SYNOPSIS
- #include <ctype.h>
- int isascii_l(int <[c]>, locale_t <[locale]>);
-
-DESCRIPTION
-<<isascii_l>> 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
-<<isascii_l>> returns non-zero if the low order byte of <[c]> is in the range
-0 to 127 (<<0x00>>--<<0x7F>>).
-
-PORTABILITY
-<<isascii_l>> is a GNU extension.
-
-No supporting OS subroutines are required.
-*/
#include <_ansi.h>
#include <ctype.h>
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
- <<isblank>>---blank character predicate
+ <<isblank>>, <<isblank_l>>---blank character predicate
INDEX
isblank
+INDEX
+ isblank_l
+
ANSI_SYNOPSIS
#include <ctype.h>
int isblank(int <[c]>);
+ #include <ctype.h>
+ int isblank_l(int <[c]>, locale_t <[locale]>);
+
TRAD_SYNOPSIS
#include <ctype.h>
int isblank(<[c]>);
DESCRIPTION
-<<isblank>> is a function which classifies ASCII integer values by table
+<<isblank>> 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.
+<<isblank_l>> is like <<isblank>> 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
-<<isblank>> returns non-zero if <[c]> is a blank character.
+<<isblank>>, <<isblank_l>> return non-zero if <[c]> is a blank character.
PORTABILITY
<<isblank>> is C99.
+<<isblank_l>> 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
- <<isblank_l>>---blank character predicate
-
-INDEX
- isblank_l
-
-ANSI_SYNOPSIS
- #include <ctype.h>
- int isblank_l(int <[c]>, locale_t <[locale]>);
-
-DESCRIPTION
-<<isblank_l>> 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
-<<isblank_l>> returns non-zero if <[c]> is a blank character.
-
-PORTABILITY
-<<isblank_l>> is POSIX-1.2008.
-
-No supporting OS subroutines are required.
-*/
-
#include <_ansi.h>
#include <ctype.h>
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
- <<iscntrl>>---control character predicate
+ <<iscntrl>>, <<iscntrl_l>>---control character predicate
INDEX
iscntrl
+INDEX
+ iscntrl_l
+
ANSI_SYNOPSIS
#include <ctype.h>
int iscntrl(int <[c]>);
+ #include <ctype.h>
+ int iscntrl_l(int <[c]>, locale_t <[locale]>);
+
TRAD_SYNOPSIS
#include <ctype.h>
int iscntrl(<[c]>);
DESCRIPTION
-<<iscntrl>> is a macro which classifies ASCII integer values by table
+<<iscntrl>> 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.
+<<iscntrl_l>> is like <<iscntrl>> 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
-<<iscntrl>> returns non-zero if <[c]> is a delete character or ordinary
-control character (<<0x7F>> or <<0x00>>--<<0x1F>>).
+<<iscntrl>>, <<iscntrl_l>> return non-zero if <[c]> is a delete character
+or ordinary control character.
PORTABILITY
<<iscntrl>> is ANSI C.
+<<iscntrl_l>> 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
- <<iscntrl_l>>---control character predicate
-
-INDEX
- iscntrl_l
-
-ANSI_SYNOPSIS
- #include <ctype.h>
- int iscntrl_l(int <[c]>, locale_t <[locale]>);
-
-DESCRIPTION
-<<iscntrl_l>> 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
-<<iscntrl_l>> returns non-zero if <[c]> is a delete character or ordinary
-control character (<<0x7F>> or <<0x00>>--<<0x1F>>).
-
-PORTABILITY
-<<iscntrl_l>> is POSIX-1.2008.
-
-No supporting OS subroutines are required.
-*/
-
#include <_ansi.h>
#include <ctype.h>
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
-<<isdigit>>---decimal digit predicate
+ <<isdigit>>, <<isdigit_l>>---decimal digit predicate
INDEX
-isdigit
+ isdigit
+
+INDEX
+ isdigit_l
ANSI_SYNOPSIS
-#include <ctype.h>
-int isdigit(int <[c]>);
+ #include <ctype.h>
+ int isdigit(int <[c]>);
+
+ #include <ctype.h>
+ int isdigit_l(int <[c]>, locale_t <[locale]>);
TRAD_SYNOPSIS
-#include <ctype.h>
-int isdigit(<[c]>);
+ #include <ctype.h>
+ int isdigit(<[c]>);
DESCRIPTION
-<<isdigit>> is a macro which classifies ASCII integer values by table
+<<isdigit>> 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.
+<<isdigit_l>> is like <<isdigit>> 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
-<<isdigit>> returns non-zero if <[c]> is a decimal digit (<<0>>--<<9>>).
+<<isdigit>>, <<isdigit_l>> return non-zero if <[c]> is a decimal digit
+(<<0>>--<<9>>).
PORTABILITY
<<isdigit>> is ANSI C.
+<<isdigit_l>> 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
-<<isdigit_l>>---decimal digit predicate
-
-INDEX
-isdigit_l
-
-ANSI_SYNOPSIS
-#include <ctype.h>
-int isdigit_l(int <[c]>, locale_t <[locale]>);
-
-DESCRIPTION
-<<isdigit_l>> 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
-<<isdigit_l>> returns non-zero if <[c]> is a decimal digit (<<0>>--<<9>>).
-
-PORTABILITY
-<<isdigit_l>> is POSIX-1.2008.
-
-No supporting OS subroutines are required.
-*/
-
#include <_ansi.h>
#include <ctype.h>
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
-<<islower>>---lowercase character predicate
+ <<islower>>, <<islower_l>>---lowercase character predicate
+
+INDEX
+ islower
INDEX
-islower
+ islower_l
ANSI_SYNOPSIS
-#include <ctype.h>
-int islower(int <[c]>);
+ #include <ctype.h>
+ int islower(int <[c]>);
+
+ #include <ctype.h>
+ int islower_l(int <[c]>, locale_t <[locale]>);
TRAD_SYNOPSIS
-#include <ctype.h>
-int islower(<[c]>);
+ #include <ctype.h>
+ int islower(<[c]>);
DESCRIPTION
-<<islower>> is a macro which classifies ASCII integer values by table
+<<islower>> 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.
+<<islower_l>> is like <<islower>> 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
-<<islower>> returns non-zero if <[c]> is a lowercase letter (<<a>>--<<z>>).
+<<islower>>, <<islower_l>> return non-zero if <[c]> is a lowercase letter.
PORTABILITY
<<islower>> is ANSI C.
+<<islower_l>> 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
-<<islower_l>>---lowercase character predicate
-
-INDEX
-islower_l
-
-ANSI_SYNOPSIS
-#include <ctype.h>
-int islower_l(int <[c]>, locale_t <[locale]>);
-
-DESCRIPTION
-<<islower_l>> 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
-<<islower_l>> returns non-zero if <[c]> is a lowercase letter (<<a>>--<<z>>).
-
-PORTABILITY
-<<islower_l>> is POSIX-1.2008.
-
-No supporting OS subroutines are required.
-*/
#include <_ansi.h>
#include <ctype.h>
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
- <<isprint>>, <<isgraph>>---printable character predicates
+ <<isprint>>, <<isgraph>>, <<isprint_l>>, <<isgraph_l>>---printable character predicates
INDEX
isprint
+
INDEX
isgraph
+INDEX
+ isprint_l
+
+INDEX
+ isgraph_l
+
ANSI_SYNOPSIS
#include <ctype.h>
int isprint(int <[c]>);
int isgraph(int <[c]>);
+ #include <ctype.h>
+ int isprint_l(int <[c]>, locale_t <[locale]>);
+ int isgraph_l(int <[c]>, locale_t <[locale]>);
+
TRAD_SYNOPSIS
#include <ctype.h>
int isprint(<[c]>);
int isgraph(<[c]>);
-
DESCRIPTION
-<<isprint>> 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.
+<<isprint>> 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.
+
+<<isgraph>> behaves identically to <<isprint>>, except that space characters
+are excluded.
+
+<<isprint_l>>, <<isgraph_l>> are like <<isprint>>, <<isgraph>> 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
-<<isprint>> returns non-zero if <[c]> is a printing character,
-(<<0x20>>--<<0x7E>>).
-<<isgraph>> behaves identically to <<isprint>>, except that the space
-character (<<0x20>>) is excluded.
+<<isprint>>,<isprint_l> return non-zero if <[c]> is a printing character.
+<<isgraph>>, <<isgraph_l> return non-zero if <[c]> is a printing character
+except spaces.
PORTABILITY
<<isprint>> and <<isgraph>> 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
- <<isprint_l>>, <<isgraph_l>>---printable character predicates
-
-INDEX
- isprint_l
-INDEX
- isgraph_l
-
-ANSI_SYNOPSIS
- #include <ctype.h>
- int isprint_l(int <[c]>, locale_t <[locale]>);
- int isgraph_l(int <[c]>, locale_t <[locale]>);
-
-DESCRIPTION
-<<isprint_l>> 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
-<<isprint_l>> returns non-zero if <[c]> is a printing character,
-(<<0x20>>--<<0x7E>>).
-<<isgraph_l>> behaves identically to <<isprint_l>>, except that the space
-character (<<0x20>>) is excluded.
-
-PORTABILITY
-<<isprint_l>> and <<isgraph_l>> are POSIX-1.2008.
-
-No supporting OS subroutines are required.
-*/
-
#include <_ansi.h>
#include <ctype.h>
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
-<<ispunct>>---punctuation character predicate
+ <<ispunct>>, <<ispunct_l>>---punctuation character predicate
+
+INDEX
+ ispunct
INDEX
-ispunct
+ ispunct_l
ANSI_SYNOPSIS
-#include <ctype.h>
-int ispunct(int <[c]>);
+ #include <ctype.h>
+ int ispunct(int <[c]>);
+
+ #include <ctype.h>
+ int ispunct_l(int <[c]>, locale_t <[locale]>);
TRAD_SYNOPSIS
-#include <ctype.h>
-int ispunct(<[c]>);
+ #include <ctype.h>
+ int ispunct(<[c]>);
DESCRIPTION
-<<ispunct>> is a macro which classifies ASCII integer values by table
+<<ispunct>> 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.
+<<ispunct_l>> is like <<ispunct>> 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
-<<ispunct>> returns non-zero if <[c]> is a printable punctuation character
-(<<isgraph(<[c]>) && !isalnum(<[c]>)>>).
+<<ispunct>>, <<ispunct_l>> return non-zero if <[c]> is a printable
+punctuation character.
PORTABILITY
<<ispunct>> is ANSI C.
+<<ispunct_l>> 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
-<<ispunct_l>>---punctuation character predicate
-
-INDEX
-ispunct_l
-
-ANSI_SYNOPSIS
-#include <ctype.h>
-int ispunct_l(int <[c]>, locale_t <[locale]>);
-
-DESCRIPTION
-<<ispunct_l>> 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
-<<ispunct_l>> returns non-zero if <[c]> is a printable punctuation character
-(<<isgraph(<[c]>) && !isalnum(<[c]>)>>).
-
-PORTABILITY
-<<ispunct_l>> is POSIX-1.2008
-
-No supporting OS subroutines are required.
-*/
-
#include <_ansi.h>
#include <ctype.h>
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
- <<isspace>>---whitespace character predicate
+ <<isspace>>, <<isspace_l>>---whitespace character predicate
INDEX
isspace
+INDEX
+ isspace_l
+
ANSI_SYNOPSIS
#include <ctype.h>
int isspace(int <[c]>);
+ #include <ctype.h>
+ int isspace_l(int <[c]>, locale_t <[locale]>);
+
TRAD_SYNOPSIS
#include <ctype.h>
int isspace(<[c]>);
DESCRIPTION
-<<isspace>> is a macro which classifies ASCII integer values by table
+<<isspace>> 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 <<isascii>>(<[c]>) is true or <[c]> is EOF.
+<<isspace_l>> is like <<isspace>> 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
-<<isspace>> returns non-zero if <[c]> is a space, tab, carriage return, new
-line, vertical tab, or formfeed (<<0x09>>--<<0x0D>>, <<0x20>>).
+<<isspace>>, <<isspace_l>> 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
<<isspace>> is ANSI C.
+<<isspace_l>> 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
- <<isspace_l>>---whitespace character predicate
-
-INDEX
- isspace_l
-
-ANSI_SYNOPSIS
- #include <ctype.h>
- int isspace_l(int <[c]>, locale_t *<[locale]>);
-
-DESCRIPTION
-<<isspace_l>> 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 <<isascii>>(<[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
-<<isspace_l>> returns non-zero if <[c]> is a space, tab, carriage return, new
-line, vertical tab, or formfeed (<<0x09>>--<<0x0D>>, <<0x20>>).
-
-PORTABILITY
-<<isspace_l>> is POSIX-1.2008.
-
-No supporting OS subroutines are required.
-*/
#include <_ansi.h>
#include <ctype.h>
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
-<<isupper>>---uppercase character predicate
+ <<isupper>>, <<isupper_l>>---uppercase character predicate
+
+INDEX
+ isupper
INDEX
-isupper
+ isupper_l
ANSI_SYNOPSIS
-#include <ctype.h>
-int isupper(int <[c]>);
+ #include <ctype.h>
+ int isupper(int <[c]>);
+
+ #include <ctype.h>
+ int isupper_l(int <[c]>, locale_t <[locale]>);
TRAD_SYNOPSIS
-#include <ctype.h>
-int isupper(<[c]>);
+ #include <ctype.h>
+ int isupper(<[c]>);
DESCRIPTION
-<<isupper>> is a macro which classifies ASCII integer values by table
+<<isupper>> is a macro which classifies singlebyte charset values by table
lookup. It is a predicate returning non-zero for uppercase letters
-(<<A>>--<<Z>>), and 0 for other characters. It is defined only when
-<<isascii>>(<[c]>) is true or <[c]> is EOF.
+(<<A>>--<<Z>>), and 0 for other characters.
+
+<<isupper_l>> is like <<isupper>> 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
-<<isupper>> returns non-zero if <[c]> is a uppercase letter (A-Z).
+<<isupper>>, <<isupper_l>> return non-zero if <[c]> is an uppercase letter.
PORTABILITY
<<isupper>> is ANSI C.
+<<isupper_l>> 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
-<<isupper_l>>---uppercase character predicate
-
-INDEX
-isupper_l
-
-ANSI_SYNOPSIS
-#include <ctype.h>
-int isupper_l(int <[c]>, locale_t <[locale]>);
-
-DESCRIPTION
-<<isupper_l>> is a macro which classifies ASCII integer values by table
-lookup in locale <[locale]>. It is a predicate returning non-zero for
-uppercase letters (<<A>>--<<Z>>), and 0 for other characters. It is
-defined only when <<isascii>>(<[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
-<<isupper_l>> returns non-zero if <[c]> is a uppercase letter (A-Z).
-
-PORTABILITY
-<<isupper_l>> is POSIX-1.2008.
-
-No supporting OS subroutines are required.
-*/
#include <_ansi.h>
#include <ctype.h>
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
- <<iswalnum>>---alphanumeric wide character test
+ <<iswalnum>>, <<iswalnum_l>>---alphanumeric wide character test
INDEX
iswalnum
+INDEX
+ iswalnum_l
+
ANSI_SYNOPSIS
#include <wctype.h>
int iswalnum(wint_t <[c]>);
+ #include <wctype.h>
+ int iswalnum_l(wint_t <[c]>, locale_t <[locale]>);
+
TRAD_SYNOPSIS
#include <wctype.h>
int iswalnum(<[c]>)
@@ -18,11 +24,17 @@ DESCRIPTION
<<iswalnum>> is a function which classifies wide-character values that
are alphanumeric.
+<<iswalnum_l>> is like <<iswalnum>> 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
-<<iswalnum>> returns non-zero if <[c]> is a alphanumeric wide character.
+<<iswalnum>>, <<iswalnum_l>> return non-zero if <[c]> is a alphanumeric
+wide character.
PORTABILITY
<<iswalnum>> is C99.
+<<iswalnum_l>> 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
- <<iswalnum_l>>---alphanumeric wide character test
-
-INDEX
- iswalnum_l
-
-ANSI_SYNOPSIS
- #include <wctype.h>
- int iswalnum_l(wint_t <[c]>, locale_t <[locale]>);
-
-DESCRIPTION
-<<iswalnum_l>> 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
-<<iswalnum_l>> returns non-zero if <[c]> is a alphanumeric wide character.
-
-PORTABILITY
-<<iswalnum_l>> is POSIX-1.2008.
-
-No supporting OS subroutines are required.
-*/
#include <_ansi.h>
#include <wctype.h>
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
- <<iswalpha>>---alphabetic wide character test
+ <<iswalpha>>, <<iswalpha_l>>---alphabetic wide character test
INDEX
iswalpha
+INDEX
+ iswalpha_l
+
ANSI_SYNOPSIS
#include <wctype.h>
int iswalpha(wint_t <[c]>);
+ #include <wctype.h>
+ int iswalpha_l(wint_t <[c]>, locale_t <[locale]>);
+
TRAD_SYNOPSIS
#include <wctype.h>
int iswalpha(<[c]>)
@@ -47,11 +53,17 @@ DESCRIPTION
<<iswalpha>> is a function which classifies wide-character values that
are alphabetic.
+<<iswalpha_l>> is like <<iswalpha>> 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
-<<iswalpha>> returns non-zero if <[c]> is an alphabetic wide character.
+<<iswalpha>>, <<iswalpha_l>> return non-zero if <[c]> is an alphabetic
+wide character.
PORTABILITY
<<iswalpha>> is C99.
+<<iswalpha_l>> 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
- <<iswalpha_l>>---alphabetic wide character test
-
-INDEX
- iswalpha_l
-
-ANSI_SYNOPSIS
- #include <wctype.h>
- int iswalpha_l(wint_t <[c]>, locale_t <[locale]>);
-
-DESCRIPTION
-<<iswalpha_l>> 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
-<<iswalpha_l>> returns non-zero if <[c]> is an alphabetic wide character.
-
-PORTABILITY
-<<iswalpha_l>> is POSIX-1.2008.
-
-No supporting OS subroutines are required.
-*/
#include <_ansi.h>
#include <wctype.h>
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
- <<iswblank>>---blank wide character test
+ <<iswblank>>, <<iswblank_l>>---blank wide character test
INDEX
iswblank
+INDEX
+ iswblank_l
+
ANSI_SYNOPSIS
#include <wctype.h>
int iswblank(wint_t <[c]>);
+ #include <wctype.h>
+ int iswblank_l(wint_t <[c]>, locale_t <[locale]>);
+
TRAD_SYNOPSIS
#include <wctype.h>
int iswblank(<[c]>)
@@ -47,11 +53,16 @@ DESCRIPTION
<<iswblank>> is a function which classifies wide-character values that
are categorized as blank.
+<<iswblank_l>> is like <<iswblank>> 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
-<<iswblank>> returns non-zero if <[c]> is a blank wide character.
+<<iswblank>>, <<iswblank_l>> return non-zero if <[c]> is a blank wide character.
PORTABILITY
<<iswblank>> is C99.
+<<iswblank_l>> 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
- <<iswblank_l>>---blank wide character test
-
-INDEX
- iswblank_l
-
-ANSI_SYNOPSIS
- #include <wctype.h>
- int iswblank_l(wint_t <[c]>, locale_t <[locale]>);
-
-DESCRIPTION
-<<iswblank_l>> 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
-<<iswblank_l>> returns non-zero if <[c]> is a blank wide character.
-
-PORTABILITY
-<<iswblank_l>> is POSIX-1.2008.
-
-No supporting OS subroutines are required.
-*/
#include <_ansi.h>
#include <wctype.h>
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
- <<iswcntrl>>---control wide character test
+ <<iswcntrl>>, <<iswcntrl_l>>---control wide character test
INDEX
iswcntrl
+INDEX
+ iswcntrl_l
+
ANSI_SYNOPSIS
#include <wctype.h>
int iswcntrl(wint_t <[c]>);
+ #include <wctype.h>
+ int iswcntrl_l(wint_t <[c]>, locale_t <[locale]>);
+
TRAD_SYNOPSIS
#include <wctype.h>
int iswcntrl(<[c]>)
@@ -47,11 +53,16 @@ DESCRIPTION
<<iswcntrl>> is a function which classifies wide-character values that
are categorized as control characters.
+<<iswcntrl_l>> is like <<iswcntrl>> 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
-<<iswcntrl>> returns non-zero if <[c]> is a control wide character.
+<<iswcntrl>>, <<iswcntrl_l>> return non-zero if <[c]> is a control wide character.
PORTABILITY
<<iswcntrl>> is C99.
+<<iswcntrl_l>> 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
- <<iswcntrl_l>>---control wide character test
-
-INDEX
- iswcntrl_l
-
-ANSI_SYNOPSIS
- #include <wctype.h>
- int iswcntrl_l(wint_t <[c]>, locale_t <[locale]>);
-
-DESCRIPTION
-<<iswcntrl_l>> 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
-<<iswcntrl_l>> returns non-zero if <[c]> is a control wide character.
-
-PORTABILITY
-<<iswcntrl_l>> is POSIX-1.2008.
-
-No supporting OS subroutines are required.
-*/
#include <_ansi.h>
#include <wctype.h>
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
- <<iswctype>>---extensible wide-character test
+ <<iswctype>>, <<iswctype_l>>---extensible wide-character test
INDEX
iswctype
+INDEX
+ iswctype_l
+
ANSI_SYNOPSIS
#include <wctype.h>
int iswctype(wint_t <[c]>, wctype_t <[desc]>);
+ #include <wctype.h>
+ int iswctype_l(wint_t <[c]>, wctype_t <[desc]>, locale_t <[locale]>);
+
TRAD_SYNOPSIS
#include <wctype.h>
int iswctype(<[c]>, <[desc]>)
@@ -19,12 +25,17 @@ DESCRIPTION
<<iswctype>> is a function which classifies wide-character values using the
wide-character test specified by <[desc]>.
+<<iswctype_l>> is like <<iswctype>> 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
-<<iswctype>> returns non-zero if and only if <[c]> matches the test specified by <[desc]>.
-If <[desc]> is unknown, zero is returned.
+<<iswctype>>, <<iswctype_l>> return non-zero if and only if <[c]> matches
+the test specified by <[desc]>. If <[desc]> is unknown, zero is returned.
PORTABILITY
<<iswctype>> is C99.
+<<iswctype_l>> 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
- <<iswctype_l>>---extensible wide-character test
-
-INDEX
- iswctype_l
-
-ANSI_SYNOPSIS
- #include <wctype.h>
- int iswctype_l(wint_t <[c]>, wctype_t <[desc]>, locale_t <[locale]>);
-
-DESCRIPTION
-<<iswctype_l>> 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
-<<iswctype_l>> returns non-zero if and only if <[c]> matches the test specified by <[desc]>.
-If <[desc]> is unknown, zero is returned.
-
-PORTABILITY
-<<iswctype_l>> is POSIX-1.2008.
-
-No supporting OS subroutines are required.
-*/
#include <_ansi.h>
#include <wctype.h>
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
- <<iswdigit>>---decimal digit wide character test
+ <<iswdigit>>, <<iswdigit_l>>---decimal digit wide character test
INDEX
iswdigit
+INDEX
+ iswdigit_l
+
ANSI_SYNOPSIS
#include <wctype.h>
int iswdigit(wint_t <[c]>);
+ #include <wctype.h>
+ int iswdigit_l(wint_t <[c]>, locale_t <[locale]>);
+
TRAD_SYNOPSIS
#include <wctype.h>
int iswdigit(<[c]>)
@@ -18,11 +24,16 @@ DESCRIPTION
<<iswdigit>> is a function which classifies wide-character values that
are decimal digits.
+<<iswdigit_l>> is like <<iswdigit>> 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
-<<iswdigit>> returns non-zero if <[c]> is a decimal digit wide character.
+<<iswdigit>>, <<iswdigit_l>> return non-zero if <[c]> is a decimal digit wide character.
PORTABILITY
<<iswdigit>> is C99.
+<<iswdigit_l>> 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
- <<iswdigit_l>>---decimal digit wide character test
-
-INDEX
- iswdigit_l
-
-ANSI_SYNOPSIS
- #include <wctype.h>
- int iswdigit_l(wint_t <[c]>, locale_t <[locale]>);
-
-DESCRIPTION
-<<iswdigit_l>> 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
-<<iswdigit_l>> returns non-zero if <[c]> is a decimal digit wide character.
-
-PORTABILITY
-<<iswdigit_l>> is POSIX-1.2008.
-
-No supporting OS subroutines are required.
-*/
#include <_ansi.h>
#include <wctype.h>
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
- <<iswgraph>>---graphic wide character test
+ <<iswgraph>>, <<iswgraph_l>>---graphic wide character test
INDEX
iswgraph
+INDEX
+ iswgraph_l
+
ANSI_SYNOPSIS
#include <wctype.h>
int iswgraph(wint_t <[c]>);
+ #include <wctype.h>
+ int iswgraph_l(wint_t <[c]>, locale_t <[locale]>);
+
TRAD_SYNOPSIS
#include <wctype.h>
int iswgraph(<[c]>)
@@ -47,11 +53,16 @@ DESCRIPTION
<<iswgraph>> is a function which classifies wide-character values that
are graphic.
+<<iswgraph_l>> is like <<iswgraph>> 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
-<<iswgraph>> returns non-zero if <[c]> is a graphic wide character.
+<<iswgraph>>, <<iswgraph_l>> return non-zero if <[c]> is a graphic wide character.
PORTABILITY
<<iswgraph>> is C99.
+<<iswgraph_l>> 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
- <<iswgraph_l>>---graphic wide character test
-
-INDEX
- iswgraph_l
-
-ANSI_SYNOPSIS
- #include <wctype.h>
- int iswgraph_l(wint_t <[c]>, locale_t <[locale]>);
-
-DESCRIPTION
-<<iswgraph_l>> 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
-<<iswgraph_l>> returns non-zero if <[c]> is a graphic wide character.
-
-PORTABILITY
-<<iswgraph_l>> is POSIX-1.2008.
-
-No supporting OS subroutines are required.
-*/
#include <_ansi.h>
#include <wctype.h>
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
- <<iswlower>>---lowercase wide character test
+ <<iswlower>>, <<iswlower_l>>---lowercase wide character test
INDEX
iswlower
+INDEX
+ iswlower_l
+
ANSI_SYNOPSIS
#include <wctype.h>
int iswlower(wint_t <[c]>);
+ #include <wctype.h>
+ int iswlower_l(wint_t <[c]>, locale_t <[locale]>);
+
TRAD_SYNOPSIS
#include <wctype.h>
int iswlower(<[c]>)
@@ -19,11 +24,16 @@ DESCRIPTION
<<iswlower>> is a function which classifies wide-character values that
have uppercase translations.
+<<iswlower_l>> is like <<iswlower>> 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
-<<iswlower>> returns non-zero if <[c]> is a lowercase wide character.
+<<iswlower>>, <<iswlower_l>> return non-zero if <[c]> is a lowercase wide character.
PORTABILITY
<<iswlower>> is C99.
+<<iswlower_l>> 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
- <<iswlower_l>>---lowercase wide character test
-
-INDEX
- iswlower_l
-
-ANSI_SYNOPSIS
- #include <wctype.h>
- int iswlower_l(wint_t <[c]>, locale_t <[locale]>);
-
-DESCRIPTION
-<<iswlower_l>> 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
-<<iswlower_l>> returns non-zero if <[c]> is a lowercase wide character.
-
-PORTABILITY
-<<iswlower_l>> is POSIX-1.2008.
-
-No supporting OS subroutines are required.
-*/
#include <_ansi.h>
#include <wctype.h>
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
- <<iswprint>>---printable wide character test
+ <<iswprint>>, <<iswprint_l>>---printable wide character test
INDEX
iswprint
+INDEX
+ iswprint_l
+
ANSI_SYNOPSIS
#include <wctype.h>
int iswprint(wint_t <[c]>);
+ #include <wctype.h>
+ int iswprint_l(wint_t <[c]>, locale_t <[locale]>);
+
TRAD_SYNOPSIS
#include <wctype.h>
int iswprint(<[c]>)
@@ -47,11 +53,16 @@ DESCRIPTION
<<iswprint>> is a function which classifies wide-character values that
are printable.
+<<iswprint_l>> is like <<iswprint>> 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
-<<iswprint>> returns non-zero if <[c]> is a printable wide character.
+<<iswprint>>, <<iswprint_l>> return non-zero if <[c]> is a printable wide character.
PORTABILITY
<<iswprint>> is C99.
+<<iswprint_l>> 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
- <<iswprint_l>>---printable wide character test
-
-INDEX
- iswprint_l
-
-ANSI_SYNOPSIS
- #include <wctype.h>
- int iswprint_l(wint_t <[c]>, locale_t <[locale]>);
-
-DESCRIPTION
-<<iswprint_l>> 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
-<<iswprint_l>> returns non-zero if <[c]> is a printable wide character.
-
-PORTABILITY
-<<iswprint_l>> is POSIX-1.2008.
-
-No supporting OS subroutines are required.
-*/
#include <_ansi.h>
#include <wctype.h>
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
- <<iswpunct>>---punctuation wide character test
+ <<iswpunct>>, <<iswpunct_l>>---punctuation wide character test
INDEX
iswpunct
+INDEX
+ iswpunct_l
+
ANSI_SYNOPSIS
#include <wctype.h>
int iswpunct(wint_t <[c]>);
+ #include <wctype.h>
+ int iswpunct_l(wint_t <[c]>, locale_t <[locale]>);
+
TRAD_SYNOPSIS
#include <wctype.h>
int iswpunct(<[c]>)
@@ -47,11 +53,16 @@ DESCRIPTION
<<iswpunct>> is a function which classifies wide-character values that
are punctuation.
+<<iswpunct_l>> is like <<iswpunct>> 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
-<<iswpunct>> returns non-zero if <[c]> is a punctuation wide character.
+<<iswpunct>>, <<iswpunct_l>> return non-zero if <[c]> is a punctuation wide character.
PORTABILITY
<<iswpunct>> is C99.
+<<iswpunct_l>> 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
- <<iswpunct_l>>---punctuation wide character test
-
-INDEX
- iswpunct_l
-
-ANSI_SYNOPSIS
- #include <wctype.h>
- int iswpunct_l(wint_t <[c]>, locale_t <[locale]>);
-
-DESCRIPTION
-<<iswpunct_l>> 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
-<<iswpunct_l>> returns non-zero if <[c]> is a punctuation wide character.
-
-PORTABILITY
-<<iswpunct_l>> is POSIX-1.2008.
-
-No supporting OS subroutines are required.
-*/
#include <_ansi.h>
#include <wctype.h>
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
- <<iswspace>>---whitespace wide character test
+ <<iswspace>>, <<iswspace_l>>---whitespace wide character test
INDEX
iswspace
+INDEX
+ iswspace_l
+
ANSI_SYNOPSIS
#include <wctype.h>
int iswspace(wint_t <[c]>);
+ #include <wctype.h>
+ int iswspace_l(wint_t <[c]>, locale_t <[locale]>);
+
TRAD_SYNOPSIS
#include <wctype.h>
int iswspace(<[c]>)
@@ -47,11 +53,16 @@ DESCRIPTION
<<iswspace>> is a function which classifies wide-character values that
are categorized as whitespace.
+<<iswspace_l>> is like <<iswspace>> 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
-<<iswspace>> returns non-zero if <[c]> is a whitespace wide character.
+<<iswspace>>, <<iswspace_l>> return non-zero if <[c]> is a whitespace wide character.
PORTABILITY
<<iswspace>> is C99.
+<<iswspace_l>> 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
- <<iswspace_l>>---whitespace wide character test
-
-INDEX
- iswspace_l
-
-ANSI_SYNOPSIS
- #include <wctype.h>
- int iswspace_l(wint_t <[c]>, locale_t <[locale]>);
-
-DESCRIPTION
-<<iswspace_l>> 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
-<<iswspace_l>> returns non-zero if <[c]> is a whitespace wide character.
-
-PORTABILITY
-<<iswspace_l>> is POSIX-1.2008.
-
-No supporting OS subroutines are required.
-*/
#include <_ansi.h>
#include <wctype.h>
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
- <<iswupper>>---uppercase wide character test
+ <<iswupper>>, <<iswupper_l>>---uppercase wide character test
INDEX
iswupper
+INDEX
+ iswupper_l
+
ANSI_SYNOPSIS
#include <wctype.h>
int iswupper(wint_t <[c]>);
+ #include <wctype.h>
+ int iswupper_l(wint_t <[c]>, locale_t <[locale]>);
+
TRAD_SYNOPSIS
#include <wctype.h>
int iswupper(<[c]>)
@@ -19,11 +24,16 @@ DESCRIPTION
<<iswupper>> is a function which classifies wide-character values that
have uppercase translations.
+<<iswupper_l>> is like <<iswupper>> 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
-<<iswupper>> returns non-zero if <[c]> is a uppercase wide character.
+<<iswupper>>, <<iswupper_l>> return non-zero if <[c]> is a uppercase wide character.
PORTABILITY
<<iswupper>> is C99.
+<<iswupper_l>> 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
- <<iswupper_l>>---uppercase wide character test
-
-INDEX
- iswupper_l
-
-ANSI_SYNOPSIS
- #include <wctype.h>
- int iswupper_l(wint_t <[c]>, locale_t <[locale]>);
-
-DESCRIPTION
-<<iswupper_l>> 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
-<<iswupper_l>> returns non-zero if <[c]> is a uppercase wide character.
-
-PORTABILITY
-<<iswupper_l>> is POSIX-1.2008.
-
-No supporting OS subroutines are required.
-*/
#include <_ansi.h>
#include <wctype.h>
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
- <<iswxdigit>>---hexadecimal digit wide character test
+ <<iswxdigit>>, <<iswxdigit_l>>---hexadecimal digit wide character test
INDEX
iswxdigit
+INDEX
+ iswxdigit_l
+
ANSI_SYNOPSIS
#include <wctype.h>
int iswxdigit(wint_t <[c]>);
+ #include <wctype.h>
+ int iswxdigit_l(wint_t <[c]>, locale_t <[locale]>);
+
TRAD_SYNOPSIS
#include <wctype.h>
int iswxdigit(<[c]>)
@@ -18,11 +24,16 @@ DESCRIPTION
<<iswxdigit>> is a function which classifies wide character values that
are hexadecimal digits.
+<<iswxdigit_l>> is like <<iswxdigit>> 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
-<<iswxdigit>> returns non-zero if <[c]> is a hexadecimal digit wide character.
+<<iswxdigit>>, <<iswxdigit_l>> return non-zero if <[c]> is a hexadecimal digit wide character.
PORTABILITY
<<iswxdigit>> is C99.
+<<iswxdigit_l>> 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
- <<iswxdigit_l>>---hexadecimal digit wide character test
-
-INDEX
- iswxdigit_l
-
-ANSI_SYNOPSIS
- #include <wctype.h>
- int iswxdigit_l(wint_t <[c]>, locale_t <[locale]>);
-
-DESCRIPTION
-<<iswxdigit_l>> 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
-<<iswxdigit_l>> returns non-zero if <[c]> is a hexadecimal digit wide character.
-
-PORTABILITY
-<<iswxdigit_l>> is POSIX-1.2008.
-
-No supporting OS subroutines are required.
-*/
#include <_ansi.h>
#include <wctype.h>
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
-<<isxdigit>>---hexadecimal digit predicate
+ <<isxdigit>>, <<isxdigit_l>>---hexadecimal digit predicate
+
+INDEX
+ isxdigit
INDEX
-isxdigit
+ isxdigit_l
ANSI_SYNOPSIS
-#include <ctype.h>
-int isxdigit(int <[c]>);
+ #include <ctype.h>
+ int isxdigit(int <[c]>);
+
+ #include <ctype.h>
+ int isxdigit_l(int <[c]>, locale_t <[locale]>);
TRAD_SYNOPSIS
-#include <ctype.h>
-int isxdigit(int <[c]>);
+ #include <ctype.h>
+ int isxdigit(int <[c]>);
DESCRIPTION
-<<isxdigit>> is a macro which classifies ASCII integer values by table
+<<isxdigit>> 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.
+<<isxdigit_l>> is like <<isxdigit>> 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
-<<isxdigit>> returns non-zero if <[c]> is a hexadecimal digit
+<<isxdigit>>, <<isxdigit_l>> return non-zero if <[c]> is a hexadecimal digit
(<<0>>--<<9>>, <<a>>--<<f>>, or <<A>>--<<F>>).
PORTABILITY
<<isxdigit>> is ANSI C.
+<<isxdigit_l>> 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
-<<isxdigit_l>>---hexadecimal digit predicate
-
-INDEX
-isxdigit_l
-
-ANSI_SYNOPSIS
-#include <ctype.h>
-int isxdigit_l(int <[c]>, locale_t <[locale]>);
-
-DESCRIPTION
-<<isxdigit_l>> 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
-<<isxdigit_l>> returns non-zero if <[c]> is a hexadecimal digit
-(<<0>>--<<9>>, <<a>>--<<f>>, or <<A>>--<<F>>).
-
-PORTABILITY
-<<isxdigit_l>> is POSIX-1.2008.
-
-No supporting OS subroutines are required.
-*/
#include <_ansi.h>
#include <ctype.h>
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
- <<toascii>>---force integers to ASCII range
+ <<toascii>>, <<toascii_l>>---force integers to ASCII range
INDEX
toascii
+INDEX
+ toascii_l
+
ANSI_SYNOPSIS
#include <ctype.h>
int toascii(int <[c]>);
+ #include <ctype.h>
+ int toascii_l(int <[c]>, locale_t <[locale]>);
+
TRAD_SYNOPSIS
#include <ctype.h>
int toascii(<[c]>);
@@ -17,14 +23,20 @@ TRAD_SYNOPSIS
DESCRIPTION
<<toascii>> is a macro which coerces integers to the ASCII range (0--127) by zeroing any higher-order bits.
+<<toascii_l>> is like <<toascii>> 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
-<<toascii>> returns integers between 0 and 127.
+<<toascii>>, <<toascii_l>> return integers between 0 and 127.
PORTABILITY
-<<toascii>> is not ANSI C.
+<<toascii>> is X/Open, BSD and POSIX-1.2001, but marked obsolete in
+POSIX-1.2008.
+<<toascii_l>> 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
- <<toascii_l>>---force integers to ASCII range
-
-INDEX
- toascii_l
-
-ANSI_SYNOPSIS
- #include <ctype.h>
- int toascii_l(int <[c]>, locale_t <[locale]>);
-
-DESCRIPTION
-<<toascii_l>> 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
-<<toascii_l>> returns integers between 0 and 127.
-
-PORTABILITY
-<<toascii_l>> is a GNU extension.
-
-No supporting OS subroutines are required.
-*/
-
#include <_ansi.h>
#include <ctype.h>
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
- <<tolower>>---translate characters to lowercase
+ <<tolower>>, <<tolower_l>>---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 <ctype.h>
+ int tolower_l(int <[c]>, locale_t <[locale]>);
+
TRAD_SYNOPSIS
#include <ctype.h>
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 <<EOF>> to <<255>>.
+<<tolower_l>> is like <<tolower>> 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 <<tolower>>, but should
only be used when <[c]> is known to be an uppercase character (<<A>>--<<Z>>).
RETURNS
-<<tolower>> returns the lowercase equivalent of <[c]> when it is a
-character between <<A>> and <<Z>>, and <[c]> otherwise.
+<<tolower>>, <<tolower_l>> 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 <<A>> and <<Z>>. If <[c]> is not one of these
characters, the behaviour of <<_tolower>> is undefined.
PORTABILITY
-<<tolower>> is ANSI C. <<_tolower>> is not recommended for portable
-programs.
+<<tolower>> is ANSI C. <<_tolower>> is not recommended for portable programs.
+<<tolower_l>> 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
- <<tolower_l>>---translate characters to lowercase
-
-INDEX
- tolower_l
-
-ANSI_SYNOPSIS
- #include <ctype.h>
- int tolower_l(int <[c]>, locale_t <[locale]>);
-
-DESCRIPTION
-<<tolower_l>> 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 <<EOF>> to <<255>>.
-
-if <[locale]> is LC_GLOBAL_LOCALE or not a valid locale object, the behaviour
-is undefined.
-
-RETURNS
-<<tolower_l>> returns the lowercase equivalent of <[c]> when it is a
-character between <<A>> and <<Z>>, and <[c]> otherwise.
-
-PORTABILITY
-<<tolower_l>> is POSIX-1.2008.
-programs.
-
-No supporting OS subroutines are required.
-*/
-
#include <_ansi.h>
#include <ctype.h>
#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
- <<toupper>>---translate characters to uppercase
+ <<toupper>>, <<toupper_l>>---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 <ctype.h>
+ int toupper_l(int <[c]>, locale_t <[locale]>);
+
TRAD_SYNOPSIS
#include <ctype.h>
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 <<EOF>> to <<255>>.
+<<toupper_l>> is like <<toupper>> 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 <<toupper>>, but should
only be used when <[c]> is known to be a lowercase character (<<a>>--<<z>>).
RETURNS
-<<toupper>> returns the uppercase equivalent of <[c]> when it is a
-character between <<a>> and <<z>>, and <[c]> otherwise.
+<<toupper>>, <<toupper_l>> 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 <<a>> and <<z>>. If <[c]> is not one of these
@@ -39,6 +50,7 @@ characters, the behaviour of <<_toupper>> is undefined.
PORTABILITY
<<toupper>> is ANSI C. <<_toupper>> is not recommended for portable programs.
+<<toupper_l>> 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
- <<toupper_l>>---translate characters to uppercase
-
-INDEX
- toupper_l
-
-ANSI_SYNOPSIS
- #include <ctype.h>
- int toupper_l(int <[c]>, locale_t <[locale]>);
-
-DESCRIPTION
-<<toupper_l>> 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 <<EOF>> to <<255>>.
-
-if <[locale]> is LC_GLOBAL_LOCALE or not a valid locale object, the behaviour
-is undefined.
-
-RETURNS
-<<toupper_l>> returns the uppercase equivalent of <[c]> when it is a
-character between <<a>> and <<z>>, and <[c]> otherwise.
-
-PORTABILITY
-<<toupper_l>> is POSIX-1.2008.
-
-No supporting OS subroutines are required.
-*/
-
#include <_ansi.h>
#include <ctype.h>
#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
- <<towctrans>>---extensible wide-character translation
+ <<towctrans>>, <<towctrans_l>>---extensible wide-character translation
INDEX
towctrans
+INDEX
+ towctrans_l
+
ANSI_SYNOPSIS
#include <wctype.h>
wint_t towctrans(wint_t <[c]>, wctrans_t <[w]>);
+ #include <wctype.h>
+ wint_t towctrans_l(wint_t <[c]>, wctrans_t <[w]>, locale_t <[locale]>);
+
TRAD_SYNOPSIS
#include <wctype.h>
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.
+<<towctrans_l>> is like <<towctrans>> 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
-<<towctrans>> 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, <<errno>> is set <<EINVAL>>.
+<<towctrans>>, <<towctrans_l>> 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, <<errno>> is
+set to <<EINVAL>>.
PORTABILITY
<<towctrans>> is C99.
+<<towctrans_l>> 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
- <<towctrans_l>>---extensible wide-character translation
-
-INDEX
- towctrans_l
-
-ANSI_SYNOPSIS
- #include <wctype.h>
- wint_t towctrans_l(wint_t <[c]>, wctrans_t <[w]>, locale_t <[locale]>);
-
-DESCRIPTION
-<<towctrans_l>> 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
-<<towctrans_l>> 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, <<errno>> is set <<EINVAL>>.
-
-PORTABILITY
-<<towctrans_l>> is POSIX-1.2008.
-
-No supporting OS subroutines are required.
-*/
#include <_ansi.h>
#include <wctype.h>
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
- <<towlower>>---translate wide characters to lowercase
+ <<towlower>>, <<towlower_l>>---translate wide characters to lowercase
INDEX
towlower
+INDEX
+ towlower_l
+
ANSI_SYNOPSIS
#include <wctype.h>
wint_t towlower(wint_t <[c]>);
+ #include <wctype.h>
+ wint_t towlower_l(wint_t <[c]>, locale_t <[locale]>);
+
TRAD_SYNOPSIS
#include <wctype.h>
wint_t towlower(<[c]>)
@@ -48,12 +54,17 @@ DESCRIPTION
<<towlower>> is a function which converts uppercase wide characters to
lowercase, leaving all other characters unchanged.
+<<towlower_l>> is like <<towlower>> 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
-<<towlower>> returns the lowercase equivalent of <[c]> when it is a
+<<towlower>>, <<towlower_l>> return the lowercase equivalent of <[c]> when it is a
uppercase wide character; otherwise, it returns the input character.
PORTABILITY
<<towlower>> is C99.
+<<towlower_l>> 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
- <<towlower_l>>---translate wide characters to lowercase
-
-INDEX
- towlower_l
-
-ANSI_SYNOPSIS
- #include <wctype.h>
- wint_t towlower_l(wint_t <[c]>, local_t <[locale]>);
-
-DESCRIPTION
-<<towlower_l>> 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
-<<towlower_l>> returns the lowercase equivalent of <[c]> when it is a
-uppercase wide character; otherwise, it returns the input character.
-
-PORTABILITY
-<<towlower_l>> is POSIX-1.2008.
-
-No supporting OS subroutines are required.
-*/
-
#include <_ansi.h>
#include <newlib.h>
#include <wctype.h>
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
- <<towupper>>---translate wide characters to uppercase
+ <<towupper>>, <<towupper_l>>---translate wide characters to uppercase
INDEX
towupper
+INDEX
+ towupper_l
+
ANSI_SYNOPSIS
#include <wctype.h>
wint_t towupper(wint_t <[c]>);
+ #include <wctype.h>
+ wint_t towupper_l(wint_t <[c]>, locale_t <[locale]>);
+
TRAD_SYNOPSIS
#include <wctype.h>
wint_t towupper(<[c]>)
@@ -48,12 +54,17 @@ DESCRIPTION
<<towupper>> is a function which converts lowercase wide characters to
uppercase, leaving all other characters unchanged.
+<<towupper_l>> is like <<towupper>> 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
-<<towupper>> returns the uppercase equivalent of <[c]> when it is a
+<<towupper>>, <<towupper_l>> return the uppercase equivalent of <[c]> when it is a
lowercase wide character, otherwise, it returns the input character.
PORTABILITY
<<towupper>> is C99.
+<<towupper_l>> 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
- <<towupper_l>>---translate wide characters to uppercase
-
-INDEX
- towupper_l
-
-ANSI_SYNOPSIS
- #include <wctype.h>
- wint_t towupper_l(wint_t <[c]>, locale_t <[locale]>);
-
-DESCRIPTION
-<<towupper_l>> 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
-<<towupper_l>> returns the uppercase equivalent of <[c]> when it is a
-lowercase wide character, otherwise, it returns the input character.
-
-PORTABILITY
-<<towupper_l>> is POSIX-1.2008.
-
-No supporting OS subroutines are required.
-*/
-
#include <_ansi.h>
#include <wctype.h>
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
- <<wctrans>>---get wide-character translation type
+ <<wctrans>>, <<wctrans_l>>---get wide-character translation type
INDEX
wctrans
+INDEX
+ wctrans_l
+
ANSI_SYNOPSIS
#include <wctype.h>
wctrans_t wctrans(const char *<[c]>);
+ #include <wctype.h>
+ wctrans_t wctrans_l(const char *<[c]>, locale_t <[locale]>);
+
TRAD_SYNOPSIS
#include <wctype.h>
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".
+<<wctrans_l>> is like <<wctrans>> 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
-<<wctrans>> returns 0 and sets <<errno>> to <<EINVAL>> if the
+<<wctrans>>, <<wctrans_l>> return 0 and sets <<errno>> to <<EINVAL>> if the
given name is invalid. Otherwise, it returns a valid non-zero wctrans_t
value.
PORTABILITY
<<wctrans>> is C99.
+<<wctrans_l>> 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
- <<wctrans_l>>---get wide-character translation type
-
-INDEX
- wctrans_l
-
-ANSI_SYNOPSIS
- #include <wctype.h>
- wctrans_t wctrans_l(const char *<[c]>, locale_t <[locale]>);
-
-DESCRIPTION
-<<wctrans_l>> 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
-<<wctrans_l>> returns 0 and sets <<errno>> to <<EINVAL>> if the
-given name is invalid. Otherwise, it returns a valid non-zero wctrans_t
-value.
-
-PORTABILITY
-<<wctrans_l>> is POSIX-1.2008.
-
-No supporting OS subroutines are required.
-*/
#include <_ansi.h>
#include <wctype.h>
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
- <<wctype>>---get wide-character classification type
+ <<wctype>>, <<wctype_l>>---get wide-character classification type
INDEX
wctype
+INDEX
+ wctype_l
+
ANSI_SYNOPSIS
#include <wctype.h>
wctype_t wctype(const char *<[c]>);
+ #include <wctype.h>
+ wctype_t wctype_l(const char *<[c]>, locale_t <[locale]>);
+
TRAD_SYNOPSIS
#include <wctype.h>
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".
+<<wctype_l>> is like <<wctype>> 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
-<<wctype>> returns 0 and sets <<errno>> to <<EINVAL>> if the
+<<wctype>>, <<wctype_l>> return 0 and sets <<errno>> to <<EINVAL>> if the
given name is invalid. Otherwise, it returns a valid non-zero wctype_t
value.
PORTABILITY
<<wctype>> is C99.
+<<wctype_l>> 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
- <<wctype_l>>---get wide-character classification type
-
-INDEX
- wctype_l
-
-ANSI_SYNOPSIS
- #include <wctype_l.h>
- wctype_t wctype_l(const char *<[c]>, locale_t <[locale]>);
-
-DESCRIPTION
-<<wctype_l>> 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
-<<wctype_l>> returns 0 and sets <<errno>> to <<EINVAL>> if the
-given name is invalid. Otherwise, it returns a valid non-zero wctype_t
-value.
-
-PORTABILITY
-<<wctype_l>> is POSIX-1.2008.
-
-No supporting OS subroutines are required.
-*/
#include <_ansi.h>
#include <wctype.h>