From eb86dc683a8d9a486f6a67234a692c1da1278fd5 Mon Sep 17 00:00:00 2001 From: schwarze <> Date: Fri, 18 Jan 2019 07:43:36 +0000 Subject: [PATCH] Improve the description of locale dependency: * mention LC_COLLATE; * clarify that all these functions are infested, including the *_l() versions; * avoid ENVIRONMENT, these functions don't inspect it; * and point to the C library functions that change the locale. OK millert@ --- src/lib/libc/string/strcoll.3 | 17 ++++++++++------- src/lib/libc/string/strxfrm.3 | 17 ++++++++++------- 2 files changed, 20 insertions(+), 14 deletions(-) diff --git a/src/lib/libc/string/strcoll.3 b/src/lib/libc/string/strcoll.3 index 4ba1f226..9daa6cd9 100644 --- a/src/lib/libc/string/strcoll.3 +++ b/src/lib/libc/string/strcoll.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: strcoll.3,v 1.10 2017/09/05 03:16:13 schwarze Exp $ +.\" $OpenBSD: strcoll.3,v 1.11 2019/01/18 07:43:36 schwarze Exp $ .\" .\" Copyright (c) 1990, 1991 The Regents of the University of California. .\" Copyright (c) 2017 Ingo Schwarze @@ -32,7 +32,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd $Mdocdate: September 5 2017 $ +.Dd $Mdocdate: January 18 2019 $ .Dt STRCOLL 3 .Os .Sh NAME @@ -68,12 +68,15 @@ they have the same effect as and the global locale, the thread-specific locale, and the .Fa locale argument are ignored. -.Sh ENVIRONMENT -On other operating systems, the behaviour of -.Fn strcoll -may depend on the +On other operating systems, results may depend on the .Dv LC_CTYPE -.Xr locale 1 . +and +.Dv LC_COLLATE +locale categories set with +.Xr setlocale 3 , +.Xr uselocale 3 , +or +.Xr newlocale 3 . .Sh SEE ALSO .Xr newlocale 3 , .Xr setlocale 3 , diff --git a/src/lib/libc/string/strxfrm.3 b/src/lib/libc/string/strxfrm.3 index 1a96c851..dab3673f 100644 --- a/src/lib/libc/string/strxfrm.3 +++ b/src/lib/libc/string/strxfrm.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: strxfrm.3,v 1.11 2017/09/05 03:16:13 schwarze Exp $ +.\" $OpenBSD: strxfrm.3,v 1.12 2019/01/18 07:43:36 schwarze Exp $ .\" .\" Copyright (c) 1990, 1991 The Regents of the University of California. .\" Copyright (c) 2017 Ingo Schwarze @@ -32,7 +32,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd $Mdocdate: September 5 2017 $ +.Dd $Mdocdate: January 18 2019 $ .Dt STRXFRM 3 .Os .Sh NAME @@ -69,12 +69,15 @@ both have the same effect as and the global locale, the thread-specific locale, and the .Fa locale argument are ignored. -.Sh ENVIRONMENT -On other operating systems, the behaviour of -.Fn strxfrm -may depend on the +On other operating systems, the behaviour may depend on the .Dv LC_CTYPE -.Xr locale 1 . +and +.Dv LC_COLLATE +locale categories set with +.Xr setlocale 3 , +.Xr uselocale 3 , +or +.Xr newlocale 3 . .Sh SEE ALSO .Xr newlocale 3 , .Xr setlocale 3 ,