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