/* Decomposed printf argument list.
Copyright (C) 1999, 2002-2003, 2005-2007, 2009-2010 Free Software
Foundation, Inc.
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3, or (at your option)
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation,
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
/* This file can be parametrized with the following macros:
ENABLE_UNISTDIO Set to 1 to enable the unistdio extensions.
PRINTF_FETCHARGS Name of the function to be defined.
STATIC Set to 'static' to declare the function static. */
#ifndef PRINTF_FETCHARGS
# include <config.h>
#endif
/* Specification. */
#ifndef PRINTF_FETCHARGS
# include "printf-args.h"
#endif
#ifdef STATIC
#endif
int
{
size_t i;
{
case TYPE_SCHAR:
break;
case TYPE_UCHAR:
break;
case TYPE_SHORT:
break;
case TYPE_USHORT:
break;
case TYPE_INT:
break;
case TYPE_UINT:
break;
case TYPE_LONGINT:
break;
case TYPE_ULONGINT:
break;
case TYPE_LONGLONGINT:
break;
case TYPE_ULONGLONGINT:
break;
#endif
case TYPE_DOUBLE:
break;
case TYPE_LONGDOUBLE:
break;
case TYPE_CHAR:
break;
#if HAVE_WINT_T
case TYPE_WIDE_CHAR:
/* Although ISO C 99 7.24.1.(2) says that wint_t is "unchanged by
default argument promotions", this is not the case in mingw32,
where wint_t is 'unsigned short'. */
ap->a.a_wide_char =
(sizeof (wint_t) < sizeof (int)
break;
#endif
case TYPE_STRING:
/* A null pointer is an invalid argument for "%s", but in practice
it occurs quite frequently in printf statements that produce
debug output. Use a fallback in this case. */
break;
#if HAVE_WCHAR_T
case TYPE_WIDE_STRING:
/* A null pointer is an invalid argument for "%ls", but in practice
it occurs quite frequently in printf statements that produce
debug output. Use a fallback in this case. */
{
{
(wchar_t)'(',
(wchar_t)')',
(wchar_t)0
};
}
break;
#endif
case TYPE_POINTER:
break;
case TYPE_COUNT_SCHAR_POINTER:
break;
case TYPE_COUNT_SHORT_POINTER:
break;
case TYPE_COUNT_INT_POINTER:
break;
break;
break;
#endif
#if ENABLE_UNISTDIO
/* The unistdio extensions. */
case TYPE_U8_STRING:
/* A null pointer is an invalid argument for "%U", but in practice
it occurs quite frequently in printf statements that produce
debug output. Use a fallback in this case. */
{
{ '(', 'N', 'U', 'L', 'L', ')', 0 };
}
break;
case TYPE_U16_STRING:
/* A null pointer is an invalid argument for "%lU", but in practice
it occurs quite frequently in printf statements that produce
debug output. Use a fallback in this case. */
{
{ '(', 'N', 'U', 'L', 'L', ')', 0 };
}
break;
case TYPE_U32_STRING:
/* A null pointer is an invalid argument for "%llU", but in practice
it occurs quite frequently in printf statements that produce
debug output. Use a fallback in this case. */
{
{ '(', 'N', 'U', 'L', 'L', ')', 0 };
}
break;
#endif
default:
/* Unknown type. */
return -1;
}
return 0;
}