strfmon.3: Document strfmon_l(3)

Describe strfmon_l(3).

http://pubs.opengroup.org/onlinepubs/9699919799/functions/strfmon.html

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Marko Myllynen 2015-06-09 17:18:36 +03:00 committed by Michael Kerrisk
parent af1eec3c8a
commit 88b801ec78
2 changed files with 31 additions and 3 deletions

View File

@ -23,23 +23,46 @@
.\" .\"
.TH STRFMON 3 2015-03-02 "Linux" "Linux Programmer's Manual" .TH STRFMON 3 2015-03-02 "Linux" "Linux Programmer's Manual"
.SH NAME .SH NAME
strfmon \- convert monetary value to a string strfmon, strfmon_l \- convert monetary value to a string
.SH SYNOPSIS .SH SYNOPSIS
.nf
.B #include <monetary.h> .B #include <monetary.h>
.sp .sp
.BI "ssize_t strfmon(char *" s ", size_t " max ", const char *" format , .BI "ssize_t strfmon(char *" s ", size_t " max ", const char *" format ,
.B "...);" .B "...);"
.BI "ssize_t strfmon_l(char *" s ", size_t " max ", locale_t " locale ",
.B const char *" format , "...);"
.fi
.SH DESCRIPTION .SH DESCRIPTION
The The
.BR strfmon () .BR strfmon ()
function formats the specified amounts function formats the specified monetary amount
according to the format specification according to the current locale
and format specification
.I format .I format
and places the and places the
result in the character array result in the character array
.I s .I s
of size of size
.IR max . .IR max .
The
.BR strfmon_l ()
function performs the same task,
but uses
the locale specified by
.IR locale .
The behavior of
.BR strfmon_l ()
is undefined if
.I locale
is the special locale object
.BR LC_GLOBAL_LOCALE
(see
.BR duplocale (3))
or is not a valid locale object handle.
.PP .PP
Ordinary characters in Ordinary characters in
.I format .I format
@ -146,6 +169,9 @@ Interface Attribute Value
T{ T{
.BR strfmon () .BR strfmon ()
T} Thread safety MT-Safe locale T} Thread safety MT-Safe locale
T{
.BR strfmon_l ()
T} Thread safety MT-Safe
.TE .TE
.SH CONFORMING TO .SH CONFORMING TO
@ -186,6 +212,7 @@ and Portuguese locales yield
[ **1234$57Esc] [ **1.234$57PTE ] [ **1234$57Esc] [ **1.234$57PTE ]
.in .in
.SH SEE ALSO .SH SEE ALSO
.BR duplocale (3),
.BR setlocale (3), .BR setlocale (3),
.BR sprintf (3), .BR sprintf (3),
.BR locale (7) .BR locale (7)

1
man3/strfmon_l.3 Normal file
View File

@ -0,0 +1 @@
.so man3/strfmon.3