int line;
int charPos;
int pos;
-unsigned int included;
+int included;
} __attribute__ ((gcc_struct));
extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Location;
struct Type * type;
struct TemplateParameter * templateParameter;
} __attribute__ ((gcc_struct));
-unsigned int isSigned;
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);
struct __ecereNameSpace__ecere__sys__OldList _excludedSymbols =
{
-0, 0, 0, (unsigned int)&((struct Symbol *)(void *)0)->left, 0
+0, 0, 0, (unsigned int)&((struct Symbol *)(void * )0)->left, 0
};
extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__NameSpace;
{
for(d = (*decl->declarators).first; d; d = d->next)
{
-{
struct Identifier * declId = GetDeclId(d);
+if(declId)
+{
dataMemberDefine = __extension__ ({
struct DataMemberDefine * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_DataMemberDefine);
extern void FreeType(struct Type * type);
-extern struct __ecereNameSpace__ecere__com__Class * __ecereNameSpace__ecere__com__eSystem_RegisterClass(int type, char * name, char * baseName, int size, int sizeClass, unsigned int (* )(void * ), void (* )(void * ), struct __ecereNameSpace__ecere__com__Instance * module, int declMode, int inheritanceAccess);
+extern struct __ecereNameSpace__ecere__com__Class * __ecereNameSpace__ecere__com__eSystem_RegisterClass(int type, char * name, char * baseName, int size, int sizeClass, unsigned int (* Constructor)(void * ), void (* Destructor)(void * ), struct __ecereNameSpace__ecere__com__Instance * module, int declMode, int inheritanceAccess);
extern struct __ecereNameSpace__ecere__com__Method * __ecereNameSpace__ecere__com__eClass_AddVirtualMethod(struct __ecereNameSpace__ecere__com__Class * _class, char * name, char * type, void * function, int declMode);
extern size_t strlen(const char * );
+extern char * PassArg(char * output, const char * input);
+
extern char * GetOutputFile(void);
extern void SetOutputFile(char * s);
extern struct __ecereNameSpace__ecere__com__Instance * __thisModule;
-extern void SetGlobalContext(struct Context * context);
+extern void SetGlobalData(struct __ecereNameSpace__ecere__com__NameSpace * nameSpace);
-extern void SetTopContext(struct Context * context);
+extern void SetExcludedSymbols(struct __ecereNameSpace__ecere__sys__OldList * list);
-extern void SetCurrentContext(struct Context * context);
+extern void SetGlobalContext(struct Context * context);
-extern void SetExcludedSymbols(struct __ecereNameSpace__ecere__sys__OldList * list);
+extern void SetCurrentContext(struct Context * context);
-extern void SetGlobalData(struct __ecereNameSpace__ecere__com__NameSpace * nameSpace);
+extern void SetTopContext(struct Context * context);
extern void SetDefines(struct __ecereNameSpace__ecere__sys__OldList * list);
extern void SetImports(struct __ecereNameSpace__ecere__sys__OldList * list);
-extern void SetPrecompDefines(struct __ecereNameSpace__ecere__sys__OldList * list);
-
extern void SetInPreCompiler(unsigned int b);
+extern void SetPrecompDefines(struct __ecereNameSpace__ecere__sys__OldList * list);
+
extern void SetTargetPlatform(int platform);
extern void SetTargetBits(int bits);
{
if(!strcmp(arg + 1, "m32") || !strcmp(arg + 1, "m64"))
{
-int argLen = strlen(arg);
-int newLen = cppOptionsLen + 1 + argLen;
+int newLen = cppOptionsLen + 1 + strlen(arg);
cppOptions = __ecereNameSpace__ecere__com__eSystem_Renew(cppOptions, sizeof(char) * (newLen + 1));
cppOptions[cppOptionsLen] = ' ';
cppOptionsLen = newLen;
targetBits = !strcmp(arg + 1, "m32") ? 32 : 64;
}
-else if(arg[1] == 'D')
+else if(arg[1] == 'D' || arg[1] == 'I')
{
-int argLen = strlen(arg);
-int newLen = cppOptionsLen + 1 + argLen;
+char * buf;
+int size = cppOptionsLen + 1 + strlen(arg) * 2 + 1;
-cppOptions = __ecereNameSpace__ecere__com__eSystem_Renew(cppOptions, sizeof(char) * (newLen + 1));
-cppOptions[cppOptionsLen] = ' ';
-strcpy(cppOptions + cppOptionsLen + 1, arg);
-cppOptionsLen = newLen;
-}
-else if(arg[1] == 'I')
-{
-int argLen = strlen(arg);
-int newLen = cppOptionsLen + argLen + 3;
-
-cppOptions = __ecereNameSpace__ecere__com__eSystem_Renew(cppOptions, sizeof(char) * (newLen + 1));
-cppOptions[cppOptionsLen] = ' ';
-cppOptions[cppOptionsLen + 1] = '-';
-cppOptions[cppOptionsLen + 2] = 'I';
-cppOptions[cppOptionsLen + 3] = '"';
-strcpy(cppOptions + cppOptionsLen + 4, arg + 2);
-cppOptions[newLen - 1] = '\"';
-cppOptions[newLen] = '\0';
-cppOptionsLen = newLen;
+cppOptions = __ecereNameSpace__ecere__com__eSystem_Renew(cppOptions, sizeof(char) * (size));
+buf = cppOptions + cppOptionsLen;
+*buf++ = ' ';
+PassArg(buf, arg);
+cppOptionsLen = cppOptionsLen + 1 + strlen(buf);
}
else if(!strcmp(arg + 1, "t"))
{
{
if(c + 1 < ((struct __ecereNameSpace__ecere__com__Application *)(((char *)this + structSize_Module)))->argc)
{
-int argLen = strlen(arg);
-int arg1Len = strlen(((struct __ecereNameSpace__ecere__com__Application *)(((char *)this + structSize_Module)))->argv[c + 1]);
-int newLen = cppOptionsLen + argLen + arg1Len + 4;
+char * buf;
+char * arg1 = ((struct __ecereNameSpace__ecere__com__Application *)(((char *)this + structSize_Module)))->argv[++c];
+int size = cppOptionsLen + 1 + strlen(arg) * 2 + strlen(arg1) * 2 + 1;
-cppOptions = __ecereNameSpace__ecere__com__eSystem_Renew(cppOptions, sizeof(char) * (newLen + 1));
-cppOptions[cppOptionsLen] = ' ';
-strcpy(cppOptions + cppOptionsLen + 1, arg);
-cppOptions[cppOptionsLen + argLen + 1] = ' ';
-cppOptions[cppOptionsLen + argLen + 2] = '"';
-arg = ((struct __ecereNameSpace__ecere__com__Application *)(((char *)this + structSize_Module)))->argv[++c];
-strcpy(cppOptions + cppOptionsLen + argLen + 3, arg);
-cppOptions[newLen - 1] = '\"';
-cppOptions[newLen] = '\0';
-cppOptionsLen = newLen;
+cppOptions = __ecereNameSpace__ecere__com__eSystem_Renew(cppOptions, sizeof(char) * (size));
+buf = cppOptions + cppOptionsLen;
+*buf++ = ' ';
+buf = PassArg(buf, arg);
+*buf++ = ' ';
+buf = PassArg(buf, arg1);
+cppOptionsLen = buf - cppOptions;
}
else
valid = 0x0;
}
}
if(!valid)
+{
printf(__ecereNameSpace__ecere__GetTranslatedString(__thisModule, "Syntax:\n ecp [-t <target platform>] [-cpp <c preprocessor>] [-o <output>] [-symbols <outputdir>] [-I<includedir>]* [-isystem <sysincludedir>]* [-D<definition>]* -c <input>\n", (((void *)0))));
+}
else
{
-char command[3075LL];
struct __ecereNameSpace__ecere__com__Instance * cppOutput;
+char command[3075LL];
+SetGlobalData(&globalData);
+SetExcludedSymbols(&_excludedSymbols);
SetGlobalContext(globalContext);
-SetTopContext(globalContext);
SetCurrentContext(globalContext);
-SetExcludedSymbols(&_excludedSymbols);
-SetGlobalData(&globalData);
+SetTopContext(globalContext);
SetDefines(&defines);
SetImports(&imports);
-SetPrecompDefines(&precompDefines);
SetInPreCompiler(0x1);
+SetPrecompDefines(&precompDefines);
SetTargetPlatform(targetPlatform);
SetTargetBits(targetBits);
SetEchoOn(0x0);