1 /* Decomposed printf argument list.
2 Copyright (C) 1999, 2002-2003, 2006-2007, 2009-2010 Free Software
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 3, or (at your option)
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License along
16 with this program; if not, write to the Free Software Foundation,
17 Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
19 #ifndef _PRINTF_ARGS_H
20 #define _PRINTF_ARGS_H
22 /* This file can be parametrized with the following macros:
23 ENABLE_UNISTDIO Set to 1 to enable the unistdio extensions.
24 PRINTF_FETCHARGS Name of the function to be declared.
25 STATIC Set to 'static' to declare the function static. */
27 /* Default parameters. */
28 #ifndef PRINTF_FETCHARGS
29 # define PRINTF_FETCHARGS printf_fetchargs
61 #if HAVE_LONG_LONG_INT
76 TYPE_COUNT_SCHAR_POINTER
,
77 TYPE_COUNT_SHORT_POINTER
,
78 TYPE_COUNT_INT_POINTER
,
79 TYPE_COUNT_LONGINT_POINTER
80 #if HAVE_LONG_LONG_INT
81 , TYPE_COUNT_LONGLONGINT_POINTER
84 /* The unistdio extensions. */
91 /* Polymorphic argument */
98 unsigned char a_uchar
;
100 unsigned short a_ushort
;
104 unsigned long int a_ulongint
;
105 #if HAVE_LONG_LONG_INT
106 long long int a_longlongint
;
107 unsigned long long int a_ulonglongint
;
111 long double a_longdouble
;
116 const char* a_string
;
118 const wchar_t* a_wide_string
;
121 signed char * a_count_schar_pointer
;
122 short * a_count_short_pointer
;
123 int * a_count_int_pointer
;
124 long int * a_count_longint_pointer
;
125 #if HAVE_LONG_LONG_INT
126 long long int * a_count_longlongint_pointer
;
129 /* The unistdio extensions. */
130 const uint8_t * a_u8_string
;
131 const uint16_t * a_u16_string
;
132 const uint32_t * a_u32_string
;
147 /* Fetch the arguments, putting them into a. */
153 int PRINTF_FETCHARGS (va_list args
, arguments
*a
);
155 #endif /* _PRINTF_ARGS_H */