diff options
author | Jose Luis Duran <jlduran@gmail.com> | 2022-11-08 20:53:17 +0000 |
---|---|---|
committer | Konstantin Belousov <kib@FreeBSD.org> | 2023-01-25 09:02:55 +0000 |
commit | 59cc636d94a6c9b28147304fa59351224f801e92 (patch) | |
tree | db0430103dedfd9b7731028cd010afa06ccff303 /lib/libc | |
parent | cdd9d92dade61a6b5c37b758e9533a076bb5a2de (diff) | |
download | src-59cc636d94a6c9b28147304fa59351224f801e92.tar.gz src-59cc636d94a6c9b28147304fa59351224f801e92.zip |
strfmon(3): Wording improvements
Use the same terminology as the other `_l` xlocale(3) functions.
Reviewed by: kib
MFC after: 1 week
Diffstat (limited to 'lib/libc')
-rw-r--r-- | lib/libc/stdlib/strfmon.3 | 23 |
1 files 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 |