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 unsigned int typedByReference : 1;
776 } __attribute__ ((gcc_struct));
778 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Class;
780 struct __ecereNameSpace__ecere__com__Class
782 struct __ecereNameSpace__ecere__com__Class * prev;
783 struct __ecereNameSpace__ecere__com__Class * next;
789 int (* Constructor)(struct __ecereNameSpace__ecere__com__Instance *);
790 void (* Destructor)(struct __ecereNameSpace__ecere__com__Instance *);
793 struct __ecereNameSpace__ecere__com__Class * base;
794 struct __ecereNameSpace__ecere__sys__BinaryTree methods;
795 struct __ecereNameSpace__ecere__sys__BinaryTree members;
796 struct __ecereNameSpace__ecere__sys__BinaryTree prop;
797 struct __ecereNameSpace__ecere__sys__OldList membersAndProperties;
798 struct __ecereNameSpace__ecere__sys__BinaryTree classProperties;
799 struct __ecereNameSpace__ecere__sys__OldList derivatives;
803 struct __ecereNameSpace__ecere__com__Instance * module;
804 struct __ecereNameSpace__ecere__com__NameSpace * nameSpace;
805 char * dataTypeString;
806 struct Type * dataType;
808 int defaultAlignment;
809 void (* Initialize)();
811 struct __ecereNameSpace__ecere__sys__OldList selfWatchers;
812 char * designerClass;
813 unsigned int noExpansion;
814 char * defaultProperty;
815 unsigned int comRedefinition;
817 unsigned int isRemote;
818 unsigned int internalDecl;
820 unsigned int computeSize;
822 int destructionWatchOffset;
824 struct __ecereNameSpace__ecere__sys__OldList delayedCPValues;
825 int inheritanceAccess;
828 struct __ecereNameSpace__ecere__sys__OldList conversions;
829 struct __ecereNameSpace__ecere__sys__OldList templateParams;
830 struct __ecereNameSpace__ecere__com__ClassTemplateArgument * templateArgs;
831 struct __ecereNameSpace__ecere__com__Class * templateClass;
832 struct __ecereNameSpace__ecere__sys__OldList templatized;
834 unsigned int isInstanceClass;
835 unsigned int byValueSystemClass;
836 } __attribute__ ((gcc_struct));
838 extern long long __ecereNameSpace__ecere__com__eClass_GetProperty(struct __ecereNameSpace__ecere__com__Class * _class, char * name);
840 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Instance;
842 struct __ecereNameSpace__ecere__com__Instance
845 struct __ecereNameSpace__ecere__com__Class * _class;
847 } __attribute__ ((gcc_struct));
849 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__DataMember;
851 struct __ecereNameSpace__ecere__com__DataMember
853 struct __ecereNameSpace__ecere__com__DataMember * prev;
854 struct __ecereNameSpace__ecere__com__DataMember * next;
856 unsigned int isProperty;
859 struct __ecereNameSpace__ecere__com__Class * _class;
860 char * dataTypeString;
861 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
862 struct Type * dataType;
866 struct __ecereNameSpace__ecere__sys__OldList members;
867 struct __ecereNameSpace__ecere__sys__BinaryTree membersAlpha;
870 } __attribute__ ((gcc_struct));
872 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__SerialBuffer;
874 struct __ecereNameSpace__ecere__com__SerialBuffer
876 unsigned char * _buffer;
880 } __attribute__ ((gcc_struct));
882 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__ClassTemplateArgument;
884 struct __ecereNameSpace__ecere__com__ClassTemplateArgument
890 char * dataTypeString;
891 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
892 } __attribute__ ((gcc_struct));
893 struct __ecereNameSpace__ecere__com__DataValue expression;
899 struct __ecereNameSpace__ecere__com__DataMember * member;
900 struct __ecereNameSpace__ecere__com__Property * prop;
901 struct __ecereNameSpace__ecere__com__Method * method;
902 } __attribute__ ((gcc_struct));
903 } __attribute__ ((gcc_struct));
904 } __attribute__ ((gcc_struct));
905 } __attribute__ ((gcc_struct));
909 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
912 typedef union YYSTYPE
917 struct Identifier * id;
918 struct Expression * exp;
919 struct Specifier * specifier;
920 struct __ecereNameSpace__ecere__sys__OldList * list;
921 struct Enumerator * enumerator;
922 struct Declarator * declarator;
923 struct Pointer * pointer;
924 struct Initializer * initializer;
925 struct InitDeclarator * initDeclarator;
926 struct TypeName * typeName;
927 struct Declaration * declaration;
928 struct Statement * stmt;
929 struct FunctionDefinition * function;
930 struct External * external;
931 struct Context * context;
932 struct AsmField * asmField;
933 struct Attrib * attrib;
934 struct ExtDecl * extDecl;
935 struct Attribute * attribute;
936 struct Instantiation * instance;
937 struct MembersInit * membersInit;
938 struct MemberInit * memberInit;
939 struct ClassFunction * classFunction;
940 struct ClassDefinition * _class;
941 struct ClassDef * classDef;
942 struct PropertyDef * prop;
944 struct Symbol * symbol;
945 struct PropertyWatch * propertyWatch;
946 struct TemplateParameter * templateParameter;
947 struct TemplateArgument * templateArgument;
948 struct TemplateDatatype * templateDatatype;
949 struct DBTableEntry * dbtableEntry;
950 struct DBIndexItem * dbindexItem;
951 struct DBTableDef * dbtableDef;
952 } __attribute__ ((gcc_struct)) YYSTYPE;
954 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Enumerator;
958 struct Enumerator * prev;
959 struct Enumerator * next;
961 struct Identifier * id;
962 struct Expression * exp;
963 } __attribute__ ((gcc_struct));
965 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_InitDeclarator;
967 struct InitDeclarator
969 struct InitDeclarator * prev;
970 struct InitDeclarator * next;
972 struct Declarator * declarator;
973 struct Initializer * initializer;
974 } __attribute__ ((gcc_struct));
976 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_AsmField;
980 struct AsmField * prev;
981 struct AsmField * next;
984 struct Expression * expression;
985 } __attribute__ ((gcc_struct));
987 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Attribute;
991 struct Attribute * prev;
992 struct Attribute * next;
995 struct Expression * exp;
996 } __attribute__ ((gcc_struct));
998 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_ClassFunction;
1000 struct ClassFunction
1002 struct ClassFunction * prev;
1003 struct ClassFunction * next;
1004 struct Location loc;
1005 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
1006 struct Declarator * declarator;
1007 struct __ecereNameSpace__ecere__sys__OldList * declarations;
1008 struct Statement * body;
1009 struct __ecereNameSpace__ecere__com__Class * _class;
1010 struct __ecereNameSpace__ecere__sys__OldList attached;
1013 struct Symbol * propSet;
1014 unsigned int isVirtual;
1015 unsigned int isConstructor;
1016 unsigned int isDestructor;
1017 unsigned int dontMangle;
1020 } __attribute__ ((gcc_struct));
1022 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_MembersInit;
1026 struct MembersInit * prev;
1027 struct MembersInit * next;
1028 struct Location loc;
1032 struct __ecereNameSpace__ecere__sys__OldList * dataMembers;
1033 struct ClassFunction * function;
1034 } __attribute__ ((gcc_struct));
1035 } __attribute__ ((gcc_struct));
1037 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_MemberInit;
1041 struct MemberInit * prev;
1042 struct MemberInit * next;
1043 struct Location loc;
1044 struct Location realLoc;
1045 struct __ecereNameSpace__ecere__sys__OldList * identifiers;
1046 struct Initializer * initializer;
1048 unsigned int variable;
1049 unsigned int takeOutExp;
1050 } __attribute__ ((gcc_struct));
1052 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_PropertyDef;
1056 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_PropertyWatch;
1058 struct PropertyWatch;
1060 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_ClassDef;
1064 struct ClassDef * prev;
1065 struct ClassDef * next;
1066 struct Location loc;
1070 struct Declaration * decl;
1071 struct ClassFunction * function;
1072 struct __ecereNameSpace__ecere__sys__OldList * defProperties;
1073 struct PropertyDef * propertyDef;
1074 struct PropertyWatch * propertyWatch;
1076 struct Identifier * defaultProperty;
1079 struct Identifier * id;
1080 struct Initializer * initializer;
1081 } __attribute__ ((gcc_struct));
1082 } __attribute__ ((gcc_struct));
1085 } __attribute__ ((gcc_struct));
1087 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_DBTableEntry;
1089 struct DBTableEntry;
1091 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_DBIndexItem;
1095 extern YYSTYPE yylval;
1097 extern struct Location yylloc;
1101 unsigned int memoryGuard = 0x0;
1103 void SetMemoryGuard(unsigned int b)
1108 unsigned int GetMemoryGuard()
1113 extern int strcmp(const char * , const char * );
1115 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts;
1117 static void OutputIdentifier(struct Identifier * id, struct __ecereNameSpace__ecere__com__Instance * f)
1123 if(id->_class->type == 8)
1125 if(id->_class->templateParameter && id->_class->templateParameter->identifier && id->_class->templateParameter->identifier->string)
1126 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, id->_class->templateParameter->identifier->string);
1130 if(id->_class->name)
1132 if(!strcmp(id->_class->name, "class"))
1133 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "typed_object");
1135 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, id->_class->name);
1138 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "::");
1141 ((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)");
1144 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_Putc;
1146 static void OutputOperator(int op, struct __ecereNameSpace__ecere__com__Instance * f)
1151 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "++");
1154 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "--");
1157 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "sizeof ");
1160 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "<<");
1163 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ">>");
1166 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "<=");
1169 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ">=");
1172 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "==");
1175 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "!=");
1178 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "&&");
1181 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "||");
1184 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "*=");
1187 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "/=");
1190 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "%=");
1193 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "+=");
1196 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "-=");
1199 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "<<=");
1202 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ">>=");
1205 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "&=");
1208 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "^=");
1211 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "|=");
1226 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, char ch))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Putc])(f, (char)op);
1229 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "delete ");
1234 static void OutputSpecifier(struct Specifier * spec, struct __ecereNameSpace__ecere__com__Instance * f, unsigned int typeName);
1236 static void OutputDeclarator(struct Declarator * decl, struct __ecereNameSpace__ecere__com__Instance * f);
1238 void OutputTypeName(struct TypeName * type, struct __ecereNameSpace__ecere__com__Instance * f, unsigned int typeName)
1240 if(type->qualifiers)
1242 struct Specifier * spec;
1244 for(spec = (*type->qualifiers).first; spec; spec = spec->next)
1246 OutputSpecifier(spec, f, typeName);
1248 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
1251 if(type->declarator)
1253 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
1254 OutputDeclarator(type->declarator, f);
1256 if(!type->qualifiers && !type->declarator)
1257 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "...");
1260 static void OutputStatement(struct Statement * stmt, struct __ecereNameSpace__ecere__com__Instance * f);
1262 static void OutputInstance(struct Instantiation * inst, struct __ecereNameSpace__ecere__com__Instance * f);
1264 extern int printf(char * , ...);
1266 static void OutputInitializer(struct Initializer * initializer, struct __ecereNameSpace__ecere__com__Instance * f);
1268 void OutputExpression(struct Expression * exp, struct __ecereNameSpace__ecere__com__Instance * f)
1273 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "class(");
1274 if(exp->_classExp.specifiers)
1276 struct Specifier * spec;
1278 for(spec = (*exp->_classExp.specifiers).first; spec; spec = spec->next)
1280 OutputSpecifier(spec, f, 0x0);
1282 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
1284 if(exp->_classExp.decl)
1286 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
1287 OutputDeclarator(exp->_classExp.decl, f);
1289 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")");
1293 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "__extension__ (");
1294 OutputStatement(exp->compound, f);
1295 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")");
1298 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "new ");
1299 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
1300 OutputTypeName(exp->_renew.typeName, f, 0x0);
1301 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "[");
1302 OutputExpression(exp->_renew.size, f);
1303 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "]");
1306 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "new0 ");
1307 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
1308 OutputTypeName(exp->_renew.typeName, f, 0x0);
1309 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "[");
1310 OutputExpression(exp->_renew.size, f);
1311 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "]");
1314 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "renew ");
1315 OutputExpression(exp->_renew.exp, f);
1316 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
1317 OutputTypeName(exp->_renew.typeName, f, 0x0);
1318 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "[");
1319 OutputExpression(exp->_renew.size, f);
1320 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "]");
1323 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "renew0 ");
1324 OutputExpression(exp->_renew.exp, f);
1325 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
1326 OutputTypeName(exp->_renew.typeName, f, 0x0);
1327 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "[");
1328 OutputExpression(exp->_renew.size, f);
1329 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "]");
1333 OutputIdentifier(exp->identifier, f);
1337 OutputInstance(exp->instance, f);
1341 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, exp->constant);
1347 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, exp->string);
1352 OutputExpression(exp->op.exp1, f);
1354 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
1356 OutputOperator(exp->op.op, f);
1359 if(exp->op.exp1 || (exp->op.exp2->type == 4 && !exp->op.exp2->op.exp1 && exp->op.exp2->op.op == exp->op.op))
1360 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
1361 OutputExpression(exp->op.exp2, f);
1367 struct Expression * expression;
1370 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "__extension__ (");
1371 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "(");
1374 for(expression = (*exp->list).first; expression; expression = expression->next)
1376 OutputExpression(expression, f);
1377 if(expression->next)
1378 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
1381 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")");
1386 struct Expression * expression;
1389 OutputExpression(exp->index.exp, f);
1390 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "[");
1391 if(exp->index.index)
1392 for(expression = (*exp->index.index).first; expression; expression = expression->next)
1394 OutputExpression(expression, f);
1395 if(expression->next)
1396 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
1398 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "]");
1403 OutputExpression(exp->call.exp, f);
1404 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "(");
1405 if(exp->call.arguments)
1407 struct Expression * expression;
1409 for(expression = (*exp->call.arguments).first; expression; expression = expression->next)
1411 OutputExpression(expression, f);
1412 if(expression->next)
1413 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
1416 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")");
1421 OutputExpression(exp->member.exp, f);
1422 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ".");
1423 if(exp->member.member)
1424 OutputIdentifier(exp->member.member, f);
1427 OutputExpression(exp->member.exp, f);
1428 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "->");
1429 OutputIdentifier(exp->member.member, f);
1432 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "sizeof(");
1433 OutputTypeName(exp->typeName, f, 0x0);
1434 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")");
1437 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "__alignof__(");
1438 OutputTypeName(exp->typeName, f, 0x0);
1439 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")");
1442 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "__extension__ (");
1443 if(exp->initializer.typeName)
1444 OutputTypeName(exp->initializer.typeName, f, 0x0);
1445 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")");
1446 if(exp->initializer.initializer)
1447 OutputInitializer(exp->initializer.initializer, f);
1450 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "(");
1451 OutputTypeName(exp->cast.typeName, f, 0x0);
1452 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")");
1454 OutputExpression(exp->cast.exp, f);
1457 OutputExpression(exp->cond.cond, f);
1458 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ? ");
1460 struct Expression * expression;
1462 for(expression = (*exp->cond.exp).first; expression; expression = expression->next)
1464 OutputExpression(expression, f);
1465 if(expression->next)
1466 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
1469 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " : ");
1470 OutputExpression(exp->cond.elseExp, f);
1473 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "__builtin_va_arg(");
1474 OutputExpression(exp->vaArg.exp, f);
1475 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
1476 OutputTypeName(exp->vaArg.typeName, f, 0x0);
1477 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")");
1480 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "[");
1483 struct Expression * expression;
1485 for(expression = (*exp->list).first; expression; expression = expression->next)
1487 OutputExpression(expression, f);
1488 if(expression->next)
1489 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
1492 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "]");
1497 static void OutputAsmField(struct AsmField * field, struct __ecereNameSpace__ecere__com__Instance * f)
1499 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, field->command);
1500 if(field->expression)
1502 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "(");
1503 OutputExpression(field->expression, f);
1504 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")");
1508 extern char * strchr(const char * , int);
1510 extern char * __ecereNameSpace__ecere__sys__StripLastDirectory(char * string, char * output);
1512 extern char * sourceFile;
1514 extern char * __ecereNameSpace__ecere__sys__PathCat(char * string, char * addedPath);
1516 extern void __ecereNameSpace__ecere__sys__ChangeCh(char * string, char ch1, char ch2);
1518 static void GetSourceName(char * name, const char * src)
1523 if(!strchr(src, '/') && !strchr(src, '\\'))
1524 __ecereNameSpace__ecere__sys__StripLastDirectory(sourceFile, name);
1525 __ecereNameSpace__ecere__sys__PathCat(name, src);
1528 __ecereNameSpace__ecere__sys__PathCat(name, sourceFile);
1529 __ecereNameSpace__ecere__sys__ChangeCh(name, '\\', '/');
1532 extern unsigned int inCompiler;
1534 extern char * GetIncludeFileFromID(int id);
1536 extern char * outputFile;
1538 extern unsigned int outputLineNumbers;
1540 static void OutputDeclaration(struct Declaration * decl, struct __ecereNameSpace__ecere__com__Instance * f);
1542 extern struct __ecereNameSpace__ecere__sys__OldList * MkList(void);
1544 extern struct Declarator * SpecDeclFromString(char * string, struct __ecereNameSpace__ecere__sys__OldList * specs, struct Declarator * baseDecl);
1546 extern struct Declarator * MkDeclaratorIdentifier(struct Identifier * id);
1548 extern struct Identifier * MkIdentifier(char * string);
1550 extern struct __ecereNameSpace__ecere__sys__OldList * CopyList(struct __ecereNameSpace__ecere__sys__OldList * source, void * (* CopyFunction)(void * ));
1552 extern struct Specifier * CopySpecifier(struct Specifier * spec);
1554 extern struct Declarator * PlugDeclarator(struct Declarator * decl, struct Declarator * baseDecl);
1556 extern void ListAdd(struct __ecereNameSpace__ecere__sys__OldList * list, void * item);
1558 extern struct Specifier * MkSpecifierName(char * name);
1560 extern void PrintTypeNoConst(struct Type * type, char * string, unsigned int printName, unsigned int fullName);
1562 extern struct TypeName * MkTypeName(struct __ecereNameSpace__ecere__sys__OldList * qualifiers, struct Declarator * declarator);
1564 extern void InstDeclPassTypeName(struct TypeName * type, unsigned int param);
1566 extern void FreeTypeName(struct TypeName * typeName);
1568 int __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(struct __ecereNameSpace__ecere__com__Instance * this, char * format, ...);
1570 static void OutputStatement(struct Statement * stmt, struct __ecereNameSpace__ecere__com__Instance * f)
1572 char name[274] = "";
1573 char origName[274] = "";
1577 GetSourceName(name, stmt->loc.start.included ? GetIncludeFileFromID(stmt->loc.start.included) : (((void *)0)));
1578 __ecereNameSpace__ecere__sys__PathCat(origName, outputFile);
1579 __ecereNameSpace__ecere__sys__ChangeCh(origName, '\\', '/');
1581 if(inCompiler && outputLineNumbers && stmt->loc.start.line)
1583 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "\n#line %d \"%s\"\n", stmt->loc.start.line, name);
1589 OutputDeclaration(stmt->decl, f);
1592 OutputIdentifier(stmt->labeled.id, f);
1593 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ":\n");
1595 OutputStatement(stmt->labeled.stmt, f);
1598 if(stmt->caseStmt.exp)
1600 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "case ");
1601 OutputExpression(stmt->caseStmt.exp, f);
1602 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ":\n");
1607 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "default:\n");
1610 if(stmt->caseStmt.stmt)
1611 OutputStatement(stmt->caseStmt.stmt, f);
1615 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "{\n");
1617 if(stmt->compound.declarations)
1619 struct Declaration * decl;
1621 for(decl = (*stmt->compound.declarations).first; decl; decl = decl->next)
1623 OutputDeclaration(decl, f);
1626 if(stmt->compound.statements)
1628 struct Statement * statement;
1630 if(stmt->compound.declarations)
1632 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n");
1635 for(statement = (*stmt->compound.statements).first; statement; statement = statement->next)
1637 OutputStatement(statement, f);
1638 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n");
1642 if(inCompiler && outputLineNumbers && stmt->loc.end.line)
1644 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "\n#line %d \"%s\"\n", stmt->loc.end.line, name);
1647 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "}");
1652 if(stmt->expressions)
1654 struct Expression * exp;
1656 for(exp = (*stmt->expressions).first; exp; exp = exp->next)
1658 OutputExpression(exp, f);
1660 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
1663 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ";");
1668 struct Expression * exp;
1670 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "if(");
1671 for(exp = (*stmt->ifStmt.exp).first; exp; exp = exp->next)
1673 OutputExpression(exp, f);
1675 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
1677 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")\n");
1679 if(stmt->ifStmt.stmt)
1680 OutputStatement(stmt->ifStmt.stmt, f);
1681 if(stmt->ifStmt.elseStmt)
1683 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n");
1685 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "else");
1686 if(stmt->ifStmt.elseStmt->type != 4)
1688 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n");
1692 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
1693 OutputStatement(stmt->ifStmt.elseStmt, f);
1699 struct Expression * exp;
1701 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "switch(");
1702 for(exp = (*stmt->switchStmt.exp).first; exp; exp = exp->next)
1704 OutputExpression(exp, f);
1706 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
1708 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")\n");
1710 OutputStatement(stmt->switchStmt.stmt, f);
1715 struct Expression * exp;
1717 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "while(");
1718 for(exp = (*stmt->switchStmt.exp).first; exp; exp = exp->next)
1720 OutputExpression(exp, f);
1722 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
1724 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")\n");
1726 OutputStatement(stmt->whileStmt.stmt, f);
1731 struct Expression * exp;
1733 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "do\n");
1735 OutputStatement(stmt->whileStmt.stmt, f);
1736 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "while(");
1737 for(exp = (*stmt->switchStmt.exp).first; exp; exp = exp->next)
1739 OutputExpression(exp, f);
1741 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
1743 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ");");
1748 struct Expression * exp;
1750 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "for(");
1751 OutputStatement(stmt->forStmt.init, f);
1752 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
1753 OutputStatement(stmt->forStmt.check, f);
1754 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
1755 if(stmt->forStmt.increment)
1757 if(inCompiler && outputLineNumbers && stmt->loc.end.line)
1759 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "\n#line %d \"%s\"\n", stmt->loc.end.line, name);
1762 for(exp = (*stmt->forStmt.increment).first; exp; exp = exp->next)
1764 OutputExpression(exp, f);
1766 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
1769 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")\n");
1771 OutputStatement(stmt->forStmt.stmt, f);
1776 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "goto ");
1777 OutputIdentifier(stmt->gotoStmt.id, f);
1778 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ";");
1782 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "continue;");
1785 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "break;");
1789 struct Expression * exp;
1791 if(inCompiler && memoryGuard)
1793 struct Expression * exp = stmt->expressions ? (*stmt->expressions).last : (((void *)0));
1795 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "{ ");
1796 if(exp && exp->expType)
1798 char string[1024] = "";
1799 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
1800 struct Declarator * decl;
1801 struct TypeName * typeName;
1803 if(exp->expType->kind == 20)
1805 if(exp->expType->templateParameter->dataTypeString)
1806 decl = SpecDeclFromString(exp->expType->templateParameter->dataTypeString, specs, MkDeclaratorIdentifier(MkIdentifier("__ecereReturnVal")));
1807 else if(exp->expType->templateParameter->dataType)
1809 (__ecereNameSpace__ecere__com__eSystem_Delete(specs), specs = 0);
1810 specs = CopyList(exp->expType->templateParameter->dataType->specifiers, CopySpecifier);
1811 decl = PlugDeclarator(exp->expType->templateParameter->dataType->decl, MkDeclaratorIdentifier(MkIdentifier("__ecereReturnVal")));
1815 ListAdd(specs, MkSpecifierName("uint64"));
1816 decl = MkDeclaratorIdentifier(MkIdentifier("__ecereReturnVal"));
1821 PrintTypeNoConst(exp->expType, string, exp->expType->kind == 18 ? 0x1 : 0x0, 0x1);
1822 decl = SpecDeclFromString(string, specs, MkDeclaratorIdentifier(MkIdentifier("__ecereReturnVal")));
1824 typeName = MkTypeName(specs, decl);
1825 InstDeclPassTypeName(typeName, 0x0);
1826 OutputTypeName(typeName, f, 0x0);
1827 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, ";");
1828 FreeTypeName(typeName);
1832 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "return ");
1835 struct Expression * exp = stmt->expressions ? (*stmt->expressions).last : (((void *)0));
1837 if(exp && exp->expType)
1838 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "__ecereReturnVal = ");
1840 if(stmt->expressions)
1842 for(exp = (*stmt->expressions).first; exp; exp = exp->next)
1844 OutputExpression(exp, f);
1846 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
1849 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ";");
1850 if(inCompiler && memoryGuard)
1852 struct Expression * exp = stmt->expressions ? (struct Expression *)(*stmt->expressions).last : (((void *)0));
1854 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " __ecereNameSpace__ecere__com__MemoryGuard_PopLoc();");
1855 if(exp && exp->expType)
1856 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "return __ecereReturnVal;");
1858 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "return;");
1859 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "}");
1865 struct AsmField * field;
1867 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "__asm__ ");
1868 if(stmt->asmStmt.spec)
1869 OutputSpecifier(stmt->asmStmt.spec, f, 0x0);
1870 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "(");
1871 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, stmt->asmStmt.statements);
1872 if(stmt->asmStmt.inputFields || stmt->asmStmt.outputFields || stmt->asmStmt.clobberedFields)
1874 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ":");
1875 if(stmt->asmStmt.inputFields)
1877 for(field = (*stmt->asmStmt.inputFields).first; field; field = field->next)
1880 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ",");
1881 OutputAsmField(field, f);
1885 if(stmt->asmStmt.outputFields || stmt->asmStmt.clobberedFields)
1887 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ":");
1888 if(stmt->asmStmt.outputFields)
1890 for(field = (*stmt->asmStmt.outputFields).first; field; field = field->next)
1893 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ",");
1894 OutputAsmField(field, f);
1898 if(stmt->asmStmt.clobberedFields)
1900 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ":");
1901 for(field = (*stmt->asmStmt.clobberedFields).first; field; field = field->next)
1904 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ",");
1905 OutputAsmField(field, f);
1908 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ");\n");
1913 if(inCompiler && outputLineNumbers && stmt->loc.start.line)
1915 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "\n#line %d \"%s\"\n", outputLine + 2, origName);
1920 static void OutputPointer(struct Pointer * ptr, struct __ecereNameSpace__ecere__com__Instance * f)
1922 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "*");
1925 struct Specifier * spec;
1927 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
1928 for(spec = (*ptr->qualifiers).first; spec; spec = spec->next)
1930 OutputSpecifier(spec, f, 0x0);
1932 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
1937 OutputPointer(ptr->pointer, f);
1941 static void OutputAttrib(struct Attrib * attr, struct __ecereNameSpace__ecere__com__Instance * f);
1943 static void OutputExtDecl(struct ExtDecl * extDecl, struct __ecereNameSpace__ecere__com__Instance * f);
1945 extern void ProcessExpressionType(struct Expression * exp);
1947 extern void ComputeExpression(struct Expression * exp);
1949 static void OutputDeclarator(struct Declarator * decl, struct __ecereNameSpace__ecere__com__Instance * f)
1954 if(decl->declarator)
1956 OutputDeclarator(decl->declarator, f);
1958 if(decl->structDecl.exp)
1960 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " : ");
1961 OutputExpression(decl->structDecl.exp, f);
1963 if(decl->structDecl.posExp)
1965 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " : ");
1966 OutputExpression(decl->structDecl.posExp, f);
1968 if(decl->structDecl.attrib)
1970 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
1971 OutputAttrib(decl->structDecl.attrib, f);
1975 OutputIdentifier(decl->identifier, f);
1978 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "(");
1979 OutputDeclarator(decl->declarator, f);
1980 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")");
1983 if(decl->extended.extended)
1984 OutputExtDecl(decl->extended.extended, f);
1985 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
1986 OutputDeclarator(decl->declarator, f);
1989 OutputDeclarator(decl->declarator, f);
1990 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
1991 if(decl->extended.extended)
1992 OutputExtDecl(decl->extended.extended, f);
1995 if(decl->declarator)
1997 OutputDeclarator(decl->declarator, f);
1999 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "[");
2002 ProcessExpressionType(decl->array.exp);
2003 ComputeExpression(decl->array.exp);
2004 OutputExpression(decl->array.exp, f);
2006 else if(decl->array.enumClass)
2008 struct Symbol * _class = decl->array.enumClass->symbol;
2010 if(_class && _class->registered)
2012 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "%d", (int)__ecereNameSpace__ecere__com__eClass_GetProperty(_class->registered, "enumSize"));
2015 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "]");
2019 struct TypeName * param;
2021 if(decl->declarator)
2022 OutputDeclarator(decl->declarator, f);
2023 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "(");
2024 if(decl->function.parameters && (*decl->function.parameters).first)
2026 for(param = (*decl->function.parameters).first; param; param = param->next)
2028 OutputTypeName(param, f, 0x0);
2030 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
2033 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")");
2037 if(decl->pointer.pointer)
2038 OutputPointer(decl->pointer.pointer, f);
2039 if(decl->declarator)
2041 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
2042 OutputDeclarator(decl->declarator, f);
2048 static void OutputEnumerator(struct Enumerator * enumerator, struct __ecereNameSpace__ecere__com__Instance * f)
2050 OutputIdentifier(enumerator->id, f);
2053 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " = ");
2054 OutputExpression(enumerator->exp, f);
2058 static void OutputAttribute(struct Attribute * attr, struct __ecereNameSpace__ecere__com__Instance * f)
2061 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, attr->attr);
2064 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
2065 OutputExpression(attr->exp, f);
2069 static void OutputAttrib(struct Attrib * attr, struct __ecereNameSpace__ecere__com__Instance * f)
2074 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "__attribute__((");
2077 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "__attribute((");
2080 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "__attribute_deprecated__((");
2085 struct Attribute * attrib;
2087 for(attrib = (*attr->attribs).first; attrib; attrib = attrib->next)
2090 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
2091 OutputAttribute(attrib, f);
2094 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "))");
2097 static void OutputExtDecl(struct ExtDecl * extDecl, struct __ecereNameSpace__ecere__com__Instance * f)
2099 if(extDecl->type == 0 && extDecl->s)
2100 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, extDecl->s);
2101 else if(extDecl->type == 1)
2102 OutputAttrib(extDecl->attr, f);
2105 extern struct Symbol * FindClass(char * name);
2107 static void OutputClassDef(struct ClassDef * def, struct __ecereNameSpace__ecere__com__Instance * f);
2109 static void OutputSpecifier(struct Specifier * spec, struct __ecereNameSpace__ecere__com__Instance * f, unsigned int typeName)
2114 switch(spec->specifier)
2117 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "typedef");
2120 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "extern");
2123 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "static");
2126 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "auto");
2129 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "register");
2132 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "const");
2135 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "volatile");
2138 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "void");
2141 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "char");
2144 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "short");
2147 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "int");
2150 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, typeName ? "uint" : "unsigned int");
2153 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, typeName ? "int64" : "long long");
2156 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "__builtin_va_list");
2159 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "long");
2162 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "float");
2165 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "double");
2168 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "signed");
2171 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "unsigned");
2174 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "typed_object");
2177 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "any_object");
2180 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "class");
2183 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "thisclass");
2189 OutputExtDecl(spec->extDecl, f);
2192 if(spec->name && !strcmp(spec->name, "class"))
2194 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "typed_object");
2198 struct Symbol * symbol = spec->symbol;
2200 if(!symbol && spec->name)
2201 symbol = FindClass(spec->name);
2204 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, symbol->string ? symbol->string : "(null)");
2207 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, spec->name);
2212 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "enum");
2215 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
2216 OutputIdentifier(spec->id, f);
2220 struct Enumerator * enumerator;
2222 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n{\n");
2224 for(enumerator = (*spec->list).first; enumerator; enumerator = enumerator->next)
2226 OutputEnumerator(enumerator, f);
2227 if(enumerator->next)
2228 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
2230 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n}");
2238 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, (spec->type == 3) ? "struct" : "union");
2239 if(spec->extDeclStruct)
2241 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
2242 OutputExtDecl(spec->extDeclStruct, f);
2246 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
2247 OutputIdentifier(spec->id, f);
2249 if(spec->definitions)
2251 struct ClassDef * def;
2253 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n{\n");
2255 for(def = (*spec->definitions).first; def; def = def->next)
2257 OutputClassDef(def, f);
2259 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "} __attribute__ ((gcc_struct))");
2264 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "__typeof(");
2265 OutputExpression(spec->expression, f);
2266 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")");
2269 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "subclass(");
2270 OutputSpecifier(spec->_class, f, 0x0);
2271 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")");
2274 OutputIdentifier(spec->templateParameter->identifier, f);
2279 static void OutputInitializer(struct Initializer * initializer, struct __ecereNameSpace__ecere__com__Instance * f)
2281 char name[274] = "";
2282 char origName[274] = "";
2286 GetSourceName(name, initializer->loc.start.included ? GetIncludeFileFromID(initializer->loc.start.included) : (((void *)0)));
2287 __ecereNameSpace__ecere__sys__PathCat(origName, outputFile);
2288 __ecereNameSpace__ecere__sys__ChangeCh(origName, '\\', '/');
2290 switch(initializer->type)
2294 struct Initializer * init;
2296 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n{\n");
2298 if(inCompiler && outputLineNumbers && initializer->loc.start.line)
2300 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "\n#line %d \"%s\"\n", initializer->loc.start.line, name);
2303 for(init = (*initializer->list).first; init; init = init->next)
2305 OutputInitializer(init, f);
2307 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
2309 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n}");
2310 if(inCompiler && outputLineNumbers && initializer->loc.start.line)
2312 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "\n#line %d \"%s\"\n", initializer->loc.start.line, name);
2319 if(initializer->exp)
2320 OutputExpression(initializer->exp, f);
2325 static void OutputInitDeclarator(struct InitDeclarator * decl, struct __ecereNameSpace__ecere__com__Instance * f)
2327 OutputDeclarator(decl->declarator, f);
2328 if(decl->initializer)
2330 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " = ");
2331 OutputInitializer(decl->initializer, f);
2335 static void OutputDeclaration(struct Declaration * decl, struct __ecereNameSpace__ecere__com__Instance * f)
2337 struct Specifier * spec;
2338 char origName[274] = "";
2344 struct InitDeclarator * d;
2348 __ecereNameSpace__ecere__sys__PathCat(origName, outputFile);
2349 __ecereNameSpace__ecere__sys__ChangeCh(origName, '\\', '/');
2351 if(decl->declarators && (*decl->declarators).first)
2353 for(d = (*decl->declarators).first; d; d = d->next)
2356 char name[274] = "";
2358 GetSourceName(name, decl->loc.start.included ? GetIncludeFileFromID(decl->loc.start.included) : (((void *)0)));
2359 if(inCompiler && outputLineNumbers && decl->loc.start.line)
2361 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "\n#line %d \"%s\"\n", decl->loc.start.line, name);
2367 if(decl->specifiers)
2369 unsigned int inTypeDef = 0x0;
2371 for(spec = (*decl->specifiers).first; spec; spec = spec->next)
2373 if(spec->type == 0 && spec->specifier == TYPEDEF)
2375 OutputSpecifier(spec, f, inTypeDef && !spec->next);
2377 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
2380 if(decl->declarators && (*decl->declarators).first)
2382 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
2383 for(d = (*decl->declarators).first; d; d = d->next)
2385 OutputInitDeclarator(d, f);
2387 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
2394 if(decl->specifiers)
2396 for(spec = (*decl->specifiers).first; spec; spec = spec->next)
2398 OutputSpecifier(spec, f, 0x0);
2400 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
2403 if(decl->declarators)
2405 struct Declarator * d;
2407 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
2408 for(d = (*decl->declarators).first; d; d = d->next)
2410 OutputDeclarator(d, f);
2412 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
2415 if(decl->extStorage)
2417 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
2418 OutputSpecifier(decl->extStorage, f, 0x0);
2425 OutputInstance(decl->inst, f);
2431 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ";\n");
2433 if(inCompiler && outputLineNumbers && decl->loc.start.line && decl->type == 1)
2435 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "\n#line %d \"%s\"\n", outputLine + 2, origName);
2440 static struct FunctionDefinition * curFunction;
2442 extern struct Identifier * GetDeclId(struct Declarator * decl);
2444 static void OutputFunction(struct FunctionDefinition * func, struct __ecereNameSpace__ecere__com__Instance * f)
2446 struct FunctionDefinition * oldFunc = curFunction;
2449 if(func->specifiers)
2451 struct Specifier * spec;
2453 for(spec = (*func->specifiers).first; spec; spec = spec->next)
2455 OutputSpecifier(spec, f, 0x0);
2457 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
2459 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
2461 if(func->declarator)
2462 OutputDeclarator(func->declarator, f);
2463 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n");
2465 if(func->declarations)
2467 struct Declaration * decl;
2469 for(decl = (*func->declarations).first; decl; decl = decl->next)
2471 OutputDeclaration(decl, f);
2473 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n");
2478 if(inCompiler && memoryGuard)
2480 char name[1024] = "";
2481 struct Identifier * id = GetDeclId(func->declarator);
2483 GetSourceName(name, func->loc.start.included ? GetIncludeFileFromID(func->loc.start.included) : (((void *)0)));
2484 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "{\n");
2485 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " __ecereNameSpace__ecere__com__MemoryGuard_PushLoc(\"%s:%s\");\n", name, id->string);
2488 OutputStatement(func->body, f);
2489 if(inCompiler && memoryGuard)
2491 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " __ecereNameSpace__ecere__com__MemoryGuard_PopLoc();\n");
2492 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "}\n");
2495 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n");
2498 curFunction = oldFunc;
2501 static void OutputMemberInit(struct MemberInit * init, struct __ecereNameSpace__ecere__com__Instance * f)
2503 if(init->identifiers)
2505 if((*init->identifiers).count > 1)
2507 struct Identifier * id;
2509 for(id = (*init->identifiers).first; id; id = id->next)
2511 OutputIdentifier(id, f);
2513 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ".");
2516 else if((*init->identifiers).first)
2517 OutputIdentifier((*init->identifiers).first, f);
2518 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " = ");
2520 if(init->initializer)
2521 OutputInitializer(init->initializer, f);
2524 static void OutputClassFunction(struct ClassFunction * func, struct __ecereNameSpace__ecere__com__Instance * f);
2526 static void OutputMembersInit(struct MembersInit * init, struct __ecereNameSpace__ecere__com__Instance * f)
2532 struct MemberInit * member;
2534 if(init->dataMembers)
2536 for(member = (*init->dataMembers).first; member; member = member->next)
2538 OutputMemberInit(member, f);
2540 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
2546 OutputClassFunction(init->function, f);
2551 static void OutputInstance(struct Instantiation * inst, struct __ecereNameSpace__ecere__com__Instance * f)
2554 OutputSpecifier(inst->_class, f, 0x0);
2557 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
2558 OutputExpression(inst->exp, f);
2560 if(inst->members && (*inst->members).count > 1)
2562 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n{\n");
2565 else if(inst->members)
2566 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " { ");
2568 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "{");
2571 struct MembersInit * init;
2573 for(init = (*inst->members).first; init; init = init->next)
2575 OutputMembersInit(init, f);
2576 if(init->type == 0 && init->next)
2578 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ";\n");
2584 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " }");
2586 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "}");
2589 static void OutputClassFunction(struct ClassFunction * func, struct __ecereNameSpace__ecere__com__Instance * f)
2591 if(func->specifiers)
2593 struct Specifier * spec;
2595 for(spec = (*func->specifiers).first; spec; spec = spec->next)
2597 OutputSpecifier(spec, f, 0x0);
2599 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
2601 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
2603 if(func->declarator)
2604 OutputDeclarator(func->declarator, f);
2605 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n");
2607 if(func->declarations)
2609 struct Declaration * decl;
2611 for(decl = (*func->declarations).first; decl; decl = decl->next)
2613 OutputDeclaration(decl, f);
2615 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n");
2620 OutputStatement(func->body, f);
2621 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n");
2625 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ";");
2628 static void OutputClassDef(struct ClassDef * def, struct __ecereNameSpace__ecere__com__Instance * f)
2635 OutputDeclaration(def->decl, f);
2636 if(def->next && def->next->type != 2)
2638 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n");
2645 struct MemberInit * init;
2647 for(init = (*def->defProperties).first; init; init = init->next)
2649 OutputMemberInit(init, f);
2651 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
2653 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ";\n\n");
2658 OutputClassFunction(def->function, f);
2659 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n");
2665 static void OutputClass(struct ClassDefinition * _class, struct __ecereNameSpace__ecere__com__Instance * f)
2667 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "class ");
2668 OutputSpecifier(_class->_class, f, 0x0);
2669 if(_class->baseSpecs)
2671 struct Specifier * spec;
2673 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " : ");
2674 for(spec = (*_class->baseSpecs).first; spec; spec = spec->next)
2676 OutputSpecifier(spec, f, 0x0);
2679 if(_class->definitions)
2681 struct ClassDef * def;
2683 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n{\n");
2685 for(def = (*_class->definitions).first; def; def = def->next)
2687 OutputClassDef(def, f);
2689 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "}\n");
2693 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ";");
2696 void OutputTree(struct __ecereNameSpace__ecere__sys__OldList * ast, struct __ecereNameSpace__ecere__com__Instance * f)
2698 struct External * external;
2701 for(external = ast->first; external; external = external->next)
2703 switch(external->type)
2706 OutputFunction(external->function, f);
2707 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n");
2711 OutputDeclaration(external->declaration, f);
2712 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n");
2716 OutputClass(external->_class, f);
2717 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n");
2724 extern char * __ecereNameSpace__ecere__sys__TrimRSpaces(char * string, char * output);
2726 extern void * __ecereNameSpace__ecere__com__eInstance_New(struct __ecereNameSpace__ecere__com__Class * _class);
2728 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__TempFile;
2730 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_GetSize;
2732 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_Seek;
2734 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_Read;
2736 extern void __ecereNameSpace__ecere__com__eInstance_DecRef(struct __ecereNameSpace__ecere__com__Instance * instance);
2738 char * StringFromSpecDecl(struct __ecereNameSpace__ecere__sys__OldList * specs, struct Declarator * decl)
2741 struct TypeName * typeName = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_TypeName);
2742 struct __ecereNameSpace__ecere__com__Instance * f = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass___ecereNameSpace__ecere__sys__TempFile);
2745 typeName->qualifiers = specs;
2746 typeName->declarator = decl;
2747 OutputTypeName(typeName, f, 0x1);
2748 ((typeName ? (__ecereClass_TypeName->Destructor ? __ecereClass_TypeName->Destructor(typeName) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(typeName)) : 0), typeName = 0);
2749 size = ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_GetSize])(f);
2750 string = __ecereNameSpace__ecere__com__eSystem_New(sizeof(char) * (size + 1));
2751 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, int pos, int mode))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Seek])(f, 0, 0);
2752 ((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);
2753 string[size] = '\0';
2754 __ecereNameSpace__ecere__sys__TrimRSpaces(string, string);
2755 (__ecereNameSpace__ecere__com__eInstance_DecRef(f), f = 0);
2759 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__GlobalFunction;
2761 struct __ecereNameSpace__ecere__com__GlobalFunction;
2763 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);
2765 void __ecereRegisterModule_output(struct __ecereNameSpace__ecere__com__Instance * module)
2767 struct __ecereNameSpace__ecere__com__Class * class;
2769 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("SetMemoryGuard", "void SetMemoryGuard(bool b)", SetMemoryGuard, module, 1);
2770 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetMemoryGuard", "bool GetMemoryGuard(void)", GetMemoryGuard, module, 1);
2771 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("OutputTypeName", "void OutputTypeName(TypeName type, ecere::sys::File f, bool typeName)", OutputTypeName, module, 1);
2772 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("OutputExpression", "void OutputExpression(Expression exp, ecere::sys::File f)", OutputExpression, module, 1);
2773 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("OutputTree", "void OutputTree(ecere::sys::OldList ast, ecere::sys::File f)", OutputTree, module, 1);
2774 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("StringFromSpecDecl", "char * StringFromSpecDecl(ecere::sys::OldList specs, Declarator decl)", StringFromSpecDecl, module, 1);
2777 void __ecereUnregisterModule_output(struct __ecereNameSpace__ecere__com__Instance * module)