summaryrefslogtreecommitdiffstats
path: root/gl/printf-args.h
diff options
context:
space:
mode:
Diffstat (limited to 'gl/printf-args.h')
-rw-r--r--gl/printf-args.h72
1 files changed, 59 insertions, 13 deletions
diff --git a/gl/printf-args.h b/gl/printf-args.h
index f303cb19..6edc570c 100644
--- a/gl/printf-args.h
+++ b/gl/printf-args.h
@@ -1,5 +1,5 @@
1/* Decomposed printf argument list. 1/* Decomposed printf argument list.
2 Copyright (C) 1999, 2002-2003, 2006-2007, 2011-2023 Free Software 2 Copyright (C) 1999, 2002-2003, 2006-2007, 2011-2025 Free Software
3 Foundation, Inc. 3 Foundation, Inc.
4 4
5 This file is free software: you can redistribute it and/or modify 5 This file is free software: you can redistribute it and/or modify
@@ -28,19 +28,17 @@
28# define PRINTF_FETCHARGS printf_fetchargs 28# define PRINTF_FETCHARGS printf_fetchargs
29#endif 29#endif
30 30
31/* Get size_t. */ 31/* Get size_t, wchar_t. */
32#include <stddef.h> 32#include <stddef.h>
33 33
34/* Get wchar_t. */
35#if HAVE_WCHAR_T
36# include <stddef.h>
37#endif
38
39/* Get wint_t. */ 34/* Get wint_t. */
40#if HAVE_WINT_T 35#if HAVE_WINT_T
41# include <wchar.h> 36# include <wchar.h>
42#endif 37#endif
43 38
39/* Get intN_t, uintN_t, intN_fast_t, uintN_fast_t. */
40#include <stdint.h>
41
44/* Get va_list. */ 42/* Get va_list. */
45#include <stdarg.h> 43#include <stdarg.h>
46 44
@@ -59,6 +57,26 @@ typedef enum
59 TYPE_ULONGINT, 57 TYPE_ULONGINT,
60 TYPE_LONGLONGINT, 58 TYPE_LONGLONGINT,
61 TYPE_ULONGLONGINT, 59 TYPE_ULONGLONGINT,
60 /* According to ISO C 23 ยง 7.23.6.1, "all exact-width integer types",
61 "all minimum-width integer types", and "all fastest minimum-width integer
62 types" defined in <stdint.h> should be supported. But for portability
63 between platforms, we support only those with N = 8, 16, 32, 64. */
64 TYPE_INT8_T,
65 TYPE_UINT8_T,
66 TYPE_INT16_T,
67 TYPE_UINT16_T,
68 TYPE_INT32_T,
69 TYPE_UINT32_T,
70 TYPE_INT64_T,
71 TYPE_UINT64_T,
72 TYPE_INT_FAST8_T,
73 TYPE_UINT_FAST8_T,
74 TYPE_INT_FAST16_T,
75 TYPE_UINT_FAST16_T,
76 TYPE_INT_FAST32_T,
77 TYPE_UINT_FAST32_T,
78 TYPE_INT_FAST64_T,
79 TYPE_UINT_FAST64_T,
62 TYPE_DOUBLE, 80 TYPE_DOUBLE,
63 TYPE_LONGDOUBLE, 81 TYPE_LONGDOUBLE,
64 TYPE_CHAR, 82 TYPE_CHAR,
@@ -66,15 +84,21 @@ typedef enum
66 TYPE_WIDE_CHAR, 84 TYPE_WIDE_CHAR,
67#endif 85#endif
68 TYPE_STRING, 86 TYPE_STRING,
69#if HAVE_WCHAR_T
70 TYPE_WIDE_STRING, 87 TYPE_WIDE_STRING,
71#endif
72 TYPE_POINTER, 88 TYPE_POINTER,
73 TYPE_COUNT_SCHAR_POINTER, 89 TYPE_COUNT_SCHAR_POINTER,
74 TYPE_COUNT_SHORT_POINTER, 90 TYPE_COUNT_SHORT_POINTER,
75 TYPE_COUNT_INT_POINTER, 91 TYPE_COUNT_INT_POINTER,
76 TYPE_COUNT_LONGINT_POINTER, 92 TYPE_COUNT_LONGINT_POINTER,
77 TYPE_COUNT_LONGLONGINT_POINTER 93 TYPE_COUNT_LONGLONGINT_POINTER,
94 TYPE_COUNT_INT8_T_POINTER,
95 TYPE_COUNT_INT16_T_POINTER,
96 TYPE_COUNT_INT32_T_POINTER,
97 TYPE_COUNT_INT64_T_POINTER,
98 TYPE_COUNT_INT_FAST8_T_POINTER,
99 TYPE_COUNT_INT_FAST16_T_POINTER,
100 TYPE_COUNT_INT_FAST32_T_POINTER,
101 TYPE_COUNT_INT_FAST64_T_POINTER
78#if ENABLE_UNISTDIO 102#if ENABLE_UNISTDIO
79 /* The unistdio extensions. */ 103 /* The unistdio extensions. */
80, TYPE_U8_STRING 104, TYPE_U8_STRING
@@ -99,7 +123,23 @@ typedef struct
99 unsigned long int a_ulongint; 123 unsigned long int a_ulongint;
100 long long int a_longlongint; 124 long long int a_longlongint;
101 unsigned long long int a_ulonglongint; 125 unsigned long long int a_ulonglongint;
102 float a_float; 126 int8_t a_int8_t;
127 uint8_t a_uint8_t;
128 int16_t a_int16_t;
129 uint16_t a_uint16_t;
130 int32_t a_int32_t;
131 uint32_t a_uint32_t;
132 int64_t a_int64_t;
133 uint64_t a_uint64_t;
134 int_fast8_t a_int_fast8_t;
135 uint_fast8_t a_uint_fast8_t;
136 int_fast16_t a_int_fast16_t;
137 uint_fast16_t a_uint_fast16_t;
138 int_fast32_t a_int_fast32_t;
139 uint_fast32_t a_uint_fast32_t;
140 int_fast64_t a_int_fast64_t;
141 uint_fast64_t a_uint_fast64_t;
142 float a_float; /* unused */
103 double a_double; 143 double a_double;
104 long double a_longdouble; 144 long double a_longdouble;
105 int a_char; 145 int a_char;
@@ -107,15 +147,21 @@ typedef struct
107 wint_t a_wide_char; 147 wint_t a_wide_char;
108#endif 148#endif
109 const char* a_string; 149 const char* a_string;
110#if HAVE_WCHAR_T
111 const wchar_t* a_wide_string; 150 const wchar_t* a_wide_string;
112#endif
113 void* a_pointer; 151 void* a_pointer;
114 signed char * a_count_schar_pointer; 152 signed char * a_count_schar_pointer;
115 short * a_count_short_pointer; 153 short * a_count_short_pointer;
116 int * a_count_int_pointer; 154 int * a_count_int_pointer;
117 long int * a_count_longint_pointer; 155 long int * a_count_longint_pointer;
118 long long int * a_count_longlongint_pointer; 156 long long int * a_count_longlongint_pointer;
157 int8_t * a_count_int8_t_pointer;
158 int16_t * a_count_int16_t_pointer;
159 int32_t * a_count_int32_t_pointer;
160 int64_t * a_count_int64_t_pointer;
161 int_fast8_t * a_count_int_fast8_t_pointer;
162 int_fast16_t * a_count_int_fast16_t_pointer;
163 int_fast32_t * a_count_int_fast32_t_pointer;
164 int_fast64_t * a_count_int_fast64_t_pointer;
119#if ENABLE_UNISTDIO 165#if ENABLE_UNISTDIO
120 /* The unistdio extensions. */ 166 /* The unistdio extensions. */
121 const uint8_t * a_u8_string; 167 const uint8_t * a_u8_string;