marked all generated bootstrap C source files with 'code generated from eC srouce...
[sdk] / compiler / bootstrap / libec / bootstrap / output.c
index 4b0087c..3f00744 100644 (file)
@@ -1,6 +1,10 @@
+/* Code generated from eC source file. */
 #if defined(__GNUC__)
 typedef long long int64;
 typedef unsigned long long uint64;
+#ifndef _WIN32
+#define __declspec(x)
+#endif
 #elif defined(__TINYC__)
 #include <stdarg.h>
 #define __builtin_va_list va_list
@@ -10,6 +14,8 @@ typedef unsigned long long uint64;
 #define strcasecmp stricmp
 #define strncasecmp strnicmp
 #define __declspec(x) __attribute__((x))
+#else
+#define __declspec(x)
 #endif
 typedef long long int64;
 typedef unsigned long long uint64;
@@ -22,6 +28,16 @@ typedef unsigned __int64 uint64;
 #else
 #define __ENDIAN_PAD(x) 0
 #endif
+#include <stdint.h>
+#include <sys/types.h>
+extern void *  __ecereNameSpace__ecere__com__eSystem_New(unsigned int size);
+
+extern void *  __ecereNameSpace__ecere__com__eSystem_New0(unsigned int size);
+
+extern void *  __ecereNameSpace__ecere__com__eSystem_Renew(void *  memory, unsigned int size);
+
+extern void *  __ecereNameSpace__ecere__com__eSystem_Renew0(void *  memory, unsigned int size);
+
 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__BTNode;
 
 struct __ecereNameSpace__ecere__sys__BTNode;
@@ -32,9 +48,9 @@ struct __ecereNameSpace__ecere__sys__BinaryTree
 {
 struct __ecereNameSpace__ecere__sys__BTNode * root;
 int count;
-int (*  CompareKey)(struct __ecereNameSpace__ecere__sys__BinaryTree * tree, unsigned int a, unsigned int b);
+int (*  CompareKey)(struct __ecereNameSpace__ecere__sys__BinaryTree * tree, uintptr_t a, uintptr_t b);
 void (*  FreeKey)(void *  key);
-};
+} __attribute__ ((gcc_struct));
 
 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__OldList;
 
@@ -45,7 +61,7 @@ void *  last;
 int count;
 unsigned int offset;
 unsigned int circ;
-};
+} __attribute__ ((gcc_struct));
 
 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Method;
 
@@ -64,7 +80,7 @@ void *  symbol;
 char *  dataTypeString;
 struct Type * dataType;
 int memberAccess;
-};
+} __attribute__ ((gcc_struct));
 
 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Property;
 
@@ -80,9 +96,9 @@ struct __ecereNameSpace__ecere__com__Class * _class;
 char *  dataTypeString;
 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
 struct Type * dataType;
-void (*  Set)();
-int (*  Get)();
-unsigned int (*  IsSet)();
+void (*  Set)(void * , int);
+int (*  Get)(void * );
+unsigned int (*  IsSet)(void * );
 void *  data;
 void *  symbol;
 int vid;
@@ -92,7 +108,7 @@ char *  category;
 unsigned int compiled;
 unsigned int selfWatchable;
 unsigned int isWatchable;
-};
+} __attribute__ ((gcc_struct));
 
 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_CodePosition;
 
@@ -101,8 +117,8 @@ struct CodePosition
 int line;
 int charPos;
 int pos;
-unsigned int included;
-};
+int included;
+} __attribute__ ((gcc_struct));
 
 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Location;
 
@@ -110,7 +126,7 @@ struct Location
 {
 struct CodePosition start;
 struct CodePosition end;
-};
+} __attribute__ ((gcc_struct));
 
 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Attrib;
 
@@ -119,7 +135,7 @@ struct Attrib
 struct Location loc;
 int type;
 struct __ecereNameSpace__ecere__sys__OldList *  attribs;
-};
+} __attribute__ ((gcc_struct));
 
 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_ExtDecl;
 
@@ -131,8 +147,8 @@ union
 {
 char * s;
 struct Attrib * attr;
-};
-};
+} __attribute__ ((gcc_struct));
+} __attribute__ ((gcc_struct));
 
 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_ClassDefinition;
 
@@ -150,7 +166,7 @@ struct Location nameLoc;
 int endid;
 int declMode;
 unsigned int deleteWatchable;
-};
+} __attribute__ ((gcc_struct));
 
 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Context;
 
@@ -173,7 +189,7 @@ unsigned char *  data;
 struct Location nameLoc;
 struct Location insideLoc;
 unsigned int built;
-};
+} __attribute__ ((gcc_struct));
 
 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Declaration;
 
@@ -189,18 +205,18 @@ struct
 {
 struct __ecereNameSpace__ecere__sys__OldList *  specifiers;
 struct __ecereNameSpace__ecere__sys__OldList *  declarators;
-};
+} __attribute__ ((gcc_struct));
 struct Instantiation * inst;
 struct
 {
 struct Identifier * id;
 struct Expression * exp;
-};
-};
+} __attribute__ ((gcc_struct));
+} __attribute__ ((gcc_struct));
 struct Specifier * extStorage;
 struct Symbol * symbol;
 int declMode;
-};
+} __attribute__ ((gcc_struct));
 
 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Statement;
 
