23 #ifndef PRINTF_FETCHARGS
28 #ifndef PRINTF_FETCHARGS
41 for (i = 0, ap = &a->
arg[0]; i < a->
count; i++, ap++)
57 ap->
a.
a_int = va_arg (args,
int);
60 ap->
a.
a_uint = va_arg (args,
unsigned int);
66 ap->
a.
a_ulongint = va_arg (args,
unsigned long int);
68 #if HAVE_LONG_LONG_INT
69 case TYPE_LONGLONGINT:
70 ap->
a.a_longlongint = va_arg (args,
long long int);
72 case TYPE_ULONGLONGINT:
73 ap->
a.a_ulonglongint = va_arg (args,
unsigned long long int);
83 ap->
a.
a_char = va_arg (args,
int);
91 (
sizeof (
wint_t) <
sizeof (
int)
92 ? (
wint_t) va_arg (args,
int)
97 ap->
a.
a_string = va_arg (args,
const char *);
105 case TYPE_WIDE_STRING:
106 ap->
a.a_wide_string = va_arg (args,
const wchar_t *);
110 if (ap->
a.a_wide_string == NULL)
112 static const wchar_t wide_null_string[] =
119 ap->
a.a_wide_string = wide_null_string;
138 #if HAVE_LONG_LONG_INT
139 case TYPE_COUNT_LONGLONGINT_POINTER:
140 ap->
a.a_count_longlongint_pointer = va_arg (args,
long long int *);
146 ap->
a.a_u8_string = va_arg (args,
const uint8_t *);
150 if (ap->
a.a_u8_string == NULL)
152 static const uint8_t u8_null_string[] =
153 {
'(',
'N',
'U',
'L',
'L',
')', 0 };
154 ap->
a.a_u8_string = u8_null_string;
157 case TYPE_U16_STRING:
158 ap->
a.a_u16_string = va_arg (args,
const uint16_t *);
162 if (ap->
a.a_u16_string == NULL)
164 static const uint16_t u16_null_string[] =
165 {
'(',
'N',
'U',
'L',
'L',
')', 0 };
166 ap->
a.a_u16_string = u16_null_string;
169 case TYPE_U32_STRING:
170 ap->
a.a_u32_string = va_arg (args,
const uint32_t *);
174 if (ap->
a.a_u32_string == NULL)
176 static const uint32_t u32_null_string[] =
177 {
'(',
'N',
'U',
'L',
'L',
')', 0 };
178 ap->
a.a_u32_string = u32_null_string;
#define wchar_t
On NetBSD 5.0, the definition of NULL lacks proper parentheses.
int PRINTF_FETCHARGS(va_list args, arguments *a)
Decomposed printf argument list.
@ TYPE_COUNT_SCHAR_POINTER
@ TYPE_COUNT_SHORT_POINTER
@ TYPE_COUNT_LONGINT_POINTER
signed char * a_count_schar_pointer
long int * a_count_longint_pointer
unsigned long int a_ulongint
short * a_count_short_pointer
int * a_count_int_pointer
#define wint_t
The definitions of _GL_FUNCDECL_RPL etc.