Linux-man Archive mirror
 help / color / mirror / Atom feed
From: Alejandro Colomar <alx@kernel.org>
To: Jeremy Baxter <jtbx@disroot.org>
Cc: linux-man@vger.kernel.org, quirin.blaeser@freenet.de
Subject: Re: [PATCH] printf.3: Return the number of bytes printed, not characters
Date: Sat, 16 Mar 2024 00:34:34 +0100	[thread overview]
Message-ID: <ZfTbC3v1ruEeqRfw@debian> (raw)
In-Reply-To: <CZTX6HB4IQ2Y.261V2LM2EIKZ9@disroot.org>

[-- Attachment #1: Type: text/plain, Size: 1326 bytes --]

Hi Jeremy,

On Fri, Mar 15, 2024 at 02:07:14PM +1300, Jeremy Baxter wrote:
> From https://pubs.opengroup.org/onlinepubs/9699919799/functions/printf.html:
> 
>     Upon successful completion, the dprintf(), fprintf(), and printf()
>     functions shall return the number of bytes transmitted.
> 
> Fixes bug 218600 <https://bugzilla.kernel.org/show_bug.cgi?id=218600>.
> 

Reported-by: <quirin.blaeser@freenet.de>

> Signed-off-by: Jeremy Baxter <jtbx@disroot.org>

Patch applied; thanks.
<https://www.alejandro-colomar.es/src/alx/linux/man-pages/man-pages.git/commit/?h=contrib&id=e0fc7ee5e3d664c83bd0f4fc751ef80cf38ae1bc>

Have a lovely night!
Alex

> ---
>  man3/printf.3 | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/man3/printf.3 b/man3/printf.3
> index eb152aa19..15ed75439 100644
> --- a/man3/printf.3
> +++ b/man3/printf.3
> @@ -875,7 +875,7 @@ No argument is converted.
>  The complete conversion
>  specification is \[aq]%%\[aq].
>  .SH RETURN VALUE
> -Upon successful return, these functions return the number of characters
> +Upon successful return, these functions return the number of bytes
>  printed (excluding the null byte used to end output to strings).
>  .P
>  The functions
> -- 
> 2.44.0
> 

-- 
<https://www.alejandro-colomar.es/>

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

      reply	other threads:[~2024-03-15 23:34 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-15  1:07 [PATCH] printf.3: Return the number of bytes printed, not characters Jeremy Baxter
2024-03-15 23:34 ` 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=ZfTbC3v1ruEeqRfw@debian \
    --to=alx@kernel.org \
    --cc=jtbx@disroot.org \
    --cc=linux-man@vger.kernel.org \
    --cc=quirin.blaeser@freenet.de \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).