1/* -*- buffer-read-only: t -*- vi: set ro: */ 2/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ 3#line 1 4/* Decomposed printf argument list. 5 Copyright (C) 1999, 2002-2003, 2006-2007, 2009-2010 Free Software 6 Foundation, Inc. 7 8 This program is free software; you can redistribute it and/or modify 9 it under the terms of the GNU General Public License as published by 10 the Free Software Foundation; either version 3, or (at your option) 11 any later version. 12 13 This program is distributed in the hope that it will be useful, 14 but WITHOUT ANY WARRANTY; without even the implied warranty of 15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 GNU General Public License for more details. 17 18 You should have received a copy of the GNU General Public License along 19 with this program; if not, write to the Free Software Foundation, 20 Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ 21 22#ifndef _PRINTF_ARGS_H 23#define _PRINTF_ARGS_H 24 25/* This file can be parametrized with the following macros: 26 ENABLE_UNISTDIO Set to 1 to enable the unistdio extensions. 27 PRINTF_FETCHARGS Name of the function to be declared. 28 STATIC Set to 'static' to declare the function static. */ 29 30/* Default parameters. */ 31#ifndef PRINTF_FETCHARGS 32# define PRINTF_FETCHARGS printf_fetchargs 33#endif 34 35/* Get size_t. */ 36#include <stddef.h> 37 38/* Get wchar_t. */ 39#if HAVE_WCHAR_T 40# include <stddef.h> 41#endif 42 43/* Get wint_t. */ 44#if HAVE_WINT_T 45# include <wchar.h> 46#endif 47 48/* Get va_list. */ 49#include <stdarg.h> 50 51 52/* Argument types */ 53typedef enum 54{ 55 TYPE_NONE, 56 TYPE_SCHAR, 57 TYPE_UCHAR, 58 TYPE_SHORT, 59 TYPE_USHORT, 60 TYPE_INT, 61 TYPE_UINT, 62 TYPE_LONGINT, 63 TYPE_ULONGINT, 64#if HAVE_LONG_LONG_INT 65 TYPE_LONGLONGINT, 66 TYPE_ULONGLONGINT, 67#endif 68 TYPE_DOUBLE, 69 TYPE_LONGDOUBLE, 70 TYPE_CHAR, 71#if HAVE_WINT_T 72 TYPE_WIDE_CHAR, 73#endif 74 TYPE_STRING, 75#if HAVE_WCHAR_T 76 TYPE_WIDE_STRING, 77#endif 78 TYPE_POINTER, 79 TYPE_COUNT_SCHAR_POINTER, 80 TYPE_COUNT_SHORT_POINTER, 81 TYPE_COUNT_INT_POINTER, 82 TYPE_COUNT_LONGINT_POINTER 83#if HAVE_LONG_LONG_INT 84, TYPE_COUNT_LONGLONGINT_POINTER 85#endif 86#if ENABLE_UNISTDIO 87 /* The unistdio extensions. */ 88, TYPE_U8_STRING 89, TYPE_U16_STRING 90, TYPE_U32_STRING 91#endif 92} arg_type; 93 94/* Polymorphic argument */ 95typedef struct 96{ 97 arg_type type; 98 union 99 { 100 signed char a_schar; 101 unsigned char a_uchar; 102 short a_short; 103 unsigned short a_ushort; 104 int a_int; 105 unsigned int a_uint; 106 long int a_longint; 107 unsigned long int a_ulongint; 108#if HAVE_LONG_LONG_INT 109 long long int a_longlongint; 110 unsigned long long int a_ulonglongint; 111#endif 112 float a_float; 113 double a_double; 114 long double a_longdouble; 115 int a_char; 116#if HAVE_WINT_T 117 wint_t a_wide_char; 118#endif 119 const char* a_string; 120#if HAVE_WCHAR_T 121 const wchar_t* a_wide_string; 122#endif 123 void* a_pointer; 124 signed char * a_count_schar_pointer; 125 short * a_count_short_pointer; 126 int * a_count_int_pointer; 127 long int * a_count_longint_pointer; 128#if HAVE_LONG_LONG_INT 129 long long int * a_count_longlongint_pointer; 130#endif 131#if ENABLE_UNISTDIO 132 /* The unistdio extensions. */ 133 const uint8_t * a_u8_string; 134 const uint16_t * a_u16_string; 135 const uint32_t * a_u32_string; 136#endif 137 } 138 a; 139} 140argument; 141 142typedef struct 143{ 144 size_t count; 145 argument *arg; 146} 147arguments; 148 149 150/* Fetch the arguments, putting them into a. */ 151#ifdef STATIC 152STATIC 153#else 154extern 155#endif 156int PRINTF_FETCHARGS (va_list args, arguments *a); 157 158#endif /* _PRINTF_ARGS_H */ 159