@@ -217,51 +233,51 @@ struct
 {
 struct Identifier * id;
 struct Statement * stmt;
-} labeled;
+} __attribute__ ((gcc_struct)) labeled;
 struct
 {
 struct Expression * exp;
 struct Statement * stmt;
-} caseStmt;
+} __attribute__ ((gcc_struct)) caseStmt;
 struct
 {
 struct __ecereNameSpace__ecere__sys__OldList * declarations;
 struct __ecereNameSpace__ecere__sys__OldList * statements;
 struct Context * context;
 unsigned int isSwitch;
-} compound;
+} __attribute__ ((gcc_struct)) compound;
 struct
 {
 struct __ecereNameSpace__ecere__sys__OldList * exp;
 struct Statement * stmt;
 struct Statement * elseStmt;
-} ifStmt;
+} __attribute__ ((gcc_struct)) ifStmt;
 struct
 {
 struct __ecereNameSpace__ecere__sys__OldList * exp;
 struct Statement * stmt;
-} switchStmt;
+} __attribute__ ((gcc_struct)) switchStmt;
 struct
 {
 struct __ecereNameSpace__ecere__sys__OldList * exp;
 struct Statement * stmt;
-} whileStmt;
+} __attribute__ ((gcc_struct)) whileStmt;
 struct
 {
 struct __ecereNameSpace__ecere__sys__OldList * exp;
 struct Statement * stmt;
-} doWhile;
+} __attribute__ ((gcc_struct)) doWhile;
 struct
 {
 struct Statement * init;
 struct Statement * check;
 struct __ecereNameSpace__ecere__sys__OldList * increment;
 struct Statement * stmt;
-} forStmt;
+} __attribute__ ((gcc_struct)) forStmt;
 struct
 {
 struct Identifier * id;
-} gotoStmt;
+} __attribute__ ((gcc_struct)) gotoStmt;
 struct
 {
 struct Specifier * spec;
@@ -269,23 +285,23 @@ char * statements;
 struct __ecereNameSpace__ecere__sys__OldList * inputFields;
 struct __ecereNameSpace__ecere__sys__OldList * outputFields;
 struct __ecereNameSpace__ecere__sys__OldList * clobberedFields;
-} asmStmt;
+} __attribute__ ((gcc_struct)) asmStmt;
 struct
 {
 struct Expression * watcher;
 struct Expression * object;
 struct __ecereNameSpace__ecere__sys__OldList * watches;
-} _watch;
+} __attribute__ ((gcc_struct)) _watch;
 struct
 {
 struct Identifier * id;
 struct __ecereNameSpace__ecere__sys__OldList * exp;
 struct __ecereNameSpace__ecere__sys__OldList * filter;
 struct Statement * stmt;
-} forEachStmt;
+} __attribute__ ((gcc_struct)) forEachStmt;
 struct Declaration * decl;
-};
-};
+} __attribute__ ((gcc_struct));
+} __attribute__ ((gcc_struct));
 
 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_TypeName;
 
@@ -298,7 +314,7 @@ struct __ecereNameSpace__ecere__sys__OldList *  qualifiers;
 struct Declarator * declarator;
 int classObjectType;
 struct Expression * bitCount;
-};
+} __attribute__ ((gcc_struct));
 
 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Initializer;
 
@@ -312,9 +328,9 @@ union
 {
 struct Expression * exp;
 struct __ecereNameSpace__ecere__sys__OldList *  list;
-};
+} __attribute__ ((gcc_struct));
 unsigned int isConstant;
-};
+} __attribute__ ((gcc_struct));
 
 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__DataValue;
 
@@ -333,8 +349,8 @@ float f;
 double d;
 long long i64;
 uint64 ui64;
-};
-};
+} __attribute__ ((gcc_struct));
+} __attribute__ ((gcc_struct));
 
 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Expression;
 
@@ -350,7 +366,7 @@ struct
 {
 char *  constant;
 struct Identifier * identifier;
-};
+} __attribute__ ((gcc_struct));
 struct Statement * compound;
 struct Instantiation * instance;
 char *  string;
@@ -359,83 +375,83 @@ struct
 {
 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
 struct Declarator * decl;
-} _classExp;
+} __attribute__ ((gcc_struct)) _classExp;
 struct
 {
 struct Identifier * id;
-} classData;
+} __attribute__ ((gcc_struct)) classData;
 struct
 {
 struct Expression * exp;
 struct __ecereNameSpace__ecere__sys__OldList * arguments;
 struct Location argLoc;
-} call;
+} __attribute__ ((gcc_struct)) call;
 struct
 {
 struct Expression * exp;
 struct __ecereNameSpace__ecere__sys__OldList * index;
-} index;
+} __attribute__ ((gcc_struct)) index;
 struct
 {
 struct Expression * exp;
 struct Identifier * member;
 int memberType;
 unsigned int thisPtr;
-} member;
+} __attribute__ ((gcc_struct)) member;
 struct
 {
 int op;
 struct Expression * exp1;
 struct Expression * exp2;
-} op;
+} __attribute__ ((gcc_struct)) op;
 struct TypeName * typeName;
 struct Specifier * _class;
 struct
 {
 struct TypeName * typeName;
 struct Expression * exp;
-} cast;
+} __attribute__ ((gcc_struct)) cast;
 struct
 {
 struct Expression * cond;
 struct __ecereNameSpace__ecere__sys__OldList * exp;
 struct Expression * elseExp;
-} cond;
+} __attribute__ ((gcc_struct)) cond;
 struct
 {
 struct TypeName * typeName;
 struct Expression * size;
-} _new;
+} __attribute__ ((gcc_struct)) _new;
 struct
 {
 struct TypeName * typeName;
 struct Expression * size;
 struct Expression * exp;
-} _renew;
+} __attribute__ ((gcc_struct)) _renew;
 struct
 {
 char * table;
 struct Identifier * id;
-} db;
+} __attribute__ ((gcc_struct)) db;
 struct
 {
 struct Expression * ds;
 struct Expression * name;
-} dbopen;
+} __attribute__ ((gcc_struct)) dbopen;
 struct
 {
 struct TypeName * typeName;
 struct Initializer * initializer;
-} initializer;
+} __attribute__ ((gcc_struct)) initializer;
 struct
 {
 struct Expression * exp;
 struct TypeName * typeName;
-} vaArg;
-};
+} __attribute__ ((gcc_struct)) vaArg;
+} __attribute__ ((gcc_struct));
 unsigned int debugValue;
 struct __ecereNameSpace__ecere__com__DataValue val;
