annotate GEMBASSY-1.0.3/gsoap/src/soapcpp2.h @ 0:8300eb051bea draft

Initial upload
author ktnyt
date Fri, 26 Jun 2015 05:19:29 -0400
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
1 /*
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
2 soapcpp2.h
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
3
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
4 Common declarations.
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
5
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
6 --------------------------------------------------------------------------------
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
7 gSOAP XML Web services tools
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
8 Copyright (C) 2000-2012, Robert van Engelen, Genivia Inc. All Rights Reserved.
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
9 This part of the software is released under one of the following licenses:
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
10 GPL or Genivia's license for commercial use.
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
11 --------------------------------------------------------------------------------
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
12 GPL license.
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
13
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
14 This program is free software; you can redistribute it and/or modify it under
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
15 the terms of the GNU General Public License as published by the Free Software
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
16 Foundation; either version 2 of the License, or (at your option) any later
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
17 version.
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
18
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
19 This program is distributed in the hope that it will be useful, but WITHOUT ANY
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
20 WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
21 PARTICULAR PURPOSE. See the GNU General Public License for more details.
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
22
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
23 You should have received a copy of the GNU General Public License along with
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
24 this program; if not, write to the Free Software Foundation, Inc., 59 Temple
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
25 Place, Suite 330, Boston, MA 02111-1307 USA
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
26
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
27 Author contact information:
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
28 engelen@genivia.com / engelen@acm.org
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
29
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
30 This program is released under the GPL with the additional exemption that
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
31 compiling, linking, and/or using OpenSSL is allowed.
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
32 --------------------------------------------------------------------------------
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
33 A commercial use license is available from Genivia, Inc., contact@genivia.com
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
34 --------------------------------------------------------------------------------
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
35 */
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
36
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
37 #include <stdio.h>
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
38 #include <stdlib.h>
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
39 #include <errno.h>
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
40 #include <string.h>
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
41 #include <ctype.h>
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
42 #include <time.h>
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
43 #include "error2.h"
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
44
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
45 #ifndef VERSION
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
46 # define VERSION "2.8.17r" /* Current version */
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
47 # define GSOAP_VERSION 20817
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
48 #endif
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
49
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
50 #ifdef WIN32
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
51 # pragma warning(disable : 4996)
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
52 # ifndef WITH_BISON
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
53 # define WITH_BISON
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
54 # endif
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
55 #endif
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
56
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
57 /* #define DEBUG */ /* uncomment to debug */
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
58
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
59 #ifdef DEBUG
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
60 # define check(expr, msg) (void)((expr) ? 0 : (progerror(msg, __FILE__, __LINE__), 0))
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
61 # define DBGLOG(DBGCMD) { DBGCMD; }
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
62 #else
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
63 # define check(expr, msg) (void)(expr)
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
64 # define DBGLOG(DBGCMD)
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
65 #endif
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
66
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
67 #ifdef WIN32
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
68 # ifdef WITH_BISON
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
69 # ifdef WIN32_WITHOUT_SOLARIS_FLEX
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
70 # define yyparse soapcpp2parse
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
71 # define yylex soapcpp2lex
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
72 # define yyerror soapcpp2error
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
73 # define yylval soapcpp2lval
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
74 # define yychar soapcpp2char
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
75 # define yydebug soapcpp2debug
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
76 # define yynerrs soapcpp2nerrs
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
77 # define yylineno soapcpp2lineno
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
78 # define yytext soapcpp2text
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
79 # define yyin soapcpp2in
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
80 # define yywrap soapcpp2wrap
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
81 # endif
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
82 # endif
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
83 #endif
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
84
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
85 #ifdef WIN32
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
86 # define SOAP_PATHCAT "\\"
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
87 # define SOAP_PATHSEP ";"
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
88 # define LONG64 __int64
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
89 #else
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
90 # define SOAP_PATHCAT "/"
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
91 # define SOAP_PATHSEP ":"
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
92 # define LONG64 long long
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
93 #endif
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
94
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
95 #if defined(WIN32)
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
96 # define SOAP_LONG_FORMAT "%I64d"
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
97 # define SOAP_ULONG_FORMAT "%I64u"
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
98 # define SOAP_XLONG_FORMAT "%I64x"
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
99 #elif defined(TRU64)
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
100 # define SOAP_LONG_FORMAT "%ld"
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
101 # define SOAP_ULONG_FORMAT "%lu"
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
102 # define SOAP_XLONG_FORMAT "%lx"
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
103 #endif
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
104
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
105 #ifndef SOAP_LONG_FORMAT
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
106 # define SOAP_LONG_FORMAT "%lld" /* printf format for 64 bit ints */
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
107 #endif
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
108 #ifndef SOAP_ULONG_FORMAT
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
109 # define SOAP_ULONG_FORMAT "%llu" /* printf format for unsigned 64 bit ints */
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
110 #endif
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
111 #ifndef SOAP_XLONG_FORMAT
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
112 # define SOAP_XLONG_FORMAT "%llx" /* printf format for unsigned 64 bit hex ints */
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
113 #endif
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
114
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
115 extern int yylineno;
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
116
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
117 typedef enum Bool {False, True} Bool;
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
118
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
119 typedef int Token;
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
120
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
121 typedef enum Type
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
122 { Tnone,
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
123 Tvoid, /* primitive types */
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
124 Tchar,
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
125 Twchar,
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
126 Tshort,
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
127 Tint,
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
128 Tlong,
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
129 Tllong,
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
130 Tfloat,
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
131 Tdouble,
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
132 Tldouble,
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
133 Tuchar,
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
134 Tushort,
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
135 Tuint,
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
136 Tulong,
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
137 Tullong,
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
138 Ttime,
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
139 Tenum,
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
140 Tclass, /* compound types */
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
141 Tstruct,
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
142 Tunion,
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
143 Tpointer,
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
144 Treference,
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
145 Tarray,
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
146 Ttemplate,
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
147 Tfun
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
148 } Type;
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
149
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
150 #define TYPES (Tfun+1) /* number of type (operators) enumerated above */
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
151
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
152 typedef enum Storage
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
153 { Snone = 0,
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
154 Sauto = 0x000001,
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
155 Sregister = 0x000002,
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
156 Sstatic = 0x000004,
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
157 Sextern = 0x000008,
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
158 Stypedef = 0x000010,
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
159 Svirtual = 0x000020,
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
160 Sconst = 0x000040,
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
161 Sconstobj = 0x000080,
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
162 Sconstptr = 0x000100,
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
163 Sfriend = 0x000200,
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
164 Sinline = 0x000400,
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
165 Sabstract = 0x000800,
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
166 SmustUnderstand = 0x001000,
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
167 Sreturn = 0x002000,
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
168 Sattribute = 0x004000,
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
169 Sspecial = 0x008000,
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
170 Sexplicit = 0x010000,
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
171 Sprivate = 0x020000,
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
172 Sprotected = 0x040000
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
173 } Storage;
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
174
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
175 typedef enum Level { INTERNAL, GLOBAL, PARAM, LOCAL } Level;
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
176
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
177 #define mknone() mktype(Tnone, NULL, 0)
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
178 #define mkvoid() mktype(Tvoid, NULL, 0)
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
179 #define mkbool() mktype(Tenum, booltable, 4)
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
180 #define mkchar() mktype(Tchar, NULL, 1)
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
181 #define mkwchart() mktype(Twchar, NULL, 4)
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
182 #define mkshort() mktype(Tshort, NULL, 2)
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
183 #define mkint() mktype(Tint, NULL, 4)
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
184 #define mklong() mktype(Tlong, NULL, 8)
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
185 #define mkllong() mktype(Tllong, NULL, 8)
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
186 #define mkfloat() mktype(Tfloat, NULL, 4)
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
187 #define mkdouble() mktype(Tdouble, NULL, 8)
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
188 #define mkldouble() mktype(Tldouble, NULL, 16) /* long double */
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
189 #define mkuchar() mktype(Tuchar, NULL, 1) /* unsigned char */
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
190 #define mkushort() mktype(Tushort, NULL, 2) /* unsigned short */
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
191 #define mkuint() mktype(Tuint, NULL, 4) /* unsigned int */
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
192 #define mkulong() mktype(Tulong, NULL, 8) /* unsigned long */
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
193 #define mkullong() mktype(Tullong, NULL, 8) /* unsigned long */
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
194 #define mktimet() mktype(Ttime, NULL, 4)
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
195 #define mkenum(t) mktype(Tenum, t, 4)
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
196 #define mkmask(t) mktype(Tenum, t, 8)
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
197 #define mkpointer(t) mktype(Tpointer, t, 4)
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
198 #define mkreference(t) mktype(Treference,t, 4)
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
199 #define mkclass(t, w) mktype(Tclass, t, w)
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
200 #define mkstruct(t, w) mktype(Tstruct, t, w)
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
201 #define mkunion(t, w) mktype(Tunion, t, w)
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
202 #define mkarray(t, w) mktype(Tarray, t, w)
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
203 #define mkfun(t) mktype(Tfun, t, 0)
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
204 #define mkstring() mkpointer(mkchar())
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
205
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
206 #define MINLONG64 (0x8000000000000000LL)
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
207 #define MAXLONG64 (0x7FFFFFFFFFFFFFFFLL)
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
208
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
209 typedef struct Symbol
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
210 { char *name;
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
211 Token token;
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
212 struct Symbol *next;
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
213 } Symbol;
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
214
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
215 Symbol *install(const char*, Token), *lookup(const char*), *gensym(const char*), *gensymidx(const char*, int);
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
216
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
217 typedef struct Tnode
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
218 { Type type;
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
219 void *ref;
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
220 Symbol *id; /* struct/class/union/enum name */
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
221 Symbol *base; /* base class name */
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
222 Symbol *sym; /* typedef name */
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
223 struct Entry *response; /* funcs only: points to response struct */
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
224 int width;
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
225 int transient;
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
226 const char *imported;
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
227 struct Tnode *next;
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
228 Bool generated;
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
229 Bool classed; /* class qualified */
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
230 Bool wsdl;
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
231 int num;
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
232 char *pattern;
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
233 LONG64 minLength;
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
234 LONG64 maxLength;
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
235 } Tnode;
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
236
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
237 typedef union Value {
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
238 LONG64 i;
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
239 double r;
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
240 const char *s;
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
241 } Value;
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
242
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
243 typedef struct IDinfo {
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
244 Tnode *typ;
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
245 Storage sto;
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
246 Bool hasval; /* if true, identifier is constant */
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
247 Value val; /* ... with this value */
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
248 int offset;
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
249 LONG64 minOccurs;
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
250 LONG64 maxOccurs;
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
251 } IDinfo;
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
252
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
253 typedef struct Entry {
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
254 Symbol *sym;
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
255 char *tag;
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
256 IDinfo info;
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
257 Level level;
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
258 int lineno;
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
259 struct Entry *next;
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
260 } Entry;
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
261
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
262 typedef struct Table {
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
263 Symbol *sym;
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
264 Level level;
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
265 Entry *list;
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
266 struct Table *prev;
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
267 } Table;
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
268
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
269 typedef struct FNinfo {
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
270 Tnode *ret;
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
271 Table *args;
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
272 } FNinfo;
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
273
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
274 typedef struct Node {
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
275 Tnode *typ;
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
276 Storage sto;
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
277 Bool hasval; /* if true, this node has a constant value */
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
278 Value val; /* ... this is the value */
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
279 LONG64 minOccurs;
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
280 LONG64 maxOccurs;
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
281 char *pattern;
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
282 LONG64 minLength;
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
283 LONG64 maxLength;
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
284 } Node;
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
285
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
286 #define ACTION 0x0000
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
287 #define REQUEST_ACTION 0x0001
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
288 #define RESPONSE_ACTION 0x0002
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
289 #define FAULT_ACTION 0x0004
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
290 #define HDRIN 0x0010
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
291 #define HDROUT 0x0020
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
292 #define MIMEIN 0x0040
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
293 #define MIMEOUT 0x0080
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
294 #define COMMENT 0x0100
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
295 #define ENCODING 0x0200
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
296 #define RESPONSE_ENCODING 0x0400
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
297 #define STYLE 0x0800
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
298 #define FAULT 0x1000
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
299 #define PROTOCOL 0x2000
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
300
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
301 typedef struct Data
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
302 { struct Data *next;
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
303 char *name;
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
304 char *text;
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
305 } Data;
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
306
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
307 typedef struct Method
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
308 { struct Method *next;
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
309 char *name;
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
310 short mess; /* see #defines above */
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
311 char *part;
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
312 } Method;
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
313
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
314 typedef struct Service
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
315 { struct Service *next;
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
316 char *ns;
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
317 char *name;
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
318 char *porttype;
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
319 char *portname;
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
320 char *binding;
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
321 char *definitions;
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
322 char *transport;
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
323 char *URL;
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
324 char *executable;
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
325 char *import;
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
326 char *URI;
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
327 char *URI2;
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
328 char *WSDL;
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
329 char *style;
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
330 char *encoding;
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
331 char *protocol;
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
332 int xsi_type;
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
333 char *elementForm;
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
334 char *attributeForm;
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
335 char *documentation;
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
336 struct Method *list;
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
337 struct Data *data;
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
338 } Service;
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
339
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
340 typedef struct Pragma
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
341 { struct Pragma *next;
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
342 char *pragma;
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
343 } Pragma;
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
344
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
345 extern Entry *enter(Table*, Symbol*), *entry(Table*, Symbol*), *reenter(Table*, Symbol*), *enumentry(Symbol*);
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
346
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
347 extern int merge(Table*, Table*);
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
348
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
349 extern Table *mktable(Table*);
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
350
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
351 extern Tnode *mkmethod(Tnode*, Table*);
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
352
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
353 extern char *emalloc(size_t);
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
354
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
355 extern Tnode *mktype(Type, void*, int);
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
356 extern Tnode *mksymtype(Tnode*, Symbol*);
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
357 extern Tnode *mktemplate(Tnode*, Symbol*);
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
358
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
359 extern int is_transient(Tnode*);
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
360 extern int is_response(Tnode*);
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
361
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
362 extern Table *typetable, *enumtable, *classtable, *booltable, *templatetable;
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
363
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
364 extern void compile(Table*);
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
365 extern void freetable(Table*);
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
366 extern Entry *unlinklast(Table*);
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
367
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
368 extern FILE *fmsg;
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
369
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
370 extern int aflag;
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
371 extern int Aflag;
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
372 extern int bflag;
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
373 extern int vflag;
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
374 extern int wflag;
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
375 extern int cflag;
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
376 extern int Cflag;
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
377 extern int eflag;
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
378 extern unsigned long fflag;
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
379 extern int iflag;
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
380 extern int jflag;
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
381 extern int kflag;
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
382 extern int mflag;
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
383 extern int nflag;
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
384 extern int nflag;
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
385 extern int lflag;
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
386 extern int Lflag;
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
387 extern int Qflag;
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
388 extern int sflag;
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
389 extern int Sflag;
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
390 extern int Tflag;
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
391 extern int tflag;
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
392 extern int uflag;
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
393 extern int xflag;
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
394 extern int yflag;
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
395 extern int zflag;
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
396 extern char dirpath[1024];
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
397 extern char filename[1024];
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
398 extern char *prefix;
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
399 extern char *importpath;
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
400 extern int custom_header;
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
401 extern int custom_fault;
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
402 extern Pragma *pragmas;
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
403 extern Service *services;
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
404 extern char *namespaceid;
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
405 extern int transient;
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
406 extern int imports;
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
407 extern char *imported;
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
408 extern int typeNO;
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
409
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
410 extern char *envURI;
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
411 extern char *encURI;
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
412 extern char *rpcURI;
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
413 extern char *xsiURI;
8300eb051bea Initial upload
ktnyt
parents:
diff changeset
414 extern char *xsdURI;