Mercurial > hg > octave-nkf > gnulib-hg
annotate lib/printf-args.h @ 12559:c2cbabec01dd
update nearly all FSF copyright year lists to include 2010
Use the same procedure as for 2009, outlined in
http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/20081
author | Jim Meyering <meyering@redhat.com> |
---|---|
date | Fri, 01 Jan 2010 10:31:12 +0100 |
parents | b5e42ef33b49 |
children | 97fc9a21a8fb |
rev | line source |
---|---|
4224
83eabea25586
New modules vasnprintf and vasprintf.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
1 /* Decomposed printf argument list. |
12559
c2cbabec01dd
update nearly all FSF copyright year lists to include 2010
Jim Meyering <meyering@redhat.com>
parents:
12518
diff
changeset
|
2 Copyright (C) 1999, 2002-2003, 2006-2007, 2009-2010 Free Software |
c2cbabec01dd
update nearly all FSF copyright year lists to include 2010
Jim Meyering <meyering@redhat.com>
parents:
12518
diff
changeset
|
3 Foundation, Inc. |
4224
83eabea25586
New modules vasnprintf and vasprintf.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
4 |
4440
e58a1c05a6ba
Update gettext source files from gettext automatically, using srclist-update.
Paul Eggert <eggert@cs.ucla.edu>
parents:
4224
diff
changeset
|
5 This program is free software; you can redistribute it and/or modify |
e58a1c05a6ba
Update gettext source files from gettext automatically, using srclist-update.
Paul Eggert <eggert@cs.ucla.edu>
parents:
4224
diff
changeset
|
6 it under the terms of the GNU General Public License as published by |
e58a1c05a6ba
Update gettext source files from gettext automatically, using srclist-update.
Paul Eggert <eggert@cs.ucla.edu>
parents:
4224
diff
changeset
|
7 the Free Software Foundation; either version 2, or (at your option) |
4224
83eabea25586
New modules vasnprintf and vasprintf.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
8 any later version. |
83eabea25586
New modules vasnprintf and vasprintf.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
9 |
83eabea25586
New modules vasnprintf and vasprintf.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
10 This program is distributed in the hope that it will be useful, |
83eabea25586
New modules vasnprintf and vasprintf.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
11 but WITHOUT ANY WARRANTY; without even the implied warranty of |
4440
e58a1c05a6ba
Update gettext source files from gettext automatically, using srclist-update.
Paul Eggert <eggert@cs.ucla.edu>
parents:
4224
diff
changeset
|
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
e58a1c05a6ba
Update gettext source files from gettext automatically, using srclist-update.
Paul Eggert <eggert@cs.ucla.edu>
parents:
4224
diff
changeset
|
13 GNU General Public License for more details. |
4224
83eabea25586
New modules vasnprintf and vasprintf.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
14 |
4440
e58a1c05a6ba
Update gettext source files from gettext automatically, using srclist-update.
Paul Eggert <eggert@cs.ucla.edu>
parents:
4224
diff
changeset
|
15 You should have received a copy of the GNU General Public License along |
e58a1c05a6ba
Update gettext source files from gettext automatically, using srclist-update.
Paul Eggert <eggert@cs.ucla.edu>
parents:
4224
diff
changeset
|
16 with this program; if not, write to the Free Software Foundation, |
5848
a48fb0e98c8c
*** empty log message ***
Paul Eggert <eggert@cs.ucla.edu>
parents:
4872
diff
changeset
|
17 Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ |
4224
83eabea25586
New modules vasnprintf and vasprintf.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
18 |
83eabea25586
New modules vasnprintf and vasprintf.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
19 #ifndef _PRINTF_ARGS_H |
83eabea25586
New modules vasnprintf and vasprintf.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
20 #define _PRINTF_ARGS_H |
83eabea25586
New modules vasnprintf and vasprintf.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
21 |
8973
7df86a1985e4
Add support for Unicode strings (both as output format and as arguments to
Bruno Haible <bruno@clisp.org>
parents:
8648
diff
changeset
|
22 /* This file can be parametrized with the following macros: |
7df86a1985e4
Add support for Unicode strings (both as output format and as arguments to
Bruno Haible <bruno@clisp.org>
parents:
8648
diff
changeset
|
23 ENABLE_UNISTDIO Set to 1 to enable the unistdio extensions. |
7df86a1985e4
Add support for Unicode strings (both as output format and as arguments to
Bruno Haible <bruno@clisp.org>
parents:
8648
diff
changeset
|
24 PRINTF_FETCHARGS Name of the function to be declared. |
7df86a1985e4
Add support for Unicode strings (both as output format and as arguments to
Bruno Haible <bruno@clisp.org>
parents:
8648
diff
changeset
|
25 STATIC Set to 'static' to declare the function static. */ |
7df86a1985e4
Add support for Unicode strings (both as output format and as arguments to
Bruno Haible <bruno@clisp.org>
parents:
8648
diff
changeset
|
26 |
7df86a1985e4
Add support for Unicode strings (both as output format and as arguments to
Bruno Haible <bruno@clisp.org>
parents:
8648
diff
changeset
|
27 /* Default parameters. */ |
7df86a1985e4
Add support for Unicode strings (both as output format and as arguments to
Bruno Haible <bruno@clisp.org>
parents:
8648
diff
changeset
|
28 #ifndef PRINTF_FETCHARGS |
7df86a1985e4
Add support for Unicode strings (both as output format and as arguments to
Bruno Haible <bruno@clisp.org>
parents:
8648
diff
changeset
|
29 # define PRINTF_FETCHARGS printf_fetchargs |
7df86a1985e4
Add support for Unicode strings (both as output format and as arguments to
Bruno Haible <bruno@clisp.org>
parents:
8648
diff
changeset
|
30 #endif |
7df86a1985e4
Add support for Unicode strings (both as output format and as arguments to
Bruno Haible <bruno@clisp.org>
parents:
8648
diff
changeset
|
31 |
4872
c5afc99b8ce5
Use xsize.h to protect against memory size overflows.
Bruno Haible <bruno@clisp.org>
parents:
4440
diff
changeset
|
32 /* Get size_t. */ |
c5afc99b8ce5
Use xsize.h to protect against memory size overflows.
Bruno Haible <bruno@clisp.org>
parents:
4440
diff
changeset
|
33 #include <stddef.h> |
c5afc99b8ce5
Use xsize.h to protect against memory size overflows.
Bruno Haible <bruno@clisp.org>
parents:
4440
diff
changeset
|
34 |
4224
83eabea25586
New modules vasnprintf and vasprintf.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
35 /* Get wchar_t. */ |
8051
9c2b0396b27c
Stylistic change: Use '#if HAVE_*' instead of '#ifdef HAVE_*'.
Bruno Haible <bruno@clisp.org>
parents:
7475
diff
changeset
|
36 #if HAVE_WCHAR_T |
4224
83eabea25586
New modules vasnprintf and vasprintf.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
37 # include <stddef.h> |
83eabea25586
New modules vasnprintf and vasprintf.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
38 #endif |
83eabea25586
New modules vasnprintf and vasprintf.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
39 |
83eabea25586
New modules vasnprintf and vasprintf.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
40 /* Get wint_t. */ |
8051
9c2b0396b27c
Stylistic change: Use '#if HAVE_*' instead of '#ifdef HAVE_*'.
Bruno Haible <bruno@clisp.org>
parents:
7475
diff
changeset
|
41 #if HAVE_WINT_T |
4224
83eabea25586
New modules vasnprintf and vasprintf.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
42 # include <wchar.h> |
83eabea25586
New modules vasnprintf and vasprintf.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
43 #endif |
83eabea25586
New modules vasnprintf and vasprintf.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
44 |
83eabea25586
New modules vasnprintf and vasprintf.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
45 /* Get va_list. */ |
83eabea25586
New modules vasnprintf and vasprintf.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
46 #include <stdarg.h> |
83eabea25586
New modules vasnprintf and vasprintf.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
47 |
83eabea25586
New modules vasnprintf and vasprintf.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
48 |
83eabea25586
New modules vasnprintf and vasprintf.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
49 /* Argument types */ |
83eabea25586
New modules vasnprintf and vasprintf.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
50 typedef enum |
83eabea25586
New modules vasnprintf and vasprintf.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
51 { |
83eabea25586
New modules vasnprintf and vasprintf.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
52 TYPE_NONE, |
83eabea25586
New modules vasnprintf and vasprintf.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
53 TYPE_SCHAR, |
83eabea25586
New modules vasnprintf and vasprintf.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
54 TYPE_UCHAR, |
83eabea25586
New modules vasnprintf and vasprintf.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
55 TYPE_SHORT, |
83eabea25586
New modules vasnprintf and vasprintf.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
56 TYPE_USHORT, |
83eabea25586
New modules vasnprintf and vasprintf.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
57 TYPE_INT, |
83eabea25586
New modules vasnprintf and vasprintf.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
58 TYPE_UINT, |
83eabea25586
New modules vasnprintf and vasprintf.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
59 TYPE_LONGINT, |
83eabea25586
New modules vasnprintf and vasprintf.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
60 TYPE_ULONGINT, |
8051
9c2b0396b27c
Stylistic change: Use '#if HAVE_*' instead of '#ifdef HAVE_*'.
Bruno Haible <bruno@clisp.org>
parents:
7475
diff
changeset
|
61 #if HAVE_LONG_LONG_INT |
4224
83eabea25586
New modules vasnprintf and vasprintf.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
62 TYPE_LONGLONGINT, |
83eabea25586
New modules vasnprintf and vasprintf.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
63 TYPE_ULONGLONGINT, |
83eabea25586
New modules vasnprintf and vasprintf.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
64 #endif |
83eabea25586
New modules vasnprintf and vasprintf.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
65 TYPE_DOUBLE, |
83eabea25586
New modules vasnprintf and vasprintf.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
66 TYPE_LONGDOUBLE, |
83eabea25586
New modules vasnprintf and vasprintf.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
67 TYPE_CHAR, |
8051
9c2b0396b27c
Stylistic change: Use '#if HAVE_*' instead of '#ifdef HAVE_*'.
Bruno Haible <bruno@clisp.org>
parents:
7475
diff
changeset
|
68 #if HAVE_WINT_T |
4224
83eabea25586
New modules vasnprintf and vasprintf.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
69 TYPE_WIDE_CHAR, |
83eabea25586
New modules vasnprintf and vasprintf.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
70 #endif |
83eabea25586
New modules vasnprintf and vasprintf.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
71 TYPE_STRING, |
8051
9c2b0396b27c
Stylistic change: Use '#if HAVE_*' instead of '#ifdef HAVE_*'.
Bruno Haible <bruno@clisp.org>
parents:
7475
diff
changeset
|
72 #if HAVE_WCHAR_T |
4224
83eabea25586
New modules vasnprintf and vasprintf.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
73 TYPE_WIDE_STRING, |
83eabea25586
New modules vasnprintf and vasprintf.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
74 #endif |
83eabea25586
New modules vasnprintf and vasprintf.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
75 TYPE_POINTER, |
83eabea25586
New modules vasnprintf and vasprintf.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
76 TYPE_COUNT_SCHAR_POINTER, |
83eabea25586
New modules vasnprintf and vasprintf.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
77 TYPE_COUNT_SHORT_POINTER, |
83eabea25586
New modules vasnprintf and vasprintf.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
78 TYPE_COUNT_INT_POINTER, |
83eabea25586
New modules vasnprintf and vasprintf.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
79 TYPE_COUNT_LONGINT_POINTER |
8051
9c2b0396b27c
Stylistic change: Use '#if HAVE_*' instead of '#ifdef HAVE_*'.
Bruno Haible <bruno@clisp.org>
parents:
7475
diff
changeset
|
80 #if HAVE_LONG_LONG_INT |
4224
83eabea25586
New modules vasnprintf and vasprintf.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
81 , TYPE_COUNT_LONGLONGINT_POINTER |
83eabea25586
New modules vasnprintf and vasprintf.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
82 #endif |
8973
7df86a1985e4
Add support for Unicode strings (both as output format and as arguments to
Bruno Haible <bruno@clisp.org>
parents:
8648
diff
changeset
|
83 #if ENABLE_UNISTDIO |
7df86a1985e4
Add support for Unicode strings (both as output format and as arguments to
Bruno Haible <bruno@clisp.org>
parents:
8648
diff
changeset
|
84 /* The unistdio extensions. */ |
7df86a1985e4
Add support for Unicode strings (both as output format and as arguments to
Bruno Haible <bruno@clisp.org>
parents:
8648
diff
changeset
|
85 , TYPE_U8_STRING |
7df86a1985e4
Add support for Unicode strings (both as output format and as arguments to
Bruno Haible <bruno@clisp.org>
parents:
8648
diff
changeset
|
86 , TYPE_U16_STRING |
7df86a1985e4
Add support for Unicode strings (both as output format and as arguments to
Bruno Haible <bruno@clisp.org>
parents:
8648
diff
changeset
|
87 , TYPE_U32_STRING |
7df86a1985e4
Add support for Unicode strings (both as output format and as arguments to
Bruno Haible <bruno@clisp.org>
parents:
8648
diff
changeset
|
88 #endif |
4224
83eabea25586
New modules vasnprintf and vasprintf.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
89 } arg_type; |
83eabea25586
New modules vasnprintf and vasprintf.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
90 |
83eabea25586
New modules vasnprintf and vasprintf.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
91 /* Polymorphic argument */ |
83eabea25586
New modules vasnprintf and vasprintf.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
92 typedef struct |
83eabea25586
New modules vasnprintf and vasprintf.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
93 { |
83eabea25586
New modules vasnprintf and vasprintf.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
94 arg_type type; |
83eabea25586
New modules vasnprintf and vasprintf.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
95 union |
83eabea25586
New modules vasnprintf and vasprintf.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
96 { |
12421
e8d2c6fc33ad
Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents:
8973
diff
changeset
|
97 signed char a_schar; |
e8d2c6fc33ad
Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents:
8973
diff
changeset
|
98 unsigned char a_uchar; |
e8d2c6fc33ad
Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents:
8973
diff
changeset
|
99 short a_short; |
e8d2c6fc33ad
Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents:
8973
diff
changeset
|
100 unsigned short a_ushort; |
e8d2c6fc33ad
Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents:
8973
diff
changeset
|
101 int a_int; |
e8d2c6fc33ad
Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents:
8973
diff
changeset
|
102 unsigned int a_uint; |
e8d2c6fc33ad
Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents:
8973
diff
changeset
|
103 long int a_longint; |
e8d2c6fc33ad
Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents:
8973
diff
changeset
|
104 unsigned long int a_ulongint; |
8051
9c2b0396b27c
Stylistic change: Use '#if HAVE_*' instead of '#ifdef HAVE_*'.
Bruno Haible <bruno@clisp.org>
parents:
7475
diff
changeset
|
105 #if HAVE_LONG_LONG_INT |
12421
e8d2c6fc33ad
Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents:
8973
diff
changeset
|
106 long long int a_longlongint; |
e8d2c6fc33ad
Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents:
8973
diff
changeset
|
107 unsigned long long int a_ulonglongint; |
4224
83eabea25586
New modules vasnprintf and vasprintf.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
108 #endif |
12421
e8d2c6fc33ad
Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents:
8973
diff
changeset
|
109 float a_float; |
e8d2c6fc33ad
Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents:
8973
diff
changeset
|
110 double a_double; |
e8d2c6fc33ad
Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents:
8973
diff
changeset
|
111 long double a_longdouble; |
e8d2c6fc33ad
Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents:
8973
diff
changeset
|
112 int a_char; |
8051
9c2b0396b27c
Stylistic change: Use '#if HAVE_*' instead of '#ifdef HAVE_*'.
Bruno Haible <bruno@clisp.org>
parents:
7475
diff
changeset
|
113 #if HAVE_WINT_T |
12421
e8d2c6fc33ad
Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents:
8973
diff
changeset
|
114 wint_t a_wide_char; |
4224
83eabea25586
New modules vasnprintf and vasprintf.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
115 #endif |
12421
e8d2c6fc33ad
Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents:
8973
diff
changeset
|
116 const char* a_string; |
8051
9c2b0396b27c
Stylistic change: Use '#if HAVE_*' instead of '#ifdef HAVE_*'.
Bruno Haible <bruno@clisp.org>
parents:
7475
diff
changeset
|
117 #if HAVE_WCHAR_T |
12421
e8d2c6fc33ad
Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents:
8973
diff
changeset
|
118 const wchar_t* a_wide_string; |
4224
83eabea25586
New modules vasnprintf and vasprintf.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
119 #endif |
12421
e8d2c6fc33ad
Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents:
8973
diff
changeset
|
120 void* a_pointer; |
e8d2c6fc33ad
Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents:
8973
diff
changeset
|
121 signed char * a_count_schar_pointer; |
e8d2c6fc33ad
Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents:
8973
diff
changeset
|
122 short * a_count_short_pointer; |
e8d2c6fc33ad
Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents:
8973
diff
changeset
|
123 int * a_count_int_pointer; |
e8d2c6fc33ad
Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents:
8973
diff
changeset
|
124 long int * a_count_longint_pointer; |
8051
9c2b0396b27c
Stylistic change: Use '#if HAVE_*' instead of '#ifdef HAVE_*'.
Bruno Haible <bruno@clisp.org>
parents:
7475
diff
changeset
|
125 #if HAVE_LONG_LONG_INT |
12421
e8d2c6fc33ad
Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents:
8973
diff
changeset
|
126 long long int * a_count_longlongint_pointer; |
4224
83eabea25586
New modules vasnprintf and vasprintf.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
127 #endif |
8973
7df86a1985e4
Add support for Unicode strings (both as output format and as arguments to
Bruno Haible <bruno@clisp.org>
parents:
8648
diff
changeset
|
128 #if ENABLE_UNISTDIO |
7df86a1985e4
Add support for Unicode strings (both as output format and as arguments to
Bruno Haible <bruno@clisp.org>
parents:
8648
diff
changeset
|
129 /* The unistdio extensions. */ |
12421
e8d2c6fc33ad
Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents:
8973
diff
changeset
|
130 const uint8_t * a_u8_string; |
e8d2c6fc33ad
Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents:
8973
diff
changeset
|
131 const uint16_t * a_u16_string; |
e8d2c6fc33ad
Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents:
8973
diff
changeset
|
132 const uint32_t * a_u32_string; |
8973
7df86a1985e4
Add support for Unicode strings (both as output format and as arguments to
Bruno Haible <bruno@clisp.org>
parents:
8648
diff
changeset
|
133 #endif |
4224
83eabea25586
New modules vasnprintf and vasprintf.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
134 } |
83eabea25586
New modules vasnprintf and vasprintf.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
135 a; |
83eabea25586
New modules vasnprintf and vasprintf.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
136 } |
83eabea25586
New modules vasnprintf and vasprintf.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
137 argument; |
83eabea25586
New modules vasnprintf and vasprintf.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
138 |
83eabea25586
New modules vasnprintf and vasprintf.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
139 typedef struct |
83eabea25586
New modules vasnprintf and vasprintf.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
140 { |
4872
c5afc99b8ce5
Use xsize.h to protect against memory size overflows.
Bruno Haible <bruno@clisp.org>
parents:
4440
diff
changeset
|
141 size_t count; |
4224
83eabea25586
New modules vasnprintf and vasprintf.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
142 argument *arg; |
83eabea25586
New modules vasnprintf and vasprintf.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
143 } |
83eabea25586
New modules vasnprintf and vasprintf.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
144 arguments; |
83eabea25586
New modules vasnprintf and vasprintf.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
145 |
83eabea25586
New modules vasnprintf and vasprintf.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
146 |
83eabea25586
New modules vasnprintf and vasprintf.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
147 /* Fetch the arguments, putting them into a. */ |
83eabea25586
New modules vasnprintf and vasprintf.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
148 #ifdef STATIC |
83eabea25586
New modules vasnprintf and vasprintf.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
149 STATIC |
83eabea25586
New modules vasnprintf and vasprintf.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
150 #else |
83eabea25586
New modules vasnprintf and vasprintf.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
151 extern |
83eabea25586
New modules vasnprintf and vasprintf.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
152 #endif |
8973
7df86a1985e4
Add support for Unicode strings (both as output format and as arguments to
Bruno Haible <bruno@clisp.org>
parents:
8648
diff
changeset
|
153 int PRINTF_FETCHARGS (va_list args, arguments *a); |
4224
83eabea25586
New modules vasnprintf and vasprintf.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
154 |
83eabea25586
New modules vasnprintf and vasprintf.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
155 #endif /* _PRINTF_ARGS_H */ |