-unsigned int address;
+uint64 address;
 unsigned int hasAddress;
 struct Type * expType;
 struct Type * destType;
@@ -446,7 +462,7 @@ unsigned int isConstant;
 unsigned int addedThis;
 unsigned int needCast;
 unsigned int thisPtr;
-};
+} __attribute__ ((gcc_struct));
 
 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_TemplateDatatype;
 
@@ -454,7 +470,7 @@ struct TemplateDatatype
 {
 struct __ecereNameSpace__ecere__sys__OldList *  specifiers;
 struct Declarator * decl;
-};
+} __attribute__ ((gcc_struct));
 
 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_TemplateArgument;
 
@@ -473,11 +489,11 @@ union
 {
 struct TemplateDatatype * dataType;
 int memberType;
-};
+} __attribute__ ((gcc_struct));
 struct TemplateArgument * defaultArgument;
 char *  dataTypeString;
 struct Type * baseType;
-};
+} __attribute__ ((gcc_struct));
 
 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Specifier;
 
@@ -496,7 +512,7 @@ struct ExtDecl * extDecl;
 char *  name;
 struct Symbol * symbol;
 struct __ecereNameSpace__ecere__sys__OldList *  templateArgs;
-};
+} __attribute__ ((gcc_struct));
 struct
 {
 struct Identifier * id;
@@ -505,12 +521,13 @@ struct __ecereNameSpace__ecere__sys__OldList *  baseSpecs;
 struct __ecereNameSpace__ecere__sys__OldList *  definitions;
 unsigned int addNameSpace;
 struct Context * ctx;
-};
+struct ExtDecl * extDeclStruct;
+} __attribute__ ((gcc_struct));
 struct Expression * expression;
 struct Specifier * _class;
 struct TemplateParameter * templateParameter;
-};
-};
+} __attribute__ ((gcc_struct));
+} __attribute__ ((gcc_struct));
 
 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Identifier;
 
@@ -523,7 +540,7 @@ struct Symbol * classSym;
 struct Specifier * _class;
 char *  string;
 struct Identifier * badID;
-};
+} __attribute__ ((gcc_struct));
 
 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Pointer;
 
@@ -534,7 +551,7 @@ struct Pointer * next;
 struct Location loc;
 struct __ecereNameSpace__ecere__sys__OldList *  qualifiers;
 struct Pointer * pointer;
-};
+} __attribute__ ((gcc_struct));
 
 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Declarator;
 
@@ -554,26 +571,26 @@ struct
 struct Expression * exp;
 struct Expression * posExp;
 struct Attrib * attrib;
-} structDecl;
+} __attribute__ ((gcc_struct)) structDecl;
 struct
 {
 struct Expression * exp;
 struct Specifier * enumClass;
-} array;
+} __attribute__ ((gcc_struct)) array;
 struct
 {
 struct __ecereNameSpace__ecere__sys__OldList * parameters;
-} function;
+} __attribute__ ((gcc_struct)) function;
 struct
 {
 struct Pointer * pointer;
-} pointer;
+} __attribute__ ((gcc_struct)) pointer;
 struct
 {
 struct ExtDecl * extended;
-} extended;
-};
-};
+} __attribute__ ((gcc_struct)) extended;
+} __attribute__ ((gcc_struct));
+} __attribute__ ((gcc_struct));
 
 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_FunctionDefinition;
 
@@ -593,7 +610,7 @@ struct Type * type;
 struct Symbol * propSet;
 int tempCount;
 unsigned int propertyNoThis;
-};
+} __attribute__ ((gcc_struct));
 
 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_DBTableDef;
 
@@ -616,9 +633,9 @@ struct Declaration * declaration;
 char *  importString;
 struct Identifier * id;
 struct DBTableDef * table;
-};
+} __attribute__ ((gcc_struct));
 int importType;
-};
+} __attribute__ ((gcc_struct));
 
 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_ModuleImport;
 
@@ -643,7 +660,7 @@ union
 struct __ecereNameSpace__ecere__com__Method * method;
 struct __ecereNameSpace__ecere__com__Property * _property;
 struct __ecereNameSpace__ecere__com__Class * registered;
-};
+} __attribute__ ((gcc_struct));
 int id;
 int idCode;
 union
@@ -652,20 +669,20 @@ struct
 {
 struct External * pointerExternal;
 struct External * structExternal;
-};
+} __attribute__ ((gcc_struct));
 struct
 {
 struct External * externalGet;
 struct External * externalSet;
 struct External * externalPtr;
 struct External * externalIsSet;
-};
+} __attribute__ ((gcc_struct));
 struct
 {
 struct External * methodExternal;
 struct External * methodCodeExternal;
-};
-};
+} __attribute__ ((gcc_struct));
+} __attribute__ ((gcc_struct));
 unsigned int imported;
 unsigned int declaredStructSym;
 struct __ecereNameSpace__ecere__com__Class * _class;
