about summary refs log tree commit diff
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>1995-03-10 18:31:02 +0000
committerRoland McGrath <roland@gnu.org>1995-03-10 18:31:02 +0000
commitece07193c79ef873a9ef1c09475a770a4d753702 (patch)
tree33fcaa95cec709618b366bae3e5ada38165849ed
parentc21ec3268d68fa786caac2abe87d2c35bd7d7956 (diff)
downloadglibc-ece07193c79ef873a9ef1c09475a770a4d753702.tar.gz
glibc-ece07193c79ef873a9ef1c09475a770a4d753702.tar.xz
glibc-ece07193c79ef873a9ef1c09475a770a4d753702.zip
Doc fixes. Don't #include <stddef.h>. (printf_function): Make last arg ARGS a vector of pointers instead of a pointer to va_list.
-rw-r--r--stdio/printf.h30
1 files changed, 20 insertions, 10 deletions
diff --git a/stdio/printf.h b/stdio/printf.h
index c369222281..0f381c77f4 100644
--- a/stdio/printf.h
+++ b/stdio/printf.h
@@ -28,8 +28,6 @@ __BEGIN_DECLS
 #define	__need_size_t
 #include <stddef.h>
 
-#include <stdarg.h>		/* Need va_list.  */
-
 
 struct printf_info
 {
@@ -51,24 +49,35 @@ struct printf_info
 /* Type of a printf specifier-handler function.
    STREAM is the FILE on which to write output.
    INFO gives information about the format specification.
-   Arguments can be read from ARGS.
+   ARGS is a vector of pointers to the argument data;
+   the number of pointers will be the number returned
+   by the associated arginfo function for the same INFO.
+
    The function should return the number of characters written,
    or -1 for errors.  */
 
-typedef int printf_function __P ((FILE * __stream,
-				  __const struct printf_info * __info,
-				  va_list * __args));
+typedef int printf_function __P ((FILE *__stream,
+				  __const struct printf_info *__info,
+				  __const void **__const __args));
+
+/* Type of a printf specifier-arginfo function.
+   INFO gives information about the format specification.
+   N, ARGTYPES, and return value are as for printf_parse_format.  */
+
 typedef int printf_arginfo_function __P ((__const struct printf_info * __info,
 					  size_t __n,
 					  int *__argtypes));
 
-/* Register FUNC to be called to format SPEC specifiers.
-   ARGINFO, if not NULL, is a function used by `parse_printf_format'
-   to determine how many arguments a SPEC conversion requires,
-   and what their types are.  */
+
+/* Register FUNC to be called to format SPEC specifiers; ARGINFO must be
+   specified to determine how many arguments a SPEC conversion requires and
+   what their types are, even if your program never calls
+   `parse_printf_format'.  */
+
 extern int register_printf_function __P ((int __spec, printf_function __func,
 					  printf_arginfo_function __arginfo));
 
+
 /* Parse FMT, and fill in N elements of ARGTYPES with the
    types needed for the conversions FMT specifies.  Returns
    the number of arguments required by FMT.
@@ -84,6 +93,7 @@ extern size_t parse_printf_format __P ((__const char *__fmt,
 					size_t __n,
 					int *__argtypes));
 
+
 /* Codes returned by `parse_printf_format' for basic types.
 
    These values cover all the standard format specifications.