1 /* Code generated from eC source file: DualPipe.ec */
3 #define __runtimePlatform 1
4 #elif defined(__APPLE__)
5 #define __runtimePlatform 3
7 #define __runtimePlatform 2
10 typedef long long int64;
11 typedef unsigned long long uint64;
15 #elif defined(__TINYC__)
17 #define __builtin_va_list va_list
18 #define __builtin_va_start va_start
19 #define __builtin_va_end va_end
21 #define strcasecmp stricmp
22 #define strncasecmp strnicmp
23 #define __declspec(x) __attribute__((x))
27 typedef long long int64;
28 typedef unsigned long long uint64;
30 typedef __int64 int64;
31 typedef unsigned __int64 uint64;
34 #define __ENDIAN_PAD(x) (8 - (x))
36 #define __ENDIAN_PAD(x) 0
39 # if defined(__GNUC__) || defined(__TINYC__)
40 # define ecere_stdcall __attribute__((__stdcall__))
42 # define ecere_stdcall __stdcall
45 # define ecere_stdcall
48 #include <sys/types.h>
49 typedef __builtin_va_list va_list;
51 typedef struct _DualPipe _DualPipe;
53 void DualPipe_Destructor(_DualPipe * dp);
55 void DualPipe_CloseInput(_DualPipe * dp);
57 void DualPipe_CloseOutput(_DualPipe * dp);
59 int DualPipe_Read(_DualPipe * dp, unsigned char * buffer, unsigned int size, unsigned int count);
61 int DualPipe_Write(_DualPipe * dp, const unsigned char * buffer, unsigned int size, unsigned int count);
63 unsigned int DualPipe_Getc(_DualPipe * dp, char * ch);
65 unsigned int DualPipe_Putc(_DualPipe * dp, char ch);
67 unsigned int DualPipe_Puts(_DualPipe * dp, const char * string);
69 unsigned int DualPipe_Seek(_DualPipe * dp, int pos, int mode);
71 unsigned int DualPipe_Tell(_DualPipe * dp);
73 unsigned int DualPipe_Eof(_DualPipe * dp);
75 unsigned int DualPipe_GetSize(_DualPipe * dp);
77 unsigned int DualPipe_Peek(_DualPipe * dp);
79 void DualPipe_Terminate(_DualPipe * dp);
81 int DualPipe_GetExitCode(_DualPipe * dp);
83 int DualPipe_GetProcessID(_DualPipe * dp);
85 void DualPipe_Wait(_DualPipe * dp);
87 _DualPipe * _DualPipeOpen(unsigned int mode, const char * commandLine, const char * env, void ** inputPtr, void ** outputPtr);
89 struct __ecereNameSpace__ecere__sys__DualPipe
92 } __attribute__ ((gcc_struct));
94 extern struct __ecereNameSpace__ecere__com__Property * __ecereProp___ecereNameSpace__ecere__sys__File_input;
96 extern struct __ecereNameSpace__ecere__com__Property * __ecereProp___ecereNameSpace__ecere__sys__File_output;
98 struct __ecereNameSpace__ecere__sys__BTNode;
100 struct __ecereNameSpace__ecere__sys__OldList
107 } __attribute__ ((gcc_struct));
109 struct __ecereNameSpace__ecere__com__DataValue
124 } __attribute__ ((gcc_struct)) __anon1;
125 } __attribute__ ((gcc_struct));
127 struct __ecereNameSpace__ecere__com__SerialBuffer
129 unsigned char * _buffer;
133 } __attribute__ ((gcc_struct));
135 extern void * __ecereNameSpace__ecere__com__eSystem_New(unsigned int size);
137 extern void * __ecereNameSpace__ecere__com__eSystem_New0(unsigned int size);
139 extern void * __ecereNameSpace__ecere__com__eSystem_Renew(void * memory, unsigned int size);
141 extern void * __ecereNameSpace__ecere__com__eSystem_Renew0(void * memory, unsigned int size);
143 extern void __ecereNameSpace__ecere__com__eSystem_Delete(void * memory);
145 extern int vsnprintf(char * , size_t, const char * , __builtin_va_list);
147 struct __ecereNameSpace__ecere__com__BitMember;
149 struct __ecereNameSpace__ecere__com__GlobalFunction;
151 struct __ecereNameSpace__ecere__com__Class;
153 struct __ecereNameSpace__ecere__com__Instance
156 struct __ecereNameSpace__ecere__com__Class * _class;
158 } __attribute__ ((gcc_struct));
160 extern long long __ecereNameSpace__ecere__com__eClass_GetProperty(struct __ecereNameSpace__ecere__com__Class * _class, const char * name);
162 extern void __ecereNameSpace__ecere__com__eClass_SetProperty(struct __ecereNameSpace__ecere__com__Class * _class, const char * name, long long value);
164 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);
166 extern void * __ecereNameSpace__ecere__com__eInstance_New(struct __ecereNameSpace__ecere__com__Class * _class);
168 extern void __ecereNameSpace__ecere__com__eInstance_SetMethod(struct __ecereNameSpace__ecere__com__Instance * instance, const char * name, void * function);
170 extern void __ecereNameSpace__ecere__com__eInstance_IncRef(struct __ecereNameSpace__ecere__com__Instance * instance);
172 void * __ecereProp___ecereNameSpace__ecere__sys__File_Get_input(struct __ecereNameSpace__ecere__com__Instance * this);
174 void __ecereProp___ecereNameSpace__ecere__sys__File_Set_input(struct __ecereNameSpace__ecere__com__Instance * this, void * value);
176 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_CloseInput;
178 void * __ecereProp___ecereNameSpace__ecere__sys__File_Get_output(struct __ecereNameSpace__ecere__com__Instance * this);
180 void __ecereProp___ecereNameSpace__ecere__sys__File_Set_output(struct __ecereNameSpace__ecere__com__Instance * this, void * value);
182 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_CloseOutput;
184 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_Write;
186 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_Getc;
188 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_Putc;
190 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts;
192 unsigned int __ecereMethod___ecereNameSpace__ecere__sys__File_Flush(struct __ecereNameSpace__ecere__com__Instance * this);
194 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_Seek;
196 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_Tell;
198 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_GetSize;
200 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_Eof;
202 struct __ecereNameSpace__ecere__com__Property;
204 struct __ecereNameSpace__ecere__com__Property
206 struct __ecereNameSpace__ecere__com__Property * prev;
207 struct __ecereNameSpace__ecere__com__Property * next;
209 unsigned int isProperty;
212 struct __ecereNameSpace__ecere__com__Class * _class;
213 const char * dataTypeString;
214 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
215 struct __ecereNameSpace__ecere__com__Instance * dataType;
216 void (* Set)(void * , int);
217 int (* Get)(void * );
218 unsigned int (* IsSet)(void * );
222 unsigned int conversion;
223 unsigned int watcherOffset;
224 const char * category;
225 unsigned int compiled;
226 unsigned int selfWatchable;
227 unsigned int isWatchable;
228 } __attribute__ ((gcc_struct));
230 extern void __ecereNameSpace__ecere__com__eInstance_FireSelfWatchers(struct __ecereNameSpace__ecere__com__Instance * instance, struct __ecereNameSpace__ecere__com__Property * _property);
232 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);
234 extern void __ecereNameSpace__ecere__com__eInstance_Watch(void * instance, struct __ecereNameSpace__ecere__com__Property * _property, void * object, void (* callback)(void * , void * ));
236 extern void __ecereNameSpace__ecere__com__eInstance_FireWatchers(struct __ecereNameSpace__ecere__com__Instance * instance, struct __ecereNameSpace__ecere__com__Property * _property);
238 struct __ecereNameSpace__ecere__sys__BinaryTree;
240 struct __ecereNameSpace__ecere__sys__BinaryTree
242 struct __ecereNameSpace__ecere__sys__BTNode * root;
244 int (* CompareKey)(struct __ecereNameSpace__ecere__sys__BinaryTree * tree, uintptr_t a, uintptr_t b);
245 void (* FreeKey)(void * key);
246 } __attribute__ ((gcc_struct));
248 struct __ecereNameSpace__ecere__com__Instance * __ecereNameSpace__ecere__sys__DualPipeOpen(unsigned int mode, const char * commandLine);
250 struct __ecereNameSpace__ecere__com__Instance * __ecereNameSpace__ecere__sys__DualPipeOpenf(unsigned int mode, const char * command, ...)
252 char commandLine[1025];
255 __builtin_va_start(args, command);
256 vsnprintf(commandLine, sizeof (commandLine), command, args);
257 commandLine[sizeof (commandLine) - 1] = (char)0;
258 __builtin_va_end(args);
259 return __ecereNameSpace__ecere__sys__DualPipeOpen(mode, commandLine);
262 struct __ecereNameSpace__ecere__com__Instance * __ecereNameSpace__ecere__sys__DualPipeOpenEnv(unsigned int mode, const char * env, const char * commandLine);
264 struct __ecereNameSpace__ecere__com__Instance * __ecereNameSpace__ecere__sys__DualPipeOpenEnvf(unsigned int mode, const char * env, const char * command, ...)
266 char commandLine[1025];
269 __builtin_va_start(args, command);
270 vsnprintf(commandLine, sizeof (commandLine), command, args);
271 commandLine[sizeof (commandLine) - 1] = (char)0;
272 __builtin_va_end(args);
273 return __ecereNameSpace__ecere__sys__DualPipeOpenEnv(mode, env, commandLine);
276 struct __ecereNameSpace__ecere__com__Method;
278 struct __ecereNameSpace__ecere__com__Method
281 struct __ecereNameSpace__ecere__com__Method * parent;
282 struct __ecereNameSpace__ecere__com__Method * left;
283 struct __ecereNameSpace__ecere__com__Method * right;
288 struct __ecereNameSpace__ecere__com__Class * _class;
290 const char * dataTypeString;
291 struct __ecereNameSpace__ecere__com__Instance * dataType;
293 } __attribute__ ((gcc_struct));
295 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);
297 struct __ecereNameSpace__ecere__com__Module;
299 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);
301 extern struct __ecereNameSpace__ecere__com__Instance * __thisModule;
303 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);
305 struct __ecereNameSpace__ecere__com__NameSpace;
307 struct __ecereNameSpace__ecere__com__NameSpace
310 struct __ecereNameSpace__ecere__com__NameSpace * btParent;
311 struct __ecereNameSpace__ecere__com__NameSpace * left;
312 struct __ecereNameSpace__ecere__com__NameSpace * right;
314 struct __ecereNameSpace__ecere__com__NameSpace * parent;
315 struct __ecereNameSpace__ecere__sys__BinaryTree nameSpaces;
316 struct __ecereNameSpace__ecere__sys__BinaryTree classes;
317 struct __ecereNameSpace__ecere__sys__BinaryTree defines;
318 struct __ecereNameSpace__ecere__sys__BinaryTree functions;
319 } __attribute__ ((gcc_struct));
321 struct __ecereNameSpace__ecere__com__Application
326 unsigned int isGUIApp;
327 struct __ecereNameSpace__ecere__sys__OldList allModules;
328 char * parsedCommand;
329 struct __ecereNameSpace__ecere__com__NameSpace systemNameSpace;
330 } __attribute__ ((gcc_struct));
332 struct __ecereNameSpace__ecere__com__Module
334 struct __ecereNameSpace__ecere__com__Instance * application;
335 struct __ecereNameSpace__ecere__sys__OldList classes;
336 struct __ecereNameSpace__ecere__sys__OldList defines;
337 struct __ecereNameSpace__ecere__sys__OldList functions;
338 struct __ecereNameSpace__ecere__sys__OldList modules;
339 struct __ecereNameSpace__ecere__com__Instance * prev;
340 struct __ecereNameSpace__ecere__com__Instance * next;
346 struct __ecereNameSpace__ecere__com__NameSpace privateNameSpace;
347 struct __ecereNameSpace__ecere__com__NameSpace publicNameSpace;
348 } __attribute__ ((gcc_struct));
350 void __ecereUnregisterModule_DualPipe(struct __ecereNameSpace__ecere__com__Instance * module)
355 struct __ecereNameSpace__ecere__com__DataMember;
357 struct __ecereNameSpace__ecere__com__ClassTemplateArgument
363 const char * dataTypeString;
364 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
365 } __attribute__ ((gcc_struct)) __anon1;
366 struct __ecereNameSpace__ecere__com__DataValue expression;
369 const char * memberString;
372 struct __ecereNameSpace__ecere__com__DataMember * member;
373 struct __ecereNameSpace__ecere__com__Property * prop;
374 struct __ecereNameSpace__ecere__com__Method * method;
375 } __attribute__ ((gcc_struct)) __anon1;
376 } __attribute__ ((gcc_struct)) __anon2;
377 } __attribute__ ((gcc_struct)) __anon1;
378 } __attribute__ ((gcc_struct));
380 struct __ecereNameSpace__ecere__com__DataMember
382 struct __ecereNameSpace__ecere__com__DataMember * prev;
383 struct __ecereNameSpace__ecere__com__DataMember * next;
385 unsigned int isProperty;
388 struct __ecereNameSpace__ecere__com__Class * _class;
389 const char * dataTypeString;
390 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
391 struct __ecereNameSpace__ecere__com__Instance * dataType;
395 struct __ecereNameSpace__ecere__sys__OldList members;
396 struct __ecereNameSpace__ecere__sys__BinaryTree membersAlpha;
398 short structAlignment;
399 short pointerAlignment;
400 } __attribute__ ((gcc_struct));
402 struct __ecereNameSpace__ecere__com__Class
404 struct __ecereNameSpace__ecere__com__Class * prev;
405 struct __ecereNameSpace__ecere__com__Class * next;
411 unsigned int (* Constructor)(void * );
412 void (* Destructor)(void * );
415 struct __ecereNameSpace__ecere__com__Class * base;
416 struct __ecereNameSpace__ecere__sys__BinaryTree methods;
417 struct __ecereNameSpace__ecere__sys__BinaryTree members;
418 struct __ecereNameSpace__ecere__sys__BinaryTree prop;
419 struct __ecereNameSpace__ecere__sys__OldList membersAndProperties;
420 struct __ecereNameSpace__ecere__sys__BinaryTree classProperties;
421 struct __ecereNameSpace__ecere__sys__OldList derivatives;
425 struct __ecereNameSpace__ecere__com__Instance * module;
426 struct __ecereNameSpace__ecere__com__NameSpace * nameSpace;
427 const char * dataTypeString;
428 struct __ecereNameSpace__ecere__com__Instance * dataType;
430 int defaultAlignment;
431 void (* Initialize)();
433 struct __ecereNameSpace__ecere__sys__OldList selfWatchers;
434 const char * designerClass;
435 unsigned int noExpansion;
436 const char * defaultProperty;
437 unsigned int comRedefinition;
440 unsigned int internalDecl;
442 unsigned int computeSize;
443 short structAlignment;
444 short pointerAlignment;
445 int destructionWatchOffset;
447 struct __ecereNameSpace__ecere__sys__OldList delayedCPValues;
448 int inheritanceAccess;
449 const char * fullName;
451 struct __ecereNameSpace__ecere__sys__OldList conversions;
452 struct __ecereNameSpace__ecere__sys__OldList templateParams;
453 struct __ecereNameSpace__ecere__com__ClassTemplateArgument * templateArgs;
454 struct __ecereNameSpace__ecere__com__Class * templateClass;
455 struct __ecereNameSpace__ecere__sys__OldList templatized;
457 unsigned int isInstanceClass;
458 unsigned int byValueSystemClass;
459 } __attribute__ ((gcc_struct));
461 static struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__PipeOpenMode;
463 static struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__DualPipe;
465 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__File;
467 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Module;
469 void __ecereDestructor___ecereNameSpace__ecere__sys__DualPipe(struct __ecereNameSpace__ecere__com__Instance * this)
471 __attribute__((unused)) 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 DualPipe_Destructor(__ecerePointer___ecereNameSpace__ecere__sys__DualPipe->dp);
478 int __ecereMethod___ecereNameSpace__ecere__sys__DualPipe_Read(struct __ecereNameSpace__ecere__com__Instance * this, unsigned char * buffer, unsigned int size, unsigned int count)
480 __attribute__((unused)) 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);
482 return DualPipe_Read(__ecerePointer___ecereNameSpace__ecere__sys__DualPipe->dp, buffer, size, count);
485 unsigned int __ecereMethod___ecereNameSpace__ecere__sys__DualPipe_Eof(struct __ecereNameSpace__ecere__com__Instance * this)
487 __attribute__((unused)) 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);
489 return DualPipe_Eof(__ecerePointer___ecereNameSpace__ecere__sys__DualPipe->dp);
492 unsigned int __ecereMethod___ecereNameSpace__ecere__sys__DualPipe_Peek(struct __ecereNameSpace__ecere__com__Instance * this)
494 __attribute__((unused)) 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);
496 return DualPipe_Peek(__ecerePointer___ecereNameSpace__ecere__sys__DualPipe->dp);
499 void __ecereMethod___ecereNameSpace__ecere__sys__DualPipe_Terminate(struct __ecereNameSpace__ecere__com__Instance * this)
501 __attribute__((unused)) 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);
503 DualPipe_Terminate(__ecerePointer___ecereNameSpace__ecere__sys__DualPipe->dp);
506 int __ecereMethod___ecereNameSpace__ecere__sys__DualPipe_GetExitCode(struct __ecereNameSpace__ecere__com__Instance * this)
508 __attribute__((unused)) 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);
510 return DualPipe_GetExitCode(__ecerePointer___ecereNameSpace__ecere__sys__DualPipe->dp);
513 int __ecereMethod___ecereNameSpace__ecere__sys__DualPipe_GetProcessID(struct __ecereNameSpace__ecere__com__Instance * this)
515 __attribute__((unused)) 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);
517 return DualPipe_GetProcessID(__ecerePointer___ecereNameSpace__ecere__sys__DualPipe->dp);
520 void __ecereMethod___ecereNameSpace__ecere__sys__DualPipe_Wait(struct __ecereNameSpace__ecere__com__Instance * this)
522 __attribute__((unused)) 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);
524 DualPipe_Wait(__ecerePointer___ecereNameSpace__ecere__sys__DualPipe->dp);
527 struct __ecereNameSpace__ecere__com__Instance * __ecereNameSpace__ecere__sys__DualPipeOpen(unsigned int mode, const char * commandLine)
529 void * input, * output;
530 void * f = _DualPipeOpen(mode, commandLine, (((void *)0)), &input, &output);
533 return __extension__ ({
534 struct __ecereNameSpace__ecere__com__Instance * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass___ecereNameSpace__ecere__sys__DualPipe);
536 ((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;
538 return (((void *)0));
541 struct __ecereNameSpace__ecere__com__Instance * __ecereNameSpace__ecere__sys__DualPipeOpenEnv(unsigned int mode, const char * env, const char * commandLine)
543 void * input, * output;
544 void * f = _DualPipeOpen(mode, commandLine, env, &input, &output);
547 return __extension__ ({
548 struct __ecereNameSpace__ecere__com__Instance * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass___ecereNameSpace__ecere__sys__DualPipe);
550 ((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;
552 return (((void *)0));
555 void __ecereMethod___ecereNameSpace__ecere__sys__DualPipe_CloseInput(struct __ecereNameSpace__ecere__com__Instance * this)
557 __attribute__((unused)) 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);
559 (__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);
562 void __ecereMethod___ecereNameSpace__ecere__sys__DualPipe_CloseOutput(struct __ecereNameSpace__ecere__com__Instance * this)
564 __attribute__((unused)) 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);
566 (__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);
569 int __ecereMethod___ecereNameSpace__ecere__sys__DualPipe_Write(struct __ecereNameSpace__ecere__com__Instance * this, const unsigned char * buffer, unsigned int size, unsigned int count)
571 __attribute__((unused)) 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);
573 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);
576 unsigned int __ecereMethod___ecereNameSpace__ecere__sys__DualPipe_Getc(struct __ecereNameSpace__ecere__com__Instance * this, char * ch)
578 __attribute__((unused)) 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);
580 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);
583 unsigned int __ecereMethod___ecereNameSpace__ecere__sys__DualPipe_Putc(struct __ecereNameSpace__ecere__com__Instance * this, char ch)
585 __attribute__((unused)) 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);
587 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);
590 unsigned int __ecereMethod___ecereNameSpace__ecere__sys__DualPipe_Puts(struct __ecereNameSpace__ecere__com__Instance * this, const char * string)
592 __attribute__((unused)) 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);
594 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);
597 unsigned int __ecereMethod___ecereNameSpace__ecere__sys__DualPipe_Seek(struct __ecereNameSpace__ecere__com__Instance * this, int pos, int mode)
599 __attribute__((unused)) 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);
601 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);
604 unsigned int __ecereMethod___ecereNameSpace__ecere__sys__DualPipe_Tell(struct __ecereNameSpace__ecere__com__Instance * this)
606 __attribute__((unused)) 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);
608 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);
611 unsigned int __ecereMethod___ecereNameSpace__ecere__sys__DualPipe_GetSize(struct __ecereNameSpace__ecere__com__Instance * this)
613 __attribute__((unused)) 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);
615 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);
618 unsigned int __ecereMethod___ecereNameSpace__ecere__sys__DualPipe_GetLinePeek(struct __ecereNameSpace__ecere__com__Instance * this, char * s, int max, int * charsRead)
620 __attribute__((unused)) 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);
624 while(c < max - 1 && __ecereMethod___ecereNameSpace__ecere__sys__DualPipe_Peek(this) && ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, char * ch))__extension__ ({
625 struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = this;
627 __internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__DualPipe->_vTbl;
628 })[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Getc])(this, &ch) && ch != '\n')
633 return ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *))__extension__ ({
634 struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = this;
636 __internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__DualPipe->_vTbl;
637 })[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Eof])(this) || ch == '\n';
640 void __ecereRegisterModule_DualPipe(struct __ecereNameSpace__ecere__com__Instance * module)
642 struct __ecereNameSpace__ecere__com__Class __attribute__((unused)) * class;
644 class = __ecereNameSpace__ecere__com__eSystem_RegisterClass(2, "ecere::sys::PipeOpenMode", 0, 0, 0, (void *)0, (void *)0, module, 1, 1);
645 if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->application == ((struct __ecereNameSpace__ecere__com__Module *)(((char *)__thisModule + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->application && class)
646 __ecereClass___ecereNameSpace__ecere__sys__PipeOpenMode = class;
647 __ecereNameSpace__ecere__com__eClass_AddBitMember(class, "output", "bool", 1, 0, 1);
648 __ecereNameSpace__ecere__com__eClass_AddBitMember(class, "error", "bool", 1, 1, 1);
649 __ecereNameSpace__ecere__com__eClass_AddBitMember(class, "input", "bool", 1, 2, 1);
650 __ecereNameSpace__ecere__com__eClass_AddBitMember(class, "showWindow", "bool", 1, 3, 1);
651 class = __ecereNameSpace__ecere__com__eSystem_RegisterClass(0, "ecere::sys::DualPipe", "ecere::sys::File", sizeof(struct __ecereNameSpace__ecere__sys__DualPipe), 0, (void *)0, (void *)__ecereDestructor___ecereNameSpace__ecere__sys__DualPipe, module, 1, 1);
652 if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->application == ((struct __ecereNameSpace__ecere__com__Module *)(((char *)__thisModule + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->application && class)
653 __ecereClass___ecereNameSpace__ecere__sys__DualPipe = class;
654 __ecereNameSpace__ecere__com__eClass_AddMethod(class, "Seek", 0, __ecereMethod___ecereNameSpace__ecere__sys__DualPipe_Seek, 1);
655 __ecereNameSpace__ecere__com__eClass_AddMethod(class, "Tell", 0, __ecereMethod___ecereNameSpace__ecere__sys__DualPipe_Tell, 1);
656 __ecereNameSpace__ecere__com__eClass_AddMethod(class, "Read", 0, __ecereMethod___ecereNameSpace__ecere__sys__DualPipe_Read, 1);
657 __ecereNameSpace__ecere__com__eClass_AddMethod(class, "Write", 0, __ecereMethod___ecereNameSpace__ecere__sys__DualPipe_Write, 1);
658 __ecereNameSpace__ecere__com__eClass_AddMethod(class, "Getc", 0, __ecereMethod___ecereNameSpace__ecere__sys__DualPipe_Getc, 1);
659 __ecereNameSpace__ecere__com__eClass_AddMethod(class, "Putc", 0, __ecereMethod___ecereNameSpace__ecere__sys__DualPipe_Putc, 1);
660 __ecereNameSpace__ecere__com__eClass_AddMethod(class, "Puts", 0, __ecereMethod___ecereNameSpace__ecere__sys__DualPipe_Puts, 1);
661 __ecereNameSpace__ecere__com__eClass_AddMethod(class, "Eof", 0, __ecereMethod___ecereNameSpace__ecere__sys__DualPipe_Eof, 1);
662 __ecereNameSpace__ecere__com__eClass_AddMethod(class, "GetSize", 0, __ecereMethod___ecereNameSpace__ecere__sys__DualPipe_GetSize, 1);
663 __ecereNameSpace__ecere__com__eClass_AddMethod(class, "CloseInput", 0, __ecereMethod___ecereNameSpace__ecere__sys__DualPipe_CloseInput, 1);
664 __ecereNameSpace__ecere__com__eClass_AddMethod(class, "CloseOutput", 0, __ecereMethod___ecereNameSpace__ecere__sys__DualPipe_CloseOutput, 1);
665 __ecereNameSpace__ecere__com__eClass_AddMethod(class, "GetExitCode", "int GetExitCode()", __ecereMethod___ecereNameSpace__ecere__sys__DualPipe_GetExitCode, 1);
666 __ecereNameSpace__ecere__com__eClass_AddMethod(class, "GetLinePeek", "bool GetLinePeek(char * s, int max, int * charsRead)", __ecereMethod___ecereNameSpace__ecere__sys__DualPipe_GetLinePeek, 1);
667 __ecereNameSpace__ecere__com__eClass_AddMethod(class, "GetProcessID", "int GetProcessID()", __ecereMethod___ecereNameSpace__ecere__sys__DualPipe_GetProcessID, 1);
668 __ecereNameSpace__ecere__com__eClass_AddMethod(class, "Peek", "bool Peek()", __ecereMethod___ecereNameSpace__ecere__sys__DualPipe_Peek, 1);
669 __ecereNameSpace__ecere__com__eClass_AddMethod(class, "Terminate", "void Terminate()", __ecereMethod___ecereNameSpace__ecere__sys__DualPipe_Terminate, 1);
670 __ecereNameSpace__ecere__com__eClass_AddMethod(class, "Wait", "void Wait()", __ecereMethod___ecereNameSpace__ecere__sys__DualPipe_Wait, 1);
671 __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);
672 __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);
673 __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);
674 __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);