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 #include <sys/types.h>
40 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_Eof;
42 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts;
44 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_Read;
46 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_Seek;
48 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_Write;
50 void __ecereCreateModuleInstances_ecp();
52 void __ecereDestroyModuleInstances_ecp();
54 struct __ecereNameSpace__ecere__sys__OldList
61 } __attribute__ ((gcc_struct));
63 struct __ecereNameSpace__ecere__sys__BTNode;
67 struct __ecereNameSpace__ecere__com__DataValue
82 } __attribute__ ((gcc_struct)) __anon1;
83 } __attribute__ ((gcc_struct));
85 struct __ecereNameSpace__ecere__com__SerialBuffer
87 unsigned char * _buffer;
91 } __attribute__ ((gcc_struct));
93 extern void * __ecereNameSpace__ecere__com__eSystem_New(unsigned int size);
95 extern void * __ecereNameSpace__ecere__com__eSystem_New0(unsigned int size);
97 extern void * __ecereNameSpace__ecere__com__eSystem_Renew(void * memory, unsigned int size);
99 extern void * __ecereNameSpace__ecere__com__eSystem_Renew0(void * memory, unsigned int size);
101 extern void __ecereNameSpace__ecere__com__eSystem_Delete(void * memory);
103 extern void __ecereNameSpace__ecere__LoadTranslatedStrings(const char * moduleName, const char * name);
105 extern void __ecereNameSpace__ecere__UnloadTranslatedStrings(const char * name);
107 struct __ecereNameSpace__ecere__com__Class;
109 struct __ecereNameSpace__ecere__com__Instance
112 struct __ecereNameSpace__ecere__com__Class * _class;
114 } __attribute__ ((gcc_struct));
116 extern long long __ecereNameSpace__ecere__com__eClass_GetProperty(struct __ecereNameSpace__ecere__com__Class * _class, const char * name);
118 extern void __ecereNameSpace__ecere__com__eClass_SetProperty(struct __ecereNameSpace__ecere__com__Class * _class, const char * name, long long value);
120 struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Application;
122 struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Module;
124 struct __ecereNameSpace__ecere__com__Class * __ecereClass_Context;
126 struct __ecereNameSpace__ecere__com__Class * __ecereClass_ModuleImport;
128 struct __ecereNameSpace__ecere__com__Class * __ecereClass_Symbol;
130 struct __ecereNameSpace__ecere__com__Class * __ecereClass_Type;
132 struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__DualPipe;
134 struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__File;
136 struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__TempFile;
138 extern void __ecereNameSpace__ecere__com__eInstance_SetMethod(struct __ecereNameSpace__ecere__com__Instance * instance, const char * name, void * function);
140 extern void __ecereNameSpace__ecere__com__eInstance_IncRef(struct __ecereNameSpace__ecere__com__Instance * instance);
142 extern void __ecereNameSpace__ecere__com__eInstance_Evolve(struct __ecereNameSpace__ecere__com__Instance ** instancePtr, struct __ecereNameSpace__ecere__com__Class * _class);
144 extern void __ecereNameSpace__ecere__com__eInstance_DecRef(struct __ecereNameSpace__ecere__com__Instance * instance);
146 struct __ecereNameSpace__ecere__com__Property;
148 struct __ecereNameSpace__ecere__com__Property
150 struct __ecereNameSpace__ecere__com__Property * prev;
151 struct __ecereNameSpace__ecere__com__Property * next;
153 unsigned int isProperty;
156 struct __ecereNameSpace__ecere__com__Class * _class;
157 const char * dataTypeString;
158 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
159 struct Type * dataType;
160 void (* Set)(void * , int);
161 int (* Get)(void * );
162 unsigned int (* IsSet)(void * );
166 unsigned int conversion;
167 unsigned int watcherOffset;
168 const char * category;
169 unsigned int compiled;
170 unsigned int selfWatchable;
171 unsigned int isWatchable;
172 } __attribute__ ((gcc_struct));
174 extern void __ecereNameSpace__ecere__com__eInstance_FireSelfWatchers(struct __ecereNameSpace__ecere__com__Instance * instance, struct __ecereNameSpace__ecere__com__Property * _property);
176 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);
178 extern void __ecereNameSpace__ecere__com__eInstance_Watch(void * instance, struct __ecereNameSpace__ecere__com__Property * _property, void * object, void (* callback)(void * , void * ));
180 extern void __ecereNameSpace__ecere__com__eInstance_FireWatchers(struct __ecereNameSpace__ecere__com__Instance * instance, struct __ecereNameSpace__ecere__com__Property * _property);
182 struct __ecereNameSpace__ecere__com__Property * __ecereProp___ecereNameSpace__ecere__com__Platform_char__PTR_;
184 struct __ecereNameSpace__ecere__sys__BinaryTree;
186 struct __ecereNameSpace__ecere__sys__BinaryTree
188 struct __ecereNameSpace__ecere__sys__BTNode * root;
190 int (* CompareKey)(struct __ecereNameSpace__ecere__sys__BinaryTree * tree, uintptr_t a, uintptr_t b);
191 void (* FreeKey)(void * key);
192 } __attribute__ ((gcc_struct));
194 struct __ecereNameSpace__ecere__com__Method;
196 struct __ecereNameSpace__ecere__com__Method
199 struct __ecereNameSpace__ecere__com__Method * parent;
200 struct __ecereNameSpace__ecere__com__Method * left;
201 struct __ecereNameSpace__ecere__com__Method * right;
206 struct __ecereNameSpace__ecere__com__Class * _class;
208 const char * dataTypeString;
209 struct Type * dataType;
211 } __attribute__ ((gcc_struct));
213 struct __ecereNameSpace__ecere__com__Module;
215 static struct __ecereNameSpace__ecere__com__Instance * __currentModule;
217 struct __ecereNameSpace__ecere__com__Instance * __thisModule;
219 unsigned int __ecereDll_Load_ec(struct __ecereNameSpace__ecere__com__Instance * module);
221 unsigned int __ecereDll_Unload_ec(struct __ecereNameSpace__ecere__com__Instance * module);
223 unsigned int __ecereDll_Load_ecere(struct __ecereNameSpace__ecere__com__Instance * module);
225 unsigned int __ecereDll_Unload_ecere(struct __ecereNameSpace__ecere__com__Instance * module);
227 void __ecereRegisterModule_ecp(struct __ecereNameSpace__ecere__com__Instance * module);
229 void __ecereUnregisterModule_ecp(struct __ecereNameSpace__ecere__com__Instance * module);
231 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));
233 extern struct __ecereNameSpace__ecere__com__Class * __ecereNameSpace__ecere__com__eSystem_FindClass(struct __ecereNameSpace__ecere__com__Instance * module, const char * name);
235 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);
237 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);
239 struct __ecereNameSpace__ecere__com__Application;
241 extern struct __ecereNameSpace__ecere__com__Instance * __ecereNameSpace__ecere__com____ecere_COM_Initialize(unsigned int guiApp, int argc, char * argv[]);
243 struct __ecereNameSpace__ecere__com__NameSpace;
245 struct __ecereNameSpace__ecere__com__NameSpace
248 struct __ecereNameSpace__ecere__com__NameSpace * btParent;
249 struct __ecereNameSpace__ecere__com__NameSpace * left;
250 struct __ecereNameSpace__ecere__com__NameSpace * right;
252 struct __ecereNameSpace__ecere__com__NameSpace * parent;
253 struct __ecereNameSpace__ecere__sys__BinaryTree nameSpaces;
254 struct __ecereNameSpace__ecere__sys__BinaryTree classes;
255 struct __ecereNameSpace__ecere__sys__BinaryTree defines;
256 struct __ecereNameSpace__ecere__sys__BinaryTree functions;
257 } __attribute__ ((gcc_struct));
259 struct __ecereNameSpace__ecere__com__Application
264 unsigned int isGUIApp;
265 struct __ecereNameSpace__ecere__sys__OldList allModules;
266 char * parsedCommand;
267 struct __ecereNameSpace__ecere__com__NameSpace systemNameSpace;
268 } __attribute__ ((gcc_struct));
270 struct __ecereNameSpace__ecere__com__Module
272 struct __ecereNameSpace__ecere__com__Instance * application;
273 struct __ecereNameSpace__ecere__sys__OldList classes;
274 struct __ecereNameSpace__ecere__sys__OldList defines;
275 struct __ecereNameSpace__ecere__sys__OldList functions;
276 struct __ecereNameSpace__ecere__sys__OldList modules;
277 struct __ecereNameSpace__ecere__com__Instance * prev;
278 struct __ecereNameSpace__ecere__com__Instance * next;
284 struct __ecereNameSpace__ecere__com__NameSpace privateNameSpace;
285 struct __ecereNameSpace__ecere__com__NameSpace publicNameSpace;
286 } __attribute__ ((gcc_struct));
288 void __ecereRegisterModule_ecp_main(struct __ecereNameSpace__ecere__com__Instance * module)
290 struct __ecereNameSpace__ecere__com__Class __attribute__((unused)) * class;
294 void __ecereUnregisterModule_ecp_main(struct __ecereNameSpace__ecere__com__Instance * module)
299 struct __ecereNameSpace__ecere__com__DataMember;
301 struct __ecereNameSpace__ecere__com__ClassTemplateArgument
307 const char * dataTypeString;
308 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
309 } __attribute__ ((gcc_struct)) __anon1;
310 struct __ecereNameSpace__ecere__com__DataValue expression;
313 const char * memberString;
316 struct __ecereNameSpace__ecere__com__DataMember * member;
317 struct __ecereNameSpace__ecere__com__Property * prop;
318 struct __ecereNameSpace__ecere__com__Method * method;
319 } __attribute__ ((gcc_struct)) __anon1;
320 } __attribute__ ((gcc_struct)) __anon2;
321 } __attribute__ ((gcc_struct)) __anon1;
322 } __attribute__ ((gcc_struct));
324 struct __ecereNameSpace__ecere__com__DataMember
326 struct __ecereNameSpace__ecere__com__DataMember * prev;
327 struct __ecereNameSpace__ecere__com__DataMember * next;
329 unsigned int isProperty;
332 struct __ecereNameSpace__ecere__com__Class * _class;
333 const char * dataTypeString;
334 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
335 struct Type * dataType;
339 struct __ecereNameSpace__ecere__sys__OldList members;
340 struct __ecereNameSpace__ecere__sys__BinaryTree membersAlpha;
342 short structAlignment;
343 short pointerAlignment;
344 } __attribute__ ((gcc_struct));
346 struct __ecereNameSpace__ecere__com__Class
348 struct __ecereNameSpace__ecere__com__Class * prev;
349 struct __ecereNameSpace__ecere__com__Class * next;
355 unsigned int (* Constructor)(void * );
356 void (* Destructor)(void * );
359 struct __ecereNameSpace__ecere__com__Class * base;
360 struct __ecereNameSpace__ecere__sys__BinaryTree methods;
361 struct __ecereNameSpace__ecere__sys__BinaryTree members;
362 struct __ecereNameSpace__ecere__sys__BinaryTree prop;
363 struct __ecereNameSpace__ecere__sys__OldList membersAndProperties;
364 struct __ecereNameSpace__ecere__sys__BinaryTree classProperties;
365 struct __ecereNameSpace__ecere__sys__OldList derivatives;
369 struct __ecereNameSpace__ecere__com__Instance * module;
370 struct __ecereNameSpace__ecere__com__NameSpace * nameSpace;
371 const char * dataTypeString;
372 struct Type * dataType;
374 int defaultAlignment;
375 void (* Initialize)();
377 struct __ecereNameSpace__ecere__sys__OldList selfWatchers;
378 const char * designerClass;
379 unsigned int noExpansion;
380 const char * defaultProperty;
381 unsigned int comRedefinition;
384 unsigned int internalDecl;
386 unsigned int computeSize;
387 short structAlignment;
388 short pointerAlignment;
389 int destructionWatchOffset;
391 struct __ecereNameSpace__ecere__sys__OldList delayedCPValues;
392 int inheritanceAccess;
393 const char * fullName;
395 struct __ecereNameSpace__ecere__sys__OldList conversions;
396 struct __ecereNameSpace__ecere__sys__OldList templateParams;
397 struct __ecereNameSpace__ecere__com__ClassTemplateArgument * templateArgs;
398 struct __ecereNameSpace__ecere__com__Class * templateClass;
399 struct __ecereNameSpace__ecere__sys__OldList templatized;
401 unsigned int isInstanceClass;
402 unsigned int byValueSystemClass;
403 } __attribute__ ((gcc_struct));
405 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Instance;
407 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Application;
409 int main(int _argc, char * _argv[])
412 struct __ecereNameSpace__ecere__com__Instance * module;
413 __attribute__((unused)) struct __ecereNameSpace__ecere__com__Class * _class;
414 __attribute__((unused)) struct __ecereNameSpace__ecere__com__Method * method;
415 __attribute__((unused)) struct __ecereNameSpace__ecere__com__Property * _property;
417 __thisModule = __currentModule = module = __ecereNameSpace__ecere__com____ecere_COM_Initialize((unsigned int)1, _argc, (void *)_argv);
418 __ecereNameSpace__ecere__com__eModule_LoadStatic(module, "ec", 2, (void *)(__ecereDll_Load_ec), (void *)(__ecereDll_Unload_ec));
419 __ecereNameSpace__ecere__com__eModule_LoadStatic(module, "ecere", 2, (void *)(__ecereDll_Load_ecere), (void *)(__ecereDll_Unload_ecere));
420 __ecereRegisterModule_ecp(module);
421 __ecereClass___ecereNameSpace__ecere__com__Application = __ecereNameSpace__ecere__com__eSystem_FindClass(module, "ecere::com::Application");
422 __ecereClass___ecereNameSpace__ecere__com__Module = __ecereNameSpace__ecere__com__eSystem_FindClass(module, "ecere::com::Module");
423 __ecereClass_Context = __ecereNameSpace__ecere__com__eSystem_FindClass(module, "Context");
424 __ecereClass_ModuleImport = __ecereNameSpace__ecere__com__eSystem_FindClass(module, "ModuleImport");
425 __ecereClass_Symbol = __ecereNameSpace__ecere__com__eSystem_FindClass(module, "Symbol");
426 __ecereClass_Type = __ecereNameSpace__ecere__com__eSystem_FindClass(module, "Type");
427 _class = __ecereNameSpace__ecere__com__eSystem_FindClass(module, "ecere::com::Platform");
428 __ecereProp___ecereNameSpace__ecere__com__Platform_char__PTR_ = _property = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, "char *", module);
429 _class = __ecereNameSpace__ecere__com__eSystem_FindClass(module, "ecere::sys::BinaryTree");
430 __ecereClass___ecereNameSpace__ecere__sys__DualPipe = __ecereNameSpace__ecere__com__eSystem_FindClass(module, "ecere::sys::DualPipe");
431 __ecereClass___ecereNameSpace__ecere__sys__File = __ecereNameSpace__ecere__com__eSystem_FindClass(module, "ecere::sys::File");
432 method = __ecereNameSpace__ecere__com__eClass_FindMethod(__ecereClass___ecereNameSpace__ecere__sys__File, "Eof", module);
434 __ecereVMethodID___ecereNameSpace__ecere__sys__File_Eof = method->vid;
435 method = __ecereNameSpace__ecere__com__eClass_FindMethod(__ecereClass___ecereNameSpace__ecere__sys__File, "Puts", module);
437 __ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts = method->vid;
438 method = __ecereNameSpace__ecere__com__eClass_FindMethod(__ecereClass___ecereNameSpace__ecere__sys__File, "Read", module);
440 __ecereVMethodID___ecereNameSpace__ecere__sys__File_Read = method->vid;
441 method = __ecereNameSpace__ecere__com__eClass_FindMethod(__ecereClass___ecereNameSpace__ecere__sys__File, "Seek", module);
443 __ecereVMethodID___ecereNameSpace__ecere__sys__File_Seek = method->vid;
444 method = __ecereNameSpace__ecere__com__eClass_FindMethod(__ecereClass___ecereNameSpace__ecere__sys__File, "Write", module);
446 __ecereVMethodID___ecereNameSpace__ecere__sys__File_Write = method->vid;
447 _class = __ecereNameSpace__ecere__com__eSystem_FindClass(module, "ecere::sys::OldList");
448 __ecereClass___ecereNameSpace__ecere__sys__TempFile = __ecereNameSpace__ecere__com__eSystem_FindClass(module, "ecere::sys::TempFile");
449 __ecereNameSpace__ecere__LoadTranslatedStrings((((void *)0)), "ecp");
450 _class = __ecereNameSpace__ecere__com__eSystem_FindClass(__currentModule, "PrecompApp");
451 __ecereNameSpace__ecere__com__eInstance_Evolve((struct __ecereNameSpace__ecere__com__Instance **)&__currentModule, _class);
452 __thisModule = __currentModule;
453 __ecereCreateModuleInstances_ecp();
454 ((void (*)(void *))(void *)((struct __ecereNameSpace__ecere__com__Instance *)(char *)__currentModule)->_vTbl[12])(__currentModule);
455 __ecereDestroyModuleInstances_ecp();
456 __ecereNameSpace__ecere__UnloadTranslatedStrings("ecp");
457 _class = __ecereNameSpace__ecere__com__eSystem_FindClass(__currentModule, "ecere::com::Application");
458 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;
459 (__ecereNameSpace__ecere__com__eInstance_DecRef(__currentModule), __currentModule = 0);