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__))
41 # define ecere_gcc_struct __attribute__((gcc_struct))
43 # define ecere_stdcall __stdcall
44 # define ecere_gcc_struct
47 # define ecere_stdcall
48 # define ecere_gcc_struct
51 #include <sys/types.h>
52 typedef __builtin_va_list va_list;
54 typedef struct _DualPipe _DualPipe;
56 void DualPipe_Destructor(_DualPipe * dp);
58 void DualPipe_CloseInput(_DualPipe * dp);
60 void DualPipe_CloseOutput(_DualPipe * dp);
62 int DualPipe_Read(_DualPipe * dp, unsigned char * buffer, unsigned int size, unsigned int count);
64 int DualPipe_Write(_DualPipe * dp, const unsigned char * buffer, unsigned int size, unsigned int count);
66 unsigned int DualPipe_Getc(_DualPipe * dp, char * ch);
68 unsigned int DualPipe_Putc(_DualPipe * dp, char ch);
70 unsigned int DualPipe_Puts(_DualPipe * dp, const char * string);
72 unsigned int DualPipe_Seek(_DualPipe * dp, int pos, int mode);
74 unsigned int DualPipe_Tell(_DualPipe * dp);
76 unsigned int DualPipe_Eof(_DualPipe * dp);
78 unsigned int DualPipe_GetSize(_DualPipe * dp);
80 unsigned int DualPipe_Peek(_DualPipe * dp);
82 void DualPipe_Terminate(_DualPipe * dp);
84 int DualPipe_GetExitCode(_DualPipe * dp);
86 int DualPipe_GetProcessID(_DualPipe * dp);
88 void DualPipe_Wait(_DualPipe * dp);
90 _DualPipe * _DualPipeOpen(unsigned int mode, const char * commandLine, const char * env, void ** inputPtr, void ** outputPtr);
92 struct __ecereNameSpace__ecere__sys__DualPipe
97 extern struct __ecereNameSpace__ecere__com__Property * __ecereProp___ecereNameSpace__ecere__sys__File_input;
99 extern struct __ecereNameSpace__ecere__com__Property * __ecereProp___ecereNameSpace__ecere__sys__File_output;
101 struct __ecereNameSpace__ecere__sys__BTNode;
103 struct __ecereNameSpace__ecere__sys__OldList
112 struct __ecereNameSpace__ecere__com__DataValue
127 } ecere_gcc_struct __anon1;
130 struct __ecereNameSpace__ecere__com__SerialBuffer
132 unsigned char * _buffer;
138 extern void * __ecereNameSpace__ecere__com__eSystem_New(unsigned int size);
140 extern void * __ecereNameSpace__ecere__com__eSystem_New0(unsigned int size);
142 extern void * __ecereNameSpace__ecere__com__eSystem_Renew(void * memory, unsigned int size);
144 extern void * __ecereNameSpace__ecere__com__eSystem_Renew0(void * memory, unsigned int size);
146 extern void __ecereNameSpace__ecere__com__eSystem_Delete(void * memory);
148 extern int vsnprintf(char * , size_t, const char * , __builtin_va_list);
150 struct __ecereNameSpace__ecere__com__BitMember;
152 struct __ecereNameSpace__ecere__com__GlobalFunction;
154 struct __ecereNameSpace__ecere__com__Class;
156 struct __ecereNameSpace__ecere__com__Instance
159 struct __ecereNameSpace__ecere__com__Class * _class;
163 extern long long __ecereNameSpace__ecere__com__eClass_GetProperty(struct __ecereNameSpace__ecere__com__Class * _class, const char * name);
165 extern void __ecereNameSpace__ecere__com__eClass_SetProperty(struct __ecereNameSpace__ecere__com__Class * _class, const char * name, long long value);
167 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);
169 extern void * __ecereNameSpace__ecere__com__eInstance_New(struct __ecereNameSpace__ecere__com__Class * _class);
171 extern void __ecereNameSpace__ecere__com__eInstance_SetMethod(struct __ecereNameSpace__ecere__com__Instance * instance, const char * name, void * function);
173 extern void __ecereNameSpace__ecere__com__eInstance_IncRef(struct __ecereNameSpace__ecere__com__Instance * instance);
175 void * __ecereProp___ecereNameSpace__ecere__sys__File_Get_input(struct __ecereNameSpace__ecere__com__Instance * this);
177 void __ecereProp___ecereNameSpace__ecere__sys__File_Set_input(struct __ecereNameSpace__ecere__com__Instance * this, void * value);
179 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_CloseInput;
181 void * __ecereProp___ecereNameSpace__ecere__sys__File_Get_output(struct __ecereNameSpace__ecere__com__Instance * this);
183 void __ecereProp___ecereNameSpace__ecere__sys__File_Set_output(struct __ecereNameSpace__ecere__com__Instance * this, void * value);
185 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_CloseOutput;
187 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_Write;
189 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_Getc;
191 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_Putc;
193 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts;
195 unsigned int __ecereMethod___ecereNameSpace__ecere__sys__File_Flush(struct __ecereNameSpace__ecere__com__Instance * this);
197 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_Seek;
199 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_Tell;
201 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_GetSize;
203 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_Eof;
205 struct __ecereNameSpace__ecere__sys__BinaryTree;
207 struct __ecereNameSpace__ecere__sys__BinaryTree
209 struct __ecereNameSpace__ecere__sys__BTNode * root;
211 int (* CompareKey)(struct __ecereNameSpace__ecere__sys__BinaryTree * tree, uintptr_t a, uintptr_t b);
212 void (* FreeKey)(void * key);
215 struct __ecereNameSpace__ecere__com__Instance * __ecereNameSpace__ecere__sys__DualPipeOpen(unsigned int mode, const char * commandLine);
217 struct __ecereNameSpace__ecere__com__Instance * __ecereNameSpace__ecere__sys__DualPipeOpenf(unsigned int mode, const char * command, ...)
219 char commandLine[1025];
222 __builtin_va_start(args, command);
223 vsnprintf(commandLine, sizeof (commandLine), command, args);
224 commandLine[sizeof (commandLine) - 1] = 0;
225 __builtin_va_end(args);
226 return __ecereNameSpace__ecere__sys__DualPipeOpen(mode, commandLine);
229 struct __ecereNameSpace__ecere__com__Instance * __ecereNameSpace__ecere__sys__DualPipeOpenEnv(unsigned int mode, const char * env, const char * commandLine);
231 struct __ecereNameSpace__ecere__com__Instance * __ecereNameSpace__ecere__sys__DualPipeOpenEnvf(unsigned int mode, const char * env, const char * command, ...)
233 char commandLine[1025];
236 __builtin_va_start(args, command);
237 vsnprintf(commandLine, sizeof (commandLine), command, args);
238 commandLine[sizeof (commandLine) - 1] = 0;
239 __builtin_va_end(args);
240 return __ecereNameSpace__ecere__sys__DualPipeOpenEnv(mode, env, commandLine);
243 struct __ecereNameSpace__ecere__com__DataMember;
245 struct __ecereNameSpace__ecere__com__DataMember
247 struct __ecereNameSpace__ecere__com__DataMember * prev;
248 struct __ecereNameSpace__ecere__com__DataMember * next;
250 unsigned int isProperty;
253 struct __ecereNameSpace__ecere__com__Class * _class;
254 const char * dataTypeString;
255 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
256 struct __ecereNameSpace__ecere__com__Instance * dataType;
260 struct __ecereNameSpace__ecere__sys__OldList members;
261 struct __ecereNameSpace__ecere__sys__BinaryTree membersAlpha;
263 short structAlignment;
264 short pointerAlignment;
267 struct __ecereNameSpace__ecere__com__Method;
269 struct __ecereNameSpace__ecere__com__Method
272 struct __ecereNameSpace__ecere__com__Method * parent;
273 struct __ecereNameSpace__ecere__com__Method * left;
274 struct __ecereNameSpace__ecere__com__Method * right;
279 struct __ecereNameSpace__ecere__com__Class * _class;
281 const char * dataTypeString;
282 struct __ecereNameSpace__ecere__com__Instance * dataType;
286 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);
288 struct __ecereNameSpace__ecere__com__Property;
290 struct __ecereNameSpace__ecere__com__ClassTemplateArgument
296 const char * dataTypeString;
297 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
298 } ecere_gcc_struct __anon1;
299 struct __ecereNameSpace__ecere__com__DataValue expression;
302 const char * memberString;
305 struct __ecereNameSpace__ecere__com__DataMember * member;
306 struct __ecereNameSpace__ecere__com__Property * prop;
307 struct __ecereNameSpace__ecere__com__Method * method;
308 } ecere_gcc_struct __anon1;
309 } ecere_gcc_struct __anon2;
310 } ecere_gcc_struct __anon1;
313 struct __ecereNameSpace__ecere__com__Property
315 struct __ecereNameSpace__ecere__com__Property * prev;
316 struct __ecereNameSpace__ecere__com__Property * next;
318 unsigned int isProperty;
321 struct __ecereNameSpace__ecere__com__Class * _class;
322 const char * dataTypeString;
323 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
324 struct __ecereNameSpace__ecere__com__Instance * dataType;
325 void (* Set)(void * , int);
326 int (* Get)(void * );
327 unsigned int (* IsSet)(void * );
331 unsigned int conversion;
332 unsigned int watcherOffset;
333 const char * category;
334 unsigned int compiled;
335 unsigned int selfWatchable;
336 unsigned int isWatchable;
339 extern void __ecereNameSpace__ecere__com__eInstance_FireSelfWatchers(struct __ecereNameSpace__ecere__com__Instance * instance, struct __ecereNameSpace__ecere__com__Property * _property);
341 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);
343 extern void __ecereNameSpace__ecere__com__eInstance_Watch(struct __ecereNameSpace__ecere__com__Instance * instance, struct __ecereNameSpace__ecere__com__Property * _property, void * object, void (* callback)(void * , void * ));
345 extern void __ecereNameSpace__ecere__com__eInstance_FireWatchers(struct __ecereNameSpace__ecere__com__Instance * instance, struct __ecereNameSpace__ecere__com__Property * _property);
347 struct __ecereNameSpace__ecere__com__Module;
349 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);
351 extern struct __ecereNameSpace__ecere__com__Instance * __thisModule;
353 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);
355 struct __ecereNameSpace__ecere__com__NameSpace;
357 struct __ecereNameSpace__ecere__com__NameSpace
360 struct __ecereNameSpace__ecere__com__NameSpace * btParent;
361 struct __ecereNameSpace__ecere__com__NameSpace * left;
362 struct __ecereNameSpace__ecere__com__NameSpace * right;
364 struct __ecereNameSpace__ecere__com__NameSpace * parent;
365 struct __ecereNameSpace__ecere__sys__BinaryTree nameSpaces;
366 struct __ecereNameSpace__ecere__sys__BinaryTree classes;
367 struct __ecereNameSpace__ecere__sys__BinaryTree defines;
368 struct __ecereNameSpace__ecere__sys__BinaryTree functions;
371 struct __ecereNameSpace__ecere__com__Class
373 struct __ecereNameSpace__ecere__com__Class * prev;
374 struct __ecereNameSpace__ecere__com__Class * next;
380 unsigned int (* Constructor)(void * );
381 void (* Destructor)(void * );
384 struct __ecereNameSpace__ecere__com__Class * base;
385 struct __ecereNameSpace__ecere__sys__BinaryTree methods;
386 struct __ecereNameSpace__ecere__sys__BinaryTree members;
387 struct __ecereNameSpace__ecere__sys__BinaryTree prop;
388 struct __ecereNameSpace__ecere__sys__OldList membersAndProperties;
389 struct __ecereNameSpace__ecere__sys__BinaryTree classProperties;
390 struct __ecereNameSpace__ecere__sys__OldList derivatives;
394 struct __ecereNameSpace__ecere__com__Instance * module;
395 struct __ecereNameSpace__ecere__com__NameSpace * nameSpace;
396 const char * dataTypeString;
397 struct __ecereNameSpace__ecere__com__Instance * dataType;
399 int defaultAlignment;
400 void (* Initialize)();
402 struct __ecereNameSpace__ecere__sys__OldList selfWatchers;
403 const char * designerClass;
404 unsigned int noExpansion;
405 const char * defaultProperty;
406 unsigned int comRedefinition;
409 unsigned int internalDecl;
411 unsigned int computeSize;
412 short structAlignment;
413 short pointerAlignment;
414 int destructionWatchOffset;
416 struct __ecereNameSpace__ecere__sys__OldList delayedCPValues;
417 int inheritanceAccess;
418 const char * fullName;
420 struct __ecereNameSpace__ecere__sys__OldList conversions;
421 struct __ecereNameSpace__ecere__sys__OldList templateParams;
422 struct __ecereNameSpace__ecere__com__ClassTemplateArgument * templateArgs;
423 struct __ecereNameSpace__ecere__com__Class * templateClass;
424 struct __ecereNameSpace__ecere__sys__OldList templatized;
426 unsigned int isInstanceClass;
427 unsigned int byValueSystemClass;
428 void * bindingsClass;
431 struct __ecereNameSpace__ecere__com__Application
436 unsigned int isGUIApp;
437 struct __ecereNameSpace__ecere__sys__OldList allModules;
438 char * parsedCommand;
439 struct __ecereNameSpace__ecere__com__NameSpace systemNameSpace;
442 static struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__PipeOpenMode;
444 static struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__DualPipe;
446 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__File;
448 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Module;
450 struct __ecereNameSpace__ecere__com__Module
452 struct __ecereNameSpace__ecere__com__Instance * application;
453 struct __ecereNameSpace__ecere__sys__OldList classes;
454 struct __ecereNameSpace__ecere__sys__OldList defines;
455 struct __ecereNameSpace__ecere__sys__OldList functions;
456 struct __ecereNameSpace__ecere__sys__OldList modules;
457 struct __ecereNameSpace__ecere__com__Instance * prev;
458 struct __ecereNameSpace__ecere__com__Instance * next;
464 struct __ecereNameSpace__ecere__com__NameSpace privateNameSpace;
465 struct __ecereNameSpace__ecere__com__NameSpace publicNameSpace;
468 void __ecereDestructor___ecereNameSpace__ecere__sys__DualPipe(struct __ecereNameSpace__ecere__com__Instance * this)
470 __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);
473 DualPipe_Destructor(__ecerePointer___ecereNameSpace__ecere__sys__DualPipe->dp);
477 int __ecereMethod___ecereNameSpace__ecere__sys__DualPipe_Read(struct __ecereNameSpace__ecere__com__Instance * this, unsigned char * buffer, unsigned int size, unsigned int count)
479 __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);
481 return DualPipe_Read(__ecerePointer___ecereNameSpace__ecere__sys__DualPipe->dp, buffer, size, count);
484 unsigned int __ecereMethod___ecereNameSpace__ecere__sys__DualPipe_Eof(struct __ecereNameSpace__ecere__com__Instance * this)
486 __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);
488 return DualPipe_Eof(__ecerePointer___ecereNameSpace__ecere__sys__DualPipe->dp);
491 unsigned int __ecereMethod___ecereNameSpace__ecere__sys__DualPipe_Peek(struct __ecereNameSpace__ecere__com__Instance * this)
493 __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);
495 return DualPipe_Peek(__ecerePointer___ecereNameSpace__ecere__sys__DualPipe->dp);
498 void __ecereMethod___ecereNameSpace__ecere__sys__DualPipe_Terminate(struct __ecereNameSpace__ecere__com__Instance * this)
500 __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);
502 DualPipe_Terminate(__ecerePointer___ecereNameSpace__ecere__sys__DualPipe->dp);
505 int __ecereMethod___ecereNameSpace__ecere__sys__DualPipe_GetExitCode(struct __ecereNameSpace__ecere__com__Instance * this)
507 __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);
509 return DualPipe_GetExitCode(__ecerePointer___ecereNameSpace__ecere__sys__DualPipe->dp);
512 int __ecereMethod___ecereNameSpace__ecere__sys__DualPipe_GetProcessID(struct __ecereNameSpace__ecere__com__Instance * this)
514 __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);
516 return DualPipe_GetProcessID(__ecerePointer___ecereNameSpace__ecere__sys__DualPipe->dp);
519 void __ecereMethod___ecereNameSpace__ecere__sys__DualPipe_Wait(struct __ecereNameSpace__ecere__com__Instance * this)
521 __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);
523 DualPipe_Wait(__ecerePointer___ecereNameSpace__ecere__sys__DualPipe->dp);
526 struct __ecereNameSpace__ecere__com__Instance * __ecereNameSpace__ecere__sys__DualPipeOpen(unsigned int mode, const char * commandLine)
528 void * input, * output;
529 void * f = _DualPipeOpen(mode, commandLine, (((void *)0)), &input, &output);
532 return __extension__ ({
533 struct __ecereNameSpace__ecere__com__Instance * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass___ecereNameSpace__ecere__sys__DualPipe);
535 ((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;
537 return (((void *)0));
540 struct __ecereNameSpace__ecere__com__Instance * __ecereNameSpace__ecere__sys__DualPipeOpenEnv(unsigned int mode, const char * env, const char * commandLine)
542 void * input, * output;
543 void * f = _DualPipeOpen(mode, commandLine, env, &input, &output);
546 return __extension__ ({
547 struct __ecereNameSpace__ecere__com__Instance * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass___ecereNameSpace__ecere__sys__DualPipe);
549 ((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;
551 return (((void *)0));
554 void __ecereMethod___ecereNameSpace__ecere__sys__DualPipe_CloseInput(struct __ecereNameSpace__ecere__com__Instance * this)
556 __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);
558 (__ecereProp___ecereNameSpace__ecere__sys__File_Get_input(this) != (((void *)0))) ? (__extension__ ({
559 void (* __internal_VirtualMethod)(struct __ecereNameSpace__ecere__com__Instance *);
561 __internal_VirtualMethod = ((void (*)(struct __ecereNameSpace__ecere__com__Instance *))__ecereClass___ecereNameSpace__ecere__sys__File->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_CloseInput]);
562 __internal_VirtualMethod ? __internal_VirtualMethod(this) : (void)1;
563 })) : DualPipe_CloseInput(__ecerePointer___ecereNameSpace__ecere__sys__DualPipe->dp);
566 void __ecereMethod___ecereNameSpace__ecere__sys__DualPipe_CloseOutput(struct __ecereNameSpace__ecere__com__Instance * this)
568 __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);
570 (__ecereProp___ecereNameSpace__ecere__sys__File_Get_output(this) != (((void *)0))) ? (__extension__ ({
571 void (* __internal_VirtualMethod)(struct __ecereNameSpace__ecere__com__Instance *);
573 __internal_VirtualMethod = ((void (*)(struct __ecereNameSpace__ecere__com__Instance *))__ecereClass___ecereNameSpace__ecere__sys__File->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_CloseOutput]);
574 __internal_VirtualMethod ? __internal_VirtualMethod(this) : (void)1;
575 })) : DualPipe_CloseOutput(__ecerePointer___ecereNameSpace__ecere__sys__DualPipe->dp);
578 int __ecereMethod___ecereNameSpace__ecere__sys__DualPipe_Write(struct __ecereNameSpace__ecere__com__Instance * this, const unsigned char * buffer, unsigned int size, unsigned int count)
580 __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);
582 return __ecereProp___ecereNameSpace__ecere__sys__File_Get_output(this) ? (__extension__ ({
583 int (* __internal_VirtualMethod)(struct __ecereNameSpace__ecere__com__Instance *, const void * buffer, unsigned int size, unsigned int count);
585 __internal_VirtualMethod = ((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]);
586 __internal_VirtualMethod ? __internal_VirtualMethod(this, buffer, size, count) : (int)1;
587 })) : DualPipe_Write(__ecerePointer___ecereNameSpace__ecere__sys__DualPipe->dp, buffer, size, count);
590 unsigned int __ecereMethod___ecereNameSpace__ecere__sys__DualPipe_Getc(struct __ecereNameSpace__ecere__com__Instance * this, char * ch)
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_input(this) ? (__extension__ ({
595 unsigned int (* __internal_VirtualMethod)(struct __ecereNameSpace__ecere__com__Instance *, char * ch);
597 __internal_VirtualMethod = ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, char * ch))__ecereClass___ecereNameSpace__ecere__sys__File->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Getc]);
598 __internal_VirtualMethod ? __internal_VirtualMethod(this, ch) : (unsigned int)1;
599 })) : DualPipe_Getc(__ecerePointer___ecereNameSpace__ecere__sys__DualPipe->dp, ch);
602 unsigned int __ecereMethod___ecereNameSpace__ecere__sys__DualPipe_Putc(struct __ecereNameSpace__ecere__com__Instance * this, char ch)
604 __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);
606 return __ecereProp___ecereNameSpace__ecere__sys__File_Get_output(this) ? (__extension__ ({
607 unsigned int (* __internal_VirtualMethod)(struct __ecereNameSpace__ecere__com__Instance *, char ch);
609 __internal_VirtualMethod = ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, char ch))__ecereClass___ecereNameSpace__ecere__sys__File->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Putc]);
610 __internal_VirtualMethod ? __internal_VirtualMethod(this, ch) : (unsigned int)1;
611 })) : DualPipe_Putc(__ecerePointer___ecereNameSpace__ecere__sys__DualPipe->dp, ch);
614 unsigned int __ecereMethod___ecereNameSpace__ecere__sys__DualPipe_Puts(struct __ecereNameSpace__ecere__com__Instance * this, const char * string)
616 __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);
618 return __ecereProp___ecereNameSpace__ecere__sys__File_Get_output(this) ? ((__extension__ ({
619 unsigned int (* __internal_VirtualMethod)(struct __ecereNameSpace__ecere__com__Instance *, const char * string);
621 __internal_VirtualMethod = ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))__ecereClass___ecereNameSpace__ecere__sys__File->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts]);
622 __internal_VirtualMethod ? __internal_VirtualMethod(this, string) : (unsigned int)1;
623 })), __ecereMethod___ecereNameSpace__ecere__sys__File_Flush(this)) : DualPipe_Puts(__ecerePointer___ecereNameSpace__ecere__sys__DualPipe->dp, string);
626 unsigned int __ecereMethod___ecereNameSpace__ecere__sys__DualPipe_Seek(struct __ecereNameSpace__ecere__com__Instance * this, int pos, int mode)
628 __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);
630 return (__ecereProp___ecereNameSpace__ecere__sys__File_Get_input(this) || __ecereProp___ecereNameSpace__ecere__sys__File_Get_output(this)) ? (__extension__ ({
631 unsigned int (* __internal_VirtualMethod)(struct __ecereNameSpace__ecere__com__Instance *, int pos, int mode);
633 __internal_VirtualMethod = ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, int pos, int mode))__ecereClass___ecereNameSpace__ecere__sys__File->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Seek]);
634 __internal_VirtualMethod ? __internal_VirtualMethod(this, pos, mode) : (unsigned int)1;
635 })) : DualPipe_Seek(__ecerePointer___ecereNameSpace__ecere__sys__DualPipe->dp, pos, mode);
638 unsigned int __ecereMethod___ecereNameSpace__ecere__sys__DualPipe_Tell(struct __ecereNameSpace__ecere__com__Instance * this)
640 __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);
642 return (__ecereProp___ecereNameSpace__ecere__sys__File_Get_input(this) || __ecereProp___ecereNameSpace__ecere__sys__File_Get_output(this)) ? (__extension__ ({
643 unsigned int (* __internal_VirtualMethod)(struct __ecereNameSpace__ecere__com__Instance *);
645 __internal_VirtualMethod = ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *))__ecereClass___ecereNameSpace__ecere__sys__File->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Tell]);
646 __internal_VirtualMethod ? __internal_VirtualMethod(this) : (unsigned int)1;
647 })) : DualPipe_Tell(__ecerePointer___ecereNameSpace__ecere__sys__DualPipe->dp);
650 unsigned int __ecereMethod___ecereNameSpace__ecere__sys__DualPipe_GetSize(struct __ecereNameSpace__ecere__com__Instance * this)
652 __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);
654 return (__ecereProp___ecereNameSpace__ecere__sys__File_Get_input(this) || __ecereProp___ecereNameSpace__ecere__sys__File_Get_output(this)) ? (__extension__ ({
655 unsigned int (* __internal_VirtualMethod)(struct __ecereNameSpace__ecere__com__Instance *);
657 __internal_VirtualMethod = ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *))__ecereClass___ecereNameSpace__ecere__sys__File->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_GetSize]);
658 __internal_VirtualMethod ? __internal_VirtualMethod(this) : (unsigned int)1;
659 })) : DualPipe_GetSize(__ecerePointer___ecereNameSpace__ecere__sys__DualPipe->dp);
662 void __ecereUnregisterModule_DualPipe(struct __ecereNameSpace__ecere__com__Instance * module)
667 unsigned int __ecereMethod___ecereNameSpace__ecere__sys__DualPipe_GetLinePeek(struct __ecereNameSpace__ecere__com__Instance * this, char * s, int max, int * charsRead)
669 __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);
673 while(c < max - 1 && __ecereMethod___ecereNameSpace__ecere__sys__DualPipe_Peek(this) && (__extension__ ({
674 unsigned int (* __internal_VirtualMethod)(struct __ecereNameSpace__ecere__com__Instance *, char * ch);
676 __internal_VirtualMethod = ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, char * ch))__extension__ ({
677 struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = this;
679 __internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__DualPipe->_vTbl;
680 })[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Getc]);
681 __internal_VirtualMethod ? __internal_VirtualMethod(this, &ch) : (unsigned int)1;
687 return (__extension__ ({
688 unsigned int (* __internal_VirtualMethod)(struct __ecereNameSpace__ecere__com__Instance *);
690 __internal_VirtualMethod = ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *))__extension__ ({
691 struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = this;
693 __internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__DualPipe->_vTbl;
694 })[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Eof]);
695 __internal_VirtualMethod ? __internal_VirtualMethod(this) : (unsigned int)1;
699 void __ecereRegisterModule_DualPipe(struct __ecereNameSpace__ecere__com__Instance * module)
701 struct __ecereNameSpace__ecere__com__Class __attribute__((unused)) * class;
703 class = __ecereNameSpace__ecere__com__eSystem_RegisterClass(2, "ecere::sys::PipeOpenMode", 0, 0, 0, (void *)0, (void *)0, module, 1, 1);
704 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)
705 __ecereClass___ecereNameSpace__ecere__sys__PipeOpenMode = class;
706 __ecereNameSpace__ecere__com__eClass_AddBitMember(class, "output", "bool", 1, 0, 1);
707 __ecereNameSpace__ecere__com__eClass_AddBitMember(class, "error", "bool", 1, 1, 1);
708 __ecereNameSpace__ecere__com__eClass_AddBitMember(class, "input", "bool", 1, 2, 1);
709 __ecereNameSpace__ecere__com__eClass_AddBitMember(class, "showWindow", "bool", 1, 3, 1);
710 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);
711 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)
712 __ecereClass___ecereNameSpace__ecere__sys__DualPipe = class;
713 __ecereNameSpace__ecere__com__eClass_AddMethod(class, "Seek", 0, __ecereMethod___ecereNameSpace__ecere__sys__DualPipe_Seek, 1);
714 __ecereNameSpace__ecere__com__eClass_AddMethod(class, "Tell", 0, __ecereMethod___ecereNameSpace__ecere__sys__DualPipe_Tell, 1);
715 __ecereNameSpace__ecere__com__eClass_AddMethod(class, "Read", 0, __ecereMethod___ecereNameSpace__ecere__sys__DualPipe_Read, 1);
716 __ecereNameSpace__ecere__com__eClass_AddMethod(class, "Write", 0, __ecereMethod___ecereNameSpace__ecere__sys__DualPipe_Write, 1);
717 __ecereNameSpace__ecere__com__eClass_AddMethod(class, "Getc", 0, __ecereMethod___ecereNameSpace__ecere__sys__DualPipe_Getc, 1);
718 __ecereNameSpace__ecere__com__eClass_AddMethod(class, "Putc", 0, __ecereMethod___ecereNameSpace__ecere__sys__DualPipe_Putc, 1);
719 __ecereNameSpace__ecere__com__eClass_AddMethod(class, "Puts", 0, __ecereMethod___ecereNameSpace__ecere__sys__DualPipe_Puts, 1);
720 __ecereNameSpace__ecere__com__eClass_AddMethod(class, "Eof", 0, __ecereMethod___ecereNameSpace__ecere__sys__DualPipe_Eof, 1);
721 __ecereNameSpace__ecere__com__eClass_AddMethod(class, "GetSize", 0, __ecereMethod___ecereNameSpace__ecere__sys__DualPipe_GetSize, 1);
722 __ecereNameSpace__ecere__com__eClass_AddMethod(class, "CloseInput", 0, __ecereMethod___ecereNameSpace__ecere__sys__DualPipe_CloseInput, 1);
723 __ecereNameSpace__ecere__com__eClass_AddMethod(class, "CloseOutput", 0, __ecereMethod___ecereNameSpace__ecere__sys__DualPipe_CloseOutput, 1);
724 __ecereNameSpace__ecere__com__eClass_AddMethod(class, "GetExitCode", "int GetExitCode()", __ecereMethod___ecereNameSpace__ecere__sys__DualPipe_GetExitCode, 1);
725 __ecereNameSpace__ecere__com__eClass_AddMethod(class, "GetLinePeek", "bool GetLinePeek(char * s, int max, int * charsRead)", __ecereMethod___ecereNameSpace__ecere__sys__DualPipe_GetLinePeek, 1);
726 __ecereNameSpace__ecere__com__eClass_AddMethod(class, "GetProcessID", "int GetProcessID()", __ecereMethod___ecereNameSpace__ecere__sys__DualPipe_GetProcessID, 1);
727 __ecereNameSpace__ecere__com__eClass_AddMethod(class, "Peek", "bool Peek()", __ecereMethod___ecereNameSpace__ecere__sys__DualPipe_Peek, 1);
728 __ecereNameSpace__ecere__com__eClass_AddMethod(class, "Terminate", "void Terminate()", __ecereMethod___ecereNameSpace__ecere__sys__DualPipe_Terminate, 1);
729 __ecereNameSpace__ecere__com__eClass_AddMethod(class, "Wait", "void Wait()", __ecereMethod___ecereNameSpace__ecere__sys__DualPipe_Wait, 1);
730 __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);
731 __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);
732 __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);
733 __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);