If you define a meaning for `%A', what if the template contains `%+23A' or `%-#A'? To implement a sensible meaning for these, the handler when called needs to be able to get the options specified in the template.
Both the handler-function and arginfo-function arguments
to register_printf_function
accept an argument that points to a
struct printf_info
, which contains information about the options
appearing in an instance of the conversion specifier. This data type
is declared in the header file `printf.h'.
printf
template
string to the handler and arginfo functions for that specifier. It
contains the following members:
int prec
-1
if no precision
was specified. If the precision was given as `*', the
printf_info
structure passed to the handler function contains the
actual value retrieved from the argument list. But the structure passed
to the arginfo function contains a value of INT_MIN
, since the
actual value is not known.
int width
0
if no
width was specified. If the field width was given as `*', the
printf_info
structure passed to the handler function contains the
actual value retrieved from the argument list. But the structure passed
to the arginfo function contains a value of INT_MIN
, since the
actual value is not known.
wchar_t spec
unsigned int is_long_double
long long int
, as opposed to long double
for floating
point conversions.
unsigned int is_short
unsigned int is_long
unsigned int alt
unsigned int space
unsigned int left
unsigned int showsign
unsigned int group
unsigned int extra
printf
function this variable always contains the value
0
.
wchar_t pad
'0'
if the `0' flag was specified, and
' '
otherwise.
Go to the first, previous, next, last section, table of contents.