compiler/libec: (#341, #351, #644, #771) Improved enum type matching and type handlin...
[sdk] / compiler / bootstrap / ecere / bootstrap / DualPipe.c
1 /* Code generated from eC source file: DualPipe.ec */
2 #if defined(__GNUC__)
3 typedef long long int64;
4 typedef unsigned long long uint64;
5 #ifndef _WIN32
6 #define __declspec(x)
7 #endif
8 #elif defined(__TINYC__)
9 #include <stdarg.h>
10 #define __builtin_va_list va_list
11 #define __builtin_va_start va_start
12 #define __builtin_va_end va_end
13 #ifdef _WIN32
14 #define strcasecmp stricmp
15 #define strncasecmp strnicmp
16 #define __declspec(x) __attribute__((x))
17 #else
18 #define __declspec(x)
19 #endif
20 typedef long long int64;
21 typedef unsigned long long uint64;
22 #else
23 typedef __int64 int64;
24 typedef unsigned __int64 uint64;
25 #endif
26 #ifdef __BIG_ENDIAN__
27 #define __ENDIAN_PAD(x) (8 - (x))
28 #else
29 #define __ENDIAN_PAD(x) 0
30 #endif
31 #include <stdint.h>
32 #include <sys/types.h>
33
34 #if /*defined(_W64) || */(defined(__WORDSIZE) && __WORDSIZE == 8) || defined(__x86_64__)
35 #define _64BIT 1
36 #else
37 #define _64BIT 0
38 #endif
39
40 #define arch_PointerSize                  sizeof(void *)
41 #define structSize_Instance               (_64BIT ? 24 : 12)
42
43 extern void *  __ecereNameSpace__ecere__com__eSystem_New(unsigned int size);
44
45 extern void *  __ecereNameSpace__ecere__com__eSystem_New0(unsigned int size);
46
47 extern void *  __ecereNameSpace__ecere__com__eSystem_Renew(void *  memory, unsigned int size);
48
49 extern void *  __ecereNameSpace__ecere__com__eSystem_Renew0(void *  memory, unsigned int size);
50
51 extern void __ecereNameSpace__ecere__com__eSystem_Delete(void *  memory);
52
53 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__BTNode;
54
55 struct __ecereNameSpace__ecere__sys__BTNode;
56
57 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__BinaryTree;
58
59 struct __ecereNameSpace__ecere__sys__BinaryTree
60 {
61 struct __ecereNameSpace__ecere__sys__BTNode * root;
62 int count;
63 int (*  CompareKey)(struct __ecereNameSpace__ecere__sys__BinaryTree * tree, uintptr_t a, uintptr_t b);
64 void (*  FreeKey)(void *  key);
65 } __attribute__ ((gcc_struct));
66
67 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__OldList;
68
69 struct __ecereNameSpace__ecere__sys__OldList
70 {
71 void *  first;
72 void *  last;
73 int count;
74 unsigned int offset;
75 unsigned int circ;
76 } __attribute__ ((gcc_struct));
77
78 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Class;
79
80 struct __ecereNameSpace__ecere__com__Class
81 {
82 struct __ecereNameSpace__ecere__com__Class * prev;
83 struct __ecereNameSpace__ecere__com__Class * next;
84 char *  name;
85 int offset;
86 int structSize;
87 int (* *  _vTbl)();
88 int vTblSize;
89 int (*  Constructor)(struct __ecereNameSpace__ecere__com__Instance *);
90 void (*  Destructor)(struct __ecereNameSpace__ecere__com__Instance *);
91 int offsetClass;
92 int sizeClass;
93 struct __ecereNameSpace__ecere__com__Class * base;
94 struct __ecereNameSpace__ecere__sys__BinaryTree methods;
95 struct __ecereNameSpace__ecere__sys__BinaryTree members;
96 struct __ecereNameSpace__ecere__sys__BinaryTree prop;
97 struct __ecereNameSpace__ecere__sys__OldList membersAndProperties;
98 struct __ecereNameSpace__ecere__sys__BinaryTree classProperties;
99 struct __ecereNameSpace__ecere__sys__OldList derivatives;
100 int memberID;
101 int startMemberID;
102 int type;
103 struct __ecereNameSpace__ecere__com__Instance * module;
104 struct __ecereNameSpace__ecere__com__NameSpace *  nameSpace;
105 char *  dataTypeString;
106 struct __ecereNameSpace__ecere__com__Instance * dataType;
107 int typeSize;
108 int defaultAlignment;
109 void (*  Initialize)();
110 int memberOffset;
111 struct __ecereNameSpace__ecere__sys__OldList selfWatchers;
112 char *  designerClass;
113 unsigned int noExpansion;
114 char *  defaultProperty;
115 unsigned int comRedefinition;
116 int count;
117 int isRemote;
118 unsigned int internalDecl;
119 void *  data;
120 unsigned int computeSize;
121 int structAlignment;
122 int destructionWatchOffset;
123 unsigned int fixed;
124 struct __ecereNameSpace__ecere__sys__OldList delayedCPValues;
125 int inheritanceAccess;
126 char *  fullName;
127 void *  symbol;
128 struct __ecereNameSpace__ecere__sys__OldList conversions;
129 struct __ecereNameSpace__ecere__sys__OldList templateParams;
130 struct __ecereNameSpace__ecere__com__ClassTemplateArgument *  templateArgs;
131 struct __ecereNameSpace__ecere__com__Class * templateClass;
132 struct __ecereNameSpace__ecere__sys__OldList templatized;
133 int numParams;
134 unsigned int isInstanceClass;
135 unsigned int byValueSystemClass;
136 } __attribute__ ((gcc_struct));
137
138 extern long long __ecereNameSpace__ecere__com__eClass_GetProperty(struct __ecereNameSpace__ecere__com__Class * _class, char *  name);
139
140 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Property;
141
142 struct __ecereNameSpace__ecere__com__Property
143 {
144 struct __ecereNameSpace__ecere__com__Property * prev;
145 struct __ecereNameSpace__ecere__com__Property * next;
146 char *  name;
147 unsigned int isProperty;
148 int memberAccess;
149 int id;
150 struct __ecereNameSpace__ecere__com__Class * _class;
151 char *  dataTypeString;
152 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
153 struct __ecereNameSpace__ecere__com__Instance * dataType;
154 void (*  Set)(void * , int);
155 int (*  Get)(void * );
156 unsigned int (*  IsSet)(void * );
157 void *  data;
158 void *  symbol;
159 int vid;
160 unsigned int conversion;
161 unsigned int watcherOffset;
162 char *  category;
163 unsigned int compiled;
164 unsigned int selfWatchable;
165 unsigned int isWatchable;
166 } __attribute__ ((gcc_struct));
167
168 extern void __ecereNameSpace__ecere__com__eInstance_FireSelfWatchers(struct __ecereNameSpace__ecere__com__Instance * instance, struct __ecereNameSpace__ecere__com__Property * _property);
169
170 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Instance;
171
172 struct __ecereNameSpace__ecere__com__Instance
173 {
174 int (* *  _vTbl)();
175 struct __ecereNameSpace__ecere__com__Class * _class;
176 int _refCount;
177 } __attribute__ ((gcc_struct));
178
179 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__DataMember;
180
181 struct __ecereNameSpace__ecere__com__DataMember
182 {
183 struct __ecereNameSpace__ecere__com__DataMember * prev;
184 struct __ecereNameSpace__ecere__com__DataMember * next;
185 char *  name;
186 unsigned int isProperty;
187 int memberAccess;
188 int id;
189 struct __ecereNameSpace__ecere__com__Class * _class;
190 char *  dataTypeString;
191 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
192 struct __ecereNameSpace__ecere__com__Instance * dataType;
193 int type;
194 int offset;
195 int memberID;
196 struct __ecereNameSpace__ecere__sys__OldList members;
197 struct __ecereNameSpace__ecere__sys__BinaryTree membersAlpha;
198 int memberOffset;
199 int structAlignment;
200 } __attribute__ ((gcc_struct));
201
202 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Method;
203
204 struct __ecereNameSpace__ecere__com__Method
205 {
206 char *  name;
207 struct __ecereNameSpace__ecere__com__Method * parent;
208 struct __ecereNameSpace__ecere__com__Method * left;
209 struct __ecereNameSpace__ecere__com__Method * right;
210 int depth;
211 int (*  function)();
212 int vid;
213 int type;
214 struct __ecereNameSpace__ecere__com__Class * _class;
215 void *  symbol;
216 char *  dataTypeString;
217 struct __ecereNameSpace__ecere__com__Instance * dataType;
218 int memberAccess;
219 } __attribute__ ((gcc_struct));
220
221 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__SerialBuffer;
222
223 struct __ecereNameSpace__ecere__com__SerialBuffer
224 {
225 unsigned char *  _buffer;
226 unsigned int count;
227 unsigned int _size;
228 unsigned int pos;
229 } __attribute__ ((gcc_struct));
230
231 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__DataValue;
232
233 struct __ecereNameSpace__ecere__com__DataValue
234 {
235 union
236 {
237 char c;
238 unsigned char uc;
239 short s;
240 unsigned short us;
241 int i;
242 unsigned int ui;
243 void *  p;
244 float f;
245 double d;
246 long long i64;
247 uint64 ui64;
248 } __attribute__ ((gcc_struct));
249 } __attribute__ ((gcc_struct));
250
251 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__ClassTemplateArgument;
252
253 struct __ecereNameSpace__ecere__com__ClassTemplateArgument
254 {
255 union
256 {
257 struct
258 {
259 char *  dataTypeString;
260 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
261 } __attribute__ ((gcc_struct));
262 struct __ecereNameSpace__ecere__com__DataValue expression;
263 struct
264 {
265 char *  memberString;
266 union
267 {
268 struct __ecereNameSpace__ecere__com__DataMember * member;
269 struct __ecereNameSpace__ecere__com__Property * prop;
270 struct __ecereNameSpace__ecere__com__Method * method;
271 } __attribute__ ((gcc_struct));
272 } __attribute__ ((gcc_struct));
273 } __attribute__ ((gcc_struct));
274 } __attribute__ ((gcc_struct));
275
276 typedef __builtin_va_list va_list;
277
278 void DualPipe_Destructor(struct __ecereNameSpace__ecere__com__Instance ** dp);
279
280 void DualPipe_CloseInput(struct __ecereNameSpace__ecere__com__Instance ** dp);
281
282 void DualPipe_CloseOutput(struct __ecereNameSpace__ecere__com__Instance ** dp);
283
284 int DualPipe_Read(struct __ecereNameSpace__ecere__com__Instance ** dp, unsigned char * buffer, unsigned int size, unsigned int count);
285
286 int DualPipe_Write(struct __ecereNameSpace__ecere__com__Instance ** dp, unsigned char * buffer, unsigned int size, unsigned int count);
287
288 unsigned int DualPipe_Getc(struct __ecereNameSpace__ecere__com__Instance ** dp, char * ch);
289
290 unsigned int DualPipe_Putc(struct __ecereNameSpace__ecere__com__Instance ** dp, char ch);
291
292 unsigned int DualPipe_Puts(struct __ecereNameSpace__ecere__com__Instance ** dp, char * string);
293
294 unsigned int DualPipe_Seek(struct __ecereNameSpace__ecere__com__Instance ** dp, int pos, int mode);
295
296 unsigned int DualPipe_Tell(struct __ecereNameSpace__ecere__com__Instance ** dp);
297
298 unsigned int DualPipe_Eof(struct __ecereNameSpace__ecere__com__Instance ** dp);
299
300 unsigned int DualPipe_GetSize(struct __ecereNameSpace__ecere__com__Instance ** dp);
301
302 unsigned int DualPipe_Peek(struct __ecereNameSpace__ecere__com__Instance ** dp);
303
304 void DualPipe_Terminate(struct __ecereNameSpace__ecere__com__Instance ** dp);
305
306 int DualPipe_GetExitCode(struct __ecereNameSpace__ecere__com__Instance ** dp);
307
308 int DualPipe_GetProcessID(struct __ecereNameSpace__ecere__com__Instance ** dp);
309
310 void DualPipe_Wait(struct __ecereNameSpace__ecere__com__Instance ** dp);
311
312 struct __ecereNameSpace__ecere__com__Instance ** _DualPipeOpen(unsigned int mode, char * commandLine, char * env, void ** inputPtr, void ** outputPtr);
313
314 static struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__PipeOpenMode;
315
316 struct __ecereNameSpace__ecere__sys__DualPipe
317 {
318 void * dp;
319 } __attribute__ ((gcc_struct));
320
321 static struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__DualPipe;
322
323 void __ecereDestructor___ecereNameSpace__ecere__sys__DualPipe(struct __ecereNameSpace__ecere__com__Instance * this)
324 {
325 struct __ecereNameSpace__ecere__sys__DualPipe * __ecerePointer___ecereNameSpace__ecere__sys__DualPipe = (struct __ecereNameSpace__ecere__sys__DualPipe *)(this ? (((char *)this) + __ecereClass___ecereNameSpace__ecere__sys__DualPipe->offset) : 0);
326
327 {
328 DualPipe_Destructor(__ecerePointer___ecereNameSpace__ecere__sys__DualPipe->dp);
329 }
330 }
331
332 void *  __ecereProp___ecereNameSpace__ecere__sys__File_Get_input(struct __ecereNameSpace__ecere__com__Instance * this);
333
334 void __ecereProp___ecereNameSpace__ecere__sys__File_Set_input(struct __ecereNameSpace__ecere__com__Instance * this, void *  value);
335
336 extern struct __ecereNameSpace__ecere__com__Property ** __ecereProp___ecereNameSpace__ecere__sys__File_input;
337
338 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_CloseInput;
339
340 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__File;
341
342 void __ecereMethod___ecereNameSpace__ecere__sys__DualPipe_CloseInput(struct __ecereNameSpace__ecere__com__Instance * this)
343 {
344 struct __ecereNameSpace__ecere__sys__DualPipe * __ecerePointer___ecereNameSpace__ecere__sys__DualPipe = (struct __ecereNameSpace__ecere__sys__DualPipe *)(this ? (((char *)this) + __ecereClass___ecereNameSpace__ecere__sys__DualPipe->offset) : 0);
345
346 (__ecereProp___ecereNameSpace__ecere__sys__File_Get_input(this) != (((void *)0))) ? ((void (*)(struct __ecereNameSpace__ecere__com__Instance *))__ecereClass___ecereNameSpace__ecere__sys__File->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_CloseInput])(this) : DualPipe_CloseInput(__ecerePointer___ecereNameSpace__ecere__sys__DualPipe->dp);
347 }
348
349 void *  __ecereProp___ecereNameSpace__ecere__sys__File_Get_output(struct __ecereNameSpace__ecere__com__Instance * this);
350
351 void __ecereProp___ecereNameSpace__ecere__sys__File_Set_output(struct __ecereNameSpace__ecere__com__Instance * this, void *  value);
352
353 extern struct __ecereNameSpace__ecere__com__Property ** __ecereProp___ecereNameSpace__ecere__sys__File_output;
354
355 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_CloseOutput;
356
357 void __ecereMethod___ecereNameSpace__ecere__sys__DualPipe_CloseOutput(struct __ecereNameSpace__ecere__com__Instance * this)
358 {
359 struct __ecereNameSpace__ecere__sys__DualPipe * __ecerePointer___ecereNameSpace__ecere__sys__DualPipe = (struct __ecereNameSpace__ecere__sys__DualPipe *)(this ? (((char *)this) + __ecereClass___ecereNameSpace__ecere__sys__DualPipe->offset) : 0);
360
361 (__ecereProp___ecereNameSpace__ecere__sys__File_Get_output(this) != (((void *)0))) ? ((void (*)(struct __ecereNameSpace__ecere__com__Instance *))__ecereClass___ecereNameSpace__ecere__sys__File->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_CloseOutput])(this) : DualPipe_CloseOutput(__ecerePointer___ecereNameSpace__ecere__sys__DualPipe->dp);
362 }
363
364 int __ecereMethod___ecereNameSpace__ecere__sys__DualPipe_Read(struct __ecereNameSpace__ecere__com__Instance * this, unsigned char * buffer, unsigned int size, unsigned int count)
365 {
366 struct __ecereNameSpace__ecere__sys__DualPipe * __ecerePointer___ecereNameSpace__ecere__sys__DualPipe = (struct __ecereNameSpace__ecere__sys__DualPipe *)(this ? (((char *)this) + __ecereClass___ecereNameSpace__ecere__sys__DualPipe->offset) : 0);
367
368 return DualPipe_Read(__ecerePointer___ecereNameSpace__ecere__sys__DualPipe->dp, buffer, size, count);
369 }
370
371 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_Write;
372
373 int __ecereMethod___ecereNameSpace__ecere__sys__DualPipe_Write(struct __ecereNameSpace__ecere__com__Instance * this, unsigned char * buffer, unsigned int size, unsigned int count)
374 {
375 struct __ecereNameSpace__ecere__sys__DualPipe * __ecerePointer___ecereNameSpace__ecere__sys__DualPipe = (struct __ecereNameSpace__ecere__sys__DualPipe *)(this ? (((char *)this) + __ecereClass___ecereNameSpace__ecere__sys__DualPipe->offset) : 0);
376
377 return __ecereProp___ecereNameSpace__ecere__sys__File_Get_output(this) ? ((int (*)(struct __ecereNameSpace__ecere__com__Instance *, void *  buffer, unsigned int size, unsigned int count))__ecereClass___ecereNameSpace__ecere__sys__File->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Write])(this, buffer, size, count) : DualPipe_Write(__ecerePointer___ecereNameSpace__ecere__sys__DualPipe->dp, buffer, size, count);
378 }
379
380 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_Getc;
381
382 unsigned int __ecereMethod___ecereNameSpace__ecere__sys__DualPipe_Getc(struct __ecereNameSpace__ecere__com__Instance * this, char * ch)
383 {
384 struct __ecereNameSpace__ecere__sys__DualPipe * __ecerePointer___ecereNameSpace__ecere__sys__DualPipe = (struct __ecereNameSpace__ecere__sys__DualPipe *)(this ? (((char *)this) + __ecereClass___ecereNameSpace__ecere__sys__DualPipe->offset) : 0);
385
386 return __ecereProp___ecereNameSpace__ecere__sys__File_Get_input(this) ? ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, char *  ch))__ecereClass___ecereNameSpace__ecere__sys__File->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Getc])(this, ch) : DualPipe_Getc(__ecerePointer___ecereNameSpace__ecere__sys__DualPipe->dp, ch);
387 }
388
389 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_Putc;
390
391 unsigned int __ecereMethod___ecereNameSpace__ecere__sys__DualPipe_Putc(struct __ecereNameSpace__ecere__com__Instance * this, char ch)
392 {
393 struct __ecereNameSpace__ecere__sys__DualPipe * __ecerePointer___ecereNameSpace__ecere__sys__DualPipe = (struct __ecereNameSpace__ecere__sys__DualPipe *)(this ? (((char *)this) + __ecereClass___ecereNameSpace__ecere__sys__DualPipe->offset) : 0);
394
395 return __ecereProp___ecereNameSpace__ecere__sys__File_Get_output(this) ? ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, char ch))__ecereClass___ecereNameSpace__ecere__sys__File->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Putc])(this, ch) : DualPipe_Putc(__ecerePointer___ecereNameSpace__ecere__sys__DualPipe->dp, ch);
396 }
397
398 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts;
399
400 unsigned int __ecereMethod___ecereNameSpace__ecere__sys__File_Flush(struct __ecereNameSpace__ecere__com__Instance * this);
401
402 unsigned int __ecereMethod___ecereNameSpace__ecere__sys__DualPipe_Puts(struct __ecereNameSpace__ecere__com__Instance * this, char * string)
403 {
404 struct __ecereNameSpace__ecere__sys__DualPipe * __ecerePointer___ecereNameSpace__ecere__sys__DualPipe = (struct __ecereNameSpace__ecere__sys__DualPipe *)(this ? (((char *)this) + __ecereClass___ecereNameSpace__ecere__sys__DualPipe->offset) : 0);
405
406 return __ecereProp___ecereNameSpace__ecere__sys__File_Get_output(this) ? (((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char *  string))__ecereClass___ecereNameSpace__ecere__sys__File->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(this, string), __ecereMethod___ecereNameSpace__ecere__sys__File_Flush(this)) : DualPipe_Puts(__ecerePointer___ecereNameSpace__ecere__sys__DualPipe->dp, string);
407 }
408
409 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_Seek;
410
411 unsigned int __ecereMethod___ecereNameSpace__ecere__sys__DualPipe_Seek(struct __ecereNameSpace__ecere__com__Instance * this, int pos, int mode)
412 {
413 struct __ecereNameSpace__ecere__sys__DualPipe * __ecerePointer___ecereNameSpace__ecere__sys__DualPipe = (struct __ecereNameSpace__ecere__sys__DualPipe *)(this ? (((char *)this) + __ecereClass___ecereNameSpace__ecere__sys__DualPipe->offset) : 0);
414
415 return (__ecereProp___ecereNameSpace__ecere__sys__File_Get_input(this) || __ecereProp___ecereNameSpace__ecere__sys__File_Get_output(this)) ? ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, int pos, int mode))__ecereClass___ecereNameSpace__ecere__sys__File->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Seek])(this, pos, mode) : DualPipe_Seek(__ecerePointer___ecereNameSpace__ecere__sys__DualPipe->dp, pos, mode);
416 }
417
418 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_Tell;
419
420 unsigned int __ecereMethod___ecereNameSpace__ecere__sys__DualPipe_Tell(struct __ecereNameSpace__ecere__com__Instance * this)
421 {
422 struct __ecereNameSpace__ecere__sys__DualPipe * __ecerePointer___ecereNameSpace__ecere__sys__DualPipe = (struct __ecereNameSpace__ecere__sys__DualPipe *)(this ? (((char *)this) + __ecereClass___ecereNameSpace__ecere__sys__DualPipe->offset) : 0);
423
424 return (__ecereProp___ecereNameSpace__ecere__sys__File_Get_input(this) || __ecereProp___ecereNameSpace__ecere__sys__File_Get_output(this)) ? ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *))__ecereClass___ecereNameSpace__ecere__sys__File->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Tell])(this) : DualPipe_Tell(__ecerePointer___ecereNameSpace__ecere__sys__DualPipe->dp);
425 }
426
427 unsigned int __ecereMethod___ecereNameSpace__ecere__sys__DualPipe_Eof(struct __ecereNameSpace__ecere__com__Instance * this)
428 {
429 struct __ecereNameSpace__ecere__sys__DualPipe * __ecerePointer___ecereNameSpace__ecere__sys__DualPipe = (struct __ecereNameSpace__ecere__sys__DualPipe *)(this ? (((char *)this) + __ecereClass___ecereNameSpace__ecere__sys__DualPipe->offset) : 0);
430
431 return DualPipe_Eof(__ecerePointer___ecereNameSpace__ecere__sys__DualPipe->dp);
432 }
433
434 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_GetSize;
435
436 unsigned int __ecereMethod___ecereNameSpace__ecere__sys__DualPipe_GetSize(struct __ecereNameSpace__ecere__com__Instance * this)
437 {
438 struct __ecereNameSpace__ecere__sys__DualPipe * __ecerePointer___ecereNameSpace__ecere__sys__DualPipe = (struct __ecereNameSpace__ecere__sys__DualPipe *)(this ? (((char *)this) + __ecereClass___ecereNameSpace__ecere__sys__DualPipe->offset) : 0);
439
440 return (__ecereProp___ecereNameSpace__ecere__sys__File_Get_input(this) || __ecereProp___ecereNameSpace__ecere__sys__File_Get_output(this)) ? ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *))__ecereClass___ecereNameSpace__ecere__sys__File->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_GetSize])(this) : DualPipe_GetSize(__ecerePointer___ecereNameSpace__ecere__sys__DualPipe->dp);
441 }
442
443 unsigned int __ecereMethod___ecereNameSpace__ecere__sys__DualPipe_Peek(struct __ecereNameSpace__ecere__com__Instance * this)
444 {
445 struct __ecereNameSpace__ecere__sys__DualPipe * __ecerePointer___ecereNameSpace__ecere__sys__DualPipe = (struct __ecereNameSpace__ecere__sys__DualPipe *)(this ? (((char *)this) + __ecereClass___ecereNameSpace__ecere__sys__DualPipe->offset) : 0);
446
447 return DualPipe_Peek(__ecerePointer___ecereNameSpace__ecere__sys__DualPipe->dp);
448 }
449
450 void __ecereMethod___ecereNameSpace__ecere__sys__DualPipe_Terminate(struct __ecereNameSpace__ecere__com__Instance * this)
451 {
452 struct __ecereNameSpace__ecere__sys__DualPipe * __ecerePointer___ecereNameSpace__ecere__sys__DualPipe = (struct __ecereNameSpace__ecere__sys__DualPipe *)(this ? (((char *)this) + __ecereClass___ecereNameSpace__ecere__sys__DualPipe->offset) : 0);
453
454 DualPipe_Terminate(__ecerePointer___ecereNameSpace__ecere__sys__DualPipe->dp);
455 }
456
457 int __ecereMethod___ecereNameSpace__ecere__sys__DualPipe_GetExitCode(struct __ecereNameSpace__ecere__com__Instance * this)
458 {
459 struct __ecereNameSpace__ecere__sys__DualPipe * __ecerePointer___ecereNameSpace__ecere__sys__DualPipe = (struct __ecereNameSpace__ecere__sys__DualPipe *)(this ? (((char *)this) + __ecereClass___ecereNameSpace__ecere__sys__DualPipe->offset) : 0);
460
461 return DualPipe_GetExitCode(__ecerePointer___ecereNameSpace__ecere__sys__DualPipe->dp);
462 }
463
464 int __ecereMethod___ecereNameSpace__ecere__sys__DualPipe_GetProcessID(struct __ecereNameSpace__ecere__com__Instance * this)
465 {
466 struct __ecereNameSpace__ecere__sys__DualPipe * __ecerePointer___ecereNameSpace__ecere__sys__DualPipe = (struct __ecereNameSpace__ecere__sys__DualPipe *)(this ? (((char *)this) + __ecereClass___ecereNameSpace__ecere__sys__DualPipe->offset) : 0);
467
468 return DualPipe_GetProcessID(__ecerePointer___ecereNameSpace__ecere__sys__DualPipe->dp);
469 }
470
471 void __ecereMethod___ecereNameSpace__ecere__sys__DualPipe_Wait(struct __ecereNameSpace__ecere__com__Instance * this)
472 {
473 struct __ecereNameSpace__ecere__sys__DualPipe * __ecerePointer___ecereNameSpace__ecere__sys__DualPipe = (struct __ecereNameSpace__ecere__sys__DualPipe *)(this ? (((char *)this) + __ecereClass___ecereNameSpace__ecere__sys__DualPipe->offset) : 0);
474
475 DualPipe_Wait(__ecerePointer___ecereNameSpace__ecere__sys__DualPipe->dp);
476 }
477
478 extern int vsnprintf(char * , size_t, const char * , __builtin_va_list);
479
480 struct __ecereNameSpace__ecere__com__Instance * __ecereNameSpace__ecere__sys__DualPipeOpen(unsigned int mode, char *  commandLine);
481
482 struct __ecereNameSpace__ecere__com__Instance * __ecereNameSpace__ecere__sys__DualPipeOpenf(unsigned int mode, char * command, ...)
483 {
484 char commandLine[1025];
485 va_list args;
486
487 __builtin_va_start(args, command);
488 vsnprintf(commandLine, sizeof (commandLine), command, args);
489 commandLine[sizeof (commandLine) - 1] = (char)0;
490 __builtin_va_end(args);
491 return __ecereNameSpace__ecere__sys__DualPipeOpen(mode, commandLine);
492 }
493
494 extern void *  __ecereNameSpace__ecere__com__eInstance_New(struct __ecereNameSpace__ecere__com__Class * _class);
495
496 struct __ecereNameSpace__ecere__com__Instance * __ecereNameSpace__ecere__sys__DualPipeOpen(unsigned int mode, char * commandLine)
497 {
498 void * input, * output;
499 void * f = _DualPipeOpen(mode, commandLine, (((void *)0)), &input, &output);
500
501 if(f)
502 return __extension__ ({
503 struct __ecereNameSpace__ecere__com__Instance * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass___ecereNameSpace__ecere__sys__DualPipe);
504
505 ((struct __ecereNameSpace__ecere__sys__DualPipe *)(((char *)__ecereInstance1 + __ecereClass___ecereNameSpace__ecere__sys__DualPipe->offset)))->dp = f, __ecereProp___ecereNameSpace__ecere__sys__File_Set_input(__ecereInstance1, input), __ecereProp___ecereNameSpace__ecere__sys__File_Set_output(__ecereInstance1, output), __ecereInstance1;
506 });
507 return (((void *)0));
508 }
509
510 struct __ecereNameSpace__ecere__com__Instance * __ecereNameSpace__ecere__sys__DualPipeOpenEnv(unsigned int mode, char *  env, char *  commandLine);
511
512 struct __ecereNameSpace__ecere__com__Instance * __ecereNameSpace__ecere__sys__DualPipeOpenEnvf(unsigned int mode, char * env, char * command, ...)
513 {
514 char commandLine[1025];
515 va_list args;
516
517 __builtin_va_start(args, command);
518 vsnprintf(commandLine, sizeof (commandLine), command, args);
519 commandLine[sizeof (commandLine) - 1] = (char)0;
520 __builtin_va_end(args);
521 return __ecereNameSpace__ecere__sys__DualPipeOpenEnv(mode, env, commandLine);
522 }
523
524 struct __ecereNameSpace__ecere__com__Instance * __ecereNameSpace__ecere__sys__DualPipeOpenEnv(unsigned int mode, char * env, char * commandLine)
525 {
526 void * input, * output;
527 void * f = _DualPipeOpen(mode, commandLine, env, &input, &output);
528
529 if(f)
530 return __extension__ ({
531 struct __ecereNameSpace__ecere__com__Instance * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass___ecereNameSpace__ecere__sys__DualPipe);
532
533 ((struct __ecereNameSpace__ecere__sys__DualPipe *)(((char *)__ecereInstance1 + __ecereClass___ecereNameSpace__ecere__sys__DualPipe->offset)))->dp = f, __ecereProp___ecereNameSpace__ecere__sys__File_Set_input(__ecereInstance1, input), __ecereProp___ecereNameSpace__ecere__sys__File_Set_output(__ecereInstance1, output), __ecereInstance1;
534 });
535 return (((void *)0));
536 }
537
538 extern struct __ecereNameSpace__ecere__com__Class * __ecereNameSpace__ecere__com__eSystem_RegisterClass(int type, char *  name, char *  baseName, int size, int sizeClass, unsigned int (*  Constructor)(void * ), void (*  Destructor)(void * ), struct __ecereNameSpace__ecere__com__Instance * module, int declMode, int inheritanceAccess);
539
540 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__NameSpace;
541
542 struct __ecereNameSpace__ecere__com__NameSpace
543 {
544 char *  name;
545 struct __ecereNameSpace__ecere__com__NameSpace *  btParent;
546 struct __ecereNameSpace__ecere__com__NameSpace *  left;
547 struct __ecereNameSpace__ecere__com__NameSpace *  right;
548 int depth;
549 struct __ecereNameSpace__ecere__com__NameSpace *  parent;
550 struct __ecereNameSpace__ecere__sys__BinaryTree nameSpaces;
551 struct __ecereNameSpace__ecere__sys__BinaryTree classes;
552 struct __ecereNameSpace__ecere__sys__BinaryTree defines;
553 struct __ecereNameSpace__ecere__sys__BinaryTree functions;
554 } __attribute__ ((gcc_struct));
555
556 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Module;
557
558 struct __ecereNameSpace__ecere__com__Module
559 {
560 struct __ecereNameSpace__ecere__com__Instance * application;
561 struct __ecereNameSpace__ecere__sys__OldList classes;
562 struct __ecereNameSpace__ecere__sys__OldList defines;
563 struct __ecereNameSpace__ecere__sys__OldList functions;
564 struct __ecereNameSpace__ecere__sys__OldList modules;
565 struct __ecereNameSpace__ecere__com__Instance * prev;
566 struct __ecereNameSpace__ecere__com__Instance * next;
567 char *  name;
568 void *  library;
569 void *  Unload;
570 int importType;
571 int origImportType;
572 struct __ecereNameSpace__ecere__com__NameSpace privateNameSpace;
573 struct __ecereNameSpace__ecere__com__NameSpace publicNameSpace;
574 } __attribute__ ((gcc_struct));
575
576 extern struct __ecereNameSpace__ecere__com__Instance * __thisModule;
577
578 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__BitMember;
579
580 struct __ecereNameSpace__ecere__com__BitMember;
581
582 extern struct __ecereNameSpace__ecere__com__BitMember * __ecereNameSpace__ecere__com__eClass_AddBitMember(struct __ecereNameSpace__ecere__com__Class * _class, char *  name, char *  type, int bitSize, int bitPos, int declMode);
583
584 extern struct __ecereNameSpace__ecere__com__Method * __ecereNameSpace__ecere__com__eClass_AddMethod(struct __ecereNameSpace__ecere__com__Class * _class, char *  name, char *  type, void *  function, int declMode);
585
586 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__GlobalFunction;
587
588 struct __ecereNameSpace__ecere__com__GlobalFunction;
589
590 extern struct __ecereNameSpace__ecere__com__GlobalFunction * __ecereNameSpace__ecere__com__eSystem_RegisterFunction(char *  name, char *  type, void *  func, struct __ecereNameSpace__ecere__com__Instance * module, int declMode);
591
592 void __ecereRegisterModule_DualPipe(struct __ecereNameSpace__ecere__com__Instance * module)
593 {
594 struct __ecereNameSpace__ecere__com__Class * class;
595
596 class = __ecereNameSpace__ecere__com__eSystem_RegisterClass(2, "ecere::sys::PipeOpenMode", 0, 0, 0, 0, 0, module, 1, 1);
597 if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->application == ((struct __ecereNameSpace__ecere__com__Module *)(((char *)__thisModule + structSize_Instance)))->application && class)
598 __ecereClass___ecereNameSpace__ecere__sys__PipeOpenMode = class;
599 __ecereNameSpace__ecere__com__eClass_AddBitMember(class, "output", "bool", 1, 0, 1);
600 __ecereNameSpace__ecere__com__eClass_AddBitMember(class, "error", "bool", 1, 1, 1);
601 __ecereNameSpace__ecere__com__eClass_AddBitMember(class, "input", "bool", 1, 2, 1);
602 __ecereNameSpace__ecere__com__eClass_AddBitMember(class, "showWindow", "bool", 1, 3, 1);
603 class = __ecereNameSpace__ecere__com__eSystem_RegisterClass(0, "ecere::sys::DualPipe", "ecere::sys::File", sizeof(struct __ecereNameSpace__ecere__sys__DualPipe), 0, 0, __ecereDestructor___ecereNameSpace__ecere__sys__DualPipe, module, 1, 1);
604 if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->application == ((struct __ecereNameSpace__ecere__com__Module *)(((char *)__thisModule + structSize_Instance)))->application && class)
605 __ecereClass___ecereNameSpace__ecere__sys__DualPipe = class;
606 __ecereNameSpace__ecere__com__eClass_AddMethod(class, "Seek", 0, __ecereMethod___ecereNameSpace__ecere__sys__DualPipe_Seek, 1);
607 __ecereNameSpace__ecere__com__eClass_AddMethod(class, "Tell", 0, __ecereMethod___ecereNameSpace__ecere__sys__DualPipe_Tell, 1);
608 __ecereNameSpace__ecere__com__eClass_AddMethod(class, "Read", 0, __ecereMethod___ecereNameSpace__ecere__sys__DualPipe_Read, 1);
609 __ecereNameSpace__ecere__com__eClass_AddMethod(class, "Write", 0, __ecereMethod___ecereNameSpace__ecere__sys__DualPipe_Write, 1);
610 __ecereNameSpace__ecere__com__eClass_AddMethod(class, "Getc", 0, __ecereMethod___ecereNameSpace__ecere__sys__DualPipe_Getc, 1);
611 __ecereNameSpace__ecere__com__eClass_AddMethod(class, "Putc", 0, __ecereMethod___ecereNameSpace__ecere__sys__DualPipe_Putc, 1);
612 __ecereNameSpace__ecere__com__eClass_AddMethod(class, "Puts", 0, __ecereMethod___ecereNameSpace__ecere__sys__DualPipe_Puts, 1);
613 __ecereNameSpace__ecere__com__eClass_AddMethod(class, "Eof", 0, __ecereMethod___ecereNameSpace__ecere__sys__DualPipe_Eof, 1);
614 __ecereNameSpace__ecere__com__eClass_AddMethod(class, "GetSize", 0, __ecereMethod___ecereNameSpace__ecere__sys__DualPipe_GetSize, 1);
615 __ecereNameSpace__ecere__com__eClass_AddMethod(class, "CloseInput", 0, __ecereMethod___ecereNameSpace__ecere__sys__DualPipe_CloseInput, 1);
616 __ecereNameSpace__ecere__com__eClass_AddMethod(class, "CloseOutput", 0, __ecereMethod___ecereNameSpace__ecere__sys__DualPipe_CloseOutput, 1);
617 __ecereNameSpace__ecere__com__eClass_AddMethod(class, "GetExitCode", "int GetExitCode()", __ecereMethod___ecereNameSpace__ecere__sys__DualPipe_GetExitCode, 1);
618 __ecereNameSpace__ecere__com__eClass_AddMethod(class, "GetProcessID", "int GetProcessID()", __ecereMethod___ecereNameSpace__ecere__sys__DualPipe_GetProcessID, 1);
619 __ecereNameSpace__ecere__com__eClass_AddMethod(class, "Peek", "bool Peek()", __ecereMethod___ecereNameSpace__ecere__sys__DualPipe_Peek, 1);
620 __ecereNameSpace__ecere__com__eClass_AddMethod(class, "Terminate", "void Terminate()", __ecereMethod___ecereNameSpace__ecere__sys__DualPipe_Terminate, 1);
621 __ecereNameSpace__ecere__com__eClass_AddMethod(class, "Wait", "void Wait()", __ecereMethod___ecereNameSpace__ecere__sys__DualPipe_Wait, 1);
622 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ecere::sys::DualPipeOpenf", "ecere::sys::DualPipe ecere::sys::DualPipeOpenf(ecere::sys::PipeOpenMode mode, char * command, ...)", __ecereNameSpace__ecere__sys__DualPipeOpenf, module, 1);
623 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ecere::sys::DualPipeOpen", "ecere::sys::DualPipe ecere::sys::DualPipeOpen(ecere::sys::PipeOpenMode mode, char * commandLine)", __ecereNameSpace__ecere__sys__DualPipeOpen, module, 1);
624 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ecere::sys::DualPipeOpenEnvf", "ecere::sys::DualPipe ecere::sys::DualPipeOpenEnvf(ecere::sys::PipeOpenMode mode, char * env, char * command, ...)", __ecereNameSpace__ecere__sys__DualPipeOpenEnvf, module, 1);
625 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ecere::sys::DualPipeOpenEnv", "ecere::sys::DualPipe ecere::sys::DualPipeOpenEnv(ecere::sys::PipeOpenMode mode, char * env, char * commandLine)", __ecereNameSpace__ecere__sys__DualPipeOpenEnv, module, 1);
626 }
627
628 void __ecereUnregisterModule_DualPipe(struct __ecereNameSpace__ecere__com__Instance * module)
629 {
630
631 }
632