From nobody Wed Jan 25 09:03:25 2023 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 4P1yYV3mJ4z3113x; Wed, 25 Jan 2023 09:03:26 +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 4P1yYV0mlZz3kbT; Wed, 25 Jan 2023 09:03:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674637406; 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=Uf4ZVRBE4qx4jdz/e0WhVsFfbYlFiNX0tXyT6trKliA=; b=hBN6+5Sm7T0kEVT5J4VgOg3bHnXf3MKuORLHDu2RYVFm1v+jVmrJX8KsvUXgYYTof9J8ET SweExjZIr/oSPmM60mnBgbR3yY2DcQNKgRme9bos8/Dn/grnjsMHBAZ+DztrC9NwM5J8gX LNYmSasm7DAUJvbHTQOD/+cPxS8EiVa8uMb7+wP+d8TCkJuBvNGxeQqf5lfw1RIdF1Ikc1 oaKRXltsZDFwfoYh4KMBR8vnv4GmnTjmOBIlmZMtMCSQ/gHMzlVpnvUfvzLBsMk4qOyW84 aimnkm/dWGiNxJr1g76474kyqunp3IvaWsUvj9R2ZnDkFtznNB/SoTdTJ92PgA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674637406; 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=Uf4ZVRBE4qx4jdz/e0WhVsFfbYlFiNX0tXyT6trKliA=; b=iFpEZKwUbHXyteXOSzjwmLniRaAa9W2IwUhLsl+ojJQh2AgDFRm8yth3Lm201v0tj7G/dV xCb+119wHCz9pSKiCwCB/YIj6E6WBPnFPUF4e7V+HLNnjnSaj4eH9YwfkzbyjcvHJqtg1q N+yTvOZg+iePM3rLCyn4IQbzHFRwN7YNiKU3Hudcd/4sDjHqMbawdEHeRRu2yDAkw3LSrG mdV/r6gb53ee2Uzb8rLUYWzMju9dzz1InbXkKw/qENrTnAgMw/GG3hg/e4DTKECn5tq00u AwA7s4MGL4RONf99QEigKb6fbaNvuWdzHHkXK7ojGqP+R2Ltq9IjsGKTBmVMPQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1674637406; a=rsa-sha256; cv=none; b=L0qCcFSBegp3DxpUhsTZoNm+PXiCIo38FHVeeplhcpHTLbohIOL65iujMQl4pDcVj680DC SMZ9uSzqhzi3Gf9697oLGey7OtzLURTGL9jMjXijeUQ9zAVNoisI2YkWe7T1awQ72bGp+k PwDSV5Co/rK/B6uJX2prhkKo41sVCpDGXptZ9ZHuiJad6d1oJ80ycVHFjc6NMRO0YrKhtD eyLreAUQgD4tVW4S4LD0di+w6q7BaUqEBRqhTD0B/7Mv/Bg3bD6VZoUf2/Wp06g2Sk9guI WsUKFNNBDfWINKY2yjZG4Q+Bi6t6PrZbynf/zI79qhYVROOKse7MZ0jBvn3tIw== 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 4P1yYT6xZSzjjh; Wed, 25 Jan 2023 09:03:25 +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 30P93PJF027100; Wed, 25 Jan 2023 09:03:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 30P93Pnf027099; Wed, 25 Jan 2023 09:03:25 GMT (envelope-from git) Date: Wed, 25 Jan 2023 09:03:25 GMT Message-Id: <202301250903.30P93Pnf027099@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 59cc636d94a6 - main - strfmon(3): Wording improvements 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: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 59cc636d94a6c9b28147304fa59351224f801e92 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=59cc636d94a6c9b28147304fa59351224f801e92 commit 59cc636d94a6c9b28147304fa59351224f801e92 Author: Jose Luis Duran AuthorDate: 2022-11-08 20:53:17 +0000 Commit: Konstantin Belousov CommitDate: 2023-01-25 09:02:55 +0000 strfmon(3): Wording improvements Use the same terminology as the other `_l` xlocale(3) functions. Reviewed by: kib MFC after: 1 week --- lib/libc/stdlib/strfmon.3 | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/lib/libc/stdlib/strfmon.3 b/lib/libc/stdlib/strfmon.3 index 1ddfb77cb0ac..5c110a8987dc 100644 --- a/lib/libc/stdlib/strfmon.3 +++ b/lib/libc/stdlib/strfmon.3 @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 28, 2022 +.Dd January 25, 2023 .Dt STRFMON 3 .Os .Sh NAME @@ -37,13 +37,15 @@ .In monetary.h .Ft ssize_t .Fn strfmon "char * restrict s" "size_t maxsize" "const char * restrict format" "..." +.In monetary.h +.In xlocale.h .Ft ssize_t .Fn strfmon_l "char * restrict s" "size_t maxsize" "locale_t loc" "const char * restrict format" "..." .Sh DESCRIPTION The .Fn strfmon function places characters into the array pointed to by -.Fa s +.Fa s , as controlled by the string pointed to by .Fa format . No more than @@ -52,9 +54,9 @@ bytes are placed into the array. .Pp The .Fn strfmon_l -function does the same as +function takes an explicit locale argument, whereas the .Fn strfmon -but takes an explicit locale rather than using the current locale. +function uses the current global or per-thread locale. .Pp The format string is composed of zero or more directives: ordinary characters (not @@ -129,12 +131,14 @@ character is written. .El .El .Sh RETURN VALUES -If the total number of resulting bytes including the terminating +If the total number of resulting bytes, including the terminating .Dv NUL -byte is not more than +byte, is not more than .Fa maxsize , .Fn strfmon -returns the number of bytes placed into the array pointed to by +and +.Fn strfmon_l +return the number of bytes placed into the array pointed to by .Fa s , not including the terminating .Dv NUL @@ -144,11 +148,6 @@ the contents of the array are indeterminate, and .Va errno is set to indicate the error. -.Pp -The -.Fn strfmon_l -function returns the same values as -.Fn strfmon . .Sh EXAMPLES The following example will format the value .Dq Li 1234567.89