aboutsummaryrefslogtreecommitdiff
path: root/src/daemon/https/lgl/printf-args.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/daemon/https/lgl/printf-args.h')
-rw-r--r--src/daemon/https/lgl/printf-args.h152
1 files changed, 0 insertions, 152 deletions
diff --git a/src/daemon/https/lgl/printf-args.h b/src/daemon/https/lgl/printf-args.h
deleted file mode 100644
index 5edbdf40..00000000
--- a/src/daemon/https/lgl/printf-args.h
+++ /dev/null
@@ -1,152 +0,0 @@
1/* Decomposed printf argument list.
2 Copyright (C) 1999, 2002-2003, 2006-2007 Free Software Foundation, Inc.
3
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU Lesser General Public License as published by
6 the Free Software Foundation; either version 2.1, 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
12 GNU Lesser General Public License for more details.
13
14 You should have received a copy of the GNU Lesser General Public License along
15 with this program; if not, write to the Free Software Foundation,
16 Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
17
18#ifndef _PRINTF_ARGS_H
19#define _PRINTF_ARGS_H
20
21/* This file can be parametrized with the following macros:
22 ENABLE_UNISTDIO Set to 1 to enable the unistdio extensions.
23 PRINTF_FETCHARGS Name of the function to be declared.
24 STATIC Set to 'static' to declare the function static. */
25
26/* Default parameters. */
27#ifndef PRINTF_FETCHARGS
28# define PRINTF_FETCHARGS printf_fetchargs
29#endif
30
31/* Get size_t. */
32#include <stddef.h>
33
34/* Get wchar_t. */
35#if HAVE_WCHAR_T
36# include <stddef.h>
37#endif
38
39/* Get wint_t. */
40#if HAVE_WINT_T
41# include <wchar.h>
42#endif
43
44/* Get va_list. */
45#include <stdarg.h>
46
47
48/* Argument types */
49typedef enum
50{
51 TYPE_NONE,
52 TYPE_SCHAR,
53 TYPE_UCHAR,
54 TYPE_SHORT,
55 TYPE_USHORT,
56 TYPE_INT,
57 TYPE_UINT,
58 TYPE_LONGINT,
59 TYPE_ULONGINT,
60#if HAVE_LONG_LONG_INT
61 TYPE_LONGLONGINT,
62 TYPE_ULONGLONGINT,
63#endif
64 TYPE_DOUBLE,
65 TYPE_LONGDOUBLE,
66 TYPE_CHAR,
67#if HAVE_WINT_T
68 TYPE_WIDE_CHAR,
69#endif
70 TYPE_STRING,
71#if HAVE_WCHAR_T
72 TYPE_WIDE_STRING,
73#endif
74 TYPE_POINTER,
75 TYPE_COUNT_SCHAR_POINTER,
76 TYPE_COUNT_SHORT_POINTER,
77 TYPE_COUNT_INT_POINTER,
78 TYPE_COUNT_LONGINT_POINTER
79#if HAVE_LONG_LONG_INT
80 , TYPE_COUNT_LONGLONGINT_POINTER
81#endif
82#if ENABLE_UNISTDIO
83 /* The unistdio extensions. */
84 , TYPE_U8_STRING, TYPE_U16_STRING, TYPE_U32_STRING
85#endif
86} arg_type;
87
88/* Polymorphic argument */
89typedef struct
90{
91 arg_type type;
92 union
93 {
94 signed char a_schar;
95 unsigned char a_uchar;
96 short a_short;
97 unsigned short a_ushort;
98 int a_int;
99 unsigned int a_uint;
100 long int a_longint;
101 unsigned long int a_ulongint;
102#if HAVE_LONG_LONG_INT
103 long long int a_longlongint;
104 unsigned long long int a_ulonglongint;
105#endif
106 float a_float;
107 double a_double;
108 long double a_longdouble;
109 int a_char;
110#if HAVE_WINT_T
111 wint_t a_wide_char;
112#endif
113 const char *a_string;
114#if HAVE_WCHAR_T
115 const wchar_t *a_wide_string;
116#endif
117 void *a_pointer;
118 signed char *a_count_schar_pointer;
119 short *a_count_short_pointer;
120 int *a_count_int_pointer;
121 long int *a_count_longint_pointer;
122#if HAVE_LONG_LONG_INT
123 long long int *a_count_longlongint_pointer;
124#endif
125#if ENABLE_UNISTDIO
126 /* The unistdio extensions. */
127 const uint8_t *a_u8_string;
128 const uint16_t *a_u16_string;
129 const uint32_t *a_u32_string;
130#endif
131 }
132 a;
133}
134argument;
135
136typedef struct
137{
138 size_t count;
139 argument *arg;
140}
141arguments;
142
143
144/* Fetch the arguments, putting them into a. */
145#ifdef STATIC
146STATIC
147#else
148extern
149#endif
150int PRINTF_FETCHARGS (va_list args, arguments * a);
151
152#endif /* _PRINTF_ARGS_H */