1 /* Code generated from eC source file: ecc.main.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 stdcall __attribute__((__stdcall__))
42 # define stdcall __stdcall
48 #include <sys/types.h>
49 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_Eof;
51 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_Read;
53 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_Seek;
55 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_Write;
57 void __ecereCreateModuleInstances_ecc();
59 void __ecereDestroyModuleInstances_ecc();
61 struct __ecereNameSpace__ecere__sys__OldList
68 } __attribute__ ((gcc_struct));
70 struct __ecereNameSpace__ecere__sys__BTNode;
74 struct __ecereNameSpace__ecere__com__DataValue
89 } __attribute__ ((gcc_struct)) __anon1;
90 } __attribute__ ((gcc_struct));
92 struct __ecereNameSpace__ecere__com__SerialBuffer
94 unsigned char * _buffer;
98 } __attribute__ ((gcc_struct));
100 extern void * __ecereNameSpace__ecere__com__eSystem_New(unsigned int size);
102 extern void * __ecereNameSpace__ecere__com__eSystem_New0(unsigned int size);
104 extern void * __ecereNameSpace__ecere__com__eSystem_Renew(void * memory, unsigned int size);
106 extern void * __ecereNameSpace__ecere__com__eSystem_Renew0(void * memory, unsigned int size);
108 extern void __ecereNameSpace__ecere__com__eSystem_Delete(void * memory);
110 extern void __ecereNameSpace__ecere__LoadTranslatedStrings(const char * moduleName, const char * name);
112 extern void __ecereNameSpace__ecere__UnloadTranslatedStrings(const char * name);
114 struct __ecereNameSpace__ecere__com__Class;
116 struct __ecereNameSpace__ecere__com__Instance
119 struct __ecereNameSpace__ecere__com__Class * _class;
121 } __attribute__ ((gcc_struct));
123 extern long long __ecereNameSpace__ecere__com__eClass_GetProperty(struct __ecereNameSpace__ecere__com__Class * _class, const char * name);
125 extern void __ecereNameSpace__ecere__com__eClass_SetProperty(struct __ecereNameSpace__ecere__com__Class * _class, const char * name, long long value);
127 struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Application;
129 struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Module;
131 struct __ecereNameSpace__ecere__com__Class * __ecereClass_Context;
133 struct __ecereNameSpace__ecere__com__Class * __ecereClass_GlobalData;
135 struct __ecereNameSpace__ecere__com__Class * __ecereClass_ImportedModule;
137 struct __ecereNameSpace__ecere__com__Class * __ecereClass_ModuleImport;
139 struct __ecereNameSpace__ecere__com__Class * __ecereClass_Symbol;
141 struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__DualPipe;
143 struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__TempFile;
145 extern void __ecereNameSpace__ecere__com__eInstance_SetMethod(struct __ecereNameSpace__ecere__com__Instance * instance, const char * name, void * function);
147 extern void __ecereNameSpace__ecere__com__eInstance_IncRef(struct __ecereNameSpace__ecere__com__Instance * instance);
149 extern void __ecereNameSpace__ecere__com__eInstance_Evolve(struct __ecereNameSpace__ecere__com__Instance ** instancePtr, struct __ecereNameSpace__ecere__com__Class * _class);
151 extern void __ecereNameSpace__ecere__com__eInstance_DecRef(struct __ecereNameSpace__ecere__com__Instance * instance);
153 struct __ecereNameSpace__ecere__com__Property;
155 struct __ecereNameSpace__ecere__com__Property
157 struct __ecereNameSpace__ecere__com__Property * prev;
158 struct __ecereNameSpace__ecere__com__Property * next;
160 unsigned int isProperty;
163 struct __ecereNameSpace__ecere__com__Class * _class;
164 const char * dataTypeString;
165 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
166 struct Type * dataType;
167 void (* Set)(void * , int);
168 int (* Get)(void * );
169 unsigned int (* IsSet)(void * );
173 unsigned int conversion;
174 unsigned int watcherOffset;
175 const char * category;
176 unsigned int compiled;
177 unsigned int selfWatchable;
178 unsigned int isWatchable;
179 } __attribute__ ((gcc_struct));
181 extern void __ecereNameSpace__ecere__com__eInstance_FireSelfWatchers(struct __ecereNameSpace__ecere__com__Instance * instance, struct __ecereNameSpace__ecere__com__Property * _property);
183 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);
185 extern void __ecereNameSpace__ecere__com__eInstance_Watch(void * instance, struct __ecereNameSpace__ecere__com__Property * _property, void * object, void (* callback)(void * , void * ));
187 extern void __ecereNameSpace__ecere__com__eInstance_FireWatchers(struct __ecereNameSpace__ecere__com__Instance * instance, struct __ecereNameSpace__ecere__com__Property * _property);
189 struct __ecereNameSpace__ecere__com__Property * __ecereProp___ecereNameSpace__ecere__com__Platform_char__PTR_;
191 struct __ecereNameSpace__ecere__sys__BinaryTree;
193 struct __ecereNameSpace__ecere__sys__BinaryTree
195 struct __ecereNameSpace__ecere__sys__BTNode * root;
197 int (* CompareKey)(struct __ecereNameSpace__ecere__sys__BinaryTree * tree, uintptr_t a, uintptr_t b);
198 void (* FreeKey)(void * key);
199 } __attribute__ ((gcc_struct));
201 struct __ecereNameSpace__ecere__com__Method;
203 struct __ecereNameSpace__ecere__com__Method
206 struct __ecereNameSpace__ecere__com__Method * parent;
207 struct __ecereNameSpace__ecere__com__Method * left;
208 struct __ecereNameSpace__ecere__com__Method * right;
213 struct __ecereNameSpace__ecere__com__Class * _class;
215 const char * dataTypeString;
216 struct Type * dataType;
218 } __attribute__ ((gcc_struct));
220 struct __ecereNameSpace__ecere__com__Module;
222 static struct __ecereNameSpace__ecere__com__Instance * __currentModule;
224 struct __ecereNameSpace__ecere__com__Instance * __thisModule;
226 unsigned int __ecereDll_Load_ec(struct __ecereNameSpace__ecere__com__Instance * module);
228 unsigned int __ecereDll_Unload_ec(struct __ecereNameSpace__ecere__com__Instance * module);
230 unsigned int __ecereDll_Load_ecere(struct __ecereNameSpace__ecere__com__Instance * module);
232 unsigned int __ecereDll_Unload_ecere(struct __ecereNameSpace__ecere__com__Instance * module);
234 void __ecereRegisterModule_ecc(struct __ecereNameSpace__ecere__com__Instance * module);
236 void __ecereUnregisterModule_ecc(struct __ecereNameSpace__ecere__com__Instance * module);
238 extern struct __ecereNameSpace__ecere__com__Instance * __ecereNameSpace__ecere__com__eModule_LoadStatic(struct __ecereNameSpace__ecere__com__Instance * fromModule, const char * name, int importAccess, unsigned int (* Load)(struct __ecereNameSpace__ecere__com__Instance * module), unsigned int (* Unload)(struct __ecereNameSpace__ecere__com__Instance * module));
240 extern struct __ecereNameSpace__ecere__com__Class * __ecereNameSpace__ecere__com__eSystem_FindClass(struct __ecereNameSpace__ecere__com__Instance * module, const char * name);
242 extern struct __ecereNameSpace__ecere__com__Property * __ecereNameSpace__ecere__com__eClass_FindProperty(struct __ecereNameSpace__ecere__com__Class * _class, const char * name, struct __ecereNameSpace__ecere__com__Instance * module);
244 extern struct __ecereNameSpace__ecere__com__Method * __ecereNameSpace__ecere__com__eClass_FindMethod(struct __ecereNameSpace__ecere__com__Class * _class, const char * name, struct __ecereNameSpace__ecere__com__Instance * module);
246 struct __ecereNameSpace__ecere__com__Application;
248 extern struct __ecereNameSpace__ecere__com__Instance * __ecereNameSpace__ecere__com____ecere_COM_Initialize(unsigned int guiApp, int argc, char * argv[]);
250 struct __ecereNameSpace__ecere__com__NameSpace;
252 struct __ecereNameSpace__ecere__com__NameSpace
255 struct __ecereNameSpace__ecere__com__NameSpace * btParent;
256 struct __ecereNameSpace__ecere__com__NameSpace * left;
257 struct __ecereNameSpace__ecere__com__NameSpace * right;
259 struct __ecereNameSpace__ecere__com__NameSpace * parent;
260 struct __ecereNameSpace__ecere__sys__BinaryTree nameSpaces;
261 struct __ecereNameSpace__ecere__sys__BinaryTree classes;
262 struct __ecereNameSpace__ecere__sys__BinaryTree defines;
263 struct __ecereNameSpace__ecere__sys__BinaryTree functions;
264 } __attribute__ ((gcc_struct));
266 struct __ecereNameSpace__ecere__com__Application
271 unsigned int isGUIApp;
272 struct __ecereNameSpace__ecere__sys__OldList allModules;
273 char * parsedCommand;
274 struct __ecereNameSpace__ecere__com__NameSpace systemNameSpace;
275 } __attribute__ ((gcc_struct));
277 struct __ecereNameSpace__ecere__com__Module
279 struct __ecereNameSpace__ecere__com__Instance * application;
280 struct __ecereNameSpace__ecere__sys__OldList classes;
281 struct __ecereNameSpace__ecere__sys__OldList defines;
282 struct __ecereNameSpace__ecere__sys__OldList functions;
283 struct __ecereNameSpace__ecere__sys__OldList modules;
284 struct __ecereNameSpace__ecere__com__Instance * prev;
285 struct __ecereNameSpace__ecere__com__Instance * next;
291 struct __ecereNameSpace__ecere__com__NameSpace privateNameSpace;
292 struct __ecereNameSpace__ecere__com__NameSpace publicNameSpace;
293 } __attribute__ ((gcc_struct));
295 void __ecereRegisterModule_ecc_main(struct __ecereNameSpace__ecere__com__Instance * module)
297 struct __ecereNameSpace__ecere__com__Class __attribute__((unused)) * class;
301 void __ecereUnregisterModule_ecc_main(struct __ecereNameSpace__ecere__com__Instance * module)
306 struct __ecereNameSpace__ecere__com__DataMember;
308 struct __ecereNameSpace__ecere__com__ClassTemplateArgument
314 const char * dataTypeString;
315 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
316 } __attribute__ ((gcc_struct)) __anon1;
317 struct __ecereNameSpace__ecere__com__DataValue expression;
320 const char * memberString;
323 struct __ecereNameSpace__ecere__com__DataMember * member;
324 struct __ecereNameSpace__ecere__com__Property * prop;
325 struct __ecereNameSpace__ecere__com__Method * method;
326 } __attribute__ ((gcc_struct)) __anon1;
327 } __attribute__ ((gcc_struct)) __anon2;
328 } __attribute__ ((gcc_struct)) __anon1;
329 } __attribute__ ((gcc_struct));
331 struct __ecereNameSpace__ecere__com__DataMember
333 struct __ecereNameSpace__ecere__com__DataMember * prev;
334 struct __ecereNameSpace__ecere__com__DataMember * next;
336 unsigned int isProperty;
339 struct __ecereNameSpace__ecere__com__Class * _class;
340 const char * dataTypeString;
341 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
342 struct Type * dataType;
346 struct __ecereNameSpace__ecere__sys__OldList members;
347 struct __ecereNameSpace__ecere__sys__BinaryTree membersAlpha;
349 short structAlignment;
350 short pointerAlignment;
351 } __attribute__ ((gcc_struct));
353 struct __ecereNameSpace__ecere__com__Class
355 struct __ecereNameSpace__ecere__com__Class * prev;
356 struct __ecereNameSpace__ecere__com__Class * next;
362 unsigned int (* Constructor)(void * );
363 void (* Destructor)(void * );
366 struct __ecereNameSpace__ecere__com__Class * base;
367 struct __ecereNameSpace__ecere__sys__BinaryTree methods;
368 struct __ecereNameSpace__ecere__sys__BinaryTree members;
369 struct __ecereNameSpace__ecere__sys__BinaryTree prop;
370 struct __ecereNameSpace__ecere__sys__OldList membersAndProperties;
371 struct __ecereNameSpace__ecere__sys__BinaryTree classProperties;
372 struct __ecereNameSpace__ecere__sys__OldList derivatives;
376 struct __ecereNameSpace__ecere__com__Instance * module;
377 struct __ecereNameSpace__ecere__com__NameSpace * nameSpace;
378 const char * dataTypeString;
379 struct Type * dataType;
381 int defaultAlignment;
382 void (* Initialize)();
384 struct __ecereNameSpace__ecere__sys__OldList selfWatchers;
385 const char * designerClass;
386 unsigned int noExpansion;
387 const char * defaultProperty;
388 unsigned int comRedefinition;
391 unsigned int internalDecl;
393 unsigned int computeSize;
394 short structAlignment;
395 short pointerAlignment;
396 int destructionWatchOffset;
398 struct __ecereNameSpace__ecere__sys__OldList delayedCPValues;
399 int inheritanceAccess;
400 const char * fullName;
402 struct __ecereNameSpace__ecere__sys__OldList conversions;
403 struct __ecereNameSpace__ecere__sys__OldList templateParams;
404 struct __ecereNameSpace__ecere__com__ClassTemplateArgument * templateArgs;
405 struct __ecereNameSpace__ecere__com__Class * templateClass;
406 struct __ecereNameSpace__ecere__sys__OldList templatized;
408 unsigned int isInstanceClass;
409 unsigned int byValueSystemClass;
410 } __attribute__ ((gcc_struct));
412 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Instance;
414 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Application;
416 int main(int _argc, char * _argv[])
419 struct __ecereNameSpace__ecere__com__Instance * module;
420 __attribute__((unused)) struct __ecereNameSpace__ecere__com__Class * _class;
421 __attribute__((unused)) struct __ecereNameSpace__ecere__com__Method * method;
422 __attribute__((unused)) struct __ecereNameSpace__ecere__com__Property * _property;
424 __thisModule = __currentModule = module = __ecereNameSpace__ecere__com____ecere_COM_Initialize((unsigned int)1, _argc, (void *)_argv);
425 __ecereNameSpace__ecere__com__eModule_LoadStatic(module, "ec", 2, (void *)(__ecereDll_Load_ec), (void *)(__ecereDll_Unload_ec));
426 __ecereNameSpace__ecere__com__eModule_LoadStatic(module, "ecere", 2, (void *)(__ecereDll_Load_ecere), (void *)(__ecereDll_Unload_ecere));
427 __ecereRegisterModule_ecc(module);
428 __ecereClass___ecereNameSpace__ecere__com__Application = __ecereNameSpace__ecere__com__eSystem_FindClass(module, "ecere::com::Application");
429 __ecereClass___ecereNameSpace__ecere__com__Module = __ecereNameSpace__ecere__com__eSystem_FindClass(module, "ecere::com::Module");
430 __ecereClass_Context = __ecereNameSpace__ecere__com__eSystem_FindClass(module, "Context");
431 __ecereClass_GlobalData = __ecereNameSpace__ecere__com__eSystem_FindClass(module, "GlobalData");
432 __ecereClass_ImportedModule = __ecereNameSpace__ecere__com__eSystem_FindClass(module, "ImportedModule");
433 __ecereClass_ModuleImport = __ecereNameSpace__ecere__com__eSystem_FindClass(module, "ModuleImport");
434 __ecereClass_Symbol = __ecereNameSpace__ecere__com__eSystem_FindClass(module, "Symbol");
435 _class = __ecereNameSpace__ecere__com__eSystem_FindClass(module, "ecere::com::Platform");
436 __ecereProp___ecereNameSpace__ecere__com__Platform_char__PTR_ = _property = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, "char *", module);
437 _class = __ecereNameSpace__ecere__com__eSystem_FindClass(module, "ecere::sys::BinaryTree");
438 __ecereClass___ecereNameSpace__ecere__sys__DualPipe = __ecereNameSpace__ecere__com__eSystem_FindClass(module, "ecere::sys::DualPipe");
439 _class = __ecereNameSpace__ecere__com__eSystem_FindClass(module, "ecere::sys::File");
440 method = __ecereNameSpace__ecere__com__eClass_FindMethod(_class, "Eof", module);
442 __ecereVMethodID___ecereNameSpace__ecere__sys__File_Eof = method->vid;
443 method = __ecereNameSpace__ecere__com__eClass_FindMethod(_class, "Read", module);
445 __ecereVMethodID___ecereNameSpace__ecere__sys__File_Read = method->vid;
446 method = __ecereNameSpace__ecere__com__eClass_FindMethod(_class, "Seek", module);
448 __ecereVMethodID___ecereNameSpace__ecere__sys__File_Seek = method->vid;
449 method = __ecereNameSpace__ecere__com__eClass_FindMethod(_class, "Write", module);
451 __ecereVMethodID___ecereNameSpace__ecere__sys__File_Write = method->vid;
452 _class = __ecereNameSpace__ecere__com__eSystem_FindClass(module, "ecere::sys::OldList");
453 __ecereClass___ecereNameSpace__ecere__sys__TempFile = __ecereNameSpace__ecere__com__eSystem_FindClass(module, "ecere::sys::TempFile");
454 __ecereNameSpace__ecere__LoadTranslatedStrings((((void *)0)), "ecc");
455 _class = __ecereNameSpace__ecere__com__eSystem_FindClass(__currentModule, "CompilerApp");
456 __ecereNameSpace__ecere__com__eInstance_Evolve((struct __ecereNameSpace__ecere__com__Instance **)&__currentModule, _class);
457 __thisModule = __currentModule;
458 __ecereCreateModuleInstances_ecc();
459 ((void (*)(void *))(void *)((struct __ecereNameSpace__ecere__com__Instance *)(char *)__currentModule)->_vTbl[12])(__currentModule);
460 __ecereDestroyModuleInstances_ecc();
461 __ecereNameSpace__ecere__UnloadTranslatedStrings("ecc");
462 _class = __ecereNameSpace__ecere__com__eSystem_FindClass(__currentModule, "ecere::com::Application");
463 exitCode = ((struct __ecereNameSpace__ecere__com__Application *)(((char *)((struct __ecereNameSpace__ecere__com__Instance *)__currentModule) + sizeof(struct __ecereNameSpace__ecere__com__Module) + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->exitCode;
464 (__ecereNameSpace__ecere__com__eInstance_DecRef(__currentModule), __currentModule = 0);