From: "Michael Kerrisk (man-pages)" <mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: myllynen-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org
Cc: mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
linux-man <linux-man-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [PATCH] strfmon.3: document strfmon_l(3)
Date: Fri, 12 Jun 2015 20:18:26 +0200 [thread overview]
Message-ID: <557B2272.1010001@gmail.com> (raw)
In-Reply-To: <5576F5BC.3010300-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
On 06/09/2015 04:18 PM, Marko Myllynen wrote:
> Hi Michael,
>
> please find below an attempt to describe strfmon_l(3).
Thanks, Marko. Applied.
Cheers,
Michael
> http://pubs.opengroup.org/onlinepubs/9699919799/functions/strfmon.html
> ---
> man3/strfmon.3 | 33 ++++++++++++++++++++++++++++++---
> man3/strfmon_l.3 | 1 +
> 2 files changed, 31 insertions(+), 3 deletions(-)
> create mode 100644 man3/strfmon_l.3
>
> diff --git a/man3/strfmon.3 b/man3/strfmon.3
> index 4964b36..1fcfbf0 100644
> --- a/man3/strfmon.3
> +++ b/man3/strfmon.3
> @@ -23,23 +23,46 @@
> .\"
> .TH STRFMON 3 2015-03-02 "Linux" "Linux Programmer's Manual"
> .SH NAME
> -strfmon \- convert monetary value to a string
> +strfmon, strfmon_l \- convert monetary value to a string
> .SH SYNOPSIS
> +.nf
> .B #include <monetary.h>
> .sp
> .BI "ssize_t strfmon(char *" s ", size_t " max ", const char *" format ,
> .B "...);"
> +
> +.BI "ssize_t strfmon_l(char *" s ", size_t " max ", locale_t " locale ",
> +.B const char *" format , "...);"
> +.fi
> .SH DESCRIPTION
> The
> .BR strfmon ()
> -function formats the specified amounts
> -according to the format specification
> +function formats the specified monetary amount
> +according to the current locale
> +and format specification
> .I format
> and places the
> result in the character array
> .I s
> of size
> .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
> Ordinary characters in
> .I format
> @@ -146,6 +169,9 @@ Interface Attribute Value
> T{
> .BR strfmon ()
> T} Thread safety MT-Safe locale
> +T{
> +.BR strfmon_l ()
> +T} Thread safety MT-Safe
> .TE
>
> .SH CONFORMING TO
> @@ -186,6 +212,7 @@ and Portuguese locales yield
> [ **1234$57Esc] [ **1.234$57PTE ]
> .in
> .SH SEE ALSO
> +.BR duplocale (3),
> .BR setlocale (3),
> .BR sprintf (3),
> .BR locale (7)
> diff --git a/man3/strfmon_l.3 b/man3/strfmon_l.3
> new file mode 100644
> index 0000000..cdbc310
> --- /dev/null
> +++ b/man3/strfmon_l.3
> @@ -0,0 +1 @@
> +.so man3/strfmon.3
>
> Thanks,
>
--
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
prev parent reply other threads:[~2015-06-12 18:18 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-09 14:18 [PATCH] strfmon.3: document strfmon_l(3) Marko Myllynen
[not found] ` <5576F5BC.3010300-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2015-06-12 18:18 ` Michael Kerrisk (man-pages) [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=557B2272.1010001@gmail.com \
--to=mtk.manpages-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
--cc=linux-man-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=myllynen-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.