Linux Manual Pages development
 help / color / mirror / Atom feed
From: Alejandro Colomar <alx.manpages@gmail.com>
To: наб <nabijaczleweli@nabijaczleweli.xyz>
Cc: linux-man@vger.kernel.org
Subject: Re: [PATCH v4] strftime.3, strftime_l.3: mention strftime_l() with .so link
Date: Wed, 20 Jul 2022 10:29:52 +0200	[thread overview]
Message-ID: <63c8f27a-08aa-a664-51d4-d88ee8f15bb2@gmail.com> (raw)
In-Reply-To: <20220719222810.gujuec4m6jt7rrbs@tarta.nabijaczleweli.xyz>


[-- Attachment #1.1: Type: text/plain, Size: 2653 bytes --]

On 7/20/22 00:28, наб wrote:
> POSIX.1-2008 TC2:
>> [CX] The strftime_l() function shall be equivalent to the strftime()
>    function, except that the locale data used is from the locale
>    represented by locale.
>> [CX] The behavior is undefined if the locale argument to strftime_l()
>    is the special locale object LC_GLOBAL_LOCALE or is not a valid locale
>    object handle.
> 
> Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>

Patch applied.

Thanks,

Alex

> ---
>   man3/strftime.3   | 26 +++++++++++++++++++++++++-
>   man3/strftime_l.3 |  1 +
>   2 files changed, 26 insertions(+), 1 deletion(-)
>   create mode 100644 man3/strftime_l.3
> 
> diff --git a/man3/strftime.3 b/man3/strftime.3
> index dc98a5122..6eff815ad 100644
> --- a/man3/strftime.3
> +++ b/man3/strftime.3
> @@ -27,6 +27,11 @@ Standard C library
>   .BI "size_t strftime(char *restrict " s ", size_t " max ,
>   .BI "                const char *restrict " format ,
>   .BI "                const struct tm *restrict " tm );
> +.PP
> +.BI "size_t strftime_l(char *restrict " s ", size_t " max ,
> +.BI "                const char *restrict " format ,
> +.BI "                const struct tm *restrict " tm ,
> +.BI "                locale_t " locale );
>   .fi
>   .SH DESCRIPTION
>   The
> @@ -471,6 +476,17 @@ as an argument to a
>   One example of such alternative forms is the Japanese era calendar scheme in the
>   .B ja_JP
>   glibc locale.
> +.PP
> +.BR strftime_l ()
> +is equivalent to
> +.BR strftime (),
> +except it uses the specified
> +.I locale
> +instead of the current locale.
> +The behaviour is undefined if
> +.I locale
> +is invalid or
> +.BR LC_GLOBAL_LOCALE .
>   .SH RETURN VALUE
>   Provided that the result string,
>   including the terminating null byte, does not exceed
> @@ -516,14 +532,22 @@ lbx lb lb
>   l l l.
>   Interface	Attribute	Value
>   T{
> -.BR strftime ()
> +.BR strftime (),
> +.BR strftime_l ()
>   T}	Thread safety	MT-Safe env locale
>   .TE
>   .hy
>   .ad
>   .sp 1
>   .SH CONFORMING TO
> +.BR strftime ():
>   SVr4, C89, C99.
> +.PD 0
> +.PP
> +.PD
> +.BR strftime_l ():
> +POSIX.1-2008.
> +.PP
>   .\" FIXME strftime() is in POSIX.1-2001 and POSIX.1-2008, but the details
>   .\" in the standards changed across versions. Investigate and
>   .\" write up.
> diff --git a/man3/strftime_l.3 b/man3/strftime_l.3
> new file mode 100644
> index 000000000..02e797a23
> --- /dev/null
> +++ b/man3/strftime_l.3
> @@ -0,0 +1 @@
> +.so man3/strftime.3

-- 
Alejandro Colomar
<http://www.alejandro-colomar.es/>

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

      reply	other threads:[~2022-07-20  8:30 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-19 18:48 [PATCH] strftime.3: mention strftime_l() with .so link наб
2022-07-19 20:50 ` Alejandro Colomar
2022-07-19 21:27   ` наб
2022-07-19 21:55     ` Alejandro Colomar
2022-07-19 22:18       ` Alejandro Colomar
2022-07-19 22:20       ` Alejandro Colomar
2022-07-19 22:28         ` [PATCH v4] strftime.3, strftime_l.3: " наб
2022-07-20  8:29           ` Alejandro Colomar [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=63c8f27a-08aa-a664-51d4-d88ee8f15bb2@gmail.com \
    --to=alx.manpages@gmail.com \
    --cc=linux-man@vger.kernel.org \
    --cc=nabijaczleweli@nabijaczleweli.xyz \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox