X-Git-Url: https://git.deb.at/w?a=blobdiff_plain;f=intl%2Fprintf-args.h;h=f11e64c0459f52ffc183060c1527b3455ae9741c;hb=69a912c0db0ac135fff332db4f0b05ad9ed2eec6;hp=f95e6bd9c95d16afecf2f304cd25b62e6aaba3a6;hpb=ee5170ade20748797fdde09e370fbb07e585fc9a;p=pkg%2Fabook.git diff --git a/intl/printf-args.h b/intl/printf-args.h index f95e6bd..f11e64c 100644 --- a/intl/printf-args.h +++ b/intl/printf-args.h @@ -1,5 +1,5 @@ /* Decomposed printf argument list. - Copyright (C) 1999, 2002-2003, 2006-2007 Free Software Foundation, Inc. + Copyright (C) 1999, 2002-2003 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published @@ -13,32 +13,22 @@ You should have received a copy of the GNU Library 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, + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef _PRINTF_ARGS_H #define _PRINTF_ARGS_H -/* 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 declared. - STATIC Set to 'static' to declare the function static. */ - -/* Default parameters. */ -#ifndef PRINTF_FETCHARGS -# define PRINTF_FETCHARGS printf_fetchargs -#endif - /* Get size_t. */ #include /* Get wchar_t. */ -#if HAVE_WCHAR_T +#ifdef HAVE_WCHAR_T # include #endif /* Get wint_t. */ -#if HAVE_WINT_T +#ifdef HAVE_WINT_T # include #endif @@ -58,18 +48,20 @@ typedef enum TYPE_UINT, TYPE_LONGINT, TYPE_ULONGINT, -#if HAVE_LONG_LONG_INT +#ifdef HAVE_LONG_LONG TYPE_LONGLONGINT, TYPE_ULONGLONGINT, #endif TYPE_DOUBLE, +#ifdef HAVE_LONG_DOUBLE TYPE_LONGDOUBLE, +#endif TYPE_CHAR, -#if HAVE_WINT_T +#ifdef HAVE_WINT_T TYPE_WIDE_CHAR, #endif TYPE_STRING, -#if HAVE_WCHAR_T +#ifdef HAVE_WCHAR_T TYPE_WIDE_STRING, #endif TYPE_POINTER, @@ -77,15 +69,9 @@ typedef enum TYPE_COUNT_SHORT_POINTER, TYPE_COUNT_INT_POINTER, TYPE_COUNT_LONGINT_POINTER -#if HAVE_LONG_LONG_INT +#ifdef HAVE_LONG_LONG , TYPE_COUNT_LONGLONGINT_POINTER #endif -#if ENABLE_UNISTDIO - /* The unistdio extensions. */ -, TYPE_U8_STRING -, TYPE_U16_STRING -, TYPE_U32_STRING -#endif } arg_type; /* Polymorphic argument */ @@ -94,42 +80,38 @@ typedef struct arg_type type; union { - signed char a_schar; - unsigned char a_uchar; - short a_short; - unsigned short a_ushort; - int a_int; - unsigned int a_uint; - long int a_longint; - unsigned long int a_ulongint; -#if HAVE_LONG_LONG_INT - long long int a_longlongint; - unsigned long long int a_ulonglongint; + signed char a_schar; + unsigned char a_uchar; + short a_short; + unsigned short a_ushort; + int a_int; + unsigned int a_uint; + long int a_longint; + unsigned long int a_ulongint; +#ifdef HAVE_LONG_LONG + long long int a_longlongint; + unsigned long long int a_ulonglongint; #endif - float a_float; - double a_double; - long double a_longdouble; - int a_char; -#if HAVE_WINT_T - wint_t a_wide_char; + float a_float; + double a_double; +#ifdef HAVE_LONG_DOUBLE + long double a_longdouble; #endif - const char* a_string; -#if HAVE_WCHAR_T - const wchar_t* a_wide_string; + int a_char; +#ifdef HAVE_WINT_T + wint_t a_wide_char; #endif - void* a_pointer; - signed char * a_count_schar_pointer; - short * a_count_short_pointer; - int * a_count_int_pointer; - long int * a_count_longint_pointer; -#if HAVE_LONG_LONG_INT - long long int * a_count_longlongint_pointer; + const char* a_string; +#ifdef HAVE_WCHAR_T + const wchar_t* a_wide_string; #endif -#if ENABLE_UNISTDIO - /* The unistdio extensions. */ - const uint8_t * a_u8_string; - const uint16_t * a_u16_string; - const uint32_t * a_u32_string; + void* a_pointer; + signed char * a_count_schar_pointer; + short * a_count_short_pointer; + int * a_count_int_pointer; + long int * a_count_longint_pointer; +#ifdef HAVE_LONG_LONG + long long int * a_count_longlongint_pointer; #endif } a; @@ -150,6 +132,6 @@ STATIC #else extern #endif -int PRINTF_FETCHARGS (va_list args, arguments *a); +int printf_fetchargs (va_list args, arguments *a); #endif /* _PRINTF_ARGS_H */