From: Bruno Haible Date: Sun, 30 Jun 2024 18:15:58 +0000 (+0200) Subject: vprintf-posix: Document properly. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9128857a16e2833ffd463b2361bb59639f465231;p=thirdparty%2Fgnulib.git vprintf-posix: Document properly. * lib/stdio.in.h (vprintf): Add specification. * lib/vprintf.c (vprintf): Remove specification. --- diff --git a/ChangeLog b/ChangeLog index 755b3d4630..62041cd616 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2024-06-30 Bruno Haible + vprintf-posix: Document properly. + * lib/stdio.in.h (vprintf): Add specification. + * lib/vprintf.c (vprintf): Remove specification. + vzprintf: New module. * lib/stdio.in.h (vzprintf): New declaration. * lib/vzprintf.c: New file, based on lib/vprintf.c. diff --git a/lib/stdio.in.h b/lib/stdio.in.h index 9ecca6a0d1..51876b2455 100644 --- a/lib/stdio.in.h +++ b/lib/stdio.in.h @@ -1900,6 +1900,9 @@ _GL_CXXALIAS_SYS (vzprintf, off64_t, #endif #if @GNULIB_VPRINTF_POSIX@ || @GNULIB_VPRINTF@ +/* Prints formatted output to standard output. + Returns the number of bytes written to standard output. Upon failure, + returns a negative value with stdout's error indicator set. */ # if (@GNULIB_VPRINTF_POSIX@ && @REPLACE_VPRINTF@) \ || (@GNULIB_VPRINTF@ && @REPLACE_STDIO_WRITE_FUNCS@ && (@GNULIB_STDIO_H_NONBLOCKING@ || @GNULIB_STDIO_H_SIGPIPE@)) # if !(defined __cplusplus && defined GNULIB_NAMESPACE) diff --git a/lib/vprintf.c b/lib/vprintf.c index 751a235462..8ec4be7752 100644 --- a/lib/vprintf.c +++ b/lib/vprintf.c @@ -1,4 +1,4 @@ -/* Formatted output to a stream. +/* Formatted output to standard output. Copyright (C) 2007, 2009-2024 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify @@ -23,9 +23,6 @@ #include -/* Print formatted output to standard output. - Return string length of formatted string. On error, return a negative - value. */ int vprintf (const char *format, va_list args) {