@@ -692,7 +709,7 @@ struct __ecereNameSpace__ecere__sys__OldList templatedClasses;
 struct Context * ctx;
 int isIterator;
 struct Expression * propCategory;
-};
+} __attribute__ ((gcc_struct));
 
 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Type;
 
@@ -708,7 +725,7 @@ struct
 {
 struct __ecereNameSpace__ecere__sys__OldList members;
 char *  enumName;
-};
+} __attribute__ ((gcc_struct));
 struct
 {
 struct Type * returnType;
@@ -716,13 +733,13 @@ struct __ecereNameSpace__ecere__sys__OldList params;
 struct Symbol * thisClass;
 unsigned int staticMethod;
 struct TemplateParameter * thisClassTemplate;
-};
+} __attribute__ ((gcc_struct));
 struct
 {
 struct __ecereNameSpace__ecere__com__Method * method;
 struct __ecereNameSpace__ecere__com__Class * methodClass;
 struct __ecereNameSpace__ecere__com__Class * usedClass;
-};
+} __attribute__ ((gcc_struct));
 struct
 {
 struct Type * arrayType;
@@ -730,30 +747,32 @@ int arraySize;
 struct Expression * arraySizeExp;
 unsigned int freeExp;
 struct Symbol * enumClass;
-};
+} __attribute__ ((gcc_struct));
 struct Type * type;
 struct TemplateParameter * templateParameter;
-};
-unsigned int isSigned;
+} __attribute__ ((gcc_struct));
 int kind;
-unsigned int constant;
 unsigned int size;
 char *  name;
 char *  typeName;
-unsigned int count;
-unsigned int truth;
 int classObjectType;
-unsigned int byReference;
-unsigned int extraParam;
 int alignment;
-unsigned int directClassAccess;
-unsigned int computing;
-unsigned int dllExport;
 unsigned int offset;
-unsigned int keepCast;
-unsigned int passAsTemplate;
 int bitFieldCount;
-};
+int count;
+unsigned int isSigned : 1;
+unsigned int constant : 1;
+unsigned int truth : 1;
+unsigned int byReference : 1;
+unsigned int extraParam : 1;
+unsigned int directClassAccess : 1;
+unsigned int computing : 1;
+unsigned int keepCast : 1;
+unsigned int passAsTemplate : 1;
+unsigned int dllExport : 1;
+unsigned int attrStdcall : 1;
+unsigned int declaredWithStruct : 1;
+} __attribute__ ((gcc_struct));
 
 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Class;
 
@@ -811,7 +830,10 @@ struct __ecereNameSpace__ecere__com__ClassTemplateArgument *  templateArgs;
 struct __ecereNameSpace__ecere__com__Class * templateClass;
 struct __ecereNameSpace__ecere__sys__OldList templatized;
 int numParams;
-};
+unsigned int isInstanceClass;
+} __attribute__ ((gcc_struct));
+
+extern long long __ecereNameSpace__ecere__com__eClass_GetProperty(struct __ecereNameSpace__ecere__com__Class * _class, char *  name);
 
 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Instance;
 
@@ -820,7 +842,7 @@ struct __ecereNameSpace__ecere__com__Instance
 int (* *  _vTbl)();
 struct __ecereNameSpace__ecere__com__Class * _class;
 int _refCount;
-};
+} __attribute__ ((gcc_struct));
 
 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__DataMember;
 
@@ -843,7 +865,7 @@ struct __ecereNameSpace__ecere__sys__OldList members;
 struct __ecereNameSpace__ecere__sys__BinaryTree membersAlpha;
 int memberOffset;
 int structAlignment;
-};
+} __attribute__ ((gcc_struct));
 
 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__SerialBuffer;
 
@@ -853,7 +875,7 @@ unsigned char *  _buffer;
 unsigned int count;
 unsigned int _size;
 unsigned int pos;
-};
+} __attribute__ ((gcc_struct));
 
 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__ClassTemplateArgument;
 
@@ -865,7 +887,7 @@ struct
 {
 char *  dataTypeString;
 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
-};
+} __attribute__ ((gcc_struct));
 struct __ecereNameSpace__ecere__com__DataValue expression;
 struct
 {
@@ -875,10 +897,10 @@ union
 struct __ecereNameSpace__ecere__com__DataMember * member;
 struct __ecereNameSpace__ecere__com__Property * prop;
 struct __ecereNameSpace__ecere__com__Method * method;
-};
-};
-};
-};
+} __attribute__ ((gcc_struct));
+} __attribute__ ((gcc_struct));
+} __attribute__ ((gcc_struct));
+} __attribute__ ((gcc_struct));
 
 enum yytokentype
 {
@@ -925,7 +947,7 @@ struct TemplateDatatype * templateDatatype;
 struct DBTableEntry * dbtableEntry;
 struct DBIndexItem * dbindexItem;
 struct DBTableDef * dbtableDef;
-} YYSTYPE;
+} __attribute__ ((gcc_struct)) YYSTYPE;
 
 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Enumerator;
 
@@ -936,7 +958,7 @@ struct Enumerator * next;
 struct Location loc;
 struct Identifier * id;
 struct Expression * exp;
-};
+} __attribute__ ((gcc_struct));
 
 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_InitDeclarator;
 
@@ -947,7 +969,7 @@ struct InitDeclarator * next;
 struct Location loc;
 struct Declarator * declarator;
 struct Initializer * initializer;
-};
+} __attribute__ ((gcc_struct));
 
 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_AsmField;
 
