* lib/stdio.in.h (printf): Add specification.
* lib/vprintf.c (printf): Remove specification.
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.
#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, ...)
{
#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__