pocxxeci 0.30.1
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of pocxxeci might be problematic. Click here for more details.
- package/LICENSE +19 -0
- package/Makefile +18 -0
- package/README.md +52 -0
- package/binding.gyp +81 -0
- package/index.d.ts +273 -0
- package/index.js +45 -0
- package/lib/bindings.js +1 -0
- package/lib/document.js +122 -0
- package/lib/element.js +82 -0
- package/lib/sax_parser.js +38 -0
- package/package.json +70 -0
- package/src/html_document.cc +7 -0
- package/src/html_document.h +18 -0
- package/src/libxmljs.cc +252 -0
- package/src/libxmljs.h +53 -0
- package/src/xml_attribute.cc +173 -0
- package/src/xml_attribute.h +40 -0
- package/src/xml_comment.cc +117 -0
- package/src/xml_comment.h +30 -0
- package/src/xml_document.cc +810 -0
- package/src/xml_document.h +67 -0
- package/src/xml_element.cc +565 -0
- package/src/xml_element.h +61 -0
- package/src/xml_namespace.cc +158 -0
- package/src/xml_namespace.h +39 -0
- package/src/xml_node.cc +761 -0
- package/src/xml_node.h +73 -0
- package/src/xml_pi.cc +161 -0
- package/src/xml_pi.h +34 -0
- package/src/xml_sax_parser.cc +424 -0
- package/src/xml_sax_parser.h +73 -0
- package/src/xml_syntax_error.cc +66 -0
- package/src/xml_syntax_error.h +25 -0
- package/src/xml_text.cc +320 -0
- package/src/xml_text.h +48 -0
- package/src/xml_textwriter.cc +315 -0
- package/src/xml_textwriter.h +62 -0
- package/src/xml_xpath_context.cc +70 -0
- package/src/xml_xpath_context.h +23 -0
- package/vendor/libxml/Copyright +23 -0
- package/vendor/libxml/DOCBparser.c +305 -0
- package/vendor/libxml/HTMLparser.c +7287 -0
- package/vendor/libxml/HTMLtree.c +1200 -0
- package/vendor/libxml/Makefile +2983 -0
- package/vendor/libxml/SAX.c +180 -0
- package/vendor/libxml/SAX2.c +3036 -0
- package/vendor/libxml/buf.c +1351 -0
- package/vendor/libxml/buf.h +72 -0
- package/vendor/libxml/c14n.c +2234 -0
- package/vendor/libxml/catalog.c +3828 -0
- package/vendor/libxml/chvalid.c +336 -0
- package/vendor/libxml/config.h +294 -0
- package/vendor/libxml/config.h.gch +0 -0
- package/vendor/libxml/debugXML.c +3423 -0
- package/vendor/libxml/dict.c +1298 -0
- package/vendor/libxml/elfgcchack.h +17818 -0
- package/vendor/libxml/enc.h +32 -0
- package/vendor/libxml/encoding.c +3975 -0
- package/vendor/libxml/entities.c +1163 -0
- package/vendor/libxml/error.c +998 -0
- package/vendor/libxml/globals.c +1126 -0
- package/vendor/libxml/hash.c +1146 -0
- package/vendor/libxml/include/libxml/DOCBparser.h +96 -0
- package/vendor/libxml/include/libxml/HTMLparser.h +306 -0
- package/vendor/libxml/include/libxml/HTMLtree.h +147 -0
- package/vendor/libxml/include/libxml/Makefile +725 -0
- package/vendor/libxml/include/libxml/Makefile.am +54 -0
- package/vendor/libxml/include/libxml/Makefile.in +725 -0
- package/vendor/libxml/include/libxml/SAX.h +173 -0
- package/vendor/libxml/include/libxml/SAX2.h +178 -0
- package/vendor/libxml/include/libxml/c14n.h +128 -0
- package/vendor/libxml/include/libxml/catalog.h +182 -0
- package/vendor/libxml/include/libxml/chvalid.h +230 -0
- package/vendor/libxml/include/libxml/debugXML.h +217 -0
- package/vendor/libxml/include/libxml/dict.h +79 -0
- package/vendor/libxml/include/libxml/encoding.h +245 -0
- package/vendor/libxml/include/libxml/entities.h +151 -0
- package/vendor/libxml/include/libxml/globals.h +508 -0
- package/vendor/libxml/include/libxml/hash.h +236 -0
- package/vendor/libxml/include/libxml/list.h +137 -0
- package/vendor/libxml/include/libxml/nanoftp.h +163 -0
- package/vendor/libxml/include/libxml/nanohttp.h +81 -0
- package/vendor/libxml/include/libxml/parser.h +1243 -0
- package/vendor/libxml/include/libxml/parserInternals.h +644 -0
- package/vendor/libxml/include/libxml/pattern.h +100 -0
- package/vendor/libxml/include/libxml/relaxng.h +217 -0
- package/vendor/libxml/include/libxml/schemasInternals.h +958 -0
- package/vendor/libxml/include/libxml/schematron.h +142 -0
- package/vendor/libxml/include/libxml/threads.h +89 -0
- package/vendor/libxml/include/libxml/tree.h +1311 -0
- package/vendor/libxml/include/libxml/uri.h +94 -0
- package/vendor/libxml/include/libxml/valid.h +458 -0
- package/vendor/libxml/include/libxml/xinclude.h +129 -0
- package/vendor/libxml/include/libxml/xlink.h +189 -0
- package/vendor/libxml/include/libxml/xmlIO.h +368 -0
- package/vendor/libxml/include/libxml/xmlautomata.h +146 -0
- package/vendor/libxml/include/libxml/xmlerror.h +945 -0
- package/vendor/libxml/include/libxml/xmlexports.h +77 -0
- package/vendor/libxml/include/libxml/xmlmemory.h +224 -0
- package/vendor/libxml/include/libxml/xmlmodule.h +57 -0
- package/vendor/libxml/include/libxml/xmlreader.h +428 -0
- package/vendor/libxml/include/libxml/xmlregexp.h +222 -0
- package/vendor/libxml/include/libxml/xmlsave.h +88 -0
- package/vendor/libxml/include/libxml/xmlschemas.h +246 -0
- package/vendor/libxml/include/libxml/xmlschemastypes.h +151 -0
- package/vendor/libxml/include/libxml/xmlstring.h +140 -0
- package/vendor/libxml/include/libxml/xmlunicode.h +202 -0
- package/vendor/libxml/include/libxml/xmlversion.h +484 -0
- package/vendor/libxml/include/libxml/xmlwin32version.h +239 -0
- package/vendor/libxml/include/libxml/xmlwriter.h +488 -0
- package/vendor/libxml/include/libxml/xpath.h +564 -0
- package/vendor/libxml/include/libxml/xpathInternals.h +632 -0
- package/vendor/libxml/include/libxml/xpointer.h +114 -0
- package/vendor/libxml/include/win32config.h +122 -0
- package/vendor/libxml/include/wsockcompat.h +54 -0
- package/vendor/libxml/legacy.c +1343 -0
- package/vendor/libxml/libxml.h +134 -0
- package/vendor/libxml/list.c +779 -0
- package/vendor/libxml/nanoftp.c +2118 -0
- package/vendor/libxml/nanohttp.c +1899 -0
- package/vendor/libxml/parser.c +15553 -0
- package/vendor/libxml/parserInternals.c +2164 -0
- package/vendor/libxml/pattern.c +2621 -0
- package/vendor/libxml/relaxng.c +11101 -0
- package/vendor/libxml/rngparser.c +1595 -0
- package/vendor/libxml/runsuite.c +1157 -0
- package/vendor/libxml/save.h +36 -0
- package/vendor/libxml/schematron.c +1787 -0
- package/vendor/libxml/threads.c +1049 -0
- package/vendor/libxml/timsort.h +601 -0
- package/vendor/libxml/tree.c +10183 -0
- package/vendor/libxml/trio.c +6895 -0
- package/vendor/libxml/trio.h +230 -0
- package/vendor/libxml/triodef.h +228 -0
- package/vendor/libxml/trionan.c +914 -0
- package/vendor/libxml/trionan.h +84 -0
- package/vendor/libxml/triop.h +150 -0
- package/vendor/libxml/triostr.c +2112 -0
- package/vendor/libxml/triostr.h +144 -0
- package/vendor/libxml/uri.c +2561 -0
- package/vendor/libxml/valid.c +7138 -0
- package/vendor/libxml/xinclude.c +2657 -0
- package/vendor/libxml/xlink.c +183 -0
- package/vendor/libxml/xmlIO.c +4135 -0
- package/vendor/libxml/xmlcatalog.c +624 -0
- package/vendor/libxml/xmllint.c +3796 -0
- package/vendor/libxml/xmlmemory.c +1163 -0
- package/vendor/libxml/xmlmodule.c +468 -0
- package/vendor/libxml/xmlreader.c +6033 -0
- package/vendor/libxml/xmlregexp.c +8271 -0
- package/vendor/libxml/xmlsave.c +2735 -0
- package/vendor/libxml/xmlschemas.c +29173 -0
- package/vendor/libxml/xmlschemastypes.c +6276 -0
- package/vendor/libxml/xmlstring.c +1050 -0
- package/vendor/libxml/xmlunicode.c +3179 -0
- package/vendor/libxml/xmlwriter.c +4738 -0
- package/vendor/libxml/xpath.c +14734 -0
- package/vendor/libxml/xpointer.c +2969 -0
- package/vendor/libxml/xzlib.c +815 -0
- package/vendor/libxml/xzlib.h +19 -0
@@ -0,0 +1,230 @@
|
|
1
|
+
/*************************************************************************
|
2
|
+
*
|
3
|
+
* $Id$
|
4
|
+
*
|
5
|
+
* Copyright (C) 1998 Bjorn Reese and Daniel Stenberg.
|
6
|
+
*
|
7
|
+
* Permission to use, copy, modify, and distribute this software for any
|
8
|
+
* purpose with or without fee is hereby granted, provided that the above
|
9
|
+
* copyright notice and this permission notice appear in all copies.
|
10
|
+
*
|
11
|
+
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
|
12
|
+
* WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
|
13
|
+
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE AUTHORS AND
|
14
|
+
* CONTRIBUTORS ACCEPT NO RESPONSIBILITY IN ANY CONCEIVABLE MANNER.
|
15
|
+
*
|
16
|
+
*************************************************************************
|
17
|
+
*
|
18
|
+
* http://ctrio.sourceforge.net/
|
19
|
+
*
|
20
|
+
************************************************************************/
|
21
|
+
|
22
|
+
#ifndef TRIO_TRIO_H
|
23
|
+
#define TRIO_TRIO_H
|
24
|
+
|
25
|
+
#if !defined(WITHOUT_TRIO)
|
26
|
+
|
27
|
+
/*
|
28
|
+
* Use autoconf defines if present. Packages using trio must define
|
29
|
+
* HAVE_CONFIG_H as a compiler option themselves.
|
30
|
+
*/
|
31
|
+
#if defined(TRIO_HAVE_CONFIG_H)
|
32
|
+
# include "config.h"
|
33
|
+
#endif
|
34
|
+
|
35
|
+
#include "triodef.h"
|
36
|
+
|
37
|
+
#include <stdio.h>
|
38
|
+
#include <stdlib.h>
|
39
|
+
#if defined(TRIO_COMPILER_ANCIENT)
|
40
|
+
# include <varargs.h>
|
41
|
+
#else
|
42
|
+
# include <stdarg.h>
|
43
|
+
#endif
|
44
|
+
|
45
|
+
#ifdef __cplusplus
|
46
|
+
extern "C" {
|
47
|
+
#endif
|
48
|
+
|
49
|
+
/*
|
50
|
+
* Error codes.
|
51
|
+
*
|
52
|
+
* Remember to add a textual description to trio_strerror.
|
53
|
+
*/
|
54
|
+
enum {
|
55
|
+
TRIO_EOF = 1,
|
56
|
+
TRIO_EINVAL = 2,
|
57
|
+
TRIO_ETOOMANY = 3,
|
58
|
+
TRIO_EDBLREF = 4,
|
59
|
+
TRIO_EGAP = 5,
|
60
|
+
TRIO_ENOMEM = 6,
|
61
|
+
TRIO_ERANGE = 7,
|
62
|
+
TRIO_ERRNO = 8,
|
63
|
+
TRIO_ECUSTOM = 9
|
64
|
+
};
|
65
|
+
|
66
|
+
/* Error macros */
|
67
|
+
#define TRIO_ERROR_CODE(x) ((-(x)) & 0x00FF)
|
68
|
+
#define TRIO_ERROR_POSITION(x) ((-(x)) >> 8)
|
69
|
+
#define TRIO_ERROR_NAME(x) trio_strerror(x)
|
70
|
+
|
71
|
+
typedef int (*trio_outstream_t) TRIO_PROTO((trio_pointer_t, int));
|
72
|
+
typedef int (*trio_instream_t) TRIO_PROTO((trio_pointer_t));
|
73
|
+
|
74
|
+
TRIO_CONST char *trio_strerror TRIO_PROTO((int));
|
75
|
+
|
76
|
+
/*************************************************************************
|
77
|
+
* Print Functions
|
78
|
+
*/
|
79
|
+
|
80
|
+
int trio_printf TRIO_PROTO((TRIO_CONST char *format, ...));
|
81
|
+
int trio_vprintf TRIO_PROTO((TRIO_CONST char *format, va_list args));
|
82
|
+
int trio_printfv TRIO_PROTO((TRIO_CONST char *format, void **args));
|
83
|
+
|
84
|
+
int trio_fprintf TRIO_PROTO((FILE *file, TRIO_CONST char *format, ...));
|
85
|
+
int trio_vfprintf TRIO_PROTO((FILE *file, TRIO_CONST char *format, va_list args));
|
86
|
+
int trio_fprintfv TRIO_PROTO((FILE *file, TRIO_CONST char *format, void **args));
|
87
|
+
|
88
|
+
int trio_dprintf TRIO_PROTO((int fd, TRIO_CONST char *format, ...));
|
89
|
+
int trio_vdprintf TRIO_PROTO((int fd, TRIO_CONST char *format, va_list args));
|
90
|
+
int trio_dprintfv TRIO_PROTO((int fd, TRIO_CONST char *format, void **args));
|
91
|
+
|
92
|
+
int trio_cprintf TRIO_PROTO((trio_outstream_t stream, trio_pointer_t closure,
|
93
|
+
TRIO_CONST char *format, ...));
|
94
|
+
int trio_vcprintf TRIO_PROTO((trio_outstream_t stream, trio_pointer_t closure,
|
95
|
+
TRIO_CONST char *format, va_list args));
|
96
|
+
int trio_cprintfv TRIO_PROTO((trio_outstream_t stream, trio_pointer_t closure,
|
97
|
+
TRIO_CONST char *format, void **args));
|
98
|
+
|
99
|
+
int trio_sprintf TRIO_PROTO((char *buffer, TRIO_CONST char *format, ...));
|
100
|
+
int trio_vsprintf TRIO_PROTO((char *buffer, TRIO_CONST char *format, va_list args));
|
101
|
+
int trio_sprintfv TRIO_PROTO((char *buffer, TRIO_CONST char *format, void **args));
|
102
|
+
|
103
|
+
int trio_snprintf TRIO_PROTO((char *buffer, size_t max, TRIO_CONST char *format, ...));
|
104
|
+
int trio_vsnprintf TRIO_PROTO((char *buffer, size_t bufferSize, TRIO_CONST char *format,
|
105
|
+
va_list args));
|
106
|
+
int trio_snprintfv TRIO_PROTO((char *buffer, size_t bufferSize, TRIO_CONST char *format,
|
107
|
+
void **args));
|
108
|
+
|
109
|
+
int trio_snprintfcat TRIO_PROTO((char *buffer, size_t max, TRIO_CONST char *format, ...));
|
110
|
+
int trio_vsnprintfcat TRIO_PROTO((char *buffer, size_t bufferSize, TRIO_CONST char *format,
|
111
|
+
va_list args));
|
112
|
+
|
113
|
+
char *trio_aprintf TRIO_PROTO((TRIO_CONST char *format, ...));
|
114
|
+
char *trio_vaprintf TRIO_PROTO((TRIO_CONST char *format, va_list args));
|
115
|
+
|
116
|
+
int trio_asprintf TRIO_PROTO((char **ret, TRIO_CONST char *format, ...));
|
117
|
+
int trio_vasprintf TRIO_PROTO((char **ret, TRIO_CONST char *format, va_list args));
|
118
|
+
|
119
|
+
/*************************************************************************
|
120
|
+
* Scan Functions
|
121
|
+
*/
|
122
|
+
int trio_scanf TRIO_PROTO((TRIO_CONST char *format, ...));
|
123
|
+
int trio_vscanf TRIO_PROTO((TRIO_CONST char *format, va_list args));
|
124
|
+
int trio_scanfv TRIO_PROTO((TRIO_CONST char *format, void **args));
|
125
|
+
|
126
|
+
int trio_fscanf TRIO_PROTO((FILE *file, TRIO_CONST char *format, ...));
|
127
|
+
int trio_vfscanf TRIO_PROTO((FILE *file, TRIO_CONST char *format, va_list args));
|
128
|
+
int trio_fscanfv TRIO_PROTO((FILE *file, TRIO_CONST char *format, void **args));
|
129
|
+
|
130
|
+
int trio_dscanf TRIO_PROTO((int fd, TRIO_CONST char *format, ...));
|
131
|
+
int trio_vdscanf TRIO_PROTO((int fd, TRIO_CONST char *format, va_list args));
|
132
|
+
int trio_dscanfv TRIO_PROTO((int fd, TRIO_CONST char *format, void **args));
|
133
|
+
|
134
|
+
int trio_cscanf TRIO_PROTO((trio_instream_t stream, trio_pointer_t closure,
|
135
|
+
TRIO_CONST char *format, ...));
|
136
|
+
int trio_vcscanf TRIO_PROTO((trio_instream_t stream, trio_pointer_t closure,
|
137
|
+
TRIO_CONST char *format, va_list args));
|
138
|
+
int trio_cscanfv TRIO_PROTO((trio_instream_t stream, trio_pointer_t closure,
|
139
|
+
TRIO_CONST char *format, void **args));
|
140
|
+
|
141
|
+
int trio_sscanf TRIO_PROTO((TRIO_CONST char *buffer, TRIO_CONST char *format, ...));
|
142
|
+
int trio_vsscanf TRIO_PROTO((TRIO_CONST char *buffer, TRIO_CONST char *format, va_list args));
|
143
|
+
int trio_sscanfv TRIO_PROTO((TRIO_CONST char *buffer, TRIO_CONST char *format, void **args));
|
144
|
+
|
145
|
+
/*************************************************************************
|
146
|
+
* Locale Functions
|
147
|
+
*/
|
148
|
+
void trio_locale_set_decimal_point TRIO_PROTO((char *decimalPoint));
|
149
|
+
void trio_locale_set_thousand_separator TRIO_PROTO((char *thousandSeparator));
|
150
|
+
void trio_locale_set_grouping TRIO_PROTO((char *grouping));
|
151
|
+
|
152
|
+
/*************************************************************************
|
153
|
+
* Renaming
|
154
|
+
*/
|
155
|
+
#ifdef TRIO_REPLACE_STDIO
|
156
|
+
/* Replace the <stdio.h> functions */
|
157
|
+
#ifndef HAVE_PRINTF
|
158
|
+
# undef printf
|
159
|
+
# define printf trio_printf
|
160
|
+
#endif
|
161
|
+
#ifndef HAVE_VPRINTF
|
162
|
+
# undef vprintf
|
163
|
+
# define vprintf trio_vprintf
|
164
|
+
#endif
|
165
|
+
#ifndef HAVE_FPRINTF
|
166
|
+
# undef fprintf
|
167
|
+
# define fprintf trio_fprintf
|
168
|
+
#endif
|
169
|
+
#ifndef HAVE_VFPRINTF
|
170
|
+
# undef vfprintf
|
171
|
+
# define vfprintf trio_vfprintf
|
172
|
+
#endif
|
173
|
+
#ifndef HAVE_SPRINTF
|
174
|
+
# undef sprintf
|
175
|
+
# define sprintf trio_sprintf
|
176
|
+
#endif
|
177
|
+
#ifndef HAVE_VSPRINTF
|
178
|
+
# undef vsprintf
|
179
|
+
# define vsprintf trio_vsprintf
|
180
|
+
#endif
|
181
|
+
#ifndef HAVE_SNPRINTF
|
182
|
+
# undef snprintf
|
183
|
+
# define snprintf trio_snprintf
|
184
|
+
#endif
|
185
|
+
#ifndef HAVE_VSNPRINTF
|
186
|
+
# undef vsnprintf
|
187
|
+
# define vsnprintf trio_vsnprintf
|
188
|
+
#endif
|
189
|
+
#ifndef HAVE_SCANF
|
190
|
+
# undef scanf
|
191
|
+
# define scanf trio_scanf
|
192
|
+
#endif
|
193
|
+
#ifndef HAVE_VSCANF
|
194
|
+
# undef vscanf
|
195
|
+
# define vscanf trio_vscanf
|
196
|
+
#endif
|
197
|
+
#ifndef HAVE_FSCANF
|
198
|
+
# undef fscanf
|
199
|
+
# define fscanf trio_fscanf
|
200
|
+
#endif
|
201
|
+
#ifndef HAVE_VFSCANF
|
202
|
+
# undef vfscanf
|
203
|
+
# define vfscanf trio_vfscanf
|
204
|
+
#endif
|
205
|
+
#ifndef HAVE_SSCANF
|
206
|
+
# undef sscanf
|
207
|
+
# define sscanf trio_sscanf
|
208
|
+
#endif
|
209
|
+
#ifndef HAVE_VSSCANF
|
210
|
+
# undef vsscanf
|
211
|
+
# define vsscanf trio_vsscanf
|
212
|
+
#endif
|
213
|
+
/* These aren't stdio functions, but we make them look similar */
|
214
|
+
#define dprintf trio_dprintf
|
215
|
+
#define vdprintf trio_vdprintf
|
216
|
+
#define aprintf trio_aprintf
|
217
|
+
#define vaprintf trio_vaprintf
|
218
|
+
#define asprintf trio_asprintf
|
219
|
+
#define vasprintf trio_vasprintf
|
220
|
+
#define dscanf trio_dscanf
|
221
|
+
#define vdscanf trio_vdscanf
|
222
|
+
#endif
|
223
|
+
|
224
|
+
#ifdef __cplusplus
|
225
|
+
} /* extern "C" */
|
226
|
+
#endif
|
227
|
+
|
228
|
+
#endif /* WITHOUT_TRIO */
|
229
|
+
|
230
|
+
#endif /* TRIO_TRIO_H */
|
@@ -0,0 +1,228 @@
|
|
1
|
+
/*************************************************************************
|
2
|
+
*
|
3
|
+
* $Id$
|
4
|
+
*
|
5
|
+
* Copyright (C) 2001 Bjorn Reese <breese@users.sourceforge.net>
|
6
|
+
*
|
7
|
+
* Permission to use, copy, modify, and distribute this software for any
|
8
|
+
* purpose with or without fee is hereby granted, provided that the above
|
9
|
+
* copyright notice and this permission notice appear in all copies.
|
10
|
+
*
|
11
|
+
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
|
12
|
+
* WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
|
13
|
+
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE AUTHORS AND
|
14
|
+
* CONTRIBUTORS ACCEPT NO RESPONSIBILITY IN ANY CONCEIVABLE MANNER.
|
15
|
+
*
|
16
|
+
************************************************************************/
|
17
|
+
|
18
|
+
#ifndef TRIO_TRIODEF_H
|
19
|
+
#define TRIO_TRIODEF_H
|
20
|
+
|
21
|
+
/*************************************************************************
|
22
|
+
* Platform and compiler support detection
|
23
|
+
*/
|
24
|
+
#if defined(__GNUC__)
|
25
|
+
# define TRIO_COMPILER_GCC
|
26
|
+
#elif defined(__SUNPRO_C)
|
27
|
+
# define TRIO_COMPILER_SUNPRO
|
28
|
+
#elif defined(__SUNPRO_CC)
|
29
|
+
# define TRIO_COMPILER_SUNPRO
|
30
|
+
# define __SUNPRO_C __SUNPRO_CC
|
31
|
+
#elif defined(__xlC__) || defined(__IBMC__) || defined(__IBMCPP__)
|
32
|
+
# define TRIO_COMPILER_XLC
|
33
|
+
#elif defined(_AIX) && !defined(__GNUC__)
|
34
|
+
# define TRIO_COMPILER_XLC /* Workaround for old xlc */
|
35
|
+
#elif defined(__DECC) || defined(__DECCXX)
|
36
|
+
# define TRIO_COMPILER_DECC
|
37
|
+
#elif defined(__osf__) && defined(__LANGUAGE_C__)
|
38
|
+
# define TRIO_COMPILER_DECC /* Workaround for old DEC C compilers */
|
39
|
+
#elif defined(_MSC_VER)
|
40
|
+
# define TRIO_COMPILER_MSVC
|
41
|
+
#elif defined(__BORLANDC__)
|
42
|
+
# define TRIO_COMPILER_BCB
|
43
|
+
#endif
|
44
|
+
|
45
|
+
#if defined(VMS) || defined(__VMS)
|
46
|
+
/*
|
47
|
+
* VMS is placed first to avoid identifying the platform as Unix
|
48
|
+
* based on the DECC compiler later on.
|
49
|
+
*/
|
50
|
+
# define TRIO_PLATFORM_VMS
|
51
|
+
#elif defined(__OS400__)
|
52
|
+
# define TRIO_PLATFORM_OS400
|
53
|
+
#elif defined(unix) || defined(__unix) || defined(__unix__)
|
54
|
+
# define TRIO_PLATFORM_UNIX
|
55
|
+
#elif defined(TRIO_COMPILER_XLC) || defined(_AIX)
|
56
|
+
# define TRIO_PLATFORM_UNIX
|
57
|
+
#elif defined(TRIO_COMPILER_DECC) || defined(__osf___)
|
58
|
+
# define TRIO_PLATFORM_UNIX
|
59
|
+
#elif defined(__NetBSD__)
|
60
|
+
# define TRIO_PLATFORM_UNIX
|
61
|
+
#elif defined(__Lynx__)
|
62
|
+
# define TRIO_PLATFORM_UNIX
|
63
|
+
#elif defined(__QNX__)
|
64
|
+
# define TRIO_PLATFORM_UNIX
|
65
|
+
# define TRIO_PLATFORM_QNX
|
66
|
+
#elif defined(__CYGWIN__)
|
67
|
+
# define TRIO_PLATFORM_UNIX
|
68
|
+
#elif defined(AMIGA) && defined(TRIO_COMPILER_GCC)
|
69
|
+
# define TRIO_PLATFORM_UNIX
|
70
|
+
#elif defined(TRIO_COMPILER_MSVC) || defined(WIN32) || defined(_WIN32)
|
71
|
+
# define TRIO_PLATFORM_WIN32
|
72
|
+
#elif defined(mpeix) || defined(__mpexl)
|
73
|
+
# define TRIO_PLATFORM_MPEIX
|
74
|
+
#endif
|
75
|
+
|
76
|
+
#if defined(_AIX)
|
77
|
+
# define TRIO_PLATFORM_AIX
|
78
|
+
#elif defined(__hpux)
|
79
|
+
# define TRIO_PLATFORM_HPUX
|
80
|
+
#elif defined(sun) || defined(__sun__)
|
81
|
+
# if defined(__SVR4) || defined(__svr4__)
|
82
|
+
# define TRIO_PLATFORM_SOLARIS
|
83
|
+
# else
|
84
|
+
# define TRIO_PLATFORM_SUNOS
|
85
|
+
# endif
|
86
|
+
#endif
|
87
|
+
|
88
|
+
#if defined(__STDC__) || defined(TRIO_COMPILER_MSVC) || defined(TRIO_COMPILER_BCB)
|
89
|
+
# define TRIO_COMPILER_SUPPORTS_C89
|
90
|
+
# if defined(__STDC_VERSION__)
|
91
|
+
# define TRIO_COMPILER_SUPPORTS_C90
|
92
|
+
# if (__STDC_VERSION__ >= 199409L)
|
93
|
+
# define TRIO_COMPILER_SUPPORTS_C94
|
94
|
+
# endif
|
95
|
+
# if (__STDC_VERSION__ >= 199901L)
|
96
|
+
# define TRIO_COMPILER_SUPPORTS_C99
|
97
|
+
# endif
|
98
|
+
# elif defined(TRIO_COMPILER_SUNPRO)
|
99
|
+
# if (__SUNPRO_C >= 0x420)
|
100
|
+
# define TRIO_COMPILER_SUPPORTS_C94
|
101
|
+
# endif
|
102
|
+
# endif
|
103
|
+
#elif defined(TRIO_COMPILER_XLC) && defined(__EXTENDED__)
|
104
|
+
# define TRIO_COMPILER_SUPPORTS_C89
|
105
|
+
# define TRIO_COMPILER_SUPPORTS_C90
|
106
|
+
# define TRIO_COMPILER_SUPPORTS_C94
|
107
|
+
#endif
|
108
|
+
|
109
|
+
#if defined(_XOPEN_SOURCE)
|
110
|
+
# if defined(_XOPEN_SOURCE_EXTENDED)
|
111
|
+
# define TRIO_COMPILER_SUPPORTS_UNIX95
|
112
|
+
# endif
|
113
|
+
# if (_XOPEN_VERSION >= 500)
|
114
|
+
# define TRIO_COMPILER_SUPPORTS_UNIX98
|
115
|
+
# endif
|
116
|
+
# if (_XOPEN_VERSION >= 600)
|
117
|
+
# define TRIO_COMPILER_SUPPORTS_UNIX01
|
118
|
+
# endif
|
119
|
+
#endif
|
120
|
+
|
121
|
+
/*************************************************************************
|
122
|
+
* Generic defines
|
123
|
+
*/
|
124
|
+
|
125
|
+
#if !defined(TRIO_PUBLIC)
|
126
|
+
# define TRIO_PUBLIC
|
127
|
+
#endif
|
128
|
+
#if !defined(TRIO_PRIVATE)
|
129
|
+
# define TRIO_PRIVATE static
|
130
|
+
#endif
|
131
|
+
|
132
|
+
#if !(defined(TRIO_COMPILER_SUPPORTS_C89) || defined(__cplusplus))
|
133
|
+
# define TRIO_COMPILER_ANCIENT
|
134
|
+
#endif
|
135
|
+
|
136
|
+
#if defined(TRIO_COMPILER_ANCIENT)
|
137
|
+
# define TRIO_CONST
|
138
|
+
# define TRIO_VOLATILE
|
139
|
+
# define TRIO_SIGNED
|
140
|
+
typedef double trio_long_double_t;
|
141
|
+
typedef char * trio_pointer_t;
|
142
|
+
# define TRIO_SUFFIX_LONG(x) x
|
143
|
+
# define TRIO_PROTO(x) ()
|
144
|
+
# define TRIO_NOARGS
|
145
|
+
# define TRIO_ARGS1(list,a1) list a1;
|
146
|
+
# define TRIO_ARGS2(list,a1,a2) list a1; a2;
|
147
|
+
# define TRIO_ARGS3(list,a1,a2,a3) list a1; a2; a3;
|
148
|
+
# define TRIO_ARGS4(list,a1,a2,a3,a4) list a1; a2; a3; a4;
|
149
|
+
# define TRIO_ARGS5(list,a1,a2,a3,a4,a5) list a1; a2; a3; a4; a5;
|
150
|
+
# define TRIO_ARGS6(list,a1,a2,a3,a4,a5,a6) list a1; a2; a3; a4; a5; a6;
|
151
|
+
# define TRIO_VARGS2(list,a1,a2) list a1; a2
|
152
|
+
# define TRIO_VARGS3(list,a1,a2,a3) list a1; a2; a3
|
153
|
+
# define TRIO_VARGS4(list,a1,a2,a3,a4) list a1; a2; a3; a4
|
154
|
+
# define TRIO_VARGS5(list,a1,a2,a3,a4,a5) list a1; a2; a3; a4; a5
|
155
|
+
# define TRIO_VA_DECL va_dcl
|
156
|
+
# define TRIO_VA_START(x,y) va_start(x)
|
157
|
+
# define TRIO_VA_END(x) va_end(x)
|
158
|
+
#else /* ANSI C */
|
159
|
+
# define TRIO_CONST const
|
160
|
+
# define TRIO_VOLATILE volatile
|
161
|
+
# define TRIO_SIGNED signed
|
162
|
+
typedef long double trio_long_double_t;
|
163
|
+
typedef void * trio_pointer_t;
|
164
|
+
# define TRIO_SUFFIX_LONG(x) x ## L
|
165
|
+
# define TRIO_PROTO(x) x
|
166
|
+
# define TRIO_NOARGS void
|
167
|
+
# define TRIO_ARGS1(list,a1) (a1)
|
168
|
+
# define TRIO_ARGS2(list,a1,a2) (a1,a2)
|
169
|
+
# define TRIO_ARGS3(list,a1,a2,a3) (a1,a2,a3)
|
170
|
+
# define TRIO_ARGS4(list,a1,a2,a3,a4) (a1,a2,a3,a4)
|
171
|
+
# define TRIO_ARGS5(list,a1,a2,a3,a4,a5) (a1,a2,a3,a4,a5)
|
172
|
+
# define TRIO_ARGS6(list,a1,a2,a3,a4,a5,a6) (a1,a2,a3,a4,a5,a6)
|
173
|
+
# define TRIO_VARGS2 TRIO_ARGS2
|
174
|
+
# define TRIO_VARGS3 TRIO_ARGS3
|
175
|
+
# define TRIO_VARGS4 TRIO_ARGS4
|
176
|
+
# define TRIO_VARGS5 TRIO_ARGS5
|
177
|
+
# define TRIO_VA_DECL ...
|
178
|
+
# define TRIO_VA_START(x,y) va_start(x,y)
|
179
|
+
# define TRIO_VA_END(x) va_end(x)
|
180
|
+
#endif
|
181
|
+
|
182
|
+
#if defined(TRIO_COMPILER_SUPPORTS_C99) || defined(__cplusplus)
|
183
|
+
# define TRIO_INLINE inline
|
184
|
+
#elif defined(TRIO_COMPILER_GCC)
|
185
|
+
# define TRIO_INLINE __inline__
|
186
|
+
#elif defined(TRIO_COMPILER_MSVC)
|
187
|
+
# define TRIO_INLINE _inline
|
188
|
+
#elif defined(TRIO_COMPILER_BCB)
|
189
|
+
# define TRIO_INLINE __inline
|
190
|
+
#else
|
191
|
+
# define TRIO_INLINE
|
192
|
+
#endif
|
193
|
+
|
194
|
+
/*************************************************************************
|
195
|
+
* Workarounds
|
196
|
+
*/
|
197
|
+
|
198
|
+
#if defined(TRIO_PLATFORM_VMS)
|
199
|
+
/*
|
200
|
+
* Computations done with constants at compile time can trigger these
|
201
|
+
* even when compiling with IEEE enabled.
|
202
|
+
*/
|
203
|
+
# pragma message disable (UNDERFLOW, FLOATOVERFL)
|
204
|
+
|
205
|
+
# if (__CRTL_VER < 80000000)
|
206
|
+
/*
|
207
|
+
* Although the compiler supports C99 language constructs, the C
|
208
|
+
* run-time library does not contain all C99 functions.
|
209
|
+
*
|
210
|
+
* This was the case for 70300022. Update the 80000000 value when
|
211
|
+
* it has been accurately determined what version of the library
|
212
|
+
* supports C99.
|
213
|
+
*/
|
214
|
+
# if defined(TRIO_COMPILER_SUPPORTS_C99)
|
215
|
+
# undef TRIO_COMPILER_SUPPORTS_C99
|
216
|
+
# endif
|
217
|
+
# endif
|
218
|
+
#endif
|
219
|
+
|
220
|
+
/*
|
221
|
+
* Not all preprocessors supports the LL token.
|
222
|
+
*/
|
223
|
+
#if defined(TRIO_COMPILER_BCB)
|
224
|
+
#else
|
225
|
+
# define TRIO_COMPILER_SUPPORTS_LL
|
226
|
+
#endif
|
227
|
+
|
228
|
+
#endif /* TRIO_TRIODEF_H */
|