@@ -958,7 +980,7 @@ struct AsmField * next;
 struct Location loc;
 char *  command;
 struct Expression * expression;
-};
+} __attribute__ ((gcc_struct));
 
 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Attribute;
 
@@ -969,7 +991,7 @@ struct Attribute * next;
 struct Location loc;
 char * attr;
 struct Expression * exp;
-};
+} __attribute__ ((gcc_struct));
 
 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_ClassFunction;
 
@@ -993,7 +1015,7 @@ unsigned int isDestructor;
 unsigned int dontMangle;
 int id;
 int idCode;
-};
+} __attribute__ ((gcc_struct));
 
 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_MembersInit;
 
@@ -1007,8 +1029,8 @@ union
 {
 struct __ecereNameSpace__ecere__sys__OldList *  dataMembers;
 struct ClassFunction * function;
-};
-};
+} __attribute__ ((gcc_struct));
+} __attribute__ ((gcc_struct));
 
 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_MemberInit;
 
@@ -1023,7 +1045,7 @@ struct Initializer * initializer;
 unsigned int used;
 unsigned int variable;
 unsigned int takeOutExp;
-};
+} __attribute__ ((gcc_struct));
 
 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_PropertyDef;
 
@@ -1054,11 +1076,11 @@ struct
 {
 struct Identifier * id;
 struct Initializer * initializer;
-};
-};
+} __attribute__ ((gcc_struct));
+} __attribute__ ((gcc_struct));
 int memberAccess;
 void *  object;
-};
+} __attribute__ ((gcc_struct));
 
 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_DBTableEntry;
 
@@ -1207,11 +1229,11 @@ break;
 }
 }
 
-static void OutputSpecifier(struct Specifier * spec, struct __ecereNameSpace__ecere__com__Instance * f);
+static void OutputSpecifier(struct Specifier * spec, struct __ecereNameSpace__ecere__com__Instance * f, unsigned int typeName);
 
 static void OutputDeclarator(struct Declarator * decl, struct __ecereNameSpace__ecere__com__Instance * f);
 
-void OutputTypeName(struct TypeName * type, struct __ecereNameSpace__ecere__com__Instance * f)
+void OutputTypeName(struct TypeName * type, struct __ecereNameSpace__ecere__com__Instance * f, unsigned int typeName)
 {
 if(type->qualifiers)
 {
@@ -1219,7 +1241,7 @@ struct Specifier * spec;
 
 for(spec = (*type->qualifiers).first; spec; spec = spec->next)
 {
-OutputSpecifier(spec, f);
+OutputSpecifier(spec, f, typeName);
 if(spec->next)
 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char *  string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
 }
@@ -1253,7 +1275,7 @@ struct Specifier * spec;
 
 for(spec = (*exp->_classExp.specifiers).first; spec; spec = spec->next)
 {
-OutputSpecifier(spec, f);
+OutputSpecifier(spec, f, 0x0);
 if(spec->next)
 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char *  string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
 }
@@ -1273,7 +1295,7 @@ break;
 case 13:
 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char *  string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "new ");
 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char *  string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
-OutputTypeName(exp->_renew.typeName, f);
+OutputTypeName(exp->_renew.typeName, f, 0x0);
 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char *  string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "[");
 OutputExpression(exp->_renew.size, f);
 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char *  string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "]");
@@ -1281,7 +1303,7 @@ break;
 case 28:
 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char *  string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "new0 ");
 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char *  string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
-OutputTypeName(exp->_renew.typeName, f);
+OutputTypeName(exp->_renew.typeName, f, 0x0);
 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char *  string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "[");
 OutputExpression(exp->_renew.size, f);
 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char *  string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "]");
@@ -1290,7 +1312,7 @@ case 14:
 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char *  string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "renew ");
 OutputExpression(exp->_renew.exp, f);
 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char *  string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
-OutputTypeName(exp->_renew.typeName, f);
+OutputTypeName(exp->_renew.typeName, f, 0x0);
 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char *  string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "[");
 OutputExpression(exp->_renew.size, f);
 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char *  string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "]");
@@ -1299,7 +1321,7 @@ case 29:
 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char *  string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "renew0 ");
 OutputExpression(exp->_renew.exp, f);
 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char *  string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
-OutputTypeName(exp->_renew.typeName, f);
+OutputTypeName(exp->_renew.typeName, f, 0x0);
 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char *  string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "[");
 OutputExpression(exp->_renew.size, f);
 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char *  string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "]");
@@ -1406,25 +1428,25 @@ OutputIdentifier(exp->member.member, f);
 break;
 case 10:
 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char *  string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "sizeof(");
-OutputTypeName(exp->typeName, f);
+OutputTypeName(exp->typeName, f, 0x0);
 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char *  string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")");
 break;
 case 38:
 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char *  string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "__alignof__(");
-OutputTypeName(exp->typeName, f);
+OutputTypeName(exp->typeName, f, 0x0);
 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char *  string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")");
 break;
 case 35:
 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char *  string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "__extension__ (");
 if(exp->initializer.typeName)
-OutputTypeName(exp->initializer.typeName, f);
+OutputTypeName(exp->initializer.typeName, f, 0x0);
 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char *  string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")");
 if(exp->initializer.initializer)
 OutputInitializer(exp->initializer.initializer, f);
 break;
 case 11:
 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char *  string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "(");
-OutputTypeName(exp->cast.typeName, f);
+OutputTypeName(exp->cast.typeName, f, 0x0);
 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char *  string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")");
 if(exp->cast.exp)
 OutputExpression(exp->cast.exp, f);
