Skip to content

Commit

Permalink
Doc fixes. Don't #include <stddef.h>. (printf_function): Make last ar…
Browse files Browse the repository at this point in the history
…g ARGS a vector of pointers instead of a pointer to va_list.
  • Loading branch information
Roland McGrath committed Mar 10, 1995
1 parent c21ec32 commit ece0719
Showing 1 changed file with 20 additions and 10 deletions.
30 changes: 20 additions & 10 deletions stdio/printf.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ __BEGIN_DECLS
#define __need_size_t
#include <stddef.h>

#include <stdarg.h> /* Need va_list. */


struct printf_info
{
Expand All @@ -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.
Expand All @@ -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.
Expand Down

0 comments on commit ece0719

Please sign in to comment.