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