strfmon(3): Wording improvements

Use the same terminology as the other `_l` xlocale(3) functions.

Reviewed by:	kib
MFC after:	1 week
This commit is contained in:
Jose Luis Duran 2022-11-08 17:53:17 -03:00 committed by Konstantin Belousov
parent cdd9d92dad
commit 59cc636d94

View File

@ -24,7 +24,7 @@
.\" .\"
.\" $FreeBSD$ .\" $FreeBSD$
.\" .\"
.Dd October 28, 2022 .Dd January 25, 2023
.Dt STRFMON 3 .Dt STRFMON 3
.Os .Os
.Sh NAME .Sh NAME
@ -37,13 +37,15 @@
.In monetary.h .In monetary.h
.Ft ssize_t .Ft ssize_t
.Fn strfmon "char * restrict s" "size_t maxsize" "const char * restrict format" "..." .Fn strfmon "char * restrict s" "size_t maxsize" "const char * restrict format" "..."
.In monetary.h
.In xlocale.h
.Ft ssize_t .Ft ssize_t
.Fn strfmon_l "char * restrict s" "size_t maxsize" "locale_t loc" "const char * restrict format" "..." .Fn strfmon_l "char * restrict s" "size_t maxsize" "locale_t loc" "const char * restrict format" "..."
.Sh DESCRIPTION .Sh DESCRIPTION
The The
.Fn strfmon .Fn strfmon
function places characters into the array pointed to by function places characters into the array pointed to by
.Fa s .Fa s ,
as controlled by the string pointed to by as controlled by the string pointed to by
.Fa format . .Fa format .
No more than No more than
@ -52,9 +54,9 @@ bytes are placed into the array.
.Pp .Pp
The The
.Fn strfmon_l .Fn strfmon_l
function does the same as function takes an explicit locale argument, whereas the
.Fn strfmon .Fn strfmon
but takes an explicit locale rather than using the current locale. function uses the current global or per-thread locale.
.Pp .Pp
The format string is composed of zero or more directives: The format string is composed of zero or more directives:
ordinary characters (not ordinary characters (not
@ -129,12 +131,14 @@ character is written.
.El .El
.El .El
.Sh RETURN VALUES .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 .Dv NUL
byte is not more than byte, is not more than
.Fa maxsize , .Fa maxsize ,
.Fn strfmon .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 , .Fa s ,
not including the terminating not including the terminating
.Dv NUL .Dv NUL
@ -144,11 +148,6 @@ the contents of the array are indeterminate,
and and
.Va errno .Va errno
is set to indicate the error. is set to indicate the error.
.Pp
The
.Fn strfmon_l
function returns the same values as
.Fn strfmon .
.Sh EXAMPLES .Sh EXAMPLES
The following example will format the value The following example will format the value
.Dq Li 1234567.89 .Dq Li 1234567.89