@@ -1449,7 +1471,7 @@ case 36:
 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char *  string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "__builtin_va_arg(");
 OutputExpression(exp->vaArg.exp, f);
 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char *  string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
-OutputTypeName(exp->vaArg.typeName, f);
+OutputTypeName(exp->vaArg.typeName, f, 0x0);
 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char *  string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")");
 break;
 case 37:
@@ -1481,16 +1503,34 @@ OutputExpression(field->expression, f);
 }
 }
 
-extern unsigned int inCompiler;
+extern char *  strchr(const char * , int);
 
-extern char *  __ecereNameSpace__ecere__sys__PathCat(char *  string, char *  addedPath);
-
-extern char *  GetIncludeFileFromID(int id);
+extern char *  __ecereNameSpace__ecere__sys__StripLastDirectory(char *  string, char *  output);
 
 extern char *  sourceFile;
 
+extern char *  __ecereNameSpace__ecere__sys__PathCat(char *  string, char *  addedPath);
+
 extern void __ecereNameSpace__ecere__sys__ChangeCh(char *  string, char ch1, char ch2);
 
+static void GetSourceName(char * name, const char * src)
+{
+name[0] = (char)0;
+if(src)
+{
+if(!strchr(src, '/') && !strchr(src, '\\'))
+__ecereNameSpace__ecere__sys__StripLastDirectory(sourceFile, name);
+__ecereNameSpace__ecere__sys__PathCat(name, src);
+}
+else if(sourceFile)
+__ecereNameSpace__ecere__sys__PathCat(name, sourceFile);
+__ecereNameSpace__ecere__sys__ChangeCh(name, '\\', '/');
+}
+
+extern unsigned int inCompiler;
+
+extern char *  GetIncludeFileFromID(int id);
+
 extern char *  outputFile;
 
 extern unsigned int outputLineNumbers;
@@ -1505,7 +1545,7 @@ extern struct Declarator * MkDeclaratorIdentifier(struct Identifier * id);
 
 extern struct Identifier * MkIdentifier(char *  string);
 
-extern struct __ecereNameSpace__ecere__sys__OldList *  CopyList(struct __ecereNameSpace__ecere__sys__OldList *  source, void *  (* )(void * ));
+extern struct __ecereNameSpace__ecere__sys__OldList *  CopyList(struct __ecereNameSpace__ecere__sys__OldList *  source, void *  (*  CopyFunction)(void * ));
 
 extern struct Specifier * CopySpecifier(struct Specifier * spec);
 
@@ -1515,7 +1555,7 @@ extern void ListAdd(struct __ecereNameSpace__ecere__sys__OldList * list, void *
 
 extern struct Specifier * MkSpecifierName(char *  name);
 
-extern void PrintType(struct Type * type, char *  string, unsigned int printName, unsigned int fullName);
+extern void PrintTypeNoConst(struct Type * type, char *  string, unsigned int printName, unsigned int fullName);
 
 extern struct TypeName * MkTypeName(struct __ecereNameSpace__ecere__sys__OldList * qualifiers, struct Declarator * declarator);
 
@@ -1532,15 +1572,7 @@ char origName[274] = "";
 
 if(inCompiler)
 {
-if(yylloc.start.included)
-{
-__ecereNameSpace__ecere__sys__PathCat(name, GetIncludeFileFromID((unsigned int)yylloc.start.included));
-}
-else if(sourceFile)
-{
-__ecereNameSpace__ecere__sys__PathCat(name, sourceFile);
-}
-__ecereNameSpace__ecere__sys__ChangeCh(name, '\\', '/');
+GetSourceName(name, stmt->loc.start.included ? GetIncludeFileFromID(stmt->loc.start.included) : (((void *)0)));
 __ecereNameSpace__ecere__sys__PathCat(origName, outputFile);
 __ecereNameSpace__ecere__sys__ChangeCh(origName, '\\', '/');
 }
@@ -1551,6 +1583,9 @@ outputLine += 2;
 }
 switch(stmt->type)
 {
+case 14:
+OutputDeclaration(stmt->decl, f);
+break;
 case 0:
 OutputIdentifier(stmt->labeled.id, f);
 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char *  string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ":\n");
@@ -1781,12 +1816,12 @@ decl = MkDeclaratorIdentifier(MkIdentifier("__ecereReturnVal"));
 }
 else
 {
-PrintType(exp->expType, string, 0x1, 0x1);
+PrintTypeNoConst(exp->expType, string, exp->expType->kind == 18 ? 0x1 : 0x0, 0x1);
 decl = SpecDeclFromString(string, specs, MkDeclaratorIdentifier(MkIdentifier("__ecereReturnVal")));
 }
 typeName = MkTypeName(specs, decl);
 InstDeclPassTypeName(typeName, 0x0);
-OutputTypeName(typeName, f);
+OutputTypeName(typeName, f, 0x0);
 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, ";");
 FreeTypeName(typeName);
 }
@@ -1829,7 +1864,7 @@ struct AsmField * field;
 
 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char *  string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "__asm__ ");
 if(stmt->asmStmt.spec)
-OutputSpecifier(stmt->asmStmt.spec, f);
+OutputSpecifier(stmt->asmStmt.spec, f, 0x0);
 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char *  string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "(");
 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char *  string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, stmt->asmStmt.statements);
 if(stmt->asmStmt.inputFields || stmt->asmStmt.outputFields || stmt->asmStmt.clobberedFields)
@@ -1869,6 +1904,7 @@ OutputAsmField(field, f);
 }
 }
 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char *  string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ");\n");
+outputLine++;
 break;
 }
 }
