1 #ifndef _GPXE_VSPRINTF_H
2 #define _GPXE_VSPRINTF_H
8 * Etherboot's printf() functions understand the following subset of
9 * the standard C printf()'s format specifiers:
12 * - '#' - Alternate form (i.e. "0x" prefix)
16 * - 'hh' - Signed / unsigned char
17 * - 'h' - Signed / unsigned short
18 * - 'l' - Signed / unsigned long
19 * - 'll' - Signed / unsigned long long
20 * - 'z' - Signed / unsigned size_t
21 * - Conversion specifiers
22 * - 'd' - Signed decimal
23 * - 'x','X' - Unsigned hexadecimal
28 * Hexadecimal numbers are always zero-padded to the specified field
29 * width (if any); decimal numbers are always space-padded. Decimal
30 * long longs are not supported.
41 * Contexts are used in order to be able to share code between
42 * vprintf() and vsnprintf(), without requiring the allocation of a
43 * buffer for vprintf().
45 struct printf_context {
52 * This method is called for each character written to the
55 void ( * handler ) ( struct printf_context *ctx, unsigned int c );
56 /** Length of formatted string
58 * When handler() is called, @len will be set to the number of
59 * characters written so far (i.e. zero for the first call to
65 extern size_t vcprintf ( struct printf_context *ctx, const char *fmt,
67 #endif /* _GPXE_VSPRINTF_H */