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 #include <sys/types.h>
40 typedef __builtin_va_list va_list;
42 struct __ecereNameSpace__ecere__sys__DualPipe
45 } __attribute__ ((gcc_struct));
47 extern struct __ecereNameSpace__ecere__com__Property * __ecereProp___ecereNameSpace__ecere__sys__File_input;
49 extern struct __ecereNameSpace__ecere__com__Property * __ecereProp___ecereNameSpace__ecere__sys__File_output;
51 struct __ecereNameSpace__ecere__sys__BTNode;
53 struct __ecereNameSpace__ecere__sys__OldList
60 } __attribute__ ((gcc_struct));
62 struct __ecereNameSpace__ecere__com__DataValue
77 } __attribute__ ((gcc_struct)) __anon1;
78 } __attribute__ ((gcc_struct));
80 struct __ecereNameSpace__ecere__com__SerialBuffer
82 unsigned char * _buffer;
86 } __attribute__ ((gcc_struct));
88 extern void * __ecereNameSpace__ecere__com__eSystem_New(unsigned int size);
90 extern void * __ecereNameSpace__ecere__com__eSystem_New0(unsigned int size);
92 extern void * __ecereNameSpace__ecere__com__eSystem_Renew(void * memory, unsigned int size);
94 extern void * __ecereNameSpace__ecere__com__eSystem_Renew0(void * memory, unsigned int size);
96 extern void __ecereNameSpace__ecere__com__eSystem_Delete(void * memory);
98 extern int vsnprintf(char * , size_t, const char * , __builtin_va_list);
100 struct __ecereNameSpace__ecere__com__BitMember;
102 struct __ecereNameSpace__ecere__com__GlobalFunction;
104 struct __ecereNameSpace__ecere__com__Class;
106 struct __ecereNameSpace__ecere__com__Instance
109 struct __ecereNameSpace__ecere__com__Class * _class;
111 } __attribute__ ((gcc_struct));
113 extern long long __ecereNameSpace__ecere__com__eClass_GetProperty(struct __ecereNameSpace__ecere__com__Class * _class, const char * name);
115 extern void __ecereNameSpace__ecere__com__eClass_SetProperty(struct __ecereNameSpace__ecere__com__Class * _class, const char * name, long long value);
117 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);
119 extern void * __ecereNameSpace__ecere__com__eInstance_New(struct __ecereNameSpace__ecere__com__Class * _class);
121 extern void __ecereNameSpace__ecere__com__eInstance_SetMethod(struct __ecereNameSpace__ecere__com__Instance * instance, const char * name, void * function);
123 extern void __ecereNameSpace__ecere__com__eInstance_IncRef(struct __ecereNameSpace__ecere__com__Instance * instance);
125 void DualPipe_Destructor(struct __ecereNameSpace__ecere__com__Instance ** dp);
127 void DualPipe_CloseInput(struct __ecereNameSpace__ecere__com__Instance ** dp);
129 void DualPipe_CloseOutput(struct __ecereNameSpace__ecere__com__Instance ** dp);
131 int DualPipe_Read(struct __ecereNameSpace__ecere__com__Instance ** dp, unsigned char * buffer, unsigned int size, unsigned int count);
133 int DualPipe_Write(struct __ecereNameSpace__ecere__com__Instance ** dp, const unsigned char * buffer, unsigned int size, unsigned int count);
135 unsigned int DualPipe_Getc(struct __ecereNameSpace__ecere__com__Instance ** dp, char * ch);
137 unsigned int DualPipe_Putc(struct __ecereNameSpace__ecere__com__Instance ** dp, char ch);
139 unsigned int DualPipe_Puts(struct __ecereNameSpace__ecere__com__Instance ** dp, const char * string);
141 unsigned int DualPipe_Seek(struct __ecereNameSpace__ecere__com__Instance ** dp, int pos, int mode);
143 unsigned int DualPipe_Tell(struct __ecereNameSpace__ecere__com__Instance ** dp);
145 unsigned int DualPipe_Eof(struct __ecereNameSpace__ecere__com__Instance ** dp);
147 unsigned int DualPipe_GetSize(struct __ecereNameSpace__ecere__com__Instance ** dp);
149 unsigned int DualPipe_Peek(struct __ecereNameSpace__ecere__com__Instance ** dp);
151 void DualPipe_Terminate(struct __ecereNameSpace__ecere__com__Instance ** dp);
153 int DualPipe_GetExitCode(struct __ecereNameSpace__ecere__com__Instance ** dp);
155 int DualPipe_GetProcessID(struct __ecereNameSpace__ecere__com__Instance ** dp);
157 void DualPipe_Wait(struct __ecereNameSpace__ecere__com__Instance ** dp);
159 struct __ecereNameSpace__ecere__com__Instance ** _DualPipeOpen(unsigned int mode, const char * commandLine, const char * env, void ** inputPtr, void ** outputPtr);
161 void * __ecereProp___ecereNameSpace__ecere__sys__File_Get_input(struct __ecereNameSpace__ecere__com__Instance * this);
163 void __ecereProp___ecereNameSpace__ecere__sys__File_Set_input(struct __ecereNameSpace__ecere__com__Instance * this, void * value);
165 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_CloseInput;
167 void * __ecereProp___ecereNameSpace__ecere__sys__File_Get_output(struct __ecereNameSpace__ecere__com__Instance * this);
169 void __ecereProp___ecereNameSpace__ecere__sys__File_Set_output(struct __ecereNameSpace__ecere__com__Instance * this, void * value);
171 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_CloseOutput;
173 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_Write;
175 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_Getc;
177 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_Putc;
179 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts;
181 unsigned int __ecereMethod___ecereNameSpace__ecere__sys__File_Flush(struct __ecereNameSpace__ecere__com__Instance * this);
183 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_Seek;
185 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_Tell;
187 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_GetSize;
189 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_Eof;
191 struct __ecereNameSpace__ecere__com__Property;
193 struct __ecereNameSpace__ecere__com__Property
195 struct __ecereNameSpace__ecere__com__Property * prev;
196 struct __ecereNameSpace__ecere__com__Property * next;
198 unsigned int isProperty;
201 struct __ecereNameSpace__ecere__com__Class * _class;
202 const char * dataTypeString;
203 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
204 struct __ecereNameSpace__ecere__com__Instance * dataType;
205 void (* Set)(void * , int);
206 int (* Get)(void * );
207 unsigned int (* IsSet)(void * );
211 unsigned int conversion;
212 unsigned int watcherOffset;
213 const char * category;
214 unsigned int compiled;
215 unsigned int selfWatchable;
216 unsigned int isWatchable;
217 } __attribute__ ((gcc_struct));
219 extern void __ecereNameSpace__ecere__com__eInstance_FireSelfWatchers(struct __ecereNameSpace__ecere__com__Instance * instance, struct __ecereNameSpace__ecere__com__Property * _property);
221 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);
223 extern void __ecereNameSpace__ecere__com__eInstance_Watch(void * instance, struct __ecereNameSpace__ecere__com__Property * _property, void * object, void (* callback)(void * , void * ));
225 extern void __ecereNameSpace__ecere__com__eInstance_FireWatchers(struct __ecereNameSpace__ecere__com__Instance * instance, struct __ecereNameSpace__ecere__com__Property * _property);
227 struct __ecereNameSpace__ecere__sys__BinaryTree;
229 struct __ecereNameSpace__ecere__sys__BinaryTree
231 struct __ecereNameSpace__ecere__sys__BTNode * root;
233 int (* CompareKey)(struct __ecereNameSpace__ecere__sys__BinaryTree * tree, uintptr_t a, uintptr_t b);
234 void (* FreeKey)(void * key);
235 } __attribute__ ((gcc_struct));
237 struct __ecereNameSpace__ecere__com__Instance * __ecereNameSpace__ecere__sys__DualPipeOpen(unsigned int mode, const char * commandLine);
239 struct __ecereNameSpace__ecere__com__Instance * __ecereNameSpace__ecere__sys__DualPipeOpenf(unsigned int mode, const char * command, ...)
241 char commandLine[1025];
244 __builtin_va_start(args, command);
245 vsnprintf(commandLine, sizeof (commandLine), command, args);
246 commandLine[sizeof (commandLine) - 1] = (char)0;
247 __builtin_va_end(args);
248 return __ecereNameSpace__ecere__sys__DualPipeOpen(mode, commandLine);
251 struct __ecereNameSpace__ecere__com__Instance * __ecereNameSpace__ecere__sys__DualPipeOpenEnv(unsigned int mode, const char * env, const char * commandLine);
253 struct __ecereNameSpace__ecere__com__Instance * __ecereNameSpace__ecere__sys__DualPipeOpenEnvf(unsigned int mode, const char * env, const char * command, ...)
255 char commandLine[1025];
258 __builtin_va_start(args, command);
259 vsnprintf(commandLine, sizeof (commandLine), command, args);
260 commandLine[sizeof (commandLine) - 1] = (char)0;
261 __builtin_va_end(args);
262 return __ecereNameSpace__ecere__sys__DualPipeOpenEnv(mode, env, commandLine);
265 struct __ecereNameSpace__ecere__com__Method;
267 struct __ecereNameSpace__ecere__com__Method
270 struct __ecereNameSpace__ecere__com__Method * parent;
271 struct __ecereNameSpace__ecere__com__Method * left;
272 struct __ecereNameSpace__ecere__com__Method * right;
277 struct __ecereNameSpace__ecere__com__Class * _class;
279 const char * dataTypeString;
280 struct __ecereNameSpace__ecere__com__Instance * dataType;
282 } __attribute__ ((gcc_struct));
284 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);
286 struct __ecereNameSpace__ecere__com__Module;
288 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);
290 extern struct __ecereNameSpace__ecere__com__Instance * __thisModule;
292 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);
294 struct __ecereNameSpace__ecere__com__NameSpace;
296 struct __ecereNameSpace__ecere__com__NameSpace
299 struct __ecereNameSpace__ecere__com__NameSpace * btParent;
300 struct __ecereNameSpace__ecere__com__NameSpace * left;
301 struct __ecereNameSpace__ecere__com__NameSpace * right;
303 struct __ecereNameSpace__ecere__com__NameSpace * parent;
304 struct __ecereNameSpace__ecere__sys__BinaryTree nameSpaces;
305 struct __ecereNameSpace__ecere__sys__BinaryTree classes;
306 struct __ecereNameSpace__ecere__sys__BinaryTree defines;
307 struct __ecereNameSpace__ecere__sys__BinaryTree functions;
308 } __attribute__ ((gcc_struct));
310 struct __ecereNameSpace__ecere__com__Application
315 unsigned int isGUIApp;
316 struct __ecereNameSpace__ecere__sys__OldList allModules;
317 char * parsedCommand;
318 struct __ecereNameSpace__ecere__com__NameSpace systemNameSpace;
319 } __attribute__ ((gcc_struct));
321 struct __ecereNameSpace__ecere__com__Module
323 struct __ecereNameSpace__ecere__com__Instance * application;
324 struct __ecereNameSpace__ecere__sys__OldList classes;
325 struct __ecereNameSpace__ecere__sys__OldList defines;
326 struct __ecereNameSpace__ecere__sys__OldList functions;
327 struct __ecereNameSpace__ecere__sys__OldList modules;
328 struct __ecereNameSpace__ecere__com__Instance * prev;
329 struct __ecereNameSpace__ecere__com__Instance * next;
335 struct __ecereNameSpace__ecere__com__NameSpace privateNameSpace;
336 struct __ecereNameSpace__ecere__com__NameSpace publicNameSpace;
337 } __attribute__ ((gcc_struct));
339 void __ecereUnregisterModule_DualPipe(struct __ecereNameSpace__ecere__com__Instance * module)
344 struct __ecereNameSpace__ecere__com__DataMember;
346 struct __ecereNameSpace__ecere__com__ClassTemplateArgument
352 const char * dataTypeString;
353 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
354 } __attribute__ ((gcc_struct)) __anon1;
355 struct __ecereNameSpace__ecere__com__DataValue expression;
358 const char * memberString;
361 struct __ecereNameSpace__ecere__com__DataMember * member;
362 struct __ecereNameSpace__ecere__com__Property * prop;
363 struct __ecereNameSpace__ecere__com__Method * method;
364 } __attribute__ ((gcc_struct)) __anon1;
365 } __attribute__ ((gcc_struct)) __anon2;
366 } __attribute__ ((gcc_struct)) __anon1;
367 } __attribute__ ((gcc_struct));
369 struct __ecereNameSpace__ecere__com__DataMember
371 struct __ecereNameSpace__ecere__com__DataMember * prev;
372 struct __ecereNameSpace__ecere__com__DataMember * next;
374 unsigned int isProperty;
377 struct __ecereNameSpace__ecere__com__Class * _class;
378 const char * dataTypeString;
379 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
380 struct __ecereNameSpace__ecere__com__Instance * dataType;
384 struct __ecereNameSpace__ecere__sys__OldList members;
385 struct __ecereNameSpace__ecere__sys__BinaryTree membersAlpha;
387 short structAlignment;
388 short pointerAlignment;
389 } __attribute__ ((gcc_struct));
391 struct __ecereNameSpace__ecere__com__Class
393 struct __ecereNameSpace__ecere__com__Class * prev;
394 struct __ecereNameSpace__ecere__com__Class * next;
400 unsigned int (* Constructor)(void * );
401 void (* Destructor)(void * );
404 struct __ecereNameSpace__ecere__com__Class * base;
405 struct __ecereNameSpace__ecere__sys__BinaryTree methods;
406 struct __ecereNameSpace__ecere__sys__BinaryTree members;
407 struct __ecereNameSpace__ecere__sys__BinaryTree prop;
408 struct __ecereNameSpace__ecere__sys__OldList membersAndProperties;
409 struct __ecereNameSpace__ecere__sys__BinaryTree classProperties;
410 struct __ecereNameSpace__ecere__sys__OldList derivatives;
414 struct __ecereNameSpace__ecere__com__Instance * module;
415 struct __ecereNameSpace__ecere__com__NameSpace * nameSpace;
416 const char * dataTypeString;
417 struct __ecereNameSpace__ecere__com__Instance * dataType;
419 int defaultAlignment;
420 void (* Initialize)();
422 struct __ecereNameSpace__ecere__sys__OldList selfWatchers;
423 const char * designerClass;
424 unsigned int noExpansion;
425 const char * defaultProperty;
426 unsigned int comRedefinition;
429 unsigned int internalDecl;
431 unsigned int computeSize;
432 short structAlignment;
433 short pointerAlignment;
434 int destructionWatchOffset;
436 struct __ecereNameSpace__ecere__sys__OldList delayedCPValues;
437 int inheritanceAccess;
438 const char * fullName;
440 struct __ecereNameSpace__ecere__sys__OldList conversions;
441 struct __ecereNameSpace__ecere__sys__OldList templateParams;
442 struct __ecereNameSpace__ecere__com__ClassTemplateArgument * templateArgs;
443 struct __ecereNameSpace__ecere__com__Class * templateClass;
444 struct __ecereNameSpace__ecere__sys__OldList templatized;
446 unsigned int isInstanceClass;
447 unsigned int byValueSystemClass;
448 } __attribute__ ((gcc_struct));
450 static struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__PipeOpenMode;
452 static struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__DualPipe;
454 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__File;
456 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Module;
458 void __ecereDestructor___ecereNameSpace__ecere__sys__DualPipe(struct __ecereNameSpace__ecere__com__Instance * this)
460 __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);
463 DualPipe_Destructor(__ecerePointer___ecereNameSpace__ecere__sys__DualPipe->dp);
467 int __ecereMethod___ecereNameSpace__ecere__sys__DualPipe_Read(struct __ecereNameSpace__ecere__com__Instance * this, unsigned char * buffer, unsigned int size, unsigned int count)
469 __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);
471 return DualPipe_Read(__ecerePointer___ecereNameSpace__ecere__sys__DualPipe->dp, buffer, size, count);
474 unsigned int __ecereMethod___ecereNameSpace__ecere__sys__DualPipe_Eof(struct __ecereNameSpace__ecere__com__Instance * this)
476 __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);
478 return DualPipe_Eof(__ecerePointer___ecereNameSpace__ecere__sys__DualPipe->dp);
481 unsigned int __ecereMethod___ecereNameSpace__ecere__sys__DualPipe_Peek(struct __ecereNameSpace__ecere__com__Instance * this)
483 __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);
485 return DualPipe_Peek(__ecerePointer___ecereNameSpace__ecere__sys__DualPipe->dp);
488 void __ecereMethod___ecereNameSpace__ecere__sys__DualPipe_Terminate(struct __ecereNameSpace__ecere__com__Instance * this)
490 __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);
492 DualPipe_Terminate(__ecerePointer___ecereNameSpace__ecere__sys__DualPipe->dp);
495 int __ecereMethod___ecereNameSpace__ecere__sys__DualPipe_GetExitCode(struct __ecereNameSpace__ecere__com__Instance * this)
497 __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);
499 return DualPipe_GetExitCode(__ecerePointer___ecereNameSpace__ecere__sys__DualPipe->dp);
502 int __ecereMethod___ecereNameSpace__ecere__sys__DualPipe_GetProcessID(struct __ecereNameSpace__ecere__com__Instance * this)
504 __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);
506 return DualPipe_GetProcessID(__ecerePointer___ecereNameSpace__ecere__sys__DualPipe->dp);
509 void __ecereMethod___ecereNameSpace__ecere__sys__DualPipe_Wait(struct __ecereNameSpace__ecere__com__Instance * this)
511 __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);
513 DualPipe_Wait(__ecerePointer___ecereNameSpace__ecere__sys__DualPipe->dp);
516 struct __ecereNameSpace__ecere__com__Instance * __ecereNameSpace__ecere__sys__DualPipeOpen(unsigned int mode, const char * commandLine)
518 void * input, * output;
519 void * f = _DualPipeOpen(mode, commandLine, (((void *)0)), &input, &output);
522 return __extension__ ({
523 struct __ecereNameSpace__ecere__com__Instance * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass___ecereNameSpace__ecere__sys__DualPipe);
525 ((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 return (((void *)0));
530 struct __ecereNameSpace__ecere__com__Instance * __ecereNameSpace__ecere__sys__DualPipeOpenEnv(unsigned int mode, const char * env, const char * commandLine)
532 void * input, * output;
533 void * f = _DualPipeOpen(mode, commandLine, env, &input, &output);
536 return __extension__ ({
537 struct __ecereNameSpace__ecere__com__Instance * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass___ecereNameSpace__ecere__sys__DualPipe);
539 ((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;
541 return (((void *)0));
544 void __ecereMethod___ecereNameSpace__ecere__sys__DualPipe_CloseInput(struct __ecereNameSpace__ecere__com__Instance * this)
546 __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);
548 (__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);
551 void __ecereMethod___ecereNameSpace__ecere__sys__DualPipe_CloseOutput(struct __ecereNameSpace__ecere__com__Instance * this)
553 __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);
555 (__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);
558 int __ecereMethod___ecereNameSpace__ecere__sys__DualPipe_Write(struct __ecereNameSpace__ecere__com__Instance * this, const unsigned char * buffer, unsigned int size, unsigned int count)
560 __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);
562 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);
565 unsigned int __ecereMethod___ecereNameSpace__ecere__sys__DualPipe_Getc(struct __ecereNameSpace__ecere__com__Instance * this, char * ch)
567 __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);
569 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);
572 unsigned int __ecereMethod___ecereNameSpace__ecere__sys__DualPipe_Putc(struct __ecereNameSpace__ecere__com__Instance * this, char ch)
574 __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);
576 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);
579 unsigned int __ecereMethod___ecereNameSpace__ecere__sys__DualPipe_Puts(struct __ecereNameSpace__ecere__com__Instance * this, const char * string)
581 __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);
583 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);
586 unsigned int __ecereMethod___ecereNameSpace__ecere__sys__DualPipe_Seek(struct __ecereNameSpace__ecere__com__Instance * this, int pos, int mode)
588 __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);
590 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);
593 unsigned int __ecereMethod___ecereNameSpace__ecere__sys__DualPipe_Tell(struct __ecereNameSpace__ecere__com__Instance * this)
595 __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);
597 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);
600 unsigned int __ecereMethod___ecereNameSpace__ecere__sys__DualPipe_GetSize(struct __ecereNameSpace__ecere__com__Instance * this)
602 __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);
604 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);
607 unsigned int __ecereMethod___ecereNameSpace__ecere__sys__DualPipe_GetLinePeek(struct __ecereNameSpace__ecere__com__Instance * this, char * s, int max, int * charsRead)
609 __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);
613 while(c < max - 1 && __ecereMethod___ecereNameSpace__ecere__sys__DualPipe_Peek(this) && ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, char * ch))__extension__ ({
614 struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = this;
616 __internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__DualPipe->_vTbl;
617 })[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Getc])(this, &ch) && ch != '\n')
622 return ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *))__extension__ ({
623 struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = this;
625 __internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__DualPipe->_vTbl;
626 })[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Eof])(this) || ch == '\n';
629 void __ecereRegisterModule_DualPipe(struct __ecereNameSpace__ecere__com__Instance * module)
631 struct __ecereNameSpace__ecere__com__Class __attribute__((unused)) * class;
633 class = __ecereNameSpace__ecere__com__eSystem_RegisterClass(2, "ecere::sys::PipeOpenMode", 0, 0, 0, (void *)0, (void *)0, module, 1, 1);
634 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)
635 __ecereClass___ecereNameSpace__ecere__sys__PipeOpenMode = class;
636 __ecereNameSpace__ecere__com__eClass_AddBitMember(class, "output", "bool", 1, 0, 1);
637 __ecereNameSpace__ecere__com__eClass_AddBitMember(class, "error", "bool", 1, 1, 1);
638 __ecereNameSpace__ecere__com__eClass_AddBitMember(class, "input", "bool", 1, 2, 1);
639 __ecereNameSpace__ecere__com__eClass_AddBitMember(class, "showWindow", "bool", 1, 3, 1);
640 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);
641 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)
642 __ecereClass___ecereNameSpace__ecere__sys__DualPipe = class;
643 __ecereNameSpace__ecere__com__eClass_AddMethod(class, "Seek", 0, __ecereMethod___ecereNameSpace__ecere__sys__DualPipe_Seek, 1);
644 __ecereNameSpace__ecere__com__eClass_AddMethod(class, "Tell", 0, __ecereMethod___ecereNameSpace__ecere__sys__DualPipe_Tell, 1);
645 __ecereNameSpace__ecere__com__eClass_AddMethod(class, "Read", 0, __ecereMethod___ecereNameSpace__ecere__sys__DualPipe_Read, 1);
646 __ecereNameSpace__ecere__com__eClass_AddMethod(class, "Write", 0, __ecereMethod___ecereNameSpace__ecere__sys__DualPipe_Write, 1);
647 __ecereNameSpace__ecere__com__eClass_AddMethod(class, "Getc", 0, __ecereMethod___ecereNameSpace__ecere__sys__DualPipe_Getc, 1);
648 __ecereNameSpace__ecere__com__eClass_AddMethod(class, "Putc", 0, __ecereMethod___ecereNameSpace__ecere__sys__DualPipe_Putc, 1);
649 __ecereNameSpace__ecere__com__eClass_AddMethod(class, "Puts", 0, __ecereMethod___ecereNameSpace__ecere__sys__DualPipe_Puts, 1);
650 __ecereNameSpace__ecere__com__eClass_AddMethod(class, "Eof", 0, __ecereMethod___ecereNameSpace__ecere__sys__DualPipe_Eof, 1);
651 __ecereNameSpace__ecere__com__eClass_AddMethod(class, "GetSize", 0, __ecereMethod___ecereNameSpace__ecere__sys__DualPipe_GetSize, 1);
652 __ecereNameSpace__ecere__com__eClass_AddMethod(class, "CloseInput", 0, __ecereMethod___ecereNameSpace__ecere__sys__DualPipe_CloseInput, 1);
653 __ecereNameSpace__ecere__com__eClass_AddMethod(class, "CloseOutput", 0, __ecereMethod___ecereNameSpace__ecere__sys__DualPipe_CloseOutput, 1);
654 __ecereNameSpace__ecere__com__eClass_AddMethod(class, "GetExitCode", "int GetExitCode()", __ecereMethod___ecereNameSpace__ecere__sys__DualPipe_GetExitCode, 1);
655 __ecereNameSpace__ecere__com__eClass_AddMethod(class, "GetLinePeek", "bool GetLinePeek(char * s, int max, int * charsRead)", __ecereMethod___ecereNameSpace__ecere__sys__DualPipe_GetLinePeek, 1);
656 __ecereNameSpace__ecere__com__eClass_AddMethod(class, "GetProcessID", "int GetProcessID()", __ecereMethod___ecereNameSpace__ecere__sys__DualPipe_GetProcessID, 1);
657 __ecereNameSpace__ecere__com__eClass_AddMethod(class, "Peek", "bool Peek()", __ecereMethod___ecereNameSpace__ecere__sys__DualPipe_Peek, 1);
658 __ecereNameSpace__ecere__com__eClass_AddMethod(class, "Terminate", "void Terminate()", __ecereMethod___ecereNameSpace__ecere__sys__DualPipe_Terminate, 1);
659 __ecereNameSpace__ecere__com__eClass_AddMethod(class, "Wait", "void Wait()", __ecereMethod___ecereNameSpace__ecere__sys__DualPipe_Wait, 1);
660 __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);
661 __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);
662 __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);
663 __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);