| 1 | /* Decomposed printf argument list.
|
|---|
| 2 | Copyright (C) 1999, 2002-2003 Free Software Foundation, Inc.
|
|---|
| 3 |
|
|---|
| 4 | This program is free software; you can redistribute it and/or modify it
|
|---|
| 5 | under the terms of the GNU Library General Public License as published
|
|---|
| 6 | by the Free Software Foundation; either version 2, or (at your option)
|
|---|
| 7 | any later version.
|
|---|
| 8 |
|
|---|
| 9 | This program is distributed in the hope that it will be useful,
|
|---|
| 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|---|
| 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|---|
| 12 | Library General Public License for more details.
|
|---|
| 13 |
|
|---|
| 14 | You should have received a copy of the GNU Library General Public
|
|---|
| 15 | License along with this program; if not, write to the Free Software
|
|---|
| 16 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
|---|
| 17 | USA. */
|
|---|
| 18 |
|
|---|
| 19 | #ifndef _PRINTF_ARGS_H
|
|---|
| 20 | #define _PRINTF_ARGS_H
|
|---|
| 21 |
|
|---|
| 22 | /* Get size_t. */
|
|---|
| 23 | #include <stddef.h>
|
|---|
| 24 |
|
|---|
| 25 | /* Get wchar_t. */
|
|---|
| 26 | #ifdef HAVE_WCHAR_T
|
|---|
| 27 | # include <stddef.h>
|
|---|
| 28 | #endif
|
|---|
| 29 |
|
|---|
| 30 | /* Get wint_t. */
|
|---|
| 31 | #ifdef HAVE_WINT_T
|
|---|
| 32 | # include <wchar.h>
|
|---|
| 33 | #endif
|
|---|
| 34 |
|
|---|
| 35 | /* Get va_list. */
|
|---|
| 36 | #include <stdarg.h>
|
|---|
| 37 |
|
|---|
| 38 |
|
|---|
| 39 | /* Argument types */
|
|---|
| 40 | typedef enum
|
|---|
| 41 | {
|
|---|
| 42 | TYPE_NONE,
|
|---|
| 43 | TYPE_SCHAR,
|
|---|
| 44 | TYPE_UCHAR,
|
|---|
| 45 | TYPE_SHORT,
|
|---|
| 46 | TYPE_USHORT,
|
|---|
| 47 | TYPE_INT,
|
|---|
| 48 | TYPE_UINT,
|
|---|
| 49 | TYPE_LONGINT,
|
|---|
| 50 | TYPE_ULONGINT,
|
|---|
| 51 | #ifdef HAVE_LONG_LONG
|
|---|
| 52 | TYPE_LONGLONGINT,
|
|---|
| 53 | TYPE_ULONGLONGINT,
|
|---|
| 54 | #endif
|
|---|
| 55 | TYPE_DOUBLE,
|
|---|
| 56 | #ifdef HAVE_LONG_DOUBLE
|
|---|
| 57 | TYPE_LONGDOUBLE,
|
|---|
| 58 | #endif
|
|---|
| 59 | TYPE_CHAR,
|
|---|
| 60 | #ifdef HAVE_WINT_T
|
|---|
| 61 | TYPE_WIDE_CHAR,
|
|---|
| 62 | #endif
|
|---|
| 63 | TYPE_STRING,
|
|---|
| 64 | #ifdef HAVE_WCHAR_T
|
|---|
| 65 | TYPE_WIDE_STRING,
|
|---|
| 66 | #endif
|
|---|
| 67 | TYPE_POINTER,
|
|---|
| 68 | TYPE_COUNT_SCHAR_POINTER,
|
|---|
| 69 | TYPE_COUNT_SHORT_POINTER,
|
|---|
| 70 | TYPE_COUNT_INT_POINTER,
|
|---|
| 71 | TYPE_COUNT_LONGINT_POINTER
|
|---|
| 72 | #ifdef HAVE_LONG_LONG
|
|---|
| 73 | , TYPE_COUNT_LONGLONGINT_POINTER
|
|---|
| 74 | #endif
|
|---|
| 75 | } arg_type;
|
|---|
| 76 |
|
|---|
| 77 | /* Polymorphic argument */
|
|---|
|
|---|