Linux-man Archive mirror
 help / color / mirror / Atom feed
* [PATCH] printf.3: Return the number of bytes printed, not characters
@ 2024-03-15  1:07 Jeremy Baxter
  2024-03-15 23:34 ` Alejandro Colomar
  0 siblings, 1 reply; 2+ messages in thread
From: Jeremy Baxter @ 2024-03-15  1:07 UTC (permalink / raw
  To: Alejandro Colomar; +Cc: linux-man, quirin.blaeser

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>.

Signed-off-by: Jeremy Baxter <jtbx@disroot.org>
---
 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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] printf.3: Return the number of bytes printed, not characters
  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
  0 siblings, 0 replies; 2+ messages in thread
From: Alejandro Colomar @ 2024-03-15 23:34 UTC (permalink / raw
  To: Jeremy Baxter; +Cc: linux-man, quirin.blaeser

[-- 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 --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-03-15 23:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 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).