]> Savannah Git Hosting - gnulib.git/commitdiff
printf-posix: Document properly.
authorBruno Haible <bruno@clisp.org>
Sun, 30 Jun 2024 19:00:47 +0000 (21:00 +0200)
committerBruno Haible <bruno@clisp.org>
Sun, 30 Jun 2024 20:33:16 +0000 (22:33 +0200)
* lib/stdio.in.h (printf): Add specification.
* lib/vprintf.c (printf): Remove specification.

ChangeLog
lib/printf.c
lib/stdio.in.h

index 3b6f777e85dd7d8be3bcc37da14432109bddc9d8..36f4db791039c5318c3d02a7411ce22f811e3432 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2024-06-30  Bruno Haible  <bruno@clisp.org>
 
+       printf-posix: Document properly.
+       * lib/stdio.in.h (printf): Add specification.
+       * lib/vprintf.c (printf): Remove specification.
+
        zprintf: New module.
        * lib/stdio.in.h (zprintf): New declaration.
        * lib/zprintf.c: New file, based on lib/vzprintf.c.
index f89af7490e69ad446b84000c2f88cf7198483a83..f5305935b9a77a3b2075511eb9424b051a33d090 100644 (file)
@@ -23,9 +23,6 @@
 
 #include <stdarg.h>
 
-/* Print formatted output to standard output.
-   Return string length of formatted string.  On error, return a negative
-   value.  */
 int
 printf (const char *format, ...)
 {
index 013c7a4ad186767325dda12c86c73419a30110b7..38572382d46f8dea55d1ef5a68088f39a7e47386 100644 (file)
@@ -1280,6 +1280,9 @@ _GL_CXXALIAS_SYS (zprintf, off64_t, (const char *restrict format, ...));
 #endif
 
 #if @GNULIB_PRINTF_POSIX@ || @GNULIB_PRINTF@
+/* 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_PRINTF_POSIX@ && @REPLACE_PRINTF@) \
      || (@GNULIB_PRINTF@ && @REPLACE_STDIO_WRITE_FUNCS@ && (@GNULIB_STDIO_H_NONBLOCKING@ || @GNULIB_STDIO_H_SIGPIPE@))
 #  if defined __GNUC__ || defined __clang__