@@ -1889,7 +1925,7 @@ struct Specifier * spec;
 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char *  string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
 for(spec = (*ptr->qualifiers).first; spec; spec = spec->next)
 {
-OutputSpecifier(spec, f);
+OutputSpecifier(spec, f, 0x0);
 if(spec->next)
 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char *  string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
 }
@@ -1908,8 +1944,6 @@ extern void ProcessExpressionType(struct Expression * exp);
 
 extern void ComputeExpression(struct Expression * exp);
 
-extern int __ecereNameSpace__ecere__com__eClass_GetProperty(struct __ecereNameSpace__ecere__com__Class * _class, char *  name);
-
 static void OutputDeclarator(struct Declarator * decl, struct __ecereNameSpace__ecere__com__Instance * f)
 {
 switch(decl->type)
@@ -1973,7 +2007,7 @@ struct Symbol * _class = decl->array.enumClass->symbol;
 
 if(_class && _class->registered)
 {
-__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "%d", __ecereNameSpace__ecere__com__eClass_GetProperty(_class->registered, "enumSize"));
+__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "%d", (int)__ecereNameSpace__ecere__com__eClass_GetProperty(_class->registered, "enumSize"));
 }
 }
 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char *  string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "]");
@@ -1989,7 +2023,7 @@ if(decl->function.parameters && (*decl->function.parameters).first)
 {
 for(param = (*decl->function.parameters).first; param; param = param->next)
 {
-OutputTypeName(param, f);
+OutputTypeName(param, f, 0x0);
 if(param->next)
 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char *  string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
 }
@@ -2070,7 +2104,7 @@ extern struct Symbol * FindClass(char *  name);
 
 static void OutputClassDef(struct ClassDef * def, struct __ecereNameSpace__ecere__com__Instance * f);
 
-static void OutputSpecifier(struct Specifier * spec, struct __ecereNameSpace__ecere__com__Instance * f)
+static void OutputSpecifier(struct Specifier * spec, struct __ecereNameSpace__ecere__com__Instance * f, unsigned int typeName)
 {
 switch(spec->type)
 {
@@ -2111,10 +2145,10 @@ case INT:
 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char *  string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "int");
 break;
 case UINT:
-((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char *  string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "unsigned int");
+((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char *  string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, typeName ? "uint" : "unsigned int");
 break;
 case INT64:
-((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char *  string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "long long");
+((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char *  string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, typeName ? "int64" : "long long");
 break;
 case VALIST:
 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char *  string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "__builtin_va_list");
@@ -2200,6 +2234,11 @@ case 3:
 case 4:
 {
 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char *  string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, (spec->type == 3) ? "struct" : "union");
+if(spec->extDeclStruct)
+{
+((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char *  string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
+OutputExtDecl(spec->extDeclStruct, f);
+}
 if(spec->id)
 {
 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char *  string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
@@ -2215,7 +2254,7 @@ for(def = (*spec->definitions).first; def; def = def->next)
 {
 OutputClassDef(def, f);
 }
-((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char *  string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "}");
+((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char *  string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "} __attribute__ ((gcc_struct))");
 }
 break;
 }
@@ -2226,7 +2265,7 @@ OutputExpression(spec->expression, f);
 break;
 case 7:
 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char *  string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "subclass(");
-OutputSpecifier(spec->_class, f);
+OutputSpecifier(spec->_class, f, 0x0);
 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char *  string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")");
 break;
 case 8:
@@ -2242,15 +2281,7 @@ char origName[274] = "";
 
 if(inCompiler)
 {
-if(yylloc.start.included)
-{
-__ecereNameSpace__ecere__sys__PathCat(name, GetIncludeFileFromID((unsigned int)yylloc.start.included));
-}
-else if(sourceFile)
-{
-__ecereNameSpace__ecere__sys__PathCat(name, sourceFile);
-}
-__ecereNameSpace__ecere__sys__ChangeCh(name, '\\', '/');
+GetSourceName(name, initializer->loc.start.included ? GetIncludeFileFromID(initializer->loc.start.included) : (((void *)0)));
 __ecereNameSpace__ecere__sys__PathCat(origName, outputFile);
 __ecereNameSpace__ecere__sys__ChangeCh(origName, '\\', '/');
 }
@@ -2322,15 +2353,7 @@ if(d->initializer)
 {
 char name[274] = "";
 
-if(yylloc.start.included)
-{
-__ecereNameSpace__ecere__sys__PathCat(name, GetIncludeFileFromID((unsigned int)yylloc.start.included));
-}
-else if(sourceFile)
-{
-__ecereNameSpace__ecere__sys__PathCat(name, sourceFile);
-}
-__ecereNameSpace__ecere__sys__ChangeCh(name, '\\', '/');
+GetSourceName(name, decl->loc.start.included ? GetIncludeFileFromID(decl->loc.start.included) : (((void *)0)));
 if(inCompiler && outputLineNumbers && decl->loc.start.line)
 {
 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "\n#line %d \"%s\"\n", decl->loc.start.line, name);
@@ -2341,9 +2364,13 @@ break;
 }
 if(decl->specifiers)
 {
+unsigned int inTypeDef = 0x0;
+
 for(spec = (*decl->specifiers).first; spec; spec = spec->next)
 {
-OutputSpecifier(spec, f);
+if(spec->type == 0 && spec->specifier == TYPEDEF)
+inTypeDef = 0x1;
+OutputSpecifier(spec, f, inTypeDef && !spec->next);
 if(spec->next)
 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char *  string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
 }
@@ -2366,7 +2393,7 @@ if(decl->specifiers)
 {
 for(spec = (*decl->specifiers).first; spec; spec = spec->next)
 {
-OutputSpecifier(spec, f);
+OutputSpecifier(spec, f, 0x0);
 if(spec->next)
 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char *  string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
 }
@@ -2386,7 +2413,7 @@ if(d->next)
 if(decl->extStorage)
 {
 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char *  string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
-OutputSpecifier(decl->extStorage, f);
+OutputSpecifier(decl->extStorage, f, 0x0);
 }
 break;
 }
@@ -2423,7 +2450,7 @@ struct Specifier * spec;
 
 for(spec = (*func->specifiers).first; spec; spec = spec->next)
 {
-OutputSpecifier(spec, f);
+OutputSpecifier(spec, f, 0x0);
 if(spec->next)
 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char *  string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
 }
@@ -2451,15 +2478,7 @@ if(inCompiler && memoryGuard)
 char name[1024] = "";
 struct Identifier * id = GetDeclId(func->declarator);
 
-if(yylloc.start.included)
-{
-__ecereNameSpace__ecere__sys__PathCat(name, GetIncludeFileFromID((unsigned int)yylloc.start.included));
-}
-else if(sourceFile)
-{
-__ecereNameSpace__ecere__sys__PathCat(name, sourceFile);
-}
-__ecereNameSpace__ecere__sys__ChangeCh(name, '\\', '/');
+GetSourceName(name, func->loc.start.included ? GetIncludeFileFromID(func->loc.start.included) : (((void *)0)));
 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "{\n");
 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "   __ecereNameSpace__ecere__com__MemoryGuard_PushLoc(\"%s:%s\");\n", name, id->string);
 outputLine += 2;
@@ -2530,7 +2549,7 @@ break;
 static void OutputInstance(struct Instantiation * inst, struct __ecereNameSpace__ecere__com__Instance * f)
 {
 if(inst->_class)
-OutputSpecifier(inst->_class, f);
+OutputSpecifier(inst->_class, f, 0x0);
 if(inst->exp)
 {
 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char *  string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
@@ -2573,7 +2592,7 @@ struct Specifier * spec;
 
 for(spec = (*func->specifiers).first; spec; spec = spec->next)
 {
-OutputSpecifier(spec, f);
+OutputSpecifier(spec, f, 0x0);
 if(spec->next)
 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char *  string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
 }
@@ -2644,7 +2663,7 @@ break;
 static void OutputClass(struct ClassDefinition * _class, struct __ecereNameSpace__ecere__com__Instance * f)
 {
 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char *  string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "class ");
-OutputSpecifier(_class->_class, f);
+OutputSpecifier(_class->_class, f, 0x0);
 if(_class->baseSpecs)
 {
 struct Specifier * spec;
@@ -2652,7 +2671,7 @@ struct Specifier * spec;
 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char *  string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " : ");
 for(spec = (*_class->baseSpecs).first; spec; spec = spec->next)
 {
-OutputSpecifier(spec, f);
+OutputSpecifier(spec, f, 0x0);
 }
 }
 if(_class->definitions)
@@ -2676,7 +2695,7 @@ void OutputTree(struct __ecereNameSpace__ecere__sys__OldList * ast, struct __ece
 {
 struct External * external;
 
-outputLine = 25;
+outputLine = 30;
 for(external = ast->first; external; external = external->next)
 {
 switch(external->type)
@@ -2700,17 +2719,12 @@ break;
 }
 }
 
-extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__TempFile;
-
-struct __ecereNameSpace__ecere__sys__TempFile
-{
-char __ecere_padding[24];
-};
-
 extern char *  __ecereNameSpace__ecere__sys__TrimRSpaces(char *  string, char *  output);
 
 extern void *  __ecereNameSpace__ecere__com__eInstance_New(struct __ecereNameSpace__ecere__com__Class * _class);
 
+extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__TempFile;
+
 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_GetSize;
 
 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_Seek;
@@ -2728,7 +2742,7 @@ unsigned int size;
 
 typeName->qualifiers = specs;
 typeName->declarator = decl;
-OutputTypeName(typeName, f);
+OutputTypeName(typeName, f, 0x1);
 ((typeName ? (__ecereClass_TypeName->Destructor ? __ecereClass_TypeName->Destructor(typeName) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(typeName)) : 0), typeName = 0);
 size = ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_GetSize])(f);
 string = __ecereNameSpace__ecere__com__eSystem_New(sizeof(char) * (size + 1));
@@ -2752,7 +2766,7 @@ struct __ecereNameSpace__ecere__com__Class * class;
 
 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("SetMemoryGuard", "void SetMemoryGuard(bool b)", SetMemoryGuard, module, 1);
 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetMemoryGuard", "bool GetMemoryGuard(void)", GetMemoryGuard, module, 1);
-__ecereNameSpace__ecere__com__eSystem_RegisterFunction("OutputTypeName", "void OutputTypeName(TypeName type, ecere::sys::File f)", OutputTypeName, module, 1);
+__ecereNameSpace__ecere__com__eSystem_RegisterFunction("OutputTypeName", "void OutputTypeName(TypeName type, ecere::sys::File f, bool typeName)", OutputTypeName, module, 1);
 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("OutputExpression", "void OutputExpression(Expression exp, ecere::sys::File f)", OutputExpression, module, 1);
 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("OutputTree", "void OutputTree(ecere::sys::OldList ast, ecere::sys::File f)", OutputTree, module, 1);
 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("StringFromSpecDecl", "char * StringFromSpecDecl(ecere::sys::OldList specs, Declarator decl)", StringFromSpecDecl, module, 1);