1 /* Code generated from eC source file: ecc.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 static struct Context * globalContext;
42 extern struct __ecereNameSpace__ecere__com__Property * __ecereProp___ecereNameSpace__ecere__com__Platform_char__PTR_;
44 struct __ecereNameSpace__ecere__sys__OldList
51 } __attribute__ ((gcc_struct));
55 struct __ecereNameSpace__ecere__com__DataValue
70 } __attribute__ ((gcc_struct)) __anon1;
71 } __attribute__ ((gcc_struct));
73 struct __ecereNameSpace__ecere__com__SerialBuffer
75 unsigned char * _buffer;
79 } __attribute__ ((gcc_struct));
81 extern void * __ecereNameSpace__ecere__com__eSystem_New(unsigned int size);
83 extern void * __ecereNameSpace__ecere__com__eSystem_New0(unsigned int size);
85 extern void * __ecereNameSpace__ecere__com__eSystem_Renew(void * memory, unsigned int size);
87 extern void * __ecereNameSpace__ecere__com__eSystem_Renew0(void * memory, unsigned int size);
89 extern void __ecereNameSpace__ecere__com__eSystem_Delete(void * memory);
99 } __attribute__ ((gcc_struct));
103 extern int GetHostBits(void);
105 extern void SetSymbolsDir(const char * s);
107 extern int strcmp(const char * , const char * );
109 extern size_t strlen(const char * );
111 extern char * strcpy(char * , const char * );
113 extern char * PassArg(char * output, const char * input);
115 extern void SetBuildingEcereCom(unsigned int b);
117 extern void SetBuildingEcereComModule(unsigned int b);
119 extern char * __ecereNameSpace__ecere__sys__CopyString(const char * string);
121 extern const char * GetOutputFile(void);
123 extern void SetOutputFile(const char * s);
125 extern const char * GetSourceFile(void);
127 extern void SetSourceFile(const char * s);
129 extern void SetI18nModuleName(const char * s);
131 extern void SetMemoryGuard(unsigned int b);
133 extern void SetDefaultNameSpace(const char * s);
135 extern void SetStrictNameSpaces(unsigned int b);
137 extern void SetOutputLineNumbers(unsigned int value);
139 extern char * __ecereNameSpace__ecere__sys__PathCat(char * string, const char * addedPath);
141 extern char * __ecereNameSpace__ecere__sys__ChangeExtension(const char * string, const char * ext, char * output);
143 extern int printf(const char * , ...);
145 extern const char * __ecereNameSpace__ecere__GetTranslatedString(const char * name, const char * string, const char * stringAndContext);
147 extern void SetInCompiler(unsigned int b);
149 extern void SetTargetPlatform(int platform);
151 extern void SetTargetBits(int bits);
153 extern void SetEchoOn(unsigned int b);
155 struct ClassDefinition;
157 extern int snprintf(char * , size_t, const char * , ...);
159 extern char * __ecereNameSpace__ecere__sys__GetLastDirectory(const char * string, char * output);
161 extern unsigned int __ecereNameSpace__ecere__sys__StripExtension(char * string);
163 extern void resetScanner(void);
165 extern const char * GetSymbolsDir(void);
167 extern unsigned int LoadSymbols(const char * fileName, int importType, unsigned int loadDllOnly);
169 extern int strcasecmp(const char * , const char * );
171 extern unsigned int GetEcereImported(void);
173 extern unsigned int GetBuildingEcereCom(void);
175 extern void ParseEc(void);
177 extern void CheckDataRedefinitions(void);
179 extern void SetYydebug(unsigned int b);
181 extern void SetCurrentNameSpace(const char * s);
183 extern void SetDeclMode(int accessMode);
185 extern void ProcessDBTableDefinitions(void);
187 extern void PrePreProcessClassDefinitions(void);
189 extern void PreProcessClassDefinitions(void);
191 extern void ProcessClassDefinitions(void);
193 extern void ComputeDataTypes(void);
195 extern void ProcessInstantiations(void);
197 extern void ProcessMemberAccess(void);
199 extern void ProcessInstanceDeclarations(void);
203 extern void FreeIncludeFiles(void);
205 extern void OutputIntlStrings(void);
207 const char * __ecereProp___ecereNameSpace__ecere__com__Platform_Get_char__PTR_(int this);
209 int __ecereProp___ecereNameSpace__ecere__com__Platform_Set_char__PTR_(const char * value);
211 static struct __ecereNameSpace__ecere__sys__OldList defines, imports;
213 extern void SetExcludedSymbols(struct __ecereNameSpace__ecere__sys__OldList * list);
215 extern void SetDefines(struct __ecereNameSpace__ecere__sys__OldList * list);
217 extern void SetImports(struct __ecereNameSpace__ecere__sys__OldList * list);
219 extern struct __ecereNameSpace__ecere__sys__OldList * GetAST(void);
221 extern void FreeASTTree(struct __ecereNameSpace__ecere__sys__OldList * ast);
223 extern void FreeExcludedSymbols(struct __ecereNameSpace__ecere__sys__OldList * excludedSymbols);
225 void __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(struct __ecereNameSpace__ecere__sys__OldList * this, void * item);
227 unsigned int __ecereMethod___ecereNameSpace__ecere__sys__OldList_AddName(struct __ecereNameSpace__ecere__sys__OldList * this, void * item);
229 void __ecereMethod___ecereNameSpace__ecere__sys__OldList_Delete(struct __ecereNameSpace__ecere__sys__OldList * this, void * item);
231 void __ecereMethod___ecereNameSpace__ecere__sys__OldList_Free(struct __ecereNameSpace__ecere__sys__OldList * this, void (* freeFn)(void * ));
233 extern struct Type * ProcessTypeString(const char * string, unsigned int staticMethod);
237 struct CodePosition start;
238 struct CodePosition end;
239 } __attribute__ ((gcc_struct));
241 extern void FreeModuleDefine(struct Definition * def);
245 static struct ModuleImport * mainModule;
249 struct ModuleImport * prev;
250 struct ModuleImport * next;
252 struct __ecereNameSpace__ecere__sys__OldList classes;
253 struct __ecereNameSpace__ecere__sys__OldList functions;
256 } __attribute__ ((gcc_struct));
258 extern void SetMainModule(struct ModuleImport * moduleImport);
260 extern void FreeModuleImport(struct ModuleImport * imp);
262 struct __ecereNameSpace__ecere__sys__BTNode;
264 struct __ecereNameSpace__ecere__sys__BTNode
267 struct __ecereNameSpace__ecere__sys__BTNode * parent;
268 struct __ecereNameSpace__ecere__sys__BTNode * left;
269 struct __ecereNameSpace__ecere__sys__BTNode * right;
271 } __attribute__ ((gcc_struct));
273 struct __ecereNameSpace__ecere__com__Class;
275 struct __ecereNameSpace__ecere__com__Instance
278 struct __ecereNameSpace__ecere__com__Class * _class;
280 } __attribute__ ((gcc_struct));
282 extern long long __ecereNameSpace__ecere__com__eClass_GetProperty(struct __ecereNameSpace__ecere__com__Class * _class, const char * name);
284 extern void __ecereNameSpace__ecere__com__eClass_SetProperty(struct __ecereNameSpace__ecere__com__Class * _class, const char * name, long long value);
286 extern void * __ecereNameSpace__ecere__com__eInstance_New(struct __ecereNameSpace__ecere__com__Class * _class);
288 extern void __ecereNameSpace__ecere__com__eInstance_SetMethod(struct __ecereNameSpace__ecere__com__Instance * instance, const char * name, void * function);
290 extern void __ecereNameSpace__ecere__com__eInstance_IncRef(struct __ecereNameSpace__ecere__com__Instance * instance);
292 extern struct __ecereNameSpace__ecere__com__Instance * __ecereNameSpace__ecere__sys__FileOpen(const char * fileName, int mode);
294 extern struct __ecereNameSpace__ecere__com__Instance * __ecereNameSpace__ecere__sys__DualPipeOpen(unsigned int mode, const char * commandLine);
296 extern void SetFileInput(struct __ecereNameSpace__ecere__com__Instance * file);
298 extern void OutputTree(struct __ecereNameSpace__ecere__sys__OldList * ast, struct __ecereNameSpace__ecere__com__Instance * f);
300 int __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(struct __ecereNameSpace__ecere__com__Instance * this, const char * format, ...);
302 extern void __ecereNameSpace__ecere__com__eInstance_DecRef(struct __ecereNameSpace__ecere__com__Instance * instance);
304 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_Eof;
306 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_Read;
308 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_Write;
310 int __ecereMethod___ecereNameSpace__ecere__sys__DualPipe_GetExitCode();
312 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_Seek;
314 struct __ecereNameSpace__ecere__com__Property;
316 struct __ecereNameSpace__ecere__com__Property
318 struct __ecereNameSpace__ecere__com__Property * prev;
319 struct __ecereNameSpace__ecere__com__Property * next;
321 unsigned int isProperty;
324 struct __ecereNameSpace__ecere__com__Class * _class;
325 const char * dataTypeString;
326 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
327 struct Type * dataType;
328 void (* Set)(void * , int);
329 int (* Get)(void * );
330 unsigned int (* IsSet)(void * );
334 unsigned int conversion;
335 unsigned int watcherOffset;
336 const char * category;
337 unsigned int compiled;
338 unsigned int selfWatchable;
339 unsigned int isWatchable;
340 } __attribute__ ((gcc_struct));
342 extern void __ecereNameSpace__ecere__com__eInstance_FireSelfWatchers(struct __ecereNameSpace__ecere__com__Instance * instance, struct __ecereNameSpace__ecere__com__Property * _property);
344 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);
346 extern void __ecereNameSpace__ecere__com__eInstance_Watch(void * instance, struct __ecereNameSpace__ecere__com__Property * _property, void * object, void (* callback)(void * , void * ));
348 extern void __ecereNameSpace__ecere__com__eInstance_FireWatchers(struct __ecereNameSpace__ecere__com__Instance * instance, struct __ecereNameSpace__ecere__com__Property * _property);
350 struct FunctionImport;
352 struct FunctionImport
354 struct FunctionImport * prev;
355 struct FunctionImport * next;
357 } __attribute__ ((gcc_struct));
363 struct MethodImport * prev;
364 struct MethodImport * next;
366 unsigned int isVirtual;
367 } __attribute__ ((gcc_struct));
369 struct PropertyImport;
371 struct PropertyImport
373 struct PropertyImport * prev;
374 struct PropertyImport * next;
376 unsigned int isVirtual;
379 } __attribute__ ((gcc_struct));
381 struct __ecereNameSpace__ecere__com__NameSpace;
383 extern void SetGlobalData(struct __ecereNameSpace__ecere__com__NameSpace * nameSpace);
387 extern void SetGlobalContext(struct Context * context);
389 extern void SetCurrentContext(struct Context * context);
391 extern void SetTopContext(struct Context * context);
393 extern void FreeContext(struct Context * context);
395 struct ImportedModule;
397 struct ImportedModule
399 struct ImportedModule * prev;
400 struct ImportedModule * next;
404 unsigned int globalInstance;
405 unsigned int dllOnly;
407 } __attribute__ ((gcc_struct));
413 struct ClassImport * prev;
414 struct ClassImport * next;
416 struct __ecereNameSpace__ecere__sys__OldList methods;
417 struct __ecereNameSpace__ecere__sys__OldList properties;
420 } __attribute__ ((gcc_struct));
422 static void OutputImports(char * fileName)
424 struct __ecereNameSpace__ecere__com__Instance * f = __ecereNameSpace__ecere__sys__FileOpen(fileName, 2);
430 struct ModuleImport * module;
432 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "[Imported Modules]\n");
433 for(module = imports.first; module; module = module->next)
435 struct ClassImport * _class;
436 struct FunctionImport * function;
439 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " %s\n", module->name);
441 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [This]\n");
442 if(module->importType == 1)
443 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Static]\n");
444 else if(module->importType == 2)
445 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Remote]\n");
446 if(module->importAccess == 2)
447 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Private]\n");
449 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Public]\n");
450 if(module->classes.first)
452 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Imported Classes]\n");
453 for(_class = module->classes.first; _class; _class = _class->next)
455 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " %s\n", _class->name);
458 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Instantiated]\n");
462 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Remote]\n");
464 if(_class->methods.first)
466 struct MethodImport * method;
468 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Imported Methods]\n");
469 for(method = _class->methods.first; method; method = method->next)
471 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " %s\n", method->name);
472 if(method->isVirtual)
473 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Virtual]\n");
475 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " .\n");
477 if(_class->properties.first)
479 struct PropertyImport * prop;
481 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Imported Properties]\n");
482 for(prop = _class->properties.first; prop; prop = prop->next)
484 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " %s\n", prop->name);
486 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Virtual]\n");
488 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Set]\n");
490 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Get]\n");
492 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " .\n");
495 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " .\n");
497 if(module->functions.first)
499 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Imported Functions]\n");
500 for(function = module->functions.first; function; function = function->next)
502 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " %s\n", function->name);
504 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " .\n");
507 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " .\n");
510 (__ecereNameSpace__ecere__com__eInstance_DecRef(f), f = 0);
513 struct __ecereNameSpace__ecere__sys__BinaryTree;
515 struct __ecereNameSpace__ecere__sys__BinaryTree
517 struct __ecereNameSpace__ecere__sys__BTNode * root;
519 int (* CompareKey)(struct __ecereNameSpace__ecere__sys__BinaryTree * tree, uintptr_t a, uintptr_t b);
520 void (* FreeKey)(void * key);
521 } __attribute__ ((gcc_struct));
523 struct __ecereNameSpace__ecere__com__NameSpace
526 struct __ecereNameSpace__ecere__com__NameSpace * btParent;
527 struct __ecereNameSpace__ecere__com__NameSpace * left;
528 struct __ecereNameSpace__ecere__com__NameSpace * right;
530 struct __ecereNameSpace__ecere__com__NameSpace * parent;
531 struct __ecereNameSpace__ecere__sys__BinaryTree nameSpaces;
532 struct __ecereNameSpace__ecere__sys__BinaryTree classes;
533 struct __ecereNameSpace__ecere__sys__BinaryTree defines;
534 struct __ecereNameSpace__ecere__sys__BinaryTree functions;
535 } __attribute__ ((gcc_struct));
539 struct Context * parent;
540 struct __ecereNameSpace__ecere__sys__BinaryTree types;
541 struct __ecereNameSpace__ecere__sys__BinaryTree classes;
542 struct __ecereNameSpace__ecere__sys__BinaryTree symbols;
543 struct __ecereNameSpace__ecere__sys__BinaryTree structSymbols;
546 struct __ecereNameSpace__ecere__sys__BinaryTree templateTypes;
547 struct ClassDefinition * classDef;
548 unsigned int templateTypesOnly;
549 unsigned int hasNameSpace;
550 } __attribute__ ((gcc_struct));
552 unsigned int __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(struct __ecereNameSpace__ecere__sys__BinaryTree * this, struct __ecereNameSpace__ecere__sys__BTNode * node);
554 int __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_CompareString(struct __ecereNameSpace__ecere__sys__BinaryTree * this, const char * a, const char * b);
556 struct __ecereNameSpace__ecere__com__Application
561 unsigned int isGUIApp;
562 struct __ecereNameSpace__ecere__sys__OldList allModules;
563 char * parsedCommand;
564 struct __ecereNameSpace__ecere__com__NameSpace systemNameSpace;
565 } __attribute__ ((gcc_struct));
567 static struct __ecereNameSpace__ecere__com__NameSpace globalData;
569 extern void FreeGlobalData(struct __ecereNameSpace__ecere__com__NameSpace * globalDataList);
571 extern struct __ecereNameSpace__ecere__com__Instance * __ecereNameSpace__ecere__com____ecere_COM_Initialize(unsigned int guiApp, int argc, char * argv[]);
573 struct __ecereNameSpace__ecere__com__Method;
575 struct __ecereNameSpace__ecere__com__Method
578 struct __ecereNameSpace__ecere__com__Method * parent;
579 struct __ecereNameSpace__ecere__com__Method * left;
580 struct __ecereNameSpace__ecere__com__Method * right;
585 struct __ecereNameSpace__ecere__com__Class * _class;
587 const char * dataTypeString;
588 struct Type * dataType;
590 } __attribute__ ((gcc_struct));
592 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);
594 struct __ecereNameSpace__ecere__com__Module;
596 struct __ecereNameSpace__ecere__com__Module
598 struct __ecereNameSpace__ecere__com__Instance * application;
599 struct __ecereNameSpace__ecere__sys__OldList classes;
600 struct __ecereNameSpace__ecere__sys__OldList defines;
601 struct __ecereNameSpace__ecere__sys__OldList functions;
602 struct __ecereNameSpace__ecere__sys__OldList modules;
603 struct __ecereNameSpace__ecere__com__Instance * prev;
604 struct __ecereNameSpace__ecere__com__Instance * next;
610 struct __ecereNameSpace__ecere__com__NameSpace privateNameSpace;
611 struct __ecereNameSpace__ecere__com__NameSpace publicNameSpace;
612 } __attribute__ ((gcc_struct));
614 static struct __ecereNameSpace__ecere__com__Instance * privateModule;
616 extern void SetPrivateModule(struct __ecereNameSpace__ecere__com__Instance * module);
621 struct __ecereNameSpace__ecere__sys__BTNode * parent;
622 struct __ecereNameSpace__ecere__sys__BTNode * left;
623 struct __ecereNameSpace__ecere__sys__BTNode * right;
625 struct __ecereNameSpace__ecere__com__Instance * module;
626 char * dataTypeString;
627 struct Type * dataType;
630 char __ecere_padding[40];
631 } __attribute__ ((gcc_struct));
633 extern struct __ecereNameSpace__ecere__com__Instance * __ecereNameSpace__ecere__com__eModule_LoadStrict(struct __ecereNameSpace__ecere__com__Instance * fromModule, const char * name, int importAccess);
635 extern void ComputeModuleClasses(struct __ecereNameSpace__ecere__com__Instance * module);
637 extern void FreeTypeData(struct __ecereNameSpace__ecere__com__Instance * privateModule);
639 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);
641 extern struct __ecereNameSpace__ecere__com__Instance * __thisModule;
643 void __ecereUnregisterModule_ecc(struct __ecereNameSpace__ecere__com__Instance * module)
648 struct __ecereNameSpace__ecere__com__DataMember;
650 struct __ecereNameSpace__ecere__com__ClassTemplateArgument
656 const char * dataTypeString;
657 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
658 } __attribute__ ((gcc_struct)) __anon1;
659 struct __ecereNameSpace__ecere__com__DataValue expression;
662 const char * memberString;
665 struct __ecereNameSpace__ecere__com__DataMember * member;
666 struct __ecereNameSpace__ecere__com__Property * prop;
667 struct __ecereNameSpace__ecere__com__Method * method;
668 } __attribute__ ((gcc_struct)) __anon1;
669 } __attribute__ ((gcc_struct)) __anon2;
670 } __attribute__ ((gcc_struct)) __anon1;
671 } __attribute__ ((gcc_struct));
673 struct __ecereNameSpace__ecere__com__DataMember
675 struct __ecereNameSpace__ecere__com__DataMember * prev;
676 struct __ecereNameSpace__ecere__com__DataMember * next;
678 unsigned int isProperty;
681 struct __ecereNameSpace__ecere__com__Class * _class;
682 const char * dataTypeString;
683 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
684 struct Type * dataType;
688 struct __ecereNameSpace__ecere__sys__OldList members;
689 struct __ecereNameSpace__ecere__sys__BinaryTree membersAlpha;
691 short structAlignment;
692 short pointerAlignment;
693 } __attribute__ ((gcc_struct));
695 struct __ecereNameSpace__ecere__com__Class
697 struct __ecereNameSpace__ecere__com__Class * prev;
698 struct __ecereNameSpace__ecere__com__Class * next;
704 unsigned int (* Constructor)(void * );
705 void (* Destructor)(void * );
708 struct __ecereNameSpace__ecere__com__Class * base;
709 struct __ecereNameSpace__ecere__sys__BinaryTree methods;
710 struct __ecereNameSpace__ecere__sys__BinaryTree members;
711 struct __ecereNameSpace__ecere__sys__BinaryTree prop;
712 struct __ecereNameSpace__ecere__sys__OldList membersAndProperties;
713 struct __ecereNameSpace__ecere__sys__BinaryTree classProperties;
714 struct __ecereNameSpace__ecere__sys__OldList derivatives;
718 struct __ecereNameSpace__ecere__com__Instance * module;
719 struct __ecereNameSpace__ecere__com__NameSpace * nameSpace;
720 const char * dataTypeString;
721 struct Type * dataType;
723 int defaultAlignment;
724 void (* Initialize)();
726 struct __ecereNameSpace__ecere__sys__OldList selfWatchers;
727 const char * designerClass;
728 unsigned int noExpansion;
729 const char * defaultProperty;
730 unsigned int comRedefinition;
733 unsigned int internalDecl;
735 unsigned int computeSize;
736 short structAlignment;
737 short pointerAlignment;
738 int destructionWatchOffset;
740 struct __ecereNameSpace__ecere__sys__OldList delayedCPValues;
741 int inheritanceAccess;
742 const char * fullName;
744 struct __ecereNameSpace__ecere__sys__OldList conversions;
745 struct __ecereNameSpace__ecere__sys__OldList templateParams;
746 struct __ecereNameSpace__ecere__com__ClassTemplateArgument * templateArgs;
747 struct __ecereNameSpace__ecere__com__Class * templateClass;
748 struct __ecereNameSpace__ecere__sys__OldList templatized;
750 unsigned int isInstanceClass;
751 unsigned int byValueSystemClass;
752 } __attribute__ ((gcc_struct));
754 static struct __ecereNameSpace__ecere__com__Class * __ecereClass_CompilerApp;
756 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Symbol;
758 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_GlobalData;
760 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__TempFile;
762 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_ModuleImport;
764 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_ImportedModule;
766 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Context;
768 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Application;
770 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__DualPipe;
772 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Module;
774 void __ecereCreateModuleInstances_ecc()
776 globalContext = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Context);
777 (globalData.classes.CompareKey = (void *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_CompareString, globalData.defines.CompareKey = (void *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_CompareString, globalData.functions.CompareKey = (void *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_CompareString, globalData.nameSpaces.CompareKey = (void *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_CompareString);
780 void __ecereDestroyModuleInstances_ecc()
782 ((globalContext ? (__ecereClass_Context->Destructor ? __ecereClass_Context->Destructor((void *)globalContext) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(globalContext)) : 0), globalContext = 0);
790 struct Symbol * parent;
791 struct Symbol * left;
792 struct Symbol * right;
797 struct __ecereNameSpace__ecere__com__Method * method;
798 struct __ecereNameSpace__ecere__com__Property * _property;
799 struct __ecereNameSpace__ecere__com__Class * registered;
800 } __attribute__ ((gcc_struct)) __anon1;
801 unsigned int notYetDeclared;
806 struct External * pointerExternal;
807 struct External * structExternal;
808 } __attribute__ ((gcc_struct)) __anon1;
811 struct External * externalGet;
812 struct External * externalSet;
813 struct External * externalPtr;
814 struct External * externalIsSet;
815 } __attribute__ ((gcc_struct)) __anon2;
818 struct External * methodExternal;
819 struct External * methodCodeExternal;
820 } __attribute__ ((gcc_struct)) __anon3;
821 } __attribute__ ((gcc_struct)) __anon2;
822 unsigned int imported;
823 unsigned int declaredStructSym;
824 struct __ecereNameSpace__ecere__com__Class * _class;
825 unsigned int declaredStruct;
826 unsigned int needConstructor;
827 unsigned int needDestructor;
828 char * constructorName;
831 char * destructorName;
832 struct ModuleImport * module;
833 struct ClassImport * _import;
834 struct Location nameLoc;
835 unsigned int isParam;
836 unsigned int isRemote;
837 unsigned int isStruct;
838 unsigned int fireWatchersDone;
840 unsigned int classData;
841 unsigned int isStatic;
843 struct __ecereNameSpace__ecere__sys__OldList * templateParams;
844 struct __ecereNameSpace__ecere__sys__OldList templatedClasses;
845 struct Context * ctx;
847 struct Expression * propCategory;
848 } __attribute__ ((gcc_struct));
850 struct __ecereNameSpace__ecere__sys__OldList _excludedSymbols =
852 0, 0, 0, (unsigned int)(uintptr_t)&((struct Symbol *)(void * )0)->left, 0
855 void __ecereMethod_CompilerApp_Main(struct __ecereNameSpace__ecere__com__Instance * this)
857 char * cppCommand = (((void *)0));
858 char * cppOptions = (((void *)0));
859 int cppOptionsLen = 0;
861 unsigned int valid = 1;
862 char defaultOutputFile[797];
863 unsigned int buildingBootStrap = 0;
864 int targetPlatform = __runtimePlatform;
865 int targetBits = GetHostBits();
868 for(c = 1; c < ((struct __ecereNameSpace__ecere__com__Application *)(((char *)this + sizeof(struct __ecereNameSpace__ecere__com__Module) + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->argc; c++)
870 const char * arg = ((struct __ecereNameSpace__ecere__com__Application *)(((char *)this + sizeof(struct __ecereNameSpace__ecere__com__Module) + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->argv[c];
874 if(!strcmp(arg + 1, "m32") || !strcmp(arg + 1, "m64"))
876 int newLen = cppOptionsLen + 1 + strlen(arg);
878 cppOptions = __ecereNameSpace__ecere__com__eSystem_Renew(cppOptions, sizeof(char) * (newLen + 1));
879 cppOptions[cppOptionsLen] = ' ';
880 strcpy(cppOptions + cppOptionsLen + 1, arg);
881 cppOptionsLen = newLen;
882 targetBits = !strcmp(arg + 1, "m32") ? 32 : 64;
884 else if(!strcmp(arg + 1, "t32") || !strcmp(arg + 1, "t64"))
886 targetBits = !strcmp(arg + 1, "t32") ? 32 : 64;
888 else if(arg[1] == 'D' || arg[1] == 'I')
891 int size = cppOptionsLen + 1 + strlen(arg) * 2 + 1;
893 cppOptions = __ecereNameSpace__ecere__com__eSystem_Renew(cppOptions, sizeof(char) * (size));
894 buf = cppOptions + cppOptionsLen;
897 cppOptionsLen = cppOptionsLen + 1 + strlen(buf);
900 if(!strcmp(arg, "-DBUILDING_ECERE_COM"))
901 SetBuildingEcereCom(1);
902 else if(!strcmp(arg, "-DECERE_COM_MODULE"))
903 SetBuildingEcereComModule(1);
904 else if(!strcmp(arg, "-DECERE_BOOTSTRAP"))
905 buildingBootStrap = 1;
908 else if(!strcmp(arg + 1, "t"))
910 if(++c < ((struct __ecereNameSpace__ecere__com__Application *)(((char *)this + sizeof(struct __ecereNameSpace__ecere__com__Module) + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->argc)
911 targetPlatform = __ecereProp___ecereNameSpace__ecere__com__Platform_Set_char__PTR_(((struct __ecereNameSpace__ecere__com__Application *)(((char *)this + sizeof(struct __ecereNameSpace__ecere__com__Module) + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->argv[c]);
915 else if(!strcmp(arg + 1, "cpp"))
917 if(++c < ((struct __ecereNameSpace__ecere__com__Application *)(((char *)this + sizeof(struct __ecereNameSpace__ecere__com__Module) + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->argc)
918 cppCommand = __ecereNameSpace__ecere__sys__CopyString(((struct __ecereNameSpace__ecere__com__Application *)(((char *)this + sizeof(struct __ecereNameSpace__ecere__com__Module) + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->argv[c]);
922 else if(!strcmp(arg + 1, "o"))
924 if(!GetOutputFile() && c + 1 < ((struct __ecereNameSpace__ecere__com__Application *)(((char *)this + sizeof(struct __ecereNameSpace__ecere__com__Module) + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->argc)
926 SetOutputFile(((struct __ecereNameSpace__ecere__com__Application *)(((char *)this + sizeof(struct __ecereNameSpace__ecere__com__Module) + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->argv[c + 1]);
932 else if(!strcmp(arg + 1, "c"))
934 if(!GetSourceFile() && c + 1 < ((struct __ecereNameSpace__ecere__com__Application *)(((char *)this + sizeof(struct __ecereNameSpace__ecere__com__Module) + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->argc)
936 SetSourceFile(((struct __ecereNameSpace__ecere__com__Application *)(((char *)this + sizeof(struct __ecereNameSpace__ecere__com__Module) + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->argv[c + 1]);
942 else if(!strcmp(arg + 1, "isystem") || !strcmp(arg + 1, "isysroot"))
944 if(c + 1 < ((struct __ecereNameSpace__ecere__com__Application *)(((char *)this + sizeof(struct __ecereNameSpace__ecere__com__Module) + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->argc)
947 const char * arg1 = ((struct __ecereNameSpace__ecere__com__Application *)(((char *)this + sizeof(struct __ecereNameSpace__ecere__com__Module) + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->argv[++c];
948 int size = cppOptionsLen + 1 + strlen(arg) * 2 + strlen(arg1) * 2 + 1;
950 cppOptions = __ecereNameSpace__ecere__com__eSystem_Renew(cppOptions, sizeof(char) * (size));
951 buf = cppOptions + cppOptionsLen;
953 buf = PassArg(buf, arg);
955 buf = PassArg(buf, arg1);
956 cppOptionsLen = buf - cppOptions;
961 else if(!strcmp(arg + 1, "fno-diagnostics-show-caret"))
964 int size = cppOptionsLen + 1 + strlen(arg) * 2 + 1;
966 cppOptions = __ecereNameSpace__ecere__com__eSystem_Renew(cppOptions, sizeof(char) * (size));
967 buf = cppOptions + cppOptionsLen;
970 cppOptionsLen = cppOptionsLen + 1 + strlen(buf);
972 else if(!strcmp(arg + 1, "symbols"))
974 if(c + 1 < ((struct __ecereNameSpace__ecere__com__Application *)(((char *)this + sizeof(struct __ecereNameSpace__ecere__com__Module) + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->argc)
976 SetSymbolsDir(((struct __ecereNameSpace__ecere__com__Application *)(((char *)this + sizeof(struct __ecereNameSpace__ecere__com__Module) + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->argv[c + 1]);
982 else if(!strcmp(arg + 1, "module"))
984 if(c + 1 < ((struct __ecereNameSpace__ecere__com__Application *)(((char *)this + sizeof(struct __ecereNameSpace__ecere__com__Module) + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->argc)
986 SetI18nModuleName(((struct __ecereNameSpace__ecere__com__Application *)(((char *)this + sizeof(struct __ecereNameSpace__ecere__com__Module) + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->argv[c + 1]);
992 else if(!strcmp(arg + 1, "memguard"))
996 else if(!strcmp(arg + 1, "defaultns"))
998 if(c + 1 < ((struct __ecereNameSpace__ecere__com__Application *)(((char *)this + sizeof(struct __ecereNameSpace__ecere__com__Module) + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->argc)
1000 SetDefaultNameSpace(((struct __ecereNameSpace__ecere__com__Application *)(((char *)this + sizeof(struct __ecereNameSpace__ecere__com__Module) + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->argv[c + 1]);
1006 else if(!strcmp(arg + 1, "strictns"))
1008 SetStrictNameSpaces(1);
1010 else if(!strcmp(arg + 1, "nolinenumbers"))
1012 SetOutputLineNumbers(0);
1021 cppCommand = __ecereNameSpace__ecere__sys__CopyString("gcc");
1022 if(!GetSourceFile())
1024 else if(!GetOutputFile())
1026 strcpy(defaultOutputFile, "");
1027 __ecereNameSpace__ecere__sys__PathCat(defaultOutputFile, GetSourceFile());
1028 __ecereNameSpace__ecere__sys__ChangeExtension(defaultOutputFile, "c", defaultOutputFile);
1029 SetOutputFile(defaultOutputFile);
1034 printf("%s", __ecereNameSpace__ecere__GetTranslatedString("ecc", "Syntax:\n ecc [-t <target platform>] [-cpp <c preprocessor>] [-o <output>] [-module <module>] [-symbols <outputdir>] [-I<includedir>]* [-isystem <sysincludedir>]* [-D<definition>]* -c <input>\n", (((void *)0))));
1038 struct __ecereNameSpace__ecere__com__Instance * cppOutput;
1041 SetGlobalData(&globalData);
1042 SetExcludedSymbols(&_excludedSymbols);
1043 SetGlobalContext(globalContext);
1044 SetCurrentContext(globalContext);
1045 SetTopContext(globalContext);
1046 SetDefines(&defines);
1047 SetImports(&imports);
1049 SetTargetPlatform(targetPlatform);
1050 SetTargetBits(targetBits);
1052 privateModule = (struct __ecereNameSpace__ecere__com__Instance *)__ecereNameSpace__ecere__com____ecere_COM_Initialize((unsigned int)(1 | (targetBits == sizeof(uintptr_t) * 8 ? (unsigned int)0 : targetBits == 64 ? 2 : targetBits == 32 ? 4 : (unsigned int)0) | 8), 1, (((void *)0)));
1053 SetPrivateModule(privateModule);
1054 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&globalContext->types, (struct __ecereNameSpace__ecere__sys__BTNode *)__extension__ ({
1055 struct Symbol * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
1057 __ecereInstance1->string = __ecereNameSpace__ecere__sys__CopyString("uint"), __ecereInstance1->type = ProcessTypeString("unsigned int", 0), __ecereInstance1;
1059 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&globalContext->types, (struct __ecereNameSpace__ecere__sys__BTNode *)__extension__ ({
1060 struct Symbol * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
1062 __ecereInstance1->string = __ecereNameSpace__ecere__sys__CopyString("uint64"), __ecereInstance1->type = ProcessTypeString("unsigned int64", 0), __ecereInstance1;
1064 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&globalContext->types, (struct __ecereNameSpace__ecere__sys__BTNode *)__extension__ ({
1065 struct Symbol * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
1067 __ecereInstance1->string = __ecereNameSpace__ecere__sys__CopyString("uint32"), __ecereInstance1->type = ProcessTypeString("unsigned int", 0), __ecereInstance1;
1069 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&globalContext->types, (struct __ecereNameSpace__ecere__sys__BTNode *)__extension__ ({
1070 struct Symbol * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
1072 __ecereInstance1->string = __ecereNameSpace__ecere__sys__CopyString("uint16"), __ecereInstance1->type = ProcessTypeString("unsigned short", 0), __ecereInstance1;
1074 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&globalContext->types, (struct __ecereNameSpace__ecere__sys__BTNode *)__extension__ ({
1075 struct Symbol * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
1077 __ecereInstance1->string = __ecereNameSpace__ecere__sys__CopyString("byte"), __ecereInstance1->type = ProcessTypeString("unsigned char", 0), __ecereInstance1;
1079 if(buildingBootStrap)
1081 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&globalContext->types, (struct __ecereNameSpace__ecere__sys__BTNode *)__extension__ ({
1082 struct Symbol * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
1084 __ecereInstance1->string = __ecereNameSpace__ecere__sys__CopyString("intptr_t"), __ecereInstance1->type = ProcessTypeString("intptr", 0), __ecereInstance1;
1086 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&globalContext->types, (struct __ecereNameSpace__ecere__sys__BTNode *)__extension__ ({
1087 struct Symbol * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
1089 __ecereInstance1->string = __ecereNameSpace__ecere__sys__CopyString("uintptr_t"), __ecereInstance1->type = ProcessTypeString("uintptr", 0), __ecereInstance1;
1091 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&globalContext->types, (struct __ecereNameSpace__ecere__sys__BTNode *)__extension__ ({
1092 struct Symbol * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
1094 __ecereInstance1->string = __ecereNameSpace__ecere__sys__CopyString("ssize_t"), __ecereInstance1->type = ProcessTypeString("intsize", 0), __ecereInstance1;
1096 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&globalContext->types, (struct __ecereNameSpace__ecere__sys__BTNode *)__extension__ ({
1097 struct Symbol * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
1099 __ecereInstance1->string = __ecereNameSpace__ecere__sys__CopyString("size_t"), __ecereInstance1->type = ProcessTypeString("uintsize", 0), __ecereInstance1;
1103 struct GlobalData * data = (data = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_GlobalData), data->fullName = __ecereNameSpace__ecere__sys__CopyString("__thisModule"), data->dataTypeString = __ecereNameSpace__ecere__sys__CopyString("Module"), data->module = privateModule, data);
1105 data->key = (uintptr_t)data->fullName;
1106 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&globalData.functions, (struct __ecereNameSpace__ecere__sys__BTNode *)data);
1108 snprintf(command, sizeof (command), "%s%s -x c -E %s\"%s\"", cppCommand, cppOptions ? cppOptions : "", buildingBootStrap ? "" : "-include stdint.h -include sys/types.h ", GetSourceFile());
1109 command[sizeof (command) - 1] = (char)0;
1110 if((cppOutput = __ecereNameSpace__ecere__sys__DualPipeOpen((((unsigned int)(1))), command)))
1113 struct ImportedModule * module;
1114 char sourceFileName[274];
1115 char mainModuleName[274];
1117 struct __ecereNameSpace__ecere__sys__OldList * ast;
1118 struct __ecereNameSpace__ecere__com__Instance * fileInput = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass___ecereNameSpace__ecere__sys__TempFile);
1120 SetFileInput(fileInput);
1121 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&imports, (mainModule = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_ModuleImport)));
1122 SetMainModule(mainModule);
1123 __ecereNameSpace__ecere__sys__GetLastDirectory(GetSourceFile(), sourceFileName);
1124 strcpy(mainModuleName, sourceFileName);
1125 __ecereNameSpace__ecere__sys__StripExtension(mainModuleName);
1126 module = __extension__ ({
1127 struct ImportedModule * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_ImportedModule);
1129 __ecereInstance1->name = __ecereNameSpace__ecere__sys__CopyString(mainModuleName), __ecereInstance1->type = 0, __ecereInstance1;
1131 __ecereMethod___ecereNameSpace__ecere__sys__OldList_AddName(&defines, module);
1133 while(!((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *))__extension__ ({
1134 struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = cppOutput;
1136 __internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__DualPipe->_vTbl;
1137 })[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Eof])(cppOutput))
1140 int count = ((int (*)(struct __ecereNameSpace__ecere__com__Instance *, void * buffer, unsigned int size, unsigned int count))__extension__ ({
1141 struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = cppOutput;
1143 __internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__DualPipe->_vTbl;
1144 })[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Read])(cppOutput, junk, 1, 4096);
1146 ((int (*)(struct __ecereNameSpace__ecere__com__Instance *, const void * buffer, unsigned int size, unsigned int count))__extension__ ({
1147 struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = fileInput;
1149 __internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__TempFile->_vTbl;
1150 })[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Write])(fileInput, junk, 1, count);
1152 exitCode = __ecereMethod___ecereNameSpace__ecere__sys__DualPipe_GetExitCode(cppOutput);
1153 (__ecereNameSpace__ecere__com__eInstance_DecRef(cppOutput), cppOutput = 0);
1154 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, int pos, int mode))__extension__ ({
1155 struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = fileInput;
1157 __internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__TempFile->_vTbl;
1158 })[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Seek])(fileInput, 0, 0);
1161 char symLocation[797];
1162 struct ImportedModule * module, * next;
1164 strcpy(symFile, sourceFileName);
1165 __ecereNameSpace__ecere__sys__ChangeExtension(symFile, "sym", symFile);
1166 strcpy(symLocation, GetSymbolsDir());
1167 __ecereNameSpace__ecere__sys__PathCat(symLocation, symFile);
1168 LoadSymbols(symLocation, 3, 0);
1169 for(module = defines.first; module; module = next)
1171 next = module->next;
1172 if(module->type == 0 && (strcasecmp)(module->name, mainModuleName))
1174 (__ecereNameSpace__ecere__com__eSystem_Delete(module->name), module->name = 0);
1175 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Delete(&defines, module);
1178 if(!GetEcereImported() && !GetBuildingEcereCom())
1179 __ecereNameSpace__ecere__com__eModule_LoadStrict(privateModule, "ecereCOM", 1);
1182 CheckDataRedefinitions();
1184 SetCurrentNameSpace((((void *)0)));
1185 SetDefaultNameSpace((((void *)0)));
1187 (__ecereNameSpace__ecere__com__eInstance_DecRef(fileInput), fileInput = 0);
1188 SetFileInput((((void *)0)));
1192 ProcessDBTableDefinitions();
1193 PrePreProcessClassDefinitions();
1194 ComputeModuleClasses(privateModule);
1195 PreProcessClassDefinitions();
1196 ComputeModuleClasses(privateModule);
1197 ProcessClassDefinitions();
1199 ProcessInstantiations();
1200 ProcessMemberAccess();
1201 ProcessInstanceDeclarations();
1202 strcpy(impFile, GetSymbolsDir());
1203 __ecereNameSpace__ecere__sys__PathCat(impFile, sourceFileName);
1204 __ecereNameSpace__ecere__sys__ChangeExtension(impFile, "imp", impFile);
1206 OutputImports(impFile);
1207 if(!((struct __ecereNameSpace__ecere__com__Application *)(((char *)this + sizeof(struct __ecereNameSpace__ecere__com__Module) + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->exitCode)
1209 struct __ecereNameSpace__ecere__com__Instance * output = __ecereNameSpace__ecere__sys__FileOpen(GetOutputFile(), 2);
1213 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(output, "/* Code generated from eC source file: %s */\n", sourceFileName);
1214 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(output, "#if defined(_WIN32)\n");
1215 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(output, "#define __runtimePlatform 1\n");
1216 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(output, "#elif defined(__APPLE__)\n");
1217 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(output, "#define __runtimePlatform 3\n");
1218 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(output, "#else\n");
1219 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(output, "#define __runtimePlatform 2\n");
1220 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(output, "#endif\n");
1221 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(output, "#if defined(__GNUC__)\n");
1222 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(output, "typedef long long int64;\n");
1223 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(output, "typedef unsigned long long uint64;\n");
1224 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(output, "#ifndef _WIN32\n");
1225 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(output, "#define __declspec(x)\n");
1226 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(output, "#endif\n");
1227 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(output, "#elif defined(__TINYC__)\n");
1228 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(output, "#include <stdarg.h>\n");
1229 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(output, "#define __builtin_va_list va_list\n");
1230 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(output, "#define __builtin_va_start va_start\n");
1231 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(output, "#define __builtin_va_end va_end\n");
1232 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(output, "#ifdef _WIN32\n");
1233 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(output, "#define strcasecmp stricmp\n");
1234 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(output, "#define strncasecmp strnicmp\n");
1235 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(output, "#define __declspec(x) __attribute__((x))\n");
1236 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(output, "#else\n");
1237 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(output, "#define __declspec(x)\n");
1238 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(output, "#endif\n");
1239 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(output, "typedef long long int64;\n");
1240 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(output, "typedef unsigned long long uint64;\n");
1241 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(output, "#else\n");
1242 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(output, "typedef __int64 int64;\n");
1243 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(output, "typedef unsigned __int64 uint64;\n");
1244 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(output, "#endif\n");
1245 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(output, "#ifdef __BIG_ENDIAN__\n");
1246 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(output, "#define __ENDIAN_PAD(x) (8 - (x))\n");
1247 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(output, "#else\n");
1248 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(output, "#define __ENDIAN_PAD(x) 0\n");
1249 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(output, "#endif\n");
1250 if(buildingBootStrap)
1252 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(output, "#include <stdint.h>\n");
1253 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(output, "#include <sys/types.h>\n");
1256 OutputTree(ast, output);
1257 (__ecereNameSpace__ecere__com__eInstance_DecRef(output), output = 0);
1262 ((struct __ecereNameSpace__ecere__com__Application *)(((char *)this + sizeof(struct __ecereNameSpace__ecere__com__Module) + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->exitCode = exitCode;
1268 FreeContext(globalContext);
1269 FreeExcludedSymbols(&_excludedSymbols);
1270 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Free(&defines, (void *)(FreeModuleDefine));
1271 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Free(&imports, (void *)(FreeModuleImport));
1272 FreeTypeData(privateModule);
1274 FreeGlobalData(&globalData);
1275 (__ecereNameSpace__ecere__com__eInstance_DecRef(privateModule), privateModule = 0);
1277 (__ecereNameSpace__ecere__com__eSystem_Delete(cppCommand), cppCommand = 0);
1278 (__ecereNameSpace__ecere__com__eSystem_Delete(cppOptions), cppOptions = 0);
1279 SetSymbolsDir((((void *)0)));
1280 OutputIntlStrings();
1283 void __ecereRegisterModule_ecc(struct __ecereNameSpace__ecere__com__Instance * module)
1285 struct __ecereNameSpace__ecere__com__Class __attribute__((unused)) * class;
1287 class = __ecereNameSpace__ecere__com__eSystem_RegisterClass(0, "CompilerApp", "ecere::com::Application", 0, 0, (void *)0, (void *)0, module, 2, 1);
1288 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)
1289 __ecereClass_CompilerApp = class;
1290 __ecereNameSpace__ecere__com__eClass_AddMethod(class, "Main", 0, __ecereMethod_CompilerApp_Main, 1);