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 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_Puts;
53 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_Read;
55 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_Seek;
57 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_Write;
59 void __ecereCreateModuleInstances_ecp();
61 void __ecereDestroyModuleInstances_ecp();
63 struct __ecereNameSpace__ecere__sys__OldList
70 } __attribute__ ((gcc_struct));
72 struct __ecereNameSpace__ecere__sys__BTNode;
76 struct __ecereNameSpace__ecere__com__DataValue
91 } __attribute__ ((gcc_struct)) __anon1;
92 } __attribute__ ((gcc_struct));
94 struct __ecereNameSpace__ecere__com__SerialBuffer
96 unsigned char * _buffer;
100 } __attribute__ ((gcc_struct));
102 extern void * __ecereNameSpace__ecere__com__eSystem_New(unsigned int size);
104 extern void * __ecereNameSpace__ecere__com__eSystem_New0(unsigned int size);
106 extern void * __ecereNameSpace__ecere__com__eSystem_Renew(void * memory, unsigned int size);
108 extern void * __ecereNameSpace__ecere__com__eSystem_Renew0(void * memory, unsigned int size);
110 extern void __ecereNameSpace__ecere__com__eSystem_Delete(void * memory);
112 extern void __ecereNameSpace__ecere__LoadTranslatedStrings(const char * moduleName, const char * name);
114 extern void __ecereNameSpace__ecere__UnloadTranslatedStrings(const char * name);
116 struct __ecereNameSpace__ecere__com__Class;
118 struct __ecereNameSpace__ecere__com__Instance
121 struct __ecereNameSpace__ecere__com__Class * _class;
123 } __attribute__ ((gcc_struct));
125 extern long long __ecereNameSpace__ecere__com__eClass_GetProperty(struct __ecereNameSpace__ecere__com__Class * _class, const char * name);
127 extern void __ecereNameSpace__ecere__com__eClass_SetProperty(struct __ecereNameSpace__ecere__com__Class * _class, const char * name, long long value);
129 struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Application;
131 struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Module;
133 struct __ecereNameSpace__ecere__com__Class * __ecereClass_Context;
135 struct __ecereNameSpace__ecere__com__Class * __ecereClass_ModuleImport;
137 struct __ecereNameSpace__ecere__com__Class * __ecereClass_Symbol;
139 struct __ecereNameSpace__ecere__com__Class * __ecereClass_Type;
141 struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__DualPipe;
143 struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__File;
145 struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__TempFile;
147 extern void __ecereNameSpace__ecere__com__eInstance_SetMethod(struct __ecereNameSpace__ecere__com__Instance * instance, const char * name, void * function);
149 extern void __ecereNameSpace__ecere__com__eInstance_IncRef(struct __ecereNameSpace__ecere__com__Instance * instance);
151 extern void __ecereNameSpace__ecere__com__eInstance_Evolve(struct __ecereNameSpace__ecere__com__Instance ** instancePtr, struct __ecereNameSpace__ecere__com__Class * _class);
153 extern void __ecereNameSpace__ecere__com__eInstance_DecRef(struct __ecereNameSpace__ecere__com__Instance * instance);
155 struct __ecereNameSpace__ecere__com__Property;
157 struct __ecereNameSpace__ecere__com__Property
159 struct __ecereNameSpace__ecere__com__Property * prev;
160 struct __ecereNameSpace__ecere__com__Property * next;
162 unsigned int isProperty;
165 struct __ecereNameSpace__ecere__com__Class * _class;
166 const char * dataTypeString;
167 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
168 struct Type * dataType;
169 void (* Set)(void * , int);
170 int (* Get)(void * );
171 unsigned int (* IsSet)(void * );
175 unsigned int conversion;
176 unsigned int watcherOffset;
177 const char * category;
178 unsigned int compiled;
179 unsigned int selfWatchable;
180 unsigned int isWatchable;
181 } __attribute__ ((gcc_struct));
183 extern void __ecereNameSpace__ecere__com__eInstance_FireSelfWatchers(struct __ecereNameSpace__ecere__com__Instance * instance, struct __ecereNameSpace__ecere__com__Property * _property);
185 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);
187 extern void __ecereNameSpace__ecere__com__eInstance_Watch(void * instance, struct __ecereNameSpace__ecere__com__Property * _property, void * object, void (* callback)(void * , void * ));
189 extern void __ecereNameSpace__ecere__com__eInstance_FireWatchers(struct __ecereNameSpace__ecere__com__Instance * instance, struct __ecereNameSpace__ecere__com__Property * _property);
191 struct __ecereNameSpace__ecere__com__Property * __ecereProp___ecereNameSpace__ecere__com__Platform_char__PTR_;
193 struct __ecereNameSpace__ecere__sys__BinaryTree;
195 struct __ecereNameSpace__ecere__sys__BinaryTree
197 struct __ecereNameSpace__ecere__sys__BTNode * root;
199 int (* CompareKey)(struct __ecereNameSpace__ecere__sys__BinaryTree * tree, uintptr_t a, uintptr_t b);
200 void (* FreeKey)(void * key);
201 } __attribute__ ((gcc_struct));
203 struct __ecereNameSpace__ecere__com__Method;
205 struct __ecereNameSpace__ecere__com__Method
208 struct __ecereNameSpace__ecere__com__Method * parent;
209 struct __ecereNameSpace__ecere__com__Method * left;
210 struct __ecereNameSpace__ecere__com__Method * right;
215 struct __ecereNameSpace__ecere__com__Class * _class;
217 const char * dataTypeString;
218 struct Type * dataType;
220 } __attribute__ ((gcc_struct));
222 struct __ecereNameSpace__ecere__com__Module;
224 static struct __ecereNameSpace__ecere__com__Instance * __currentModule;
226 struct __ecereNameSpace__ecere__com__Instance * __thisModule;
228 unsigned int __ecereDll_Load_ec(struct __ecereNameSpace__ecere__com__Instance * module);
230 unsigned int __ecereDll_Unload_ec(struct __ecereNameSpace__ecere__com__Instance * module);
232 unsigned int __ecereDll_Load_ecere(struct __ecereNameSpace__ecere__com__Instance * module);
234 unsigned int __ecereDll_Unload_ecere(struct __ecereNameSpace__ecere__com__Instance * module);
236 void __ecereRegisterModule_ecp(struct __ecereNameSpace__ecere__com__Instance * module);
238 void __ecereUnregisterModule_ecp(struct __ecereNameSpace__ecere__com__Instance * module);
240 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));
242 extern struct __ecereNameSpace__ecere__com__Class * __ecereNameSpace__ecere__com__eSystem_FindClass(struct __ecereNameSpace__ecere__com__Instance * module, const char * name);
244 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);
246 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);
248 struct __ecereNameSpace__ecere__com__Application;
250 extern struct __ecereNameSpace__ecere__com__Instance * __ecereNameSpace__ecere__com____ecere_COM_Initialize(unsigned int guiApp, int argc, char * argv[]);
252 struct __ecereNameSpace__ecere__com__NameSpace;
254 struct __ecereNameSpace__ecere__com__NameSpace
257 struct __ecereNameSpace__ecere__com__NameSpace * btParent;
258 struct __ecereNameSpace__ecere__com__NameSpace * left;
259 struct __ecereNameSpace__ecere__com__NameSpace * right;
261 struct __ecereNameSpace__ecere__com__NameSpace * parent;
262 struct __ecereNameSpace__ecere__sys__BinaryTree nameSpaces;
263 struct __ecereNameSpace__ecere__sys__BinaryTree classes;
264 struct __ecereNameSpace__ecere__sys__BinaryTree defines;
265 struct __ecereNameSpace__ecere__sys__BinaryTree functions;
266 } __attribute__ ((gcc_struct));
268 struct __ecereNameSpace__ecere__com__Application
273 unsigned int isGUIApp;
274 struct __ecereNameSpace__ecere__sys__OldList allModules;
275 char * parsedCommand;
276 struct __ecereNameSpace__ecere__com__NameSpace systemNameSpace;
277 } __attribute__ ((gcc_struct));
279 struct __ecereNameSpace__ecere__com__Module
281 struct __ecereNameSpace__ecere__com__Instance * application;
282 struct __ecereNameSpace__ecere__sys__OldList classes;
283 struct __ecereNameSpace__ecere__sys__OldList defines;
284 struct __ecereNameSpace__ecere__sys__OldList functions;
285 struct __ecereNameSpace__ecere__sys__OldList modules;
286 struct __ecereNameSpace__ecere__com__Instance * prev;
287 struct __ecereNameSpace__ecere__com__Instance * next;
293 struct __ecereNameSpace__ecere__com__NameSpace privateNameSpace;
294 struct __ecereNameSpace__ecere__com__NameSpace publicNameSpace;
295 } __attribute__ ((gcc_struct));
297 void __ecereRegisterModule_ecp_main(struct __ecereNameSpace__ecere__com__Instance * module)
299 struct __ecereNameSpace__ecere__com__Class __attribute__((unused)) * class;
303 void __ecereUnregisterModule_ecp_main(struct __ecereNameSpace__ecere__com__Instance * module)
308 struct __ecereNameSpace__ecere__com__DataMember;
310 struct __ecereNameSpace__ecere__com__ClassTemplateArgument
316 const char * dataTypeString;
317 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
318 } __attribute__ ((gcc_struct)) __anon1;
319 struct __ecereNameSpace__ecere__com__DataValue expression;
322 const char * memberString;
325 struct __ecereNameSpace__ecere__com__DataMember * member;
326 struct __ecereNameSpace__ecere__com__Property * prop;
327 struct __ecereNameSpace__ecere__com__Method * method;
328 } __attribute__ ((gcc_struct)) __anon1;
329 } __attribute__ ((gcc_struct)) __anon2;
330 } __attribute__ ((gcc_struct)) __anon1;
331 } __attribute__ ((gcc_struct));
333 struct __ecereNameSpace__ecere__com__DataMember
335 struct __ecereNameSpace__ecere__com__DataMember * prev;
336 struct __ecereNameSpace__ecere__com__DataMember * next;
338 unsigned int isProperty;
341 struct __ecereNameSpace__ecere__com__Class * _class;
342 const char * dataTypeString;
343 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
344 struct Type * dataType;
348 struct __ecereNameSpace__ecere__sys__OldList members;
349 struct __ecereNameSpace__ecere__sys__BinaryTree membersAlpha;
351 short structAlignment;
352 short pointerAlignment;
353 } __attribute__ ((gcc_struct));
355 struct __ecereNameSpace__ecere__com__Class
357 struct __ecereNameSpace__ecere__com__Class * prev;
358 struct __ecereNameSpace__ecere__com__Class * next;
364 unsigned int (* Constructor)(void * );
365 void (* Destructor)(void * );
368 struct __ecereNameSpace__ecere__com__Class * base;
369 struct __ecereNameSpace__ecere__sys__BinaryTree methods;
370 struct __ecereNameSpace__ecere__sys__BinaryTree members;
371 struct __ecereNameSpace__ecere__sys__BinaryTree prop;
372 struct __ecereNameSpace__ecere__sys__OldList membersAndProperties;
373 struct __ecereNameSpace__ecere__sys__BinaryTree classProperties;
374 struct __ecereNameSpace__ecere__sys__OldList derivatives;
378 struct __ecereNameSpace__ecere__com__Instance * module;
379 struct __ecereNameSpace__ecere__com__NameSpace * nameSpace;
380 const char * dataTypeString;
381 struct Type * dataType;
383 int defaultAlignment;
384 void (* Initialize)();
386 struct __ecereNameSpace__ecere__sys__OldList selfWatchers;
387 const char * designerClass;
388 unsigned int noExpansion;
389 const char * defaultProperty;
390 unsigned int comRedefinition;
393 unsigned int internalDecl;
395 unsigned int computeSize;
396 short structAlignment;
397 short pointerAlignment;
398 int destructionWatchOffset;
400 struct __ecereNameSpace__ecere__sys__OldList delayedCPValues;
401 int inheritanceAccess;
402 const char * fullName;
404 struct __ecereNameSpace__ecere__sys__OldList conversions;
405 struct __ecereNameSpace__ecere__sys__OldList templateParams;
406 struct __ecereNameSpace__ecere__com__ClassTemplateArgument * templateArgs;
407 struct __ecereNameSpace__ecere__com__Class * templateClass;
408 struct __ecereNameSpace__ecere__sys__OldList templatized;
410 unsigned int isInstanceClass;
411 unsigned int byValueSystemClass;
412 } __attribute__ ((gcc_struct));
414 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Instance;
416 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Application;
418 int main(int _argc, char * _argv[])
421 struct __ecereNameSpace__ecere__com__Instance * module;
422 __attribute__((unused)) struct __ecereNameSpace__ecere__com__Class * _class;
423 __attribute__((unused)) struct __ecereNameSpace__ecere__com__Method * method;
424 __attribute__((unused)) struct __ecereNameSpace__ecere__com__Property * _property;
426 __thisModule = __currentModule = module = __ecereNameSpace__ecere__com____ecere_COM_Initialize((unsigned int)1, _argc, (void *)_argv);
427 __ecereNameSpace__ecere__com__eModule_LoadStatic(module, "ec", 2, (void *)(__ecereDll_Load_ec), (void *)(__ecereDll_Unload_ec));
428 __ecereNameSpace__ecere__com__eModule_LoadStatic(module, "ecere", 2, (void *)(__ecereDll_Load_ecere), (void *)(__ecereDll_Unload_ecere));
429 __ecereRegisterModule_ecp(module);
430 __ecereClass___ecereNameSpace__ecere__com__Application = __ecereNameSpace__ecere__com__eSystem_FindClass(module, "ecere::com::Application");
431 __ecereClass___ecereNameSpace__ecere__com__Module = __ecereNameSpace__ecere__com__eSystem_FindClass(module, "ecere::com::Module");
432 __ecereClass_Context = __ecereNameSpace__ecere__com__eSystem_FindClass(module, "Context");
433 __ecereClass_ModuleImport = __ecereNameSpace__ecere__com__eSystem_FindClass(module, "ModuleImport");
434 __ecereClass_Symbol = __ecereNameSpace__ecere__com__eSystem_FindClass(module, "Symbol");
435 __ecereClass_Type = __ecereNameSpace__ecere__com__eSystem_FindClass(module, "Type");
436 _class = __ecereNameSpace__ecere__com__eSystem_FindClass(module, "ecere::com::Platform");
437 __ecereProp___ecereNameSpace__ecere__com__Platform_char__PTR_ = _property = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, "char *", module);
438 _class = __ecereNameSpace__ecere__com__eSystem_FindClass(module, "ecere::sys::BinaryTree");
439 __ecereClass___ecereNameSpace__ecere__sys__DualPipe = __ecereNameSpace__ecere__com__eSystem_FindClass(module, "ecere::sys::DualPipe");
440 __ecereClass___ecereNameSpace__ecere__sys__File = __ecereNameSpace__ecere__com__eSystem_FindClass(module, "ecere::sys::File");
441 method = __ecereNameSpace__ecere__com__eClass_FindMethod(__ecereClass___ecereNameSpace__ecere__sys__File, "Eof", module);
443 __ecereVMethodID___ecereNameSpace__ecere__sys__File_Eof = method->vid;
444 method = __ecereNameSpace__ecere__com__eClass_FindMethod(__ecereClass___ecereNameSpace__ecere__sys__File, "Puts", module);
446 __ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts = method->vid;
447 method = __ecereNameSpace__ecere__com__eClass_FindMethod(__ecereClass___ecereNameSpace__ecere__sys__File, "Read", module);
449 __ecereVMethodID___ecereNameSpace__ecere__sys__File_Read = method->vid;
450 method = __ecereNameSpace__ecere__com__eClass_FindMethod(__ecereClass___ecereNameSpace__ecere__sys__File, "Seek", module);
452 __ecereVMethodID___ecereNameSpace__ecere__sys__File_Seek = method->vid;
453 method = __ecereNameSpace__ecere__com__eClass_FindMethod(__ecereClass___ecereNameSpace__ecere__sys__File, "Write", module);
455 __ecereVMethodID___ecereNameSpace__ecere__sys__File_Write = method->vid;
456 _class = __ecereNameSpace__ecere__com__eSystem_FindClass(module, "ecere::sys::OldList");
457 __ecereClass___ecereNameSpace__ecere__sys__TempFile = __ecereNameSpace__ecere__com__eSystem_FindClass(module, "ecere::sys::TempFile");
458 __ecereNameSpace__ecere__LoadTranslatedStrings((((void *)0)), "ecp");
459 _class = __ecereNameSpace__ecere__com__eSystem_FindClass(__currentModule, "PrecompApp");
460 __ecereNameSpace__ecere__com__eInstance_Evolve((struct __ecereNameSpace__ecere__com__Instance **)&__currentModule, _class);
461 __thisModule = __currentModule;
462 __ecereCreateModuleInstances_ecp();
463 ((void (*)(void *))(void *)((struct __ecereNameSpace__ecere__com__Instance *)(char *)__currentModule)->_vTbl[12])(__currentModule);
464 __ecereDestroyModuleInstances_ecp();
465 __ecereNameSpace__ecere__UnloadTranslatedStrings("ecp");
466 _class = __ecereNameSpace__ecere__com__eSystem_FindClass(__currentModule, "ecere::com::Application");
467 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;
468 (__ecereNameSpace__ecere__com__eInstance_DecRef(__currentModule), __currentModule = 0);