1 /* Code generated from eC source file: ecp.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 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 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_Eof;
54 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts;
56 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_Read;
58 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_Seek;
60 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_Write;
62 void __ecereCreateModuleInstances_ecp();
64 void __ecereDestroyModuleInstances_ecp();
66 struct __ecereNameSpace__ecere__sys__OldList
75 struct __ecereNameSpace__ecere__sys__BTNode;
79 struct __ecereNameSpace__ecere__com__DataValue
94 } ecere_gcc_struct __anon1;
97 struct __ecereNameSpace__ecere__com__SerialBuffer
99 unsigned char * _buffer;
105 extern void * __ecereNameSpace__ecere__com__eSystem_New(unsigned int size);
107 extern void * __ecereNameSpace__ecere__com__eSystem_New0(unsigned int size);
109 extern void * __ecereNameSpace__ecere__com__eSystem_Renew(void * memory, unsigned int size);
111 extern void * __ecereNameSpace__ecere__com__eSystem_Renew0(void * memory, unsigned int size);
113 extern void __ecereNameSpace__ecere__com__eSystem_Delete(void * memory);
115 extern void __ecereNameSpace__ecere__LoadTranslatedStrings(const char * moduleName, const char * name);
117 extern void __ecereNameSpace__ecere__UnloadTranslatedStrings(const char * name);
119 struct __ecereNameSpace__ecere__com__Class;
121 struct __ecereNameSpace__ecere__com__Instance
124 struct __ecereNameSpace__ecere__com__Class * _class;
128 extern long long __ecereNameSpace__ecere__com__eClass_GetProperty(struct __ecereNameSpace__ecere__com__Class * _class, const char * name);
130 extern void __ecereNameSpace__ecere__com__eClass_SetProperty(struct __ecereNameSpace__ecere__com__Class * _class, const char * name, long long value);
132 struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Application;
134 struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Module;
136 struct __ecereNameSpace__ecere__com__Class * __ecereClass_Context;
138 struct __ecereNameSpace__ecere__com__Class * __ecereClass_ModuleImport;
140 struct __ecereNameSpace__ecere__com__Class * __ecereClass_Symbol;
142 struct __ecereNameSpace__ecere__com__Class * __ecereClass_Type;
144 struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__DualPipe;
146 struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__File;
148 struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__TempFile;
150 extern void __ecereNameSpace__ecere__com__eInstance_SetMethod(struct __ecereNameSpace__ecere__com__Instance * instance, const char * name, void * function);
152 extern void __ecereNameSpace__ecere__com__eInstance_IncRef(struct __ecereNameSpace__ecere__com__Instance * instance);
154 extern void __ecereNameSpace__ecere__com__eInstance_Evolve(struct __ecereNameSpace__ecere__com__Instance ** instancePtr, struct __ecereNameSpace__ecere__com__Class * _class);
156 extern void __ecereNameSpace__ecere__com__eInstance_DecRef(struct __ecereNameSpace__ecere__com__Instance * instance);
158 struct __ecereNameSpace__ecere__com__Property;
160 struct __ecereNameSpace__ecere__com__Property
162 struct __ecereNameSpace__ecere__com__Property * prev;
163 struct __ecereNameSpace__ecere__com__Property * next;
165 unsigned int isProperty;
168 struct __ecereNameSpace__ecere__com__Class * _class;
169 const char * dataTypeString;
170 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
171 struct Type * dataType;
172 void (* Set)(void * , int);
173 int (* Get)(void * );
174 unsigned int (* IsSet)(void * );
178 unsigned int conversion;
179 unsigned int watcherOffset;
180 const char * category;
181 unsigned int compiled;
182 unsigned int selfWatchable;
183 unsigned int isWatchable;
186 extern void __ecereNameSpace__ecere__com__eInstance_FireSelfWatchers(struct __ecereNameSpace__ecere__com__Instance * instance, struct __ecereNameSpace__ecere__com__Property * _property);
188 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);
190 extern void __ecereNameSpace__ecere__com__eInstance_Watch(void * instance, struct __ecereNameSpace__ecere__com__Property * _property, void * object, void (* callback)(void * , void * ));
192 extern void __ecereNameSpace__ecere__com__eInstance_FireWatchers(struct __ecereNameSpace__ecere__com__Instance * instance, struct __ecereNameSpace__ecere__com__Property * _property);
194 struct __ecereNameSpace__ecere__com__Property * __ecereProp___ecereNameSpace__ecere__com__Platform_char__PTR_;
196 struct __ecereNameSpace__ecere__sys__BinaryTree;
198 struct __ecereNameSpace__ecere__sys__BinaryTree
200 struct __ecereNameSpace__ecere__sys__BTNode * root;
202 int (* CompareKey)(struct __ecereNameSpace__ecere__sys__BinaryTree * tree, uintptr_t a, uintptr_t b);
203 void (* FreeKey)(void * key);
206 struct __ecereNameSpace__ecere__com__Method;
208 struct __ecereNameSpace__ecere__com__Method
211 struct __ecereNameSpace__ecere__com__Method * parent;
212 struct __ecereNameSpace__ecere__com__Method * left;
213 struct __ecereNameSpace__ecere__com__Method * right;
218 struct __ecereNameSpace__ecere__com__Class * _class;
220 const char * dataTypeString;
221 struct Type * dataType;
225 struct __ecereNameSpace__ecere__com__Module;
227 static struct __ecereNameSpace__ecere__com__Instance * __currentModule;
229 struct __ecereNameSpace__ecere__com__Instance * __thisModule;
231 unsigned int __ecereDll_Load_ec(struct __ecereNameSpace__ecere__com__Instance * module);
233 unsigned int __ecereDll_Unload_ec(struct __ecereNameSpace__ecere__com__Instance * module);
235 unsigned int __ecereDll_Load_ecere(struct __ecereNameSpace__ecere__com__Instance * module);
237 unsigned int __ecereDll_Unload_ecere(struct __ecereNameSpace__ecere__com__Instance * module);
239 void __ecereRegisterModule_ecp(struct __ecereNameSpace__ecere__com__Instance * module);
241 void __ecereUnregisterModule_ecp(struct __ecereNameSpace__ecere__com__Instance * module);
243 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));
245 extern struct __ecereNameSpace__ecere__com__Class * __ecereNameSpace__ecere__com__eSystem_FindClass(struct __ecereNameSpace__ecere__com__Instance * module, const char * name);
247 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);
249 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);
251 struct __ecereNameSpace__ecere__com__Application;
253 extern struct __ecereNameSpace__ecere__com__Instance * __ecereNameSpace__ecere__com____ecere_COM_Initialize(unsigned int guiApp, int argc, char * argv[]);
255 struct __ecereNameSpace__ecere__com__NameSpace;
257 struct __ecereNameSpace__ecere__com__NameSpace
260 struct __ecereNameSpace__ecere__com__NameSpace * btParent;
261 struct __ecereNameSpace__ecere__com__NameSpace * left;
262 struct __ecereNameSpace__ecere__com__NameSpace * right;
264 struct __ecereNameSpace__ecere__com__NameSpace * parent;
265 struct __ecereNameSpace__ecere__sys__BinaryTree nameSpaces;
266 struct __ecereNameSpace__ecere__sys__BinaryTree classes;
267 struct __ecereNameSpace__ecere__sys__BinaryTree defines;
268 struct __ecereNameSpace__ecere__sys__BinaryTree functions;
271 struct __ecereNameSpace__ecere__com__Application
276 unsigned int isGUIApp;
277 struct __ecereNameSpace__ecere__sys__OldList allModules;
278 char * parsedCommand;
279 struct __ecereNameSpace__ecere__com__NameSpace systemNameSpace;
282 struct __ecereNameSpace__ecere__com__Module
284 struct __ecereNameSpace__ecere__com__Instance * application;
285 struct __ecereNameSpace__ecere__sys__OldList classes;
286 struct __ecereNameSpace__ecere__sys__OldList defines;
287 struct __ecereNameSpace__ecere__sys__OldList functions;
288 struct __ecereNameSpace__ecere__sys__OldList modules;
289 struct __ecereNameSpace__ecere__com__Instance * prev;
290 struct __ecereNameSpace__ecere__com__Instance * next;
296 struct __ecereNameSpace__ecere__com__NameSpace privateNameSpace;
297 struct __ecereNameSpace__ecere__com__NameSpace publicNameSpace;
300 void __ecereRegisterModule_ecp_main(struct __ecereNameSpace__ecere__com__Instance * module)
302 struct __ecereNameSpace__ecere__com__Class __attribute__((unused)) * class;
306 void __ecereUnregisterModule_ecp_main(struct __ecereNameSpace__ecere__com__Instance * module)
311 struct __ecereNameSpace__ecere__com__DataMember;
313 struct __ecereNameSpace__ecere__com__ClassTemplateArgument
319 const char * dataTypeString;
320 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
321 } ecere_gcc_struct __anon1;
322 struct __ecereNameSpace__ecere__com__DataValue expression;
325 const char * memberString;
328 struct __ecereNameSpace__ecere__com__DataMember * member;
329 struct __ecereNameSpace__ecere__com__Property * prop;
330 struct __ecereNameSpace__ecere__com__Method * method;
331 } ecere_gcc_struct __anon1;
332 } ecere_gcc_struct __anon2;
333 } ecere_gcc_struct __anon1;
336 struct __ecereNameSpace__ecere__com__DataMember
338 struct __ecereNameSpace__ecere__com__DataMember * prev;
339 struct __ecereNameSpace__ecere__com__DataMember * next;
341 unsigned int isProperty;
344 struct __ecereNameSpace__ecere__com__Class * _class;
345 const char * dataTypeString;
346 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
347 struct Type * dataType;
351 struct __ecereNameSpace__ecere__sys__OldList members;
352 struct __ecereNameSpace__ecere__sys__BinaryTree membersAlpha;
354 short structAlignment;
355 short pointerAlignment;
358 struct __ecereNameSpace__ecere__com__Class
360 struct __ecereNameSpace__ecere__com__Class * prev;
361 struct __ecereNameSpace__ecere__com__Class * next;
367 unsigned int (* Constructor)(void * );
368 void (* Destructor)(void * );
371 struct __ecereNameSpace__ecere__com__Class * base;
372 struct __ecereNameSpace__ecere__sys__BinaryTree methods;
373 struct __ecereNameSpace__ecere__sys__BinaryTree members;
374 struct __ecereNameSpace__ecere__sys__BinaryTree prop;
375 struct __ecereNameSpace__ecere__sys__OldList membersAndProperties;
376 struct __ecereNameSpace__ecere__sys__BinaryTree classProperties;
377 struct __ecereNameSpace__ecere__sys__OldList derivatives;
381 struct __ecereNameSpace__ecere__com__Instance * module;
382 struct __ecereNameSpace__ecere__com__NameSpace * nameSpace;
383 const char * dataTypeString;
384 struct Type * dataType;
386 int defaultAlignment;
387 void (* Initialize)();
389 struct __ecereNameSpace__ecere__sys__OldList selfWatchers;
390 const char * designerClass;
391 unsigned int noExpansion;
392 const char * defaultProperty;
393 unsigned int comRedefinition;
396 unsigned int internalDecl;
398 unsigned int computeSize;
399 short structAlignment;
400 short pointerAlignment;
401 int destructionWatchOffset;
403 struct __ecereNameSpace__ecere__sys__OldList delayedCPValues;
404 int inheritanceAccess;
405 const char * fullName;
407 struct __ecereNameSpace__ecere__sys__OldList conversions;
408 struct __ecereNameSpace__ecere__sys__OldList templateParams;
409 struct __ecereNameSpace__ecere__com__ClassTemplateArgument * templateArgs;
410 struct __ecereNameSpace__ecere__com__Class * templateClass;
411 struct __ecereNameSpace__ecere__sys__OldList templatized;
413 unsigned int isInstanceClass;
414 unsigned int byValueSystemClass;
417 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Instance;
419 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Application;
421 int main(int _argc, char * _argv[])
424 struct __ecereNameSpace__ecere__com__Instance * module;
425 __attribute__((unused)) struct __ecereNameSpace__ecere__com__Class * _class;
426 __attribute__((unused)) struct __ecereNameSpace__ecere__com__Method * method;
427 __attribute__((unused)) struct __ecereNameSpace__ecere__com__Property * _property;
429 __thisModule = __currentModule = module = __ecereNameSpace__ecere__com____ecere_COM_Initialize((unsigned int)1, _argc, (void *)_argv);
430 __ecereNameSpace__ecere__com__eModule_LoadStatic(module, "ec", 2, (void *)(__ecereDll_Load_ec), (void *)(__ecereDll_Unload_ec));
431 __ecereNameSpace__ecere__com__eModule_LoadStatic(module, "ecere", 2, (void *)(__ecereDll_Load_ecere), (void *)(__ecereDll_Unload_ecere));
432 __ecereRegisterModule_ecp(module);
433 __ecereClass___ecereNameSpace__ecere__com__Application = __ecereNameSpace__ecere__com__eSystem_FindClass(module, "ecere::com::Application");
434 __ecereClass___ecereNameSpace__ecere__com__Module = __ecereNameSpace__ecere__com__eSystem_FindClass(module, "ecere::com::Module");
435 __ecereClass_Context = __ecereNameSpace__ecere__com__eSystem_FindClass(module, "Context");
436 __ecereClass_ModuleImport = __ecereNameSpace__ecere__com__eSystem_FindClass(module, "ModuleImport");
437 __ecereClass_Symbol = __ecereNameSpace__ecere__com__eSystem_FindClass(module, "Symbol");
438 __ecereClass_Type = __ecereNameSpace__ecere__com__eSystem_FindClass(module, "Type");
439 _class = __ecereNameSpace__ecere__com__eSystem_FindClass(module, "ecere::com::Platform");
440 __ecereProp___ecereNameSpace__ecere__com__Platform_char__PTR_ = _property = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, "char *", module);
441 _class = __ecereNameSpace__ecere__com__eSystem_FindClass(module, "ecere::sys::BinaryTree");
442 __ecereClass___ecereNameSpace__ecere__sys__DualPipe = __ecereNameSpace__ecere__com__eSystem_FindClass(module, "ecere::sys::DualPipe");
443 __ecereClass___ecereNameSpace__ecere__sys__File = __ecereNameSpace__ecere__com__eSystem_FindClass(module, "ecere::sys::File");
444 method = __ecereNameSpace__ecere__com__eClass_FindMethod(__ecereClass___ecereNameSpace__ecere__sys__File, "Eof", module);
446 __ecereVMethodID___ecereNameSpace__ecere__sys__File_Eof = method->vid;
447 method = __ecereNameSpace__ecere__com__eClass_FindMethod(__ecereClass___ecereNameSpace__ecere__sys__File, "Puts", module);
449 __ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts = method->vid;
450 method = __ecereNameSpace__ecere__com__eClass_FindMethod(__ecereClass___ecereNameSpace__ecere__sys__File, "Read", module);
452 __ecereVMethodID___ecereNameSpace__ecere__sys__File_Read = method->vid;
453 method = __ecereNameSpace__ecere__com__eClass_FindMethod(__ecereClass___ecereNameSpace__ecere__sys__File, "Seek", module);
455 __ecereVMethodID___ecereNameSpace__ecere__sys__File_Seek = method->vid;
456 method = __ecereNameSpace__ecere__com__eClass_FindMethod(__ecereClass___ecereNameSpace__ecere__sys__File, "Write", module);
458 __ecereVMethodID___ecereNameSpace__ecere__sys__File_Write = method->vid;
459 _class = __ecereNameSpace__ecere__com__eSystem_FindClass(module, "ecere::sys::OldList");
460 __ecereClass___ecereNameSpace__ecere__sys__TempFile = __ecereNameSpace__ecere__com__eSystem_FindClass(module, "ecere::sys::TempFile");
461 __ecereNameSpace__ecere__LoadTranslatedStrings((((void *)0)), "ecp");
462 _class = __ecereNameSpace__ecere__com__eSystem_FindClass(__currentModule, "PrecompApp");
463 __ecereNameSpace__ecere__com__eInstance_Evolve((struct __ecereNameSpace__ecere__com__Instance **)&__currentModule, _class);
464 __thisModule = __currentModule;
465 __ecereCreateModuleInstances_ecp();
466 ((void (*)(void *))(void *)((struct __ecereNameSpace__ecere__com__Instance *)(char *)__currentModule)->_vTbl[12])(__currentModule);
467 __ecereDestroyModuleInstances_ecp();
468 __ecereNameSpace__ecere__UnloadTranslatedStrings("ecp");
469 _class = __ecereNameSpace__ecere__com__eSystem_FindClass(__currentModule, "ecere::com::Application");
470 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;
471 (__ecereNameSpace__ecere__com__eInstance_DecRef(__currentModule), __currentModule = 0);