1 /* Code generated from eC source file: output.ec */
3 typedef long long int64;
4 typedef unsigned long long uint64;
8 #elif defined(__TINYC__)
10 #define __builtin_va_list va_list
11 #define __builtin_va_start va_start
12 #define __builtin_va_end va_end
14 #define strcasecmp stricmp
15 #define strncasecmp strnicmp
16 #define __declspec(x) __attribute__((x))
20 typedef long long int64;
21 typedef unsigned long long uint64;
23 typedef __int64 int64;
24 typedef unsigned __int64 uint64;
27 #define __ENDIAN_PAD(x) (8 - (x))
29 #define __ENDIAN_PAD(x) 0
32 #include <sys/types.h>
33 extern void * __ecereNameSpace__ecere__com__eSystem_New(unsigned int size);
35 extern void * __ecereNameSpace__ecere__com__eSystem_New0(unsigned int size);
37 extern void * __ecereNameSpace__ecere__com__eSystem_Renew(void * memory, unsigned int size);
39 extern void * __ecereNameSpace__ecere__com__eSystem_Renew0(void * memory, unsigned int size);
41 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__BTNode;
43 struct __ecereNameSpace__ecere__sys__BTNode;
45 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__BinaryTree;
47 struct __ecereNameSpace__ecere__sys__BinaryTree
49 struct __ecereNameSpace__ecere__sys__BTNode * root;
51 int (* CompareKey)(struct __ecereNameSpace__ecere__sys__BinaryTree * tree, uintptr_t a, uintptr_t b);
52 void (* FreeKey)(void * key);
53 } __attribute__ ((gcc_struct));
55 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__OldList;
57 struct __ecereNameSpace__ecere__sys__OldList
64 } __attribute__ ((gcc_struct));
66 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Method;
68 struct __ecereNameSpace__ecere__com__Method
71 struct __ecereNameSpace__ecere__com__Method * parent;
72 struct __ecereNameSpace__ecere__com__Method * left;
73 struct __ecereNameSpace__ecere__com__Method * right;
78 struct __ecereNameSpace__ecere__com__Class * _class;
80 char * dataTypeString;
81 struct Type * dataType;
83 } __attribute__ ((gcc_struct));
85 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Property;
87 struct __ecereNameSpace__ecere__com__Property
89 struct __ecereNameSpace__ecere__com__Property * prev;
90 struct __ecereNameSpace__ecere__com__Property * next;
92 unsigned int isProperty;
95 struct __ecereNameSpace__ecere__com__Class * _class;
96 char * dataTypeString;
97 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
98 struct Type * dataType;
99 void (* Set)(void * , int);
100 int (* Get)(void * );
101 unsigned int (* IsSet)(void * );
105 unsigned int conversion;
106 unsigned int watcherOffset;
108 unsigned int compiled;
109 unsigned int selfWatchable;
110 unsigned int isWatchable;
111 } __attribute__ ((gcc_struct));
113 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_CodePosition;
121 } __attribute__ ((gcc_struct));
123 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Location;
127 struct CodePosition start;
128 struct CodePosition end;
129 } __attribute__ ((gcc_struct));
131 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Attrib;
137 struct __ecereNameSpace__ecere__sys__OldList * attribs;
138 } __attribute__ ((gcc_struct));
140 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_ExtDecl;
149 struct Attrib * attr;
150 } __attribute__ ((gcc_struct));
151 } __attribute__ ((gcc_struct));
153 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_ClassDefinition;
155 struct ClassDefinition
157 struct ClassDefinition * prev;
158 struct ClassDefinition * next;
160 struct Specifier * _class;
161 struct __ecereNameSpace__ecere__sys__OldList * baseSpecs;
162 struct __ecereNameSpace__ecere__sys__OldList * definitions;
163 struct Symbol * symbol;
164 struct Location blockStart;
165 struct Location nameLoc;
168 unsigned int deleteWatchable;
169 } __attribute__ ((gcc_struct));
171 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Context;
175 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Instantiation;
179 struct Instantiation * prev;
180 struct Instantiation * next;
182 struct Specifier * _class;
183 struct Expression * exp;
184 struct __ecereNameSpace__ecere__sys__OldList * members;
185 struct Symbol * symbol;
186 unsigned int fullSet;
187 unsigned int isConstant;
188 unsigned char * data;
189 struct Location nameLoc;
190 struct Location insideLoc;
192 } __attribute__ ((gcc_struct));
194 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Declaration;
198 struct Declaration * prev;
199 struct Declaration * next;
206 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
207 struct __ecereNameSpace__ecere__sys__OldList * declarators;
208 } __attribute__ ((gcc_struct));
209 struct Instantiation * inst;
212 struct Identifier * id;
213 struct Expression * exp;
214 } __attribute__ ((gcc_struct));
215 } __attribute__ ((gcc_struct));
216 struct Specifier * extStorage;
217 struct Symbol * symbol;
219 } __attribute__ ((gcc_struct));
221 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Statement;
225 struct Statement * prev;
226 struct Statement * next;
231 struct __ecereNameSpace__ecere__sys__OldList * expressions;
234 struct Identifier * id;
235 struct Statement * stmt;
236 } __attribute__ ((gcc_struct)) labeled;
239 struct Expression * exp;
240 struct Statement * stmt;
241 } __attribute__ ((gcc_struct)) caseStmt;
244 struct __ecereNameSpace__ecere__sys__OldList * declarations;
245 struct __ecereNameSpace__ecere__sys__OldList * statements;
246 struct Context * context;
247 unsigned int isSwitch;
248 } __attribute__ ((gcc_struct)) compound;
251 struct __ecereNameSpace__ecere__sys__OldList * exp;
252 struct Statement * stmt;
253 struct Statement * elseStmt;
254 } __attribute__ ((gcc_struct)) ifStmt;
257 struct __ecereNameSpace__ecere__sys__OldList * exp;
258 struct Statement * stmt;
259 } __attribute__ ((gcc_struct)) switchStmt;
262 struct __ecereNameSpace__ecere__sys__OldList * exp;
263 struct Statement * stmt;
264 } __attribute__ ((gcc_struct)) whileStmt;
267 struct __ecereNameSpace__ecere__sys__OldList * exp;
268 struct Statement * stmt;
269 } __attribute__ ((gcc_struct)) doWhile;
272 struct Statement * init;
273 struct Statement * check;
274 struct __ecereNameSpace__ecere__sys__OldList * increment;
275 struct Statement * stmt;
276 } __attribute__ ((gcc_struct)) forStmt;
279 struct Identifier * id;
280 } __attribute__ ((gcc_struct)) gotoStmt;
283 struct Specifier * spec;
285 struct __ecereNameSpace__ecere__sys__OldList * inputFields;
286 struct __ecereNameSpace__ecere__sys__OldList * outputFields;
287 struct __ecereNameSpace__ecere__sys__OldList * clobberedFields;
288 } __attribute__ ((gcc_struct)) asmStmt;
291 struct Expression * watcher;
292 struct Expression * object;
293 struct __ecereNameSpace__ecere__sys__OldList * watches;
294 } __attribute__ ((gcc_struct)) _watch;
297 struct Identifier * id;
298 struct __ecereNameSpace__ecere__sys__OldList * exp;
299 struct __ecereNameSpace__ecere__sys__OldList * filter;
300 struct Statement * stmt;
301 } __attribute__ ((gcc_struct)) forEachStmt;
302 struct Declaration * decl;
303 } __attribute__ ((gcc_struct));
304 } __attribute__ ((gcc_struct));
306 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_TypeName;
310 struct TypeName * prev;
311 struct TypeName * next;
313 struct __ecereNameSpace__ecere__sys__OldList * qualifiers;
314 struct Declarator * declarator;
316 struct Expression * bitCount;
317 } __attribute__ ((gcc_struct));
319 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Initializer;
323 struct Initializer * prev;
324 struct Initializer * next;
329 struct Expression * exp;
330 struct __ecereNameSpace__ecere__sys__OldList * list;
331 } __attribute__ ((gcc_struct));
332 unsigned int isConstant;
333 } __attribute__ ((gcc_struct));
335 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__DataValue;
337 struct __ecereNameSpace__ecere__com__DataValue
352 } __attribute__ ((gcc_struct));
353 } __attribute__ ((gcc_struct));
355 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Expression;
359 struct Expression * prev;
360 struct Expression * next;
368 struct Identifier * identifier;
369 } __attribute__ ((gcc_struct));
370 struct Statement * compound;
371 struct Instantiation * instance;
373 struct __ecereNameSpace__ecere__sys__OldList * list;
376 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
377 struct Declarator * decl;
378 } __attribute__ ((gcc_struct)) _classExp;
381 struct Identifier * id;
382 } __attribute__ ((gcc_struct)) classData;
385 struct Expression * exp;
386 struct __ecereNameSpace__ecere__sys__OldList * arguments;
387 struct Location argLoc;
388 } __attribute__ ((gcc_struct)) call;
391 struct Expression * exp;
392 struct __ecereNameSpace__ecere__sys__OldList * index;
393 } __attribute__ ((gcc_struct)) index;
396 struct Expression * exp;
397 struct Identifier * member;
399 unsigned int thisPtr;
400 } __attribute__ ((gcc_struct)) member;
404 struct Expression * exp1;
405 struct Expression * exp2;
406 } __attribute__ ((gcc_struct)) op;
407 struct TypeName * typeName;
408 struct Specifier * _class;
411 struct TypeName * typeName;
412 struct Expression * exp;
413 } __attribute__ ((gcc_struct)) cast;
416 struct Expression * cond;
417 struct __ecereNameSpace__ecere__sys__OldList * exp;
418 struct Expression * elseExp;
419 } __attribute__ ((gcc_struct)) cond;
422 struct TypeName * typeName;
423 struct Expression * size;
424 } __attribute__ ((gcc_struct)) _new;
427 struct TypeName * typeName;
428 struct Expression * size;
429 struct Expression * exp;
430 } __attribute__ ((gcc_struct)) _renew;
434 struct Identifier * id;
435 } __attribute__ ((gcc_struct)) db;
438 struct Expression * ds;
439 struct Expression * name;
440 } __attribute__ ((gcc_struct)) dbopen;
443 struct TypeName * typeName;
444 struct Initializer * initializer;
445 } __attribute__ ((gcc_struct)) initializer;
448 struct Expression * exp;
449 struct TypeName * typeName;
450 } __attribute__ ((gcc_struct)) vaArg;
451 } __attribute__ ((gcc_struct));
452 unsigned int debugValue;
453 struct __ecereNameSpace__ecere__com__DataValue val;
455 unsigned int hasAddress;
456 struct Type * expType;
457 struct Type * destType;
460 unsigned int byReference;
461 unsigned int isConstant;
462 unsigned int addedThis;
463 unsigned int needCast;
464 unsigned int thisPtr;
465 } __attribute__ ((gcc_struct));
467 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_TemplateDatatype;
469 struct TemplateDatatype
471 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
472 struct Declarator * decl;
473 } __attribute__ ((gcc_struct));
475 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_TemplateArgument;
477 struct TemplateArgument;
479 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_TemplateParameter;
481 struct TemplateParameter
483 struct TemplateParameter * prev;
484 struct TemplateParameter * next;
487 struct Identifier * identifier;
490 struct TemplateDatatype * dataType;
492 } __attribute__ ((gcc_struct));
493 struct TemplateArgument * defaultArgument;
494 char * dataTypeString;
495 struct Type * baseType;
496 } __attribute__ ((gcc_struct));
498 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Specifier;
502 struct Specifier * prev;
503 struct Specifier * next;
511 struct ExtDecl * extDecl;
513 struct Symbol * symbol;
514 struct __ecereNameSpace__ecere__sys__OldList * templateArgs;
515 } __attribute__ ((gcc_struct));
518 struct Identifier * id;
519 struct __ecereNameSpace__ecere__sys__OldList * list;
520 struct __ecereNameSpace__ecere__sys__OldList * baseSpecs;
521 struct __ecereNameSpace__ecere__sys__OldList * definitions;
522 unsigned int addNameSpace;
523 struct Context * ctx;
524 struct ExtDecl * extDeclStruct;
525 } __attribute__ ((gcc_struct));
526 struct Expression * expression;
527 struct Specifier * _class;
528 struct TemplateParameter * templateParameter;
529 } __attribute__ ((gcc_struct));
530 } __attribute__ ((gcc_struct));
532 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Identifier;
536 struct Identifier * prev;
537 struct Identifier * next;
539 struct Symbol * classSym;
540 struct Specifier * _class;
542 struct Identifier * badID;
543 } __attribute__ ((gcc_struct));
545 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Pointer;
549 struct Pointer * prev;
550 struct Pointer * next;
552 struct __ecereNameSpace__ecere__sys__OldList * qualifiers;
553 struct Pointer * pointer;
554 } __attribute__ ((gcc_struct));
556 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Declarator;
560 struct Declarator * prev;
561 struct Declarator * next;
564 struct Symbol * symbol;
565 struct Declarator * declarator;
568 struct Identifier * identifier;
571 struct Expression * exp;
572 struct Expression * posExp;
573 struct Attrib * attrib;
574 } __attribute__ ((gcc_struct)) structDecl;
577 struct Expression * exp;
578 struct Specifier * enumClass;
579 } __attribute__ ((gcc_struct)) array;
582 struct __ecereNameSpace__ecere__sys__OldList * parameters;
583 } __attribute__ ((gcc_struct)) function;
586 struct Pointer * pointer;
587 } __attribute__ ((gcc_struct)) pointer;
590 struct ExtDecl * extended;
591 } __attribute__ ((gcc_struct)) extended;
592 } __attribute__ ((gcc_struct));
593 } __attribute__ ((gcc_struct));
595 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_FunctionDefinition;
597 struct FunctionDefinition
599 struct FunctionDefinition * prev;
600 struct FunctionDefinition * next;
602 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
603 struct Declarator * declarator;
604 struct __ecereNameSpace__ecere__sys__OldList * declarations;
605 struct Statement * body;
606 struct __ecereNameSpace__ecere__com__Class * _class;
607 struct __ecereNameSpace__ecere__sys__OldList attached;
610 struct Symbol * propSet;
612 unsigned int propertyNoThis;
613 } __attribute__ ((gcc_struct));
615 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_DBTableDef;
619 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_External;
623 struct External * prev;
624 struct External * next;
627 struct Symbol * symbol;
630 struct FunctionDefinition * function;
631 struct ClassDefinition * _class;
632 struct Declaration * declaration;
634 struct Identifier * id;
635 struct DBTableDef * table;
636 } __attribute__ ((gcc_struct));
638 } __attribute__ ((gcc_struct));
640 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_ModuleImport;
644 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_ClassImport;
648 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Symbol;
653 struct Symbol * parent;
654 struct Symbol * left;
655 struct Symbol * right;
660 struct __ecereNameSpace__ecere__com__Method * method;
661 struct __ecereNameSpace__ecere__com__Property * _property;
662 struct __ecereNameSpace__ecere__com__Class * registered;
663 } __attribute__ ((gcc_struct));
670 struct External * pointerExternal;
671 struct External * structExternal;
672 } __attribute__ ((gcc_struct));
675 struct External * externalGet;
676 struct External * externalSet;
677 struct External * externalPtr;
678 struct External * externalIsSet;
679 } __attribute__ ((gcc_struct));
682 struct External * methodExternal;
683 struct External * methodCodeExternal;
684 } __attribute__ ((gcc_struct));
685 } __attribute__ ((gcc_struct));
686 unsigned int imported;
687 unsigned int declaredStructSym;
688 struct __ecereNameSpace__ecere__com__Class * _class;
689 unsigned int declaredStruct;
690 unsigned int needConstructor;
691 unsigned int needDestructor;
692 char * constructorName;
695 char * destructorName;
696 struct ModuleImport * module;
697 struct ClassImport * _import;
698 struct Location nameLoc;
699 unsigned int isParam;
700 unsigned int isRemote;
701 unsigned int isStruct;
702 unsigned int fireWatchersDone;
704 unsigned int classData;
705 unsigned int isStatic;
707 struct __ecereNameSpace__ecere__sys__OldList * templateParams;
708 struct __ecereNameSpace__ecere__sys__OldList templatedClasses;
709 struct Context * ctx;
711 struct Expression * propCategory;
712 } __attribute__ ((gcc_struct));
714 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Type;
723 struct Symbol * _class;
726 struct __ecereNameSpace__ecere__sys__OldList members;
728 } __attribute__ ((gcc_struct));
731 struct Type * returnType;
732 struct __ecereNameSpace__ecere__sys__OldList params;
733 struct Symbol * thisClass;
734 unsigned int staticMethod;
735 struct TemplateParameter * thisClassTemplate;
736 } __attribute__ ((gcc_struct));
739 struct __ecereNameSpace__ecere__com__Method * method;
740 struct __ecereNameSpace__ecere__com__Class * methodClass;
741 struct __ecereNameSpace__ecere__com__Class * usedClass;
742 } __attribute__ ((gcc_struct));
745 struct Type * arrayType;
747 struct Expression * arraySizeExp;
748 unsigned int freeExp;
749 struct Symbol * enumClass;
750 } __attribute__ ((gcc_struct));
752 struct TemplateParameter * templateParameter;
753 } __attribute__ ((gcc_struct));
763 unsigned int isSigned : 1;
764 unsigned int constant : 1;
765 unsigned int truth : 1;
766 unsigned int byReference : 1;
767 unsigned int extraParam : 1;
768 unsigned int directClassAccess : 1;
769 unsigned int computing : 1;
770 unsigned int keepCast : 1;
771 unsigned int passAsTemplate : 1;
772 unsigned int dllExport : 1;
773 unsigned int attrStdcall : 1;
774 unsigned int declaredWithStruct : 1;
775 } __attribute__ ((gcc_struct));
777 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Class;
779 struct __ecereNameSpace__ecere__com__Class
781 struct __ecereNameSpace__ecere__com__Class * prev;
782 struct __ecereNameSpace__ecere__com__Class * next;
788 int (* Constructor)(struct __ecereNameSpace__ecere__com__Instance *);
789 void (* Destructor)(struct __ecereNameSpace__ecere__com__Instance *);
792 struct __ecereNameSpace__ecere__com__Class * base;
793 struct __ecereNameSpace__ecere__sys__BinaryTree methods;
794 struct __ecereNameSpace__ecere__sys__BinaryTree members;
795 struct __ecereNameSpace__ecere__sys__BinaryTree prop;
796 struct __ecereNameSpace__ecere__sys__OldList membersAndProperties;
797 struct __ecereNameSpace__ecere__sys__BinaryTree classProperties;
798 struct __ecereNameSpace__ecere__sys__OldList derivatives;
802 struct __ecereNameSpace__ecere__com__Instance * module;
803 struct __ecereNameSpace__ecere__com__NameSpace * nameSpace;
804 char * dataTypeString;
805 struct Type * dataType;
807 int defaultAlignment;
808 void (* Initialize)();
810 struct __ecereNameSpace__ecere__sys__OldList selfWatchers;
811 char * designerClass;
812 unsigned int noExpansion;
813 char * defaultProperty;
814 unsigned int comRedefinition;
816 unsigned int isRemote;
817 unsigned int internalDecl;
819 unsigned int computeSize;
821 int destructionWatchOffset;
823 struct __ecereNameSpace__ecere__sys__OldList delayedCPValues;
824 int inheritanceAccess;
827 struct __ecereNameSpace__ecere__sys__OldList conversions;
828 struct __ecereNameSpace__ecere__sys__OldList templateParams;
829 struct __ecereNameSpace__ecere__com__ClassTemplateArgument * templateArgs;
830 struct __ecereNameSpace__ecere__com__Class * templateClass;
831 struct __ecereNameSpace__ecere__sys__OldList templatized;
833 unsigned int isInstanceClass;
834 unsigned int byValueSystemClass;
835 } __attribute__ ((gcc_struct));
837 extern long long __ecereNameSpace__ecere__com__eClass_GetProperty(struct __ecereNameSpace__ecere__com__Class * _class, char * name);
839 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Instance;
841 struct __ecereNameSpace__ecere__com__Instance
844 struct __ecereNameSpace__ecere__com__Class * _class;
846 } __attribute__ ((gcc_struct));
848 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__DataMember;
850 struct __ecereNameSpace__ecere__com__DataMember
852 struct __ecereNameSpace__ecere__com__DataMember * prev;
853 struct __ecereNameSpace__ecere__com__DataMember * next;
855 unsigned int isProperty;
858 struct __ecereNameSpace__ecere__com__Class * _class;
859 char * dataTypeString;
860 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
861 struct Type * dataType;
865 struct __ecereNameSpace__ecere__sys__OldList members;
866 struct __ecereNameSpace__ecere__sys__BinaryTree membersAlpha;
869 } __attribute__ ((gcc_struct));
871 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__SerialBuffer;
873 struct __ecereNameSpace__ecere__com__SerialBuffer
875 unsigned char * _buffer;
879 } __attribute__ ((gcc_struct));
881 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__ClassTemplateArgument;
883 struct __ecereNameSpace__ecere__com__ClassTemplateArgument
889 char * dataTypeString;
890 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
891 } __attribute__ ((gcc_struct));
892 struct __ecereNameSpace__ecere__com__DataValue expression;
898 struct __ecereNameSpace__ecere__com__DataMember * member;
899 struct __ecereNameSpace__ecere__com__Property * prop;
900 struct __ecereNameSpace__ecere__com__Method * method;
901 } __attribute__ ((gcc_struct));
902 } __attribute__ ((gcc_struct));
903 } __attribute__ ((gcc_struct));
904 } __attribute__ ((gcc_struct));
908 IDENTIFIER = 258, CONSTANT = 259, STRING_LITERAL = 260, SIZEOF = 261, PTR_OP = 262, INC_OP = 263, DEC_OP = 264, LEFT_OP = 265, RIGHT_OP = 266, LE_OP = 267, GE_OP = 268, EQ_OP = 269, NE_OP = 270, AND_OP = 271, OR_OP = 272, MUL_ASSIGN = 273, DIV_ASSIGN = 274, MOD_ASSIGN = 275, ADD_ASSIGN = 276, SUB_ASSIGN = 277, LEFT_ASSIGN = 278, RIGHT_ASSIGN = 279, AND_ASSIGN = 280, XOR_ASSIGN = 281, OR_ASSIGN = 282, TYPE_NAME = 283, TYPEDEF = 284, EXTERN = 285, STATIC = 286, AUTO = 287, REGISTER = 288, CHAR = 289, SHORT = 290, INT = 291, UINT = 292, INT64 = 293, LONG = 294, SIGNED = 295, UNSIGNED = 296, FLOAT = 297, DOUBLE = 298, CONST = 299, VOLATILE = 300, VOID = 301, VALIST = 302, STRUCT = 303, UNION = 304, ENUM = 305, ELLIPSIS = 306, CASE = 307, DEFAULT = 308, IF = 309, SWITCH = 310, WHILE = 311, DO = 312, FOR = 313, GOTO = 314, CONTINUE = 315, BREAK = 316, RETURN = 317, IFX = 318, ELSE = 319, CLASS = 320, THISCLASS = 321, CLASS_NAME = 322, PROPERTY = 323, SETPROP = 324, GETPROP = 325, NEWOP = 326, RENEW = 327, DELETE = 328, EXT_DECL = 329, EXT_STORAGE = 330, IMPORT = 331, DEFINE = 332, VIRTUAL = 333, ATTRIB = 334, PUBLIC = 335, PRIVATE = 336, TYPED_OBJECT = 337, ANY_OBJECT = 338, _INCREF = 339, EXTENSION = 340, ASM = 341, TYPEOF = 342, WATCH = 343, STOPWATCHING = 344, FIREWATCHERS = 345, WATCHABLE = 346, CLASS_DESIGNER = 347, CLASS_NO_EXPANSION = 348, CLASS_FIXED = 349, ISPROPSET = 350, CLASS_DEFAULT_PROPERTY = 351, PROPERTY_CATEGORY = 352, CLASS_DATA = 353, CLASS_PROPERTY = 354, SUBCLASS = 355, NAMESPACE = 356, NEW0OP = 357, RENEW0 = 358, VAARG = 359, DBTABLE = 360, DBFIELD = 361, DBINDEX = 362, DATABASE_OPEN = 363, ALIGNOF = 364, ATTRIB_DEP = 365, __ATTRIB = 366
911 typedef union YYSTYPE
916 struct Identifier * id;
917 struct Expression * exp;
918 struct Specifier * specifier;
919 struct __ecereNameSpace__ecere__sys__OldList * list;
920 struct Enumerator * enumerator;
921 struct Declarator * declarator;
922 struct Pointer * pointer;
923 struct Initializer * initializer;
924 struct InitDeclarator * initDeclarator;
925 struct TypeName * typeName;
926 struct Declaration * declaration;
927 struct Statement * stmt;
928 struct FunctionDefinition * function;
929 struct External * external;
930 struct Context * context;
931 struct AsmField * asmField;
932 struct Attrib * attrib;
933 struct ExtDecl * extDecl;
934 struct Attribute * attribute;
935 struct Instantiation * instance;
936 struct MembersInit * membersInit;
937 struct MemberInit * memberInit;
938 struct ClassFunction * classFunction;
939 struct ClassDefinition * _class;
940 struct ClassDef * classDef;
941 struct PropertyDef * prop;
943 struct Symbol * symbol;
944 struct PropertyWatch * propertyWatch;
945 struct TemplateParameter * templateParameter;
946 struct TemplateArgument * templateArgument;
947 struct TemplateDatatype * templateDatatype;
948 struct DBTableEntry * dbtableEntry;
949 struct DBIndexItem * dbindexItem;
950 struct DBTableDef * dbtableDef;
951 } __attribute__ ((gcc_struct)) YYSTYPE;
953 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Enumerator;
957 struct Enumerator * prev;
958 struct Enumerator * next;
960 struct Identifier * id;
961 struct Expression * exp;
962 } __attribute__ ((gcc_struct));
964 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_InitDeclarator;
966 struct InitDeclarator
968 struct InitDeclarator * prev;
969 struct InitDeclarator * next;
971 struct Declarator * declarator;
972 struct Initializer * initializer;
973 } __attribute__ ((gcc_struct));
975 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_AsmField;
979 struct AsmField * prev;
980 struct AsmField * next;
983 struct Expression * expression;
984 } __attribute__ ((gcc_struct));
986 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Attribute;
990 struct Attribute * prev;
991 struct Attribute * next;
994 struct Expression * exp;
995 } __attribute__ ((gcc_struct));
997 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_ClassFunction;
1001 struct ClassFunction * prev;
1002 struct ClassFunction * next;
1003 struct Location loc;
1004 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
1005 struct Declarator * declarator;
1006 struct __ecereNameSpace__ecere__sys__OldList * declarations;
1007 struct Statement * body;
1008 struct __ecereNameSpace__ecere__com__Class * _class;
1009 struct __ecereNameSpace__ecere__sys__OldList attached;
1012 struct Symbol * propSet;
1013 unsigned int isVirtual;
1014 unsigned int isConstructor;
1015 unsigned int isDestructor;
1016 unsigned int dontMangle;
1019 } __attribute__ ((gcc_struct));
1021 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_MembersInit;
1025 struct MembersInit * prev;
1026 struct MembersInit * next;
1027 struct Location loc;
1031 struct __ecereNameSpace__ecere__sys__OldList * dataMembers;
1032 struct ClassFunction * function;
1033 } __attribute__ ((gcc_struct));
1034 } __attribute__ ((gcc_struct));
1036 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_MemberInit;
1040 struct MemberInit * prev;
1041 struct MemberInit * next;
1042 struct Location loc;
1043 struct Location realLoc;
1044 struct __ecereNameSpace__ecere__sys__OldList * identifiers;
1045 struct Initializer * initializer;
1047 unsigned int variable;
1048 unsigned int takeOutExp;
1049 } __attribute__ ((gcc_struct));
1051 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_PropertyDef;
1055 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_PropertyWatch;
1057 struct PropertyWatch;
1059 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_ClassDef;
1063 struct ClassDef * prev;
1064 struct ClassDef * next;
1065 struct Location loc;
1069 struct Declaration * decl;
1070 struct ClassFunction * function;
1071 struct __ecereNameSpace__ecere__sys__OldList * defProperties;
1072 struct PropertyDef * propertyDef;
1073 struct PropertyWatch * propertyWatch;
1075 struct Identifier * defaultProperty;
1078 struct Identifier * id;
1079 struct Initializer * initializer;
1080 } __attribute__ ((gcc_struct));
1081 } __attribute__ ((gcc_struct));
1084 } __attribute__ ((gcc_struct));
1086 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_DBTableEntry;
1088 struct DBTableEntry;
1090 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_DBIndexItem;
1094 extern YYSTYPE yylval;
1096 extern struct Location yylloc;
1100 unsigned int memoryGuard = 0x0;
1102 void SetMemoryGuard(unsigned int b)
1107 unsigned int GetMemoryGuard()
1112 extern int strcmp(const char * , const char * );
1114 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts;
1116 static void OutputIdentifier(struct Identifier * id, struct __ecereNameSpace__ecere__com__Instance * f)
1122 if(id->_class->type == 8)
1124 if(id->_class->templateParameter && id->_class->templateParameter->identifier && id->_class->templateParameter->identifier->string)
1125 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, id->_class->templateParameter->identifier->string);
1129 if(id->_class->name)
1131 if(!strcmp(id->_class->name, "class"))
1132 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "typed_object");
1134 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, id->_class->name);
1137 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "::");
1140 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, (id && id->string) ? id->string : "(null identifier)");
1143 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_Putc;
1145 static void OutputOperator(int op, struct __ecereNameSpace__ecere__com__Instance * f)
1150 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "++");
1153 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "--");
1156 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "sizeof ");
1159 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "<<");
1162 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ">>");
1165 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "<=");
1168 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ">=");
1171 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "==");
1174 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "!=");
1177 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "&&");
1180 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "||");
1183 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "*=");
1186 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "/=");
1189 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "%=");
1192 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "+=");
1195 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "-=");
1198 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "<<=");
1201 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ">>=");
1204 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "&=");
1207 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "^=");
1210 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "|=");
1225 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, char ch))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Putc])(f, (char)op);
1228 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "delete ");
1233 static void OutputSpecifier(struct Specifier * spec, struct __ecereNameSpace__ecere__com__Instance * f, unsigned int typeName);
1235 static void OutputDeclarator(struct Declarator * decl, struct __ecereNameSpace__ecere__com__Instance * f);
1237 void OutputTypeName(struct TypeName * type, struct __ecereNameSpace__ecere__com__Instance * f, unsigned int typeName)
1239 if(type->qualifiers)
1241 struct Specifier * spec;
1243 for(spec = (*type->qualifiers).first; spec; spec = spec->next)
1245 OutputSpecifier(spec, f, typeName);
1247 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
1250 if(type->declarator)
1252 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
1253 OutputDeclarator(type->declarator, f);
1255 if(!type->qualifiers && !type->declarator)
1256 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "...");
1259 static void OutputStatement(struct Statement * stmt, struct __ecereNameSpace__ecere__com__Instance * f);
1261 static void OutputInstance(struct Instantiation * inst, struct __ecereNameSpace__ecere__com__Instance * f);
1263 extern int printf(char * , ...);
1265 static void OutputInitializer(struct Initializer * initializer, struct __ecereNameSpace__ecere__com__Instance * f);
1267 void OutputExpression(struct Expression * exp, struct __ecereNameSpace__ecere__com__Instance * f)
1272 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "class(");
1273 if(exp->_classExp.specifiers)
1275 struct Specifier * spec;
1277 for(spec = (*exp->_classExp.specifiers).first; spec; spec = spec->next)
1279 OutputSpecifier(spec, f, 0x0);
1281 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
1283 if(exp->_classExp.decl)
1285 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
1286 OutputDeclarator(exp->_classExp.decl, f);
1288 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")");
1292 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "__extension__ (");
1293 OutputStatement(exp->compound, f);
1294 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")");
1297 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "new ");
1298 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
1299 OutputTypeName(exp->_renew.typeName, f, 0x0);
1300 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "[");
1301 OutputExpression(exp->_renew.size, f);
1302 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "]");
1305 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "new0 ");
1306 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
1307 OutputTypeName(exp->_renew.typeName, f, 0x0);
1308 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "[");
1309 OutputExpression(exp->_renew.size, f);
1310 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "]");
1313 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "renew ");
1314 OutputExpression(exp->_renew.exp, f);
1315 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
1316 OutputTypeName(exp->_renew.typeName, f, 0x0);
1317 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "[");
1318 OutputExpression(exp->_renew.size, f);
1319 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "]");
1322 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "renew0 ");
1323 OutputExpression(exp->_renew.exp, f);
1324 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
1325 OutputTypeName(exp->_renew.typeName, f, 0x0);
1326 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "[");
1327 OutputExpression(exp->_renew.size, f);
1328 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "]");
1332 OutputIdentifier(exp->identifier, f);
1336 OutputInstance(exp->instance, f);
1340 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, exp->constant);
1346 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, exp->string);
1351 OutputExpression(exp->op.exp1, f);
1353 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
1355 OutputOperator(exp->op.op, f);
1358 if(exp->op.exp1 || (exp->op.exp2->type == 4 && !exp->op.exp2->op.exp1 && exp->op.exp2->op.op == exp->op.op))
1359 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
1360 OutputExpression(exp->op.exp2, f);
1366 struct Expression * expression;
1369 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "__extension__ (");
1370 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "(");
1373 for(expression = (*exp->list).first; expression; expression = expression->next)
1375 OutputExpression(expression, f);
1376 if(expression->next)
1377 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
1380 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")");
1385 struct Expression * expression;
1388 OutputExpression(exp->index.exp, f);
1389 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "[");
1390 if(exp->index.index)
1391 for(expression = (*exp->index.index).first; expression; expression = expression->next)
1393 OutputExpression(expression, f);
1394 if(expression->next)
1395 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
1397 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "]");
1402 OutputExpression(exp->call.exp, f);
1403 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "(");
1404 if(exp->call.arguments)
1406 struct Expression * expression;
1408 for(expression = (*exp->call.arguments).first; expression; expression = expression->next)
1410 OutputExpression(expression, f);
1411 if(expression->next)
1412 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
1415 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")");
1420 OutputExpression(exp->member.exp, f);
1421 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ".");
1422 if(exp->member.member)
1423 OutputIdentifier(exp->member.member, f);
1426 OutputExpression(exp->member.exp, f);
1427 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "->");
1428 OutputIdentifier(exp->member.member, f);
1431 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "sizeof(");
1432 OutputTypeName(exp->typeName, f, 0x0);
1433 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")");
1436 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "__alignof__(");
1437 OutputTypeName(exp->typeName, f, 0x0);
1438 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")");
1441 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "__extension__ (");
1442 if(exp->initializer.typeName)
1443 OutputTypeName(exp->initializer.typeName, f, 0x0);
1444 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")");
1445 if(exp->initializer.initializer)
1446 OutputInitializer(exp->initializer.initializer, f);
1449 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "(");
1450 OutputTypeName(exp->cast.typeName, f, 0x0);
1451 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")");
1453 OutputExpression(exp->cast.exp, f);
1456 OutputExpression(exp->cond.cond, f);
1457 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ? ");
1459 struct Expression * expression;
1461 for(expression = (*exp->cond.exp).first; expression; expression = expression->next)
1463 OutputExpression(expression, f);
1464 if(expression->next)
1465 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
1468 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " : ");
1469 OutputExpression(exp->cond.elseExp, f);
1472 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "__builtin_va_arg(");
1473 OutputExpression(exp->vaArg.exp, f);
1474 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
1475 OutputTypeName(exp->vaArg.typeName, f, 0x0);
1476 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")");
1479 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "[");
1482 struct Expression * expression;
1484 for(expression = (*exp->list).first; expression; expression = expression->next)
1486 OutputExpression(expression, f);
1487 if(expression->next)
1488 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
1491 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "]");
1496 static void OutputAsmField(struct AsmField * field, struct __ecereNameSpace__ecere__com__Instance * f)
1498 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, field->command);
1499 if(field->expression)
1501 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "(");
1502 OutputExpression(field->expression, f);
1503 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")");
1507 extern char * strchr(const char * , int);
1509 extern char * __ecereNameSpace__ecere__sys__StripLastDirectory(char * string, char * output);
1511 extern char * sourceFile;
1513 extern char * __ecereNameSpace__ecere__sys__PathCat(char * string, char * addedPath);
1515 extern void __ecereNameSpace__ecere__sys__ChangeCh(char * string, char ch1, char ch2);
1517 static void GetSourceName(char * name, const char * src)
1522 if(!strchr(src, '/') && !strchr(src, '\\'))
1523 __ecereNameSpace__ecere__sys__StripLastDirectory(sourceFile, name);
1524 __ecereNameSpace__ecere__sys__PathCat(name, src);
1527 __ecereNameSpace__ecere__sys__PathCat(name, sourceFile);
1528 __ecereNameSpace__ecere__sys__ChangeCh(name, '\\', '/');
1531 extern unsigned int inCompiler;
1533 extern char * GetIncludeFileFromID(int id);
1535 extern char * outputFile;
1537 extern unsigned int outputLineNumbers;
1539 static void OutputDeclaration(struct Declaration * decl, struct __ecereNameSpace__ecere__com__Instance * f);
1541 extern struct __ecereNameSpace__ecere__sys__OldList * MkList(void);
1543 extern struct Declarator * SpecDeclFromString(char * string, struct __ecereNameSpace__ecere__sys__OldList * specs, struct Declarator * baseDecl);
1545 extern struct Declarator * MkDeclaratorIdentifier(struct Identifier * id);
1547 extern struct Identifier * MkIdentifier(char * string);
1549 extern struct __ecereNameSpace__ecere__sys__OldList * CopyList(struct __ecereNameSpace__ecere__sys__OldList * source, void * (* CopyFunction)(void * ));
1551 extern struct Specifier * CopySpecifier(struct Specifier * spec);
1553 extern struct Declarator * PlugDeclarator(struct Declarator * decl, struct Declarator * baseDecl);
1555 extern void ListAdd(struct __ecereNameSpace__ecere__sys__OldList * list, void * item);
1557 extern struct Specifier * MkSpecifierName(char * name);
1559 extern void PrintTypeNoConst(struct Type * type, char * string, unsigned int printName, unsigned int fullName);
1561 extern struct TypeName * MkTypeName(struct __ecereNameSpace__ecere__sys__OldList * qualifiers, struct Declarator * declarator);
1563 extern void InstDeclPassTypeName(struct TypeName * type, unsigned int param);
1565 extern void FreeTypeName(struct TypeName * typeName);
1567 int __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(struct __ecereNameSpace__ecere__com__Instance * this, char * format, ...);
1569 static void OutputStatement(struct Statement * stmt, struct __ecereNameSpace__ecere__com__Instance * f)
1571 char name[274] = "";
1572 char origName[274] = "";
1576 GetSourceName(name, stmt->loc.start.included ? GetIncludeFileFromID(stmt->loc.start.included) : (((void *)0)));
1577 __ecereNameSpace__ecere__sys__PathCat(origName, outputFile);
1578 __ecereNameSpace__ecere__sys__ChangeCh(origName, '\\', '/');
1580 if(inCompiler && outputLineNumbers && stmt->loc.start.line)
1582 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "\n#line %d \"%s\"\n", stmt->loc.start.line, name);
1588 OutputDeclaration(stmt->decl, f);
1591 OutputIdentifier(stmt->labeled.id, f);
1592 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ":\n");
1594 OutputStatement(stmt->labeled.stmt, f);
1597 if(stmt->caseStmt.exp)
1599 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "case ");
1600 OutputExpression(stmt->caseStmt.exp, f);
1601 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ":\n");
1606 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "default:\n");
1609 if(stmt->caseStmt.stmt)
1610 OutputStatement(stmt->caseStmt.stmt, f);
1614 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "{\n");
1616 if(stmt->compound.declarations)
1618 struct Declaration * decl;
1620 for(decl = (*stmt->compound.declarations).first; decl; decl = decl->next)
1622 OutputDeclaration(decl, f);
1625 if(stmt->compound.statements)
1627 struct Statement * statement;
1629 if(stmt->compound.declarations)
1631 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n");
1634 for(statement = (*stmt->compound.statements).first; statement; statement = statement->next)
1636 OutputStatement(statement, f);
1637 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n");
1641 if(inCompiler && outputLineNumbers && stmt->loc.end.line)
1643 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "\n#line %d \"%s\"\n", stmt->loc.end.line, name);
1646 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "}");
1651 if(stmt->expressions)
1653 struct Expression * exp;
1655 for(exp = (*stmt->expressions).first; exp; exp = exp->next)
1657 OutputExpression(exp, f);
1659 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
1662 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ";");
1667 struct Expression * exp;
1669 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "if(");
1670 for(exp = (*stmt->ifStmt.exp).first; exp; exp = exp->next)
1672 OutputExpression(exp, f);
1674 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
1676 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")\n");
1678 if(stmt->ifStmt.stmt)
1679 OutputStatement(stmt->ifStmt.stmt, f);
1680 if(stmt->ifStmt.elseStmt)
1682 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n");
1684 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "else");
1685 if(stmt->ifStmt.elseStmt->type != 4)
1687 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n");
1691 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
1692 OutputStatement(stmt->ifStmt.elseStmt, f);
1698 struct Expression * exp;
1700 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "switch(");
1701 for(exp = (*stmt->switchStmt.exp).first; exp; exp = exp->next)
1703 OutputExpression(exp, f);
1705 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
1707 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")\n");
1709 OutputStatement(stmt->switchStmt.stmt, f);
1714 struct Expression * exp;
1716 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "while(");
1717 for(exp = (*stmt->switchStmt.exp).first; exp; exp = exp->next)
1719 OutputExpression(exp, f);
1721 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
1723 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")\n");
1725 OutputStatement(stmt->whileStmt.stmt, f);
1730 struct Expression * exp;
1732 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "do\n");
1734 OutputStatement(stmt->whileStmt.stmt, f);
1735 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "while(");
1736 for(exp = (*stmt->switchStmt.exp).first; exp; exp = exp->next)
1738 OutputExpression(exp, f);
1740 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
1742 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ");");
1747 struct Expression * exp;
1749 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "for(");
1750 OutputStatement(stmt->forStmt.init, f);
1751 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
1752 OutputStatement(stmt->forStmt.check, f);
1753 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
1754 if(stmt->forStmt.increment)
1756 if(inCompiler && outputLineNumbers && stmt->loc.end.line)
1758 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "\n#line %d \"%s\"\n", stmt->loc.end.line, name);
1761 for(exp = (*stmt->forStmt.increment).first; exp; exp = exp->next)
1763 OutputExpression(exp, f);
1765 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
1768 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")\n");
1770 OutputStatement(stmt->forStmt.stmt, f);
1775 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "goto ");
1776 OutputIdentifier(stmt->gotoStmt.id, f);
1777 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ";");
1781 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "continue;");
1784 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "break;");
1788 struct Expression * exp;
1790 if(inCompiler && memoryGuard)
1792 struct Expression * exp = stmt->expressions ? (*stmt->expressions).last : (((void *)0));
1794 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "{ ");
1795 if(exp && exp->expType)
1797 char string[1024] = "";
1798 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
1799 struct Declarator * decl;
1800 struct TypeName * typeName;
1802 if(exp->expType->kind == 20)
1804 if(exp->expType->templateParameter->dataTypeString)
1805 decl = SpecDeclFromString(exp->expType->templateParameter->dataTypeString, specs, MkDeclaratorIdentifier(MkIdentifier("__ecereReturnVal")));
1806 else if(exp->expType->templateParameter->dataType)
1808 (__ecereNameSpace__ecere__com__eSystem_Delete(specs), specs = 0);
1809 specs = CopyList(exp->expType->templateParameter->dataType->specifiers, CopySpecifier);
1810 decl = PlugDeclarator(exp->expType->templateParameter->dataType->decl, MkDeclaratorIdentifier(MkIdentifier("__ecereReturnVal")));
1814 ListAdd(specs, MkSpecifierName("uint64"));
1815 decl = MkDeclaratorIdentifier(MkIdentifier("__ecereReturnVal"));
1820 PrintTypeNoConst(exp->expType, string, exp->expType->kind == 18 ? 0x1 : 0x0, 0x1);
1821 decl = SpecDeclFromString(string, specs, MkDeclaratorIdentifier(MkIdentifier("__ecereReturnVal")));
1823 typeName = MkTypeName(specs, decl);
1824 InstDeclPassTypeName(typeName, 0x0);
1825 OutputTypeName(typeName, f, 0x0);
1826 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, ";");
1827 FreeTypeName(typeName);
1831 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "return ");
1834 struct Expression * exp = stmt->expressions ? (*stmt->expressions).last : (((void *)0));
1836 if(exp && exp->expType)
1837 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "__ecereReturnVal = ");
1839 if(stmt->expressions)
1841 for(exp = (*stmt->expressions).first; exp; exp = exp->next)
1843 OutputExpression(exp, f);
1845 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
1848 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ";");
1849 if(inCompiler && memoryGuard)
1851 struct Expression * exp = stmt->expressions ? (struct Expression *)(*stmt->expressions).last : (((void *)0));
1853 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " __ecereNameSpace__ecere__com__MemoryGuard_PopLoc();");
1854 if(exp && exp->expType)
1855 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "return __ecereReturnVal;");
1857 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "return;");
1858 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "}");
1864 struct AsmField * field;
1866 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "__asm__ ");
1867 if(stmt->asmStmt.spec)
1868 OutputSpecifier(stmt->asmStmt.spec, f, 0x0);
1869 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "(");
1870 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, stmt->asmStmt.statements);
1871 if(stmt->asmStmt.inputFields || stmt->asmStmt.outputFields || stmt->asmStmt.clobberedFields)
1873 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ":");
1874 if(stmt->asmStmt.inputFields)
1876 for(field = (*stmt->asmStmt.inputFields).first; field; field = field->next)
1879 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ",");
1880 OutputAsmField(field, f);
1884 if(stmt->asmStmt.outputFields || stmt->asmStmt.clobberedFields)
1886 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ":");
1887 if(stmt->asmStmt.outputFields)
1889 for(field = (*stmt->asmStmt.outputFields).first; field; field = field->next)
1892 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ",");
1893 OutputAsmField(field, f);
1897 if(stmt->asmStmt.clobberedFields)
1899 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ":");
1900 for(field = (*stmt->asmStmt.clobberedFields).first; field; field = field->next)
1903 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ",");
1904 OutputAsmField(field, f);
1907 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ");\n");
1912 if(inCompiler && outputLineNumbers && stmt->loc.start.line)
1914 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "\n#line %d \"%s\"\n", outputLine + 2, origName);
1919 static void OutputPointer(struct Pointer * ptr, struct __ecereNameSpace__ecere__com__Instance * f)
1921 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "*");
1924 struct Specifier * spec;
1926 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
1927 for(spec = (*ptr->qualifiers).first; spec; spec = spec->next)
1929 OutputSpecifier(spec, f, 0x0);
1931 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
1936 OutputPointer(ptr->pointer, f);
1940 static void OutputAttrib(struct Attrib * attr, struct __ecereNameSpace__ecere__com__Instance * f);
1942 static void OutputExtDecl(struct ExtDecl * extDecl, struct __ecereNameSpace__ecere__com__Instance * f);
1944 extern void ProcessExpressionType(struct Expression * exp);
1946 extern void ComputeExpression(struct Expression * exp);
1948 static void OutputDeclarator(struct Declarator * decl, struct __ecereNameSpace__ecere__com__Instance * f)
1953 if(decl->declarator)
1955 OutputDeclarator(decl->declarator, f);
1957 if(decl->structDecl.exp)
1959 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " : ");
1960 OutputExpression(decl->structDecl.exp, f);
1962 if(decl->structDecl.posExp)
1964 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " : ");
1965 OutputExpression(decl->structDecl.posExp, f);
1967 if(decl->structDecl.attrib)
1969 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
1970 OutputAttrib(decl->structDecl.attrib, f);
1974 OutputIdentifier(decl->identifier, f);
1977 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "(");
1978 OutputDeclarator(decl->declarator, f);
1979 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")");
1982 if(decl->extended.extended)
1983 OutputExtDecl(decl->extended.extended, f);
1984 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
1985 OutputDeclarator(decl->declarator, f);
1988 OutputDeclarator(decl->declarator, f);
1989 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
1990 if(decl->extended.extended)
1991 OutputExtDecl(decl->extended.extended, f);
1994 if(decl->declarator)
1996 OutputDeclarator(decl->declarator, f);
1998 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "[");
2001 ProcessExpressionType(decl->array.exp);
2002 ComputeExpression(decl->array.exp);
2003 OutputExpression(decl->array.exp, f);
2005 else if(decl->array.enumClass)
2007 struct Symbol * _class = decl->array.enumClass->symbol;
2009 if(_class && _class->registered)
2011 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "%d", (int)__ecereNameSpace__ecere__com__eClass_GetProperty(_class->registered, "enumSize"));
2014 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "]");
2018 struct TypeName * param;
2020 if(decl->declarator)
2021 OutputDeclarator(decl->declarator, f);
2022 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "(");
2023 if(decl->function.parameters && (*decl->function.parameters).first)
2025 for(param = (*decl->function.parameters).first; param; param = param->next)
2027 OutputTypeName(param, f, 0x0);
2029 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
2032 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")");
2036 if(decl->pointer.pointer)
2037 OutputPointer(decl->pointer.pointer, f);
2038 if(decl->declarator)
2040 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
2041 OutputDeclarator(decl->declarator, f);
2047 static void OutputEnumerator(struct Enumerator * enumerator, struct __ecereNameSpace__ecere__com__Instance * f)
2049 OutputIdentifier(enumerator->id, f);
2052 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " = ");
2053 OutputExpression(enumerator->exp, f);
2057 static void OutputAttribute(struct Attribute * attr, struct __ecereNameSpace__ecere__com__Instance * f)
2060 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, attr->attr);
2063 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
2064 OutputExpression(attr->exp, f);
2068 static void OutputAttrib(struct Attrib * attr, struct __ecereNameSpace__ecere__com__Instance * f)
2073 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "__attribute__((");
2076 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "__attribute((");
2079 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "__attribute_deprecated__((");
2084 struct Attribute * attrib;
2086 for(attrib = (*attr->attribs).first; attrib; attrib = attrib->next)
2089 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
2090 OutputAttribute(attrib, f);
2093 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "))");
2096 static void OutputExtDecl(struct ExtDecl * extDecl, struct __ecereNameSpace__ecere__com__Instance * f)
2098 if(extDecl->type == 0 && extDecl->s)
2099 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, extDecl->s);
2100 else if(extDecl->type == 1)
2101 OutputAttrib(extDecl->attr, f);
2104 extern struct Symbol * FindClass(char * name);
2106 static void OutputClassDef(struct ClassDef * def, struct __ecereNameSpace__ecere__com__Instance * f);
2108 static void OutputSpecifier(struct Specifier * spec, struct __ecereNameSpace__ecere__com__Instance * f, unsigned int typeName)
2113 switch(spec->specifier)
2116 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "typedef");
2119 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "extern");
2122 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "static");
2125 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "auto");
2128 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "register");
2131 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "const");
2134 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "volatile");
2137 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "void");
2140 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "char");
2143 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "short");
2146 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "int");
2149 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, typeName ? "uint" : "unsigned int");
2152 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, typeName ? "int64" : "long long");
2155 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "__builtin_va_list");
2158 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "long");
2161 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "float");
2164 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "double");
2167 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "signed");
2170 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "unsigned");
2173 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "typed_object");
2176 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "any_object");
2179 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "class");
2182 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "thisclass");
2188 OutputExtDecl(spec->extDecl, f);
2191 if(spec->name && !strcmp(spec->name, "class"))
2193 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "typed_object");
2197 struct Symbol * symbol = spec->symbol;
2199 if(!symbol && spec->name)
2200 symbol = FindClass(spec->name);
2203 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, symbol->string ? symbol->string : "(null)");
2206 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, spec->name);
2211 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "enum");
2214 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
2215 OutputIdentifier(spec->id, f);
2219 struct Enumerator * enumerator;
2221 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n{\n");
2223 for(enumerator = (*spec->list).first; enumerator; enumerator = enumerator->next)
2225 OutputEnumerator(enumerator, f);
2226 if(enumerator->next)
2227 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
2229 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n}");
2237 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, (spec->type == 3) ? "struct" : "union");
2238 if(spec->extDeclStruct)
2240 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
2241 OutputExtDecl(spec->extDeclStruct, f);
2245 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
2246 OutputIdentifier(spec->id, f);
2248 if(spec->definitions)
2250 struct ClassDef * def;
2252 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n{\n");
2254 for(def = (*spec->definitions).first; def; def = def->next)
2256 OutputClassDef(def, f);
2258 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "} __attribute__ ((gcc_struct))");
2263 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "__typeof(");
2264 OutputExpression(spec->expression, f);
2265 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")");
2268 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "subclass(");
2269 OutputSpecifier(spec->_class, f, 0x0);
2270 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")");
2273 OutputIdentifier(spec->templateParameter->identifier, f);
2278 static void OutputInitializer(struct Initializer * initializer, struct __ecereNameSpace__ecere__com__Instance * f)
2280 char name[274] = "";
2281 char origName[274] = "";
2285 GetSourceName(name, initializer->loc.start.included ? GetIncludeFileFromID(initializer->loc.start.included) : (((void *)0)));
2286 __ecereNameSpace__ecere__sys__PathCat(origName, outputFile);
2287 __ecereNameSpace__ecere__sys__ChangeCh(origName, '\\', '/');
2289 switch(initializer->type)
2293 struct Initializer * init;
2295 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n{\n");
2297 if(inCompiler && outputLineNumbers && initializer->loc.start.line)
2299 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "\n#line %d \"%s\"\n", initializer->loc.start.line, name);
2302 for(init = (*initializer->list).first; init; init = init->next)
2304 OutputInitializer(init, f);
2306 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
2308 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n}");
2309 if(inCompiler && outputLineNumbers && initializer->loc.start.line)
2311 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "\n#line %d \"%s\"\n", initializer->loc.start.line, name);
2318 if(initializer->exp)
2319 OutputExpression(initializer->exp, f);
2324 static void OutputInitDeclarator(struct InitDeclarator * decl, struct __ecereNameSpace__ecere__com__Instance * f)
2326 OutputDeclarator(decl->declarator, f);
2327 if(decl->initializer)
2329 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " = ");
2330 OutputInitializer(decl->initializer, f);
2334 static void OutputDeclaration(struct Declaration * decl, struct __ecereNameSpace__ecere__com__Instance * f)
2336 struct Specifier * spec;
2337 char origName[274] = "";
2343 struct InitDeclarator * d;
2347 __ecereNameSpace__ecere__sys__PathCat(origName, outputFile);
2348 __ecereNameSpace__ecere__sys__ChangeCh(origName, '\\', '/');
2350 if(decl->declarators && (*decl->declarators).first)
2352 for(d = (*decl->declarators).first; d; d = d->next)
2355 char name[274] = "";
2357 GetSourceName(name, decl->loc.start.included ? GetIncludeFileFromID(decl->loc.start.included) : (((void *)0)));
2358 if(inCompiler && outputLineNumbers && decl->loc.start.line)
2360 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "\n#line %d \"%s\"\n", decl->loc.start.line, name);
2366 if(decl->specifiers)
2368 unsigned int inTypeDef = 0x0;
2370 for(spec = (*decl->specifiers).first; spec; spec = spec->next)
2372 if(spec->type == 0 && spec->specifier == TYPEDEF)
2374 OutputSpecifier(spec, f, inTypeDef && !spec->next);
2376 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
2379 if(decl->declarators && (*decl->declarators).first)
2381 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
2382 for(d = (*decl->declarators).first; d; d = d->next)
2384 OutputInitDeclarator(d, f);
2386 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
2393 if(decl->specifiers)
2395 for(spec = (*decl->specifiers).first; spec; spec = spec->next)
2397 OutputSpecifier(spec, f, 0x0);
2399 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
2402 if(decl->declarators)
2404 struct Declarator * d;
2406 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
2407 for(d = (*decl->declarators).first; d; d = d->next)
2409 OutputDeclarator(d, f);
2411 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
2414 if(decl->extStorage)
2416 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
2417 OutputSpecifier(decl->extStorage, f, 0x0);
2424 OutputInstance(decl->inst, f);
2430 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ";\n");
2432 if(inCompiler && outputLineNumbers && decl->loc.start.line && decl->type == 1)
2434 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "\n#line %d \"%s\"\n", outputLine + 2, origName);
2439 static struct FunctionDefinition * curFunction;
2441 extern struct Identifier * GetDeclId(struct Declarator * decl);
2443 static void OutputFunction(struct FunctionDefinition * func, struct __ecereNameSpace__ecere__com__Instance * f)
2445 struct FunctionDefinition * oldFunc = curFunction;
2448 if(func->specifiers)
2450 struct Specifier * spec;
2452 for(spec = (*func->specifiers).first; spec; spec = spec->next)
2454 OutputSpecifier(spec, f, 0x0);
2456 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
2458 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
2460 if(func->declarator)
2461 OutputDeclarator(func->declarator, f);
2462 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n");
2464 if(func->declarations)
2466 struct Declaration * decl;
2468 for(decl = (*func->declarations).first; decl; decl = decl->next)
2470 OutputDeclaration(decl, f);
2472 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n");
2477 if(inCompiler && memoryGuard)
2479 char name[1024] = "";
2480 struct Identifier * id = GetDeclId(func->declarator);
2482 GetSourceName(name, func->loc.start.included ? GetIncludeFileFromID(func->loc.start.included) : (((void *)0)));
2483 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "{\n");
2484 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " __ecereNameSpace__ecere__com__MemoryGuard_PushLoc(\"%s:%s\");\n", name, id->string);
2487 OutputStatement(func->body, f);
2488 if(inCompiler && memoryGuard)
2490 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " __ecereNameSpace__ecere__com__MemoryGuard_PopLoc();\n");
2491 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "}\n");
2494 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n");
2497 curFunction = oldFunc;
2500 static void OutputMemberInit(struct MemberInit * init, struct __ecereNameSpace__ecere__com__Instance * f)
2502 if(init->identifiers)
2504 if((*init->identifiers).count > 1)
2506 struct Identifier * id;
2508 for(id = (*init->identifiers).first; id; id = id->next)
2510 OutputIdentifier(id, f);
2512 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ".");
2515 else if((*init->identifiers).first)
2516 OutputIdentifier((*init->identifiers).first, f);
2517 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " = ");
2519 if(init->initializer)
2520 OutputInitializer(init->initializer, f);
2523 static void OutputClassFunction(struct ClassFunction * func, struct __ecereNameSpace__ecere__com__Instance * f);
2525 static void OutputMembersInit(struct MembersInit * init, struct __ecereNameSpace__ecere__com__Instance * f)
2531 struct MemberInit * member;
2533 if(init->dataMembers)
2535 for(member = (*init->dataMembers).first; member; member = member->next)
2537 OutputMemberInit(member, f);
2539 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
2545 OutputClassFunction(init->function, f);
2550 static void OutputInstance(struct Instantiation * inst, struct __ecereNameSpace__ecere__com__Instance * f)
2553 OutputSpecifier(inst->_class, f, 0x0);
2556 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
2557 OutputExpression(inst->exp, f);
2559 if(inst->members && (*inst->members).count > 1)
2561 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n{\n");
2564 else if(inst->members)
2565 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " { ");
2567 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "{");
2570 struct MembersInit * init;
2572 for(init = (*inst->members).first; init; init = init->next)
2574 OutputMembersInit(init, f);
2575 if(init->type == 0 && init->next)
2577 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ";\n");
2583 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " }");
2585 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "}");
2588 static void OutputClassFunction(struct ClassFunction * func, struct __ecereNameSpace__ecere__com__Instance * f)
2590 if(func->specifiers)
2592 struct Specifier * spec;
2594 for(spec = (*func->specifiers).first; spec; spec = spec->next)
2596 OutputSpecifier(spec, f, 0x0);
2598 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
2600 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
2602 if(func->declarator)
2603 OutputDeclarator(func->declarator, f);
2604 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n");
2606 if(func->declarations)
2608 struct Declaration * decl;
2610 for(decl = (*func->declarations).first; decl; decl = decl->next)
2612 OutputDeclaration(decl, f);
2614 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n");
2619 OutputStatement(func->body, f);
2620 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n");
2624 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ";");
2627 static void OutputClassDef(struct ClassDef * def, struct __ecereNameSpace__ecere__com__Instance * f)
2634 OutputDeclaration(def->decl, f);
2635 if(def->next && def->next->type != 2)
2637 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n");
2644 struct MemberInit * init;
2646 for(init = (*def->defProperties).first; init; init = init->next)
2648 OutputMemberInit(init, f);
2650 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
2652 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ";\n\n");
2657 OutputClassFunction(def->function, f);
2658 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n");
2664 static void OutputClass(struct ClassDefinition * _class, struct __ecereNameSpace__ecere__com__Instance * f)
2666 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "class ");
2667 OutputSpecifier(_class->_class, f, 0x0);
2668 if(_class->baseSpecs)
2670 struct Specifier * spec;
2672 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " : ");
2673 for(spec = (*_class->baseSpecs).first; spec; spec = spec->next)
2675 OutputSpecifier(spec, f, 0x0);
2678 if(_class->definitions)
2680 struct ClassDef * def;
2682 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n{\n");
2684 for(def = (*_class->definitions).first; def; def = def->next)
2686 OutputClassDef(def, f);
2688 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "}\n");
2692 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ";");
2695 void OutputTree(struct __ecereNameSpace__ecere__sys__OldList * ast, struct __ecereNameSpace__ecere__com__Instance * f)
2697 struct External * external;
2700 for(external = ast->first; external; external = external->next)
2702 switch(external->type)
2705 OutputFunction(external->function, f);
2706 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n");
2710 OutputDeclaration(external->declaration, f);
2711 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n");
2715 OutputClass(external->_class, f);
2716 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n");
2723 extern char * __ecereNameSpace__ecere__sys__TrimRSpaces(char * string, char * output);
2725 extern void * __ecereNameSpace__ecere__com__eInstance_New(struct __ecereNameSpace__ecere__com__Class * _class);
2727 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__TempFile;
2729 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_GetSize;
2731 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_Seek;
2733 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_Read;
2735 extern void __ecereNameSpace__ecere__com__eInstance_DecRef(struct __ecereNameSpace__ecere__com__Instance * instance);
2737 char * StringFromSpecDecl(struct __ecereNameSpace__ecere__sys__OldList * specs, struct Declarator * decl)
2740 struct TypeName * typeName = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_TypeName);
2741 struct __ecereNameSpace__ecere__com__Instance * f = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass___ecereNameSpace__ecere__sys__TempFile);
2744 typeName->qualifiers = specs;
2745 typeName->declarator = decl;
2746 OutputTypeName(typeName, f, 0x1);
2747 ((typeName ? (__ecereClass_TypeName->Destructor ? __ecereClass_TypeName->Destructor(typeName) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(typeName)) : 0), typeName = 0);
2748 size = ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_GetSize])(f);
2749 string = __ecereNameSpace__ecere__com__eSystem_New(sizeof(char) * (size + 1));
2750 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, int pos, int mode))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Seek])(f, 0, 0);
2751 ((int (*)(struct __ecereNameSpace__ecere__com__Instance *, void * buffer, unsigned int size, unsigned int count))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Read])(f, string, 1, (unsigned int)size);
2752 string[size] = '\0';
2753 __ecereNameSpace__ecere__sys__TrimRSpaces(string, string);
2754 (__ecereNameSpace__ecere__com__eInstance_DecRef(f), f = 0);
2758 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__GlobalFunction;
2760 struct __ecereNameSpace__ecere__com__GlobalFunction;
2762 extern struct __ecereNameSpace__ecere__com__GlobalFunction * __ecereNameSpace__ecere__com__eSystem_RegisterFunction(char * name, char * type, void * func, struct __ecereNameSpace__ecere__com__Instance * module, int declMode);
2764 void __ecereRegisterModule_output(struct __ecereNameSpace__ecere__com__Instance * module)
2766 struct __ecereNameSpace__ecere__com__Class * class;
2768 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("SetMemoryGuard", "void SetMemoryGuard(bool b)", SetMemoryGuard, module, 1);
2769 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetMemoryGuard", "bool GetMemoryGuard(void)", GetMemoryGuard, module, 1);
2770 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("OutputTypeName", "void OutputTypeName(TypeName type, ecere::sys::File f, bool typeName)", OutputTypeName, module, 1);
2771 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("OutputExpression", "void OutputExpression(Expression exp, ecere::sys::File f)", OutputExpression, module, 1);
2772 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("OutputTree", "void OutputTree(ecere::sys::OldList ast, ecere::sys::File f)", OutputTree, module, 1);
2773 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("StringFromSpecDecl", "char * StringFromSpecDecl(ecere::sys::OldList specs, Declarator decl)", StringFromSpecDecl, module, 1);
2776 void __ecereUnregisterModule_output(struct __ecereNameSpace__ecere__com__Instance * module)