From nobody Mon Dec 19 04:55:35 2022 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Nb6pb491fzZj4n; Mon, 19 Dec 2022 04:55:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Nb6pb3myyz4WvX; Mon, 19 Dec 2022 04:55:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1671425735; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4Mwz9JgpNd7HMygjYmz4LGuAcSRd6J+qG70jwyprzzo=; b=V0GGqX4lTyB3EjdBnTs75hwBrXDoAT1O9vOqsBLOInj8riTl/VAcdo+Sv6oV0eeNJheVhf 20Ujbedh93HpwX5qfusvaQwM83ER+k+0LYOQHhdV2Zy+jr6TRRn53VmQlj5lmrTL3T/KAY dB1HOlgmzYoWF99dFW9i+Co8w5XYa92541CSYK8mu4HGEKFJtEQBnnY5F5BLei+u2QbNyL 0fNN1xAt0FHHjP9VJ0O/005j/GvpNER2FueOuBLRbdny/Kdbv/E8traq01nXt/nKd8wrQm B8q3rmhhHJLbSEKMPWwLGI8/PRXZNpvbPbDQ7EYKx0pTXeal8zgZ44Vbb8AHuA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1671425735; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4Mwz9JgpNd7HMygjYmz4LGuAcSRd6J+qG70jwyprzzo=; b=J0EwKfnfl7xgUsfkWryRcCs82tx5lfyMnzq/LBd1GaqyV1d/Z3JRkVu7/HUQTOBf77z70A KgDVUu/bLDMW62e53QpIwOae36bQ2iKRjnfPVtHm8vb2ue7xAjnYoEKboVpYjhjUs8FRar L6toxcdNUZaOTp+Eza8E3mzn8PQlzxjXbH6wZyWKTUkOUOOna2AmS3ghGYOAjgX/d9DTU/ I0iz7O+4U5HXTf+poATVb9PEQmZWoWivCGwEDoaTiqDv8GysgYbSc8bBCsS6kuFUg1z9R+ s8jj1C/GvWz1phTJnVaWIi5e+e5DoygA9JSPatWP8NkEo6QLzE4sjoFev+YtKA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1671425735; a=rsa-sha256; cv=none; b=qnxOezOXJiWSampzyLnhT4sYM2zDcKDW2QkZgf1q5hjNAjttHWdeYqW/YNJD3eUyDN7YET 4kEte662zSach/iaC2k2vOmqVGIZ32ZgpBoB7jwOBIrxSK3EAU9cUCdn/t4BW8F+MQlLKg uTkbMhrJF9pDpYQDNn4fNAxvY5WXmNj8SHd21DoBaR81u1E/p9ZZGbr5XtvS3JWpnP6lv4 VFCoP0ooEeFMAyfpcqfLTDo9l3KSaeBz2zvtTx7XNSFVXTtR1MqEYnha11BJxv3GNz49Yp INPEwOZfEUv9ptaLjZcD3IbU5eLcmXhV0Caqw7sxQE93hbI44SEpLObQXDDavQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Nb6pb2jfWzjKM; Mon, 19 Dec 2022 04:55:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 2BJ4tZW3066085; Mon, 19 Dec 2022 04:55:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 2BJ4tZDT066084; Mon, 19 Dec 2022 04:55:35 GMT (envelope-from git) Date: Mon, 19 Dec 2022 04:55:35 GMT Message-Id: <202212190455.2BJ4tZDT066084@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gordon Bergling Subject: git: 77e4249319c1 - main - xlocale(3): Link man pages List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 77e4249319c1a8331ca47ac8b65c3dc26ee598b4 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by gbe (doc committer): URL: https://cgit.FreeBSD.org/src/commit/?id=77e4249319c1a8331ca47ac8b65c3dc26ee598b4 commit 77e4249319c1a8331ca47ac8b65c3dc26ee598b4 Author: Jose Luis Duran AuthorDate: 2022-12-19 04:54:52 +0000 Commit: Gordon Bergling CommitDate: 2022-12-19 04:54:52 +0000 xlocale(3): Link man pages - provide various missing MLINKS for library functions - update various SEE ALSO section to include the new linked manual pages - add various definitions of new functions like isideogram_l(3) - document COMPATIBILITY for some functions - bump man page dates Reviewed by: gbe, bcr MFC after: 1 week Pull Request: https://github.com/freebsd/freebsd-src/pull/621 Differential Revision: https://reviews.freebsd.org/D37203 --- lib/libc/locale/Makefile.inc | 18 ++++++++++++++-- lib/libc/locale/ctype_l.3 | 49 +++++++++++++++++++------------------------ lib/libc/locale/digittoint.3 | 20 +++++++++++++----- lib/libc/locale/isalnum.3 | 27 +++++++++++++++++------- lib/libc/locale/isalpha.3 | 27 +++++++++++++++++------- lib/libc/locale/isblank.3 | 21 ++++++++++++++----- lib/libc/locale/iscntrl.3 | 19 ++++++++++++----- lib/libc/locale/isdigit.3 | 28 ++++++++++++++++++------- lib/libc/locale/isgraph.3 | 14 ++++++++++--- lib/libc/locale/isideogram.3 | 41 ++++++++++++++++++++++++++++++------ lib/libc/locale/islower.3 | 15 ++++++++++--- lib/libc/locale/isphonogram.3 | 29 +++++++++++++++++++------ lib/libc/locale/isprint.3 | 28 ++++++++++++++++++++----- lib/libc/locale/ispunct.3 | 16 +++++++++++--- lib/libc/locale/isrune.3 | 38 ++++++++++++++++++++++++++++----- lib/libc/locale/isspace.3 | 18 ++++++++++++---- lib/libc/locale/isspecial.3 | 40 +++++++++++++++++++++++++++++------ lib/libc/locale/isupper.3 | 29 ++++++++++++++++++++----- lib/libc/locale/isxdigit.3 | 36 ++++++++++++++++++++++++------- lib/libc/locale/tolower.3 | 29 ++++++++++++++++++++----- lib/libc/locale/toupper.3 | 29 ++++++++++++++++++++----- 21 files changed, 443 insertions(+), 128 deletions(-) diff --git a/lib/libc/locale/Makefile.inc b/lib/libc/locale/Makefile.inc index a8daa1ff284e..017a767ef9dc 100644 --- a/lib/libc/locale/Makefile.inc +++ b/lib/libc/locale/Makefile.inc @@ -52,11 +52,24 @@ MAN+= btowc.3 \ MAN+= big5.5 euc.5 gb18030.5 gb2312.5 gbk.5 mskanji.5 utf8.5 MLINKS+=btowc.3 wctob.3 -MLINKS+=isdigit.3 isnumber.3 +MLINKS+=digittoint.3 digittoint_l.3 +MLINKS+=isalnum.3 isalnum_l.3 +MLINKS+=isalpha.3 isalpha_l.3 +MLINKS+=isblank.3 isblank_l.3 +MLINKS+=iscntrl.3 iscntrl_l.3 +MLINKS+=isdigit.3 isnumber.3 isdigit.3 isdigit_l.3 isdigit.3 isnumber_l.3 MLINKS+=isgraph.3 isgraph_l.3 +MLINKS+=isideogram.3 isideogram_l.3 MLINKS+=islower.3 islower_l.3 +MLINKS+=isphonogram.3 isphonogram_l.3 +MLINKS+=isprint.3 isprint_l.3 MLINKS+=ispunct.3 ispunct_l.3 +MLINKS+=isrune.3 isrune_l.3 MLINKS+=isspace.3 isspace_l.3 +MLINKS+=isspecial.3 isspecial_l.3 +MLINKS+=isupper.3 isupper_l.3 +MLINKS+=tolower.3 tolower_l.3 +MLINKS+=toupper.3 toupper_l.3 MLINKS+=nl_langinfo.3 nl_langinfo_l.3 MLINKS+=iswalnum.3 iswalpha.3 iswalnum.3 iswascii.3 iswalnum.3 iswblank.3 \ iswalnum.3 iswcntrl.3 iswalnum.3 iswdigit.3 iswalnum.3 iswgraph.3 \ @@ -77,7 +90,8 @@ MLINKS+=iswalnum_l.3 iswalpha_l.3 iswalnum_l.3 iswcntrl_l.3 \ iswalnum_l.3 iswphonogram_l.3 iswalnum_l.3 iswrune_l.3 \ iswalnum_l.3 iswspecial_l.3 iswalnum_l.3 nextwctype_l.3 \ iswalnum_l.3 towctrans_l.3 iswalnum_l.3 wctrans_l.3 -MLINKS+=isxdigit.3 ishexnumber.3 +MLINKS+=isxdigit.3 ishexnumber.3 isxdigit.3 isxdigit_l.3 \ + isxdigit.3 ishexnumber_l.3 MLINKS+=localeconv.3 localeconv_l.3 MLINKS+=mbrtowc.3 mbrtoc16.3 mbrtowc.3 mbrtoc32.3 MLINKS+=mbsrtowcs.3 mbsnrtowcs.3 diff --git a/lib/libc/locale/ctype_l.3 b/lib/libc/locale/ctype_l.3 index 7680803667d2..fc5c1c370f76 100644 --- a/lib/libc/locale/ctype_l.3 +++ b/lib/libc/locale/ctype_l.3 @@ -26,14 +26,13 @@ .\" .\" $FreeBSD$ .\" -.Dd March 6, 2012 +.Dd December 19, 2022 .Dt CTYPE_L 3 .Os .Sh NAME .Nm digittoint_l , .Nm isalnum_l , .Nm isalpha_l , -.Nm isascii_l , .Nm isblank_l , .Nm iscntrl_l , .Nm isdigit_l , @@ -64,8 +63,6 @@ .Ft int .Fn isalpha_l "int c" "locale_t loc" .Ft int -.Fn isascii_l "int c" "locale_t loc" -.Ft int .Fn iscntrl_l "int c" "locale_t loc" .Ft int .Fn isdigit_l "int c" "locale_t loc" @@ -110,34 +107,32 @@ specified locale rather than the global or per-thread locale. or as true functions in the C library. See the specific manual pages for more information. .Sh SEE ALSO -.Xr digittoint 3 , -.Xr isalnum 3 , -.Xr isalpha 3 , -.Xr isascii 3 , -.Xr isblank 3 , -.Xr iscntrl 3 , -.Xr isdigit 3 , -.Xr isgraph 3 , -.Xr isideogram 3 , -.Xr islower 3 , -.Xr isphonogram 3 , -.Xr isprint 3 , -.Xr ispunct 3 , -.Xr isrune 3 , -.Xr isspace 3 , -.Xr isspecial 3 , -.Xr isupper 3 , -.Xr isxdigit 3 , -.Xr tolower 3 , -.Xr toupper 3 , -.Xr wctype 3 , -.Xr xlocale 3 +.Xr digittoint_l 3 , +.Xr isalnum_l 3 , +.Xr isalpha_l 3 , +.Xr isblank_l 3 , +.Xr iscntrl_l 3 , +.Xr isdigit_l 3 , +.Xr isgraph_l 3 , +.Xr isideogram_l 3 , +.Xr islower_l 3 , +.Xr isphonogram_l 3 , +.Xr isprint_l 3 , +.Xr ispunct_l 3 , +.Xr isrune_l 3 , +.Xr isspace_l 3 , +.Xr isspecial_l 3 , +.Xr isupper_l 3 , +.Xr isxdigit_l 3 , +.Xr tolower_l 3 , +.Xr toupper_l 3 , +.Xr wctype_l 3 , +.Xr xlocale_l 3 .Sh STANDARDS These functions conform to .St -p1003.1-2008 , except for .Fn digittoint_l , -.Fn isascii_l , .Fn ishexnumber_l , .Fn isideogram_l , .Fn isnumber_l , diff --git a/lib/libc/locale/digittoint.3 b/lib/libc/locale/digittoint.3 index 5caef66461e4..887910ac95b8 100644 --- a/lib/libc/locale/digittoint.3 +++ b/lib/libc/locale/digittoint.3 @@ -28,11 +28,12 @@ .\" @(#)digittoint.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd April 6, 2001 +.Dd December 19, 2022 .Dt DIGITTOINT 3 .Os .Sh NAME -.Nm digittoint +.Nm digittoint , +.Nm digittoint_l .Nd convert a numeric character to its integer value .Sh LIBRARY .Lb libc @@ -45,7 +46,9 @@ .Sh DESCRIPTION The .Fn digittoint -function converts a numeric character to its corresponding integer value. +and +.Fn digittoint_l +functions convert a numeric character to its corresponding integer value. The character can be any decimal digit or hexadecimal digit. With hexadecimal characters, the case of the values does not matter. .Pp @@ -57,12 +60,19 @@ function use the current global or per-thread locale. .Sh RETURN VALUES The .Fn digittoint -function always returns an integer from the range of 0 to 15. +and +.Fn digittoint_l +functions always return an integer from the range of 0 to 15. If the given character was not a digit as defined by -.Xr isxdigit 3 , +.Xr isxdigit 3 +or +.Xr isxdigit_l 3 , the function will return 0. .Sh SEE ALSO .Xr ctype 3 , +.Xr ctype_l 3 , .Xr isdigit 3 , +.Xr isdigit_l 3 , .Xr isxdigit 3 , +.Xr isxdigit_l 3 , .Xr xlocale 3 diff --git a/lib/libc/locale/isalnum.3 b/lib/libc/locale/isalnum.3 index 85e846332352..ca2c510c8fa2 100644 --- a/lib/libc/locale/isalnum.3 +++ b/lib/libc/locale/isalnum.3 @@ -32,11 +32,12 @@ .\" @(#)isalnum.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd April 2, 2022 +.Dd December 19, 2022 .Dt ISALNUM 3 .Os .Sh NAME -.Nm isalnum +.Nm isalnum , +.Nm isalnum_l .Nd alphanumeric character test .Sh LIBRARY .Lb libc @@ -49,10 +50,14 @@ .Sh DESCRIPTION The .Fn isalnum -function tests for any character for which -.Xr isalpha 3 +and +.Fn isalnum_l +functions test for any character for which +.Xr isalpha 3 , +.Xr isalpha_l 3 or -.Xr isdigit 3 +.Xr isdigit 3 , +.Xr isdigit_l 3 is true. The value of the argument must be representable as an .Vt "unsigned char" @@ -85,8 +90,10 @@ function uses the current global or per-thread locale. .Sh RETURN VALUES The .Fn isalnum -function returns zero if the character tests false and -returns non-zero if the character tests true. +and +.Fn isalnum_l +functions return zero if the character tests false and +return non-zero if the character tests true. .Sh COMPATIBILITY The .Bx 4.4 @@ -96,12 +103,18 @@ type in locales with large character sets is considered obsolete and may not be supported in future releases. The .Fn iswalnum +or +.Fn iswalnum_l function should be used instead. .Sh SEE ALSO .Xr ctype 3 , +.Xr ctype_l 3 , .Xr isalpha 3 , +.Xr isalpha_l 3 , .Xr isdigit 3 , +.Xr isdigit_l 3 , .Xr iswalnum 3 , +.Xr iswalnum_l 3 , .Xr xlocale 3 , .Xr ascii 7 .Sh STANDARDS diff --git a/lib/libc/locale/isalpha.3 b/lib/libc/locale/isalpha.3 index 1a7330f3a0d1..d66e813d2986 100644 --- a/lib/libc/locale/isalpha.3 +++ b/lib/libc/locale/isalpha.3 @@ -32,11 +32,12 @@ .\" @(#)isalpha.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd July 17, 2005 +.Dd December 19, 2022 .Dt ISALPHA 3 .Os .Sh NAME -.Nm isalpha +.Nm isalpha , +.Nm isalpha_l .Nd alphabetic character test .Sh LIBRARY .Lb libc @@ -49,10 +50,14 @@ .Sh DESCRIPTION The .Fn isalpha -function tests for any character for which -.Xr isupper 3 +and +.Fn isalpha_l +functions test for any character for which +.Xr isupper 3 , +.Xr isupper_l 3 or -.Xr islower 3 +.Xr islower 3 , +.Xr islower_l 3 is true. The value of the argument must be representable as an .Vt "unsigned char" @@ -83,8 +88,10 @@ function uses the current global or per-thread locale. .Sh RETURN VALUES The .Fn isalpha -function returns zero if the character tests false and -returns non-zero if the character tests true. +and +.Fn isalpha_l +functions return zero if the character tests false and +return non-zero if the character tests true. .Sh COMPATIBILITY The .Bx 4.4 @@ -94,12 +101,18 @@ type in locales with large character sets is considered obsolete and may not be supported in future releases. The .Fn iswalpha +or +.Fn iswalpha_l function should be used instead. .Sh SEE ALSO .Xr ctype 3 , +.Xr ctype_l 3 , .Xr islower 3 , +.Xr islower_l 3 , .Xr isupper 3 , +.Xr isupper_l 3 , .Xr iswalpha 3 , +.Xr iswalpha_l 3 , .Xr xlocale 3 , .Xr ascii 7 .Sh STANDARDS diff --git a/lib/libc/locale/isblank.3 b/lib/libc/locale/isblank.3 index b3e805ae0085..b901a9b9ad95 100644 --- a/lib/libc/locale/isblank.3 +++ b/lib/libc/locale/isblank.3 @@ -28,11 +28,12 @@ .\" @(#)isblank.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd July 17, 2005 +.Dd December 19, 2022 .Dt ISBLANK 3 .Os .Sh NAME -.Nm isblank +.Nm isblank , +.Nm isblank_l .Nd space or tab character test .Sh LIBRARY .Lb libc @@ -45,7 +46,9 @@ .Sh DESCRIPTION The .Fn isblank -function tests for a space or tab character. +and +.Fn isblank_l +functions test for a space or tab character. For any locale, this includes the following standard characters: .Bl -column XXXX .It Do \et Dc Ta Dq " " @@ -53,6 +56,8 @@ For any locale, this includes the following standard characters: .Pp In the "C" locale, a successful .Fn isblank +or +.Fn isblank_l test is limited to these characters only. The value of the argument must be representable as an .Vt "unsigned char" @@ -67,8 +72,10 @@ function uses the current global or per-thread locale. .Sh RETURN VALUES The .Fn isblank -function returns zero if the character tests false and -returns non-zero if the character tests true. +and +.Fn isblank_l +functions return zero if the character tests false and +return non-zero if the character tests true. .Sh COMPATIBILITY The .Bx 4.4 @@ -78,10 +85,14 @@ type in locales with large character sets is considered obsolete and may not be supported in future releases. The .Fn iswblank +or +.Fn iswblank_l function should be used instead. .Sh SEE ALSO .Xr ctype 3 , +.Xr ctype_l 3 , .Xr iswblank 3 , +.Xr iswblank_l 3 , .Xr xlocale 3 , .Xr ascii 7 .Sh STANDARDS diff --git a/lib/libc/locale/iscntrl.3 b/lib/libc/locale/iscntrl.3 index b61563735f74..adfda27fb531 100644 --- a/lib/libc/locale/iscntrl.3 +++ b/lib/libc/locale/iscntrl.3 @@ -32,11 +32,12 @@ .\" @(#)iscntrl.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd April 2, 2022 +.Dd December 19, 2022 .Dt ISCNTRL 3 .Os .Sh NAME -.Nm iscntrl +.Nm iscntrl , +.Nm iscntrl_l .Nd control character test .Sh LIBRARY .Lb libc @@ -49,7 +50,9 @@ .Sh DESCRIPTION The .Fn iscntrl -function tests for any control character. +and +.Fn iscntrl_l +functions test for any control character. The value of the argument must be representable as an .Vt "unsigned char" or the value of @@ -75,8 +78,10 @@ function uses the current global or per-thread locale. .Sh RETURN VALUES The .Fn iscntrl -function returns zero if the character tests false and -returns non-zero if the character tests true. +and +.Fn iscntrl_l +functions return zero if the character tests false and +return non-zero if the character tests true. .Sh COMPATIBILITY The .Bx 4.4 @@ -86,10 +91,14 @@ type in locales with large character sets is considered obsolete and may not be supported in future releases. The .Fn iswcntrl +or +.Fn iswcntrl_l function should be used instead. .Sh SEE ALSO .Xr ctype 3 , +.Xr ctype_l 3 , .Xr iswcntrl 3 , +.Xr iswcntrl_l 3 , .Xr xlocale 3 , .Xr ascii 7 .Sh STANDARDS diff --git a/lib/libc/locale/isdigit.3 b/lib/libc/locale/isdigit.3 index d1a75465e277..c627e58d85d5 100644 --- a/lib/libc/locale/isdigit.3 +++ b/lib/libc/locale/isdigit.3 @@ -32,12 +32,14 @@ .\" @(#)isdigit.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd May 4, 2007 +.Dd December 19, 2022 .Dt ISDIGIT 3 .Os .Sh NAME .Nm isdigit , -.Nm isnumber +.Nm isnumber , +.Nm isdigit_l , +.Nm isnumber_l .Nd decimal-digit character test .Sh LIBRARY .Lb libc @@ -54,7 +56,9 @@ .Sh DESCRIPTION The .Fn isdigit -function tests for a decimal digit character. +and +.Fn isdigit_l +functions test for a decimal digit character. Regardless of locale, this includes the following characters only: .Bl -column \&``0''______ \&``0''______ \&``0''______ \&``0''______ \&``0''______ .It "\&``0''" Ta "``1''" Ta "``2''" Ta "``3''" Ta "``4''" @@ -63,8 +67,12 @@ Regardless of locale, this includes the following characters only: .Pp The .Fn isnumber -function behaves similarly to -.Fn isdigit , +and +.Fn isnumber_l +functions behave similarly to +.Fn isdigit +and +.Fn isdigit_l , but may recognize additional characters, depending on the current locale setting. .Pp @@ -77,9 +85,11 @@ The _l-suffixed versions take an explicit locale argument, whereas the non-suffixed versions use the current global or per-thread locale. .Sh RETURN VALUES The -.Fn isdigit +.Fn isdigit , +.Fn isdigit_l , +.Fn isnumber , and -.Fn isnumber +.Fn isnumber_l functions return zero if the character tests false and return non-zero if the character tests true. .Sh COMPATIBILITY @@ -91,10 +101,14 @@ type in locales with large character sets is considered obsolete and may not be supported in future releases. The .Fn iswdigit +or +.Fn iswdigit_l function should be used instead. .Sh SEE ALSO .Xr ctype 3 , +.Xr ctype_l 3 , .Xr iswdigit 3 , +.Xr iswdigit_l 3 , .Xr multibyte 3 , .Xr xlocale 3 , .Xr ascii 7 diff --git a/lib/libc/locale/isgraph.3 b/lib/libc/locale/isgraph.3 index b3c078cea079..93bbb59139f7 100644 --- a/lib/libc/locale/isgraph.3 +++ b/lib/libc/locale/isgraph.3 @@ -32,11 +32,12 @@ .\" @(#)isgraph.3 8.2 (Berkeley) 12/11/93 .\" $FreeBSD$ .\" -.Dd July 30, 2012 +.Dd December 19, 2022 .Dt ISGRAPH 3 .Os .Sh NAME -.Nm isgraph +.Nm isgraph , +.Nm isgraph_l .Nd printing character test (space character exclusive) .Sh LIBRARY .Lb libc @@ -49,7 +50,9 @@ .Sh DESCRIPTION The .Fn isgraph -function tests for any printing character except space +and +.Fn isgraph_l +functions test for any printing character except space .Pq Ql "\~" and other locale-specific space-like characters. @@ -103,10 +106,15 @@ type in locales with large character sets is considered obsolete and may not be supported in future releases. The .Fn iswgraph +or +.Fn iswgraph_l function should be used instead. .Sh SEE ALSO .Xr ctype 3 , +.Xr ctype_l 3 , .Xr iswgraph 3 , +.Xr iswgraph_l 3 , +.Xr xlocale 3 , .Xr ascii 7 .Sh STANDARDS The diff --git a/lib/libc/locale/isideogram.3 b/lib/libc/locale/isideogram.3 index cbaa625e91df..59b58f541a8d 100644 --- a/lib/libc/locale/isideogram.3 +++ b/lib/libc/locale/isideogram.3 @@ -25,11 +25,12 @@ .\" .\" $FreeBSD$ .\" -.Dd March 30, 2004 +.Dd December 19, 2022 .Dt ISIDEOGRAM 3 .Os .Sh NAME -.Nm isideogram +.Nm isideogram , +.Nm isideogram_l .Nd ideographic character test .Sh LIBRARY .Lb libc @@ -37,19 +38,47 @@ .In ctype.h .Ft int .Fn isideogram "int c" +.Ft int +.Fn isideogram_l "int c" "locale_t loc" .Sh DESCRIPTION The .Fn isideogram -function tests for an ideographic character. +and +.Fn isideogram_l +functions test for an ideographic character. +.Pp +The +.Fn isideogram_l +function takes an explicit locale argument, whereas the +.Fn isideogram +function use the current global or per-thread locale. .Sh RETURN VALUES The .Fn isideogram -function returns zero if the character tests false and -returns non-zero if the character tests true. +and +.Fn isideogram_l +functions return zero if the character tests false and +return non-zero if the character tests true. +.Sh COMPATIBILITY +The +.Bx 4.4 +extension of accepting arguments outside of the range of the +.Vt "unsigned char" +type in locales with large character sets is considered obsolete +and may not be supported in future releases. +The +.Fn iswideogram +or +.Fn iswideogram_l +function should be used instead. .Sh SEE ALSO .Xr ctype 3 , +.Xr ctype_l 3 , .Xr isphonogram 3 , -.Xr iswideogram 3 +.Xr isphonogram_l 3 , +.Xr iswideogram 3 , +.Xr iswideogram_l 3 , +.Xr xlocale 3 .Sh HISTORY The .Fn isideogram diff --git a/lib/libc/locale/islower.3 b/lib/libc/locale/islower.3 index 2097510acb93..0ef171788548 100644 --- a/lib/libc/locale/islower.3 +++ b/lib/libc/locale/islower.3 @@ -32,11 +32,12 @@ .\" @(#)islower.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd April 2, 2022 +.Dd December 19, 2022 .Dt ISLOWER 3 .Os .Sh NAME -.Nm islower +.Nm islower , +.Nm islower_l .Nd lower-case character test .Sh LIBRARY .Lb libc @@ -49,7 +50,9 @@ .Sh DESCRIPTION The .Fn islower -function tests for any lower-case letters. +and +.Fn islower_l +functions test for any lower-case letters. The value of the argument must be representable as an .Vt "unsigned char" or the value of @@ -86,11 +89,17 @@ type in locales with large character sets is considered obsolete and may not be supported in future releases. The .Fn iswlower +or +.Fn iswlower_l function should be used instead. .Sh SEE ALSO .Xr ctype 3 , +.Xr ctype_l 3 , .Xr iswlower 3 , +.Xr iswlower_l 3 , .Xr tolower 3 , +.Xr tolower_l 3 , +.Xr xlocale 3 , .Xr ascii 7 .Sh STANDARDS The diff --git a/lib/libc/locale/isphonogram.3 b/lib/libc/locale/isphonogram.3 index b0d82c428cba..6b4f29f50319 100644 --- a/lib/libc/locale/isphonogram.3 +++ b/lib/libc/locale/isphonogram.3 @@ -25,11 +25,12 @@ .\" .\" $FreeBSD$ .\" -.Dd March 30, 2004 +.Dd December 19, 2022 .Dt ISPHONOGRAM 3 .Os .Sh NAME -.Nm isphonogram +.Nm isphonogram , +.Nm isphonogram_l .Nd phonographic character test .Sh LIBRARY .Lb libc @@ -37,19 +38,35 @@ .In ctype.h .Ft int .Fn isphonogram "int c" +.Ft int +.Fn isphonogram_l "int c" "locale_t loc" .Sh DESCRIPTION The .Fn isphonogram -function tests for a phonographic character. +and +.Fn isphonogram_l +functions test for a phonographic character. +.Pp +The +.Fn isphonogram_l +function takes an explicit locale argument, whereas the +.Fn isphonogram +function uses the current global or per-thread locale. .Sh RETURN VALUES The .Fn isphonogram -function returns zero if the character tests false and -returns non-zero if the character tests true. +and +.Fn isphonogram_l +functions return zero if the character tests false and +return non-zero if the character tests true. .Sh SEE ALSO .Xr ctype 3 , +.Xr ctype_l 3 , .Xr isideogram 3 , -.Xr iswphonogram 3 +.Xr isideogram_l 3 , +.Xr iswphonogram 3 , +.Xr iswphonogram_l 3 , +.Xr xlocale 3 .Sh HISTORY The .Fn isphonogram diff --git a/lib/libc/locale/isprint.3 b/lib/libc/locale/isprint.3 index 6e740d3e850d..56f8ae828611 100644 --- a/lib/libc/locale/isprint.3 +++ b/lib/libc/locale/isprint.3 @@ -32,11 +32,12 @@ .\" @(#)isprint.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd April 2, 2022 +.Dd December 19, 2022 .Dt ISPRINT 3 .Os .Sh NAME -.Nm isprint +.Nm isprint , +.Nm isprint_l .Nd printing character test (space character inclusive) .Sh LIBRARY .Lb libc @@ -44,10 +45,14 @@ .In ctype.h .Ft int .Fn isprint "int c" +.Ft int +.Fn isprint_l "int c" "locale_t loc" .Sh DESCRIPTION The .Fn isprint -function tests for any printing character, including space +and +.Fn isprint_l +functions test for any printing character, including space .Pq Ql "\ " . The value of the argument must be representable as an .Vt "unsigned char" @@ -77,11 +82,19 @@ In the ASCII character set, this includes the following characters .It "\&165\ ``u''" Ta "166\ ``v''" Ta "167\ ``w''" Ta "170\ ``x''" Ta "171\ ``y''" .It "\&172\ ``z''" Ta "173\ ``{''" Ta "174\ ``|''" Ta "175\ ``}''" Ta "176\ ``~''" .El +.Pp +The +.Fn isprint_l +function takes an explicit locale argument, whereas the +.Fn isprint +function uses the current global or per-thread locale. .Sh RETURN VALUES The .Fn isprint -function returns zero if the character tests false and -returns non-zero if the character tests true. +and +.Fn isprint_l +functions return zero if the character tests false and +return non-zero if the character tests true. .Sh COMPATIBILITY The .Bx 4.4 @@ -91,10 +104,15 @@ type in locales with large character sets is considered obsolete and may not be supported in future releases. The .Fn iswprint +or +.Fn iswprint_l function should be used instead. .Sh SEE ALSO .Xr ctype 3 , +.Xr ctype_l 3 , .Xr iswprint 3 , +.Xr iswprint_l 3 , +.Xr xlocale 3 , .Xr ascii 7 .Sh STANDARDS The diff --git a/lib/libc/locale/ispunct.3 b/lib/libc/locale/ispunct.3 index f0c838d069a3..424723377a01 100644 --- a/lib/libc/locale/ispunct.3 +++ b/lib/libc/locale/ispunct.3 @@ -32,11 +32,12 @@ .\" @(#)ispunct.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd April 2, 2022 +.Dd December 19, 2022 .Dt ISPUNCT 3 .Os .Sh NAME -.Nm ispunct +.Nm ispunct , +.Nm ispunct_l .Nd punctuation character test .Sh LIBRARY .Lb libc @@ -49,11 +50,15 @@ .Sh DESCRIPTION The .Fn ispunct -function tests for any printing character except for space +and +.Fn ispunct_l +functions test for any printing character except for space .Pq Ql "\ " or a character for which .Xr isalnum 3 +or +.Xr isalnum_l 3 is true. The value of the argument must be representable as an .Vt "unsigned char" @@ -93,10 +98,15 @@ type in locales with large character sets is considered obsolete and may not be supported in future releases. The .Fn iswpunct +or +.Fn iswpunct_l function should be used instead. .Sh SEE ALSO .Xr ctype 3 , +.Xr ctype_l 3 , .Xr iswpunct 3 , +.Xr iswpunct_l 3 , +.Xr xlocale 3 , .Xr ascii 7 .Sh STANDARDS The diff --git a/lib/libc/locale/isrune.3 b/lib/libc/locale/isrune.3 index 424c367d2014..1592eb8574f5 100644 --- a/lib/libc/locale/isrune.3 +++ b/lib/libc/locale/isrune.3 @@ -25,11 +25,12 @@ .\" .\" $FreeBSD$ .\" -.Dd March 30, 2004 +.Dd December 19, 2022 .Dt ISRUNE 3 .Os .Sh NAME -.Nm isrune +.Nm isrune , +.Nm isrune_l .Nd valid character test .Sh LIBRARY .Lb libc @@ -37,24 +38,51 @@ .In ctype.h .Ft int .Fn isrune "int c" +.Ft int +.Fn isrune_l "int c" "locale_t loc" .Sh DESCRIPTION The .Fn isrune -function tests for any character that is valid in the current +and +.Fn isrune_l +functions test for any character that is valid in the current character set. In the .Tn ASCII character set, this is equivalent to .Fn isascii . +.Pp +The +.Fn isrune_l +function takes an explicit locale argument, whereas the +.Fn isrune +function uses the current global or per-thread locale. .Sh RETURN VALUES The .Fn isrune -function returns zero if the character tests false and -returns non-zero if the character tests true. +and +.Fn isrune_l +functions return zero if the character tests false and +return non-zero if the character tests true. +.Sh COMPATIBILITY +The +.Bx 4.4 +extension of accepting arguments outside of the range of the +.Vt "unsigned char" +type in locales with large character sets is considered obsolete +and may not be supported in future releases. +The +.Fn iswrune +or +.Fn iswrune_l +function should be used instead. .Sh SEE ALSO .Xr ctype 3 , +.Xr ctype_l 3 , .Xr isascii 3 , .Xr iswrune 3 , +.Xr iswrune_l 3 , +.Xr xlocale 3 , .Xr ascii 7 .Sh HISTORY The diff --git a/lib/libc/locale/isspace.3 b/lib/libc/locale/isspace.3 *** 434 LINES SKIPPED ***