+/* 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
#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;
#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;
{
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;
int count;
unsigned int offset;
unsigned int circ;
-};
+} __attribute__ ((gcc_struct));
extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Method;
char * dataTypeString;
struct Type * dataType;
int memberAccess;
-};
+} __attribute__ ((gcc_struct));
extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Property;
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;
unsigned int compiled;
unsigned int selfWatchable;
unsigned int isWatchable;
-};
+} __attribute__ ((gcc_struct));
extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_CodePosition;
int line;
int charPos;
int pos;
-unsigned int included;
-};
+int included;
+} __attribute__ ((gcc_struct));
extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Location;
{
struct CodePosition start;
struct CodePosition end;
-};
+} __attribute__ ((gcc_struct));
extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Attrib;
struct Location loc;
int type;
struct __ecereNameSpace__ecere__sys__OldList * attribs;
-};
+} __attribute__ ((gcc_struct));
extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_ExtDecl;
{
char * s;
struct Attrib * attr;
-};
-};
+} __attribute__ ((gcc_struct));
+} __attribute__ ((gcc_struct));
extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_ClassDefinition;
int endid;
int declMode;
unsigned int deleteWatchable;
-};
+} __attribute__ ((gcc_struct));
extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Context;
struct Location nameLoc;
struct Location insideLoc;
unsigned int built;
-};
+} __attribute__ ((gcc_struct));
extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Declaration;
{
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;
{
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;
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;
struct Declarator * declarator;
int classObjectType;
struct Expression * bitCount;
-};
+} __attribute__ ((gcc_struct));
extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Initializer;
{
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;
double d;
long long i64;
uint64 ui64;
-};
-};
+} __attribute__ ((gcc_struct));
+} __attribute__ ((gcc_struct));
extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Expression;
{
char * constant;
struct Identifier * identifier;
-};
+} __attribute__ ((gcc_struct));
struct Statement * compound;
struct Instantiation * instance;
char * string;
{
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;
unsigned int addedThis;
unsigned int needCast;
unsigned int thisPtr;
-};
+} __attribute__ ((gcc_struct));
extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_TemplateDatatype;
{
struct __ecereNameSpace__ecere__sys__OldList * specifiers;
struct Declarator * decl;
-};
+} __attribute__ ((gcc_struct));
extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_TemplateArgument;
{
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;
char * name;
struct Symbol * symbol;
struct __ecereNameSpace__ecere__sys__OldList * templateArgs;
-};
+} __attribute__ ((gcc_struct));
struct
{
struct Identifier * id;
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;
struct Specifier * _class;
char * string;
struct Identifier * badID;
-};
+} __attribute__ ((gcc_struct));
extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Pointer;
struct Location loc;
struct __ecereNameSpace__ecere__sys__OldList * qualifiers;
struct Pointer * pointer;
-};
+} __attribute__ ((gcc_struct));
extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Declarator;
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;
struct Symbol * propSet;
int tempCount;
unsigned int propertyNoThis;
-};
+} __attribute__ ((gcc_struct));
extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_DBTableDef;
char * importString;
struct Identifier * id;
struct DBTableDef * table;
-};
+} __attribute__ ((gcc_struct));
int importType;
-};
+} __attribute__ ((gcc_struct));
extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_ModuleImport;
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
{
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;
struct Context * ctx;
int isIterator;
struct Expression * propCategory;
-};
+} __attribute__ ((gcc_struct));
extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Type;
{
struct __ecereNameSpace__ecere__sys__OldList members;
char * enumName;
-};
+} __attribute__ ((gcc_struct));
struct
{
struct Type * returnType;
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;
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;
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;
int (* * _vTbl)();
struct __ecereNameSpace__ecere__com__Class * _class;
int _refCount;
-};
+} __attribute__ ((gcc_struct));
extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__DataMember;
struct __ecereNameSpace__ecere__sys__BinaryTree membersAlpha;
int memberOffset;
int structAlignment;
-};
+} __attribute__ ((gcc_struct));
extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__SerialBuffer;
unsigned int count;
unsigned int _size;
unsigned int pos;
-};
+} __attribute__ ((gcc_struct));
extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__ClassTemplateArgument;
{
char * dataTypeString;
struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
-};
+} __attribute__ ((gcc_struct));
struct __ecereNameSpace__ecere__com__DataValue expression;
struct
{
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
{
struct DBTableEntry * dbtableEntry;
struct DBIndexItem * dbindexItem;
struct DBTableDef * dbtableDef;
-} YYSTYPE;
+} __attribute__ ((gcc_struct)) YYSTYPE;
extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Enumerator;
struct Location loc;
struct Identifier * id;
struct Expression * exp;
-};
+} __attribute__ ((gcc_struct));
extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_InitDeclarator;
struct Location loc;
struct Declarator * declarator;
struct Initializer * initializer;
-};
+} __attribute__ ((gcc_struct));
extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_AsmField;
struct Location loc;
char * command;
struct Expression * expression;
-};
+} __attribute__ ((gcc_struct));
extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Attribute;
struct Location loc;
char * attr;
struct Expression * exp;
-};
+} __attribute__ ((gcc_struct));
extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_ClassFunction;
unsigned int dontMangle;
int id;
int idCode;
-};
+} __attribute__ ((gcc_struct));
extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_MembersInit;
{
struct __ecereNameSpace__ecere__sys__OldList * dataMembers;
struct ClassFunction * function;
-};
-};
+} __attribute__ ((gcc_struct));
+} __attribute__ ((gcc_struct));
extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_MemberInit;
unsigned int used;
unsigned int variable;
unsigned int takeOutExp;
-};
+} __attribute__ ((gcc_struct));
extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_PropertyDef;
{
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;
}
}
-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)
{
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, " ");
}
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, " ");
}
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, "]");
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, "]");
((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, "]");
((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, "]");
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);
((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:
}
}
-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;
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);
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);
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, '\\', '/');
}
}
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");
}
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);
}
((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)
}
}
((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ");\n");
+outputLine++;
break;
}
}
((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, " ");
}
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)
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, "]");
{
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, ", ");
}
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)
{
((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");
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, " ");
{
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;
}
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:
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, '\\', '/');
}
{
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);
}
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, " ");
}
{
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, " ");
}
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;
}
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, " ");
}
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;
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, " ");
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, " ");
}
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;
((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)
{
struct External * external;
-outputLine = 25;
+outputLine = 30;
for(external = ast->first; external; external = external->next)
{
switch(external->type)
}
}
-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;
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));
__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);