struct __ecereNameSpace__ecere__sys__OldList methods;
struct __ecereNameSpace__ecere__sys__OldList properties;
unsigned int itself;
-unsigned int isRemote;
+int isRemote;
} __attribute__ ((gcc_struct));
extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Symbol;
char * defaultProperty;
unsigned int comRedefinition;
int count;
-unsigned int isRemote;
+int isRemote;
unsigned int internalDecl;
void * data;
unsigned int computeSize;
else
{
struct __ecereNameSpace__ecere__com__Instance * cppOutput;
-char command[3075LL];
+char command[3075];
SetGlobalData(&globalData);
SetExcludedSymbols(&_excludedSymbols);
SetTargetPlatform(targetPlatform);
SetTargetBits(targetBits);
SetEchoOn(0x0);
-privateModule = (struct __ecereNameSpace__ecere__com__Instance *)__ecereNameSpace__ecere__com____ecere_COM_Initialize(0x1 | (targetBits == sizeof(uintptr_t) * 8 ? (unsigned int)0 : targetBits == 64 ? (unsigned int)2 : targetBits == 32 ? (unsigned int)4 : (unsigned int)0) | (unsigned int)8, 1, (((void *)0)));
+privateModule = (struct __ecereNameSpace__ecere__com__Instance *)__ecereNameSpace__ecere__com____ecere_COM_Initialize((unsigned int)(0x1 | (targetBits == sizeof(uintptr_t) * 8 ? (unsigned int)0 : targetBits == 64 ? 2 : targetBits == 32 ? 4 : (unsigned int)0) | 8), 1, (((void *)0)));
SetPrivateModule(privateModule);
__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&globalContext->types, (struct __ecereNameSpace__ecere__sys__BTNode *)__extension__ ({
struct Symbol * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
data->key = (uintptr_t)data->fullName;
__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&globalData.functions, (struct __ecereNameSpace__ecere__sys__BTNode *)data);
}
-snprintf(command, sizeof command, "%s%s -x c -E %s\"%s\"", cppCommand, cppOptions ? cppOptions : "", buildingBootStrap ? "" : "-include stdint.h -include sys/types.h ", GetSourceFile());
-command[sizeof command - 1] = (char)0;
+snprintf(command, sizeof (command), "%s%s -x c -E %s\"%s\"", cppCommand, cppOptions ? cppOptions : "", buildingBootStrap ? "" : "-include stdint.h -include sys/types.h ", GetSourceFile());
+command[sizeof (command) - 1] = (char)0;
if((cppOutput = __ecereNameSpace__ecere__sys__DualPipeOpen((((unsigned int)(0x1))), command)))
{
char impFile[797];
char * defaultProperty;
unsigned int comRedefinition;
int count;
-unsigned int isRemote;
+int isRemote;
unsigned int internalDecl;
void * data;
unsigned int computeSize;
char * defaultProperty;
unsigned int comRedefinition;
int count;
-unsigned int isRemote;
+int isRemote;
unsigned int internalDecl;
void * data;
unsigned int computeSize;
char * defaultProperty;
unsigned int comRedefinition;
int count;
-unsigned int isRemote;
+int isRemote;
unsigned int internalDecl;
void * data;
unsigned int computeSize;
char * defaultProperty;
unsigned int comRedefinition;
int count;
-unsigned int isRemote;
+int isRemote;
unsigned int internalDecl;
void * data;
unsigned int computeSize;
char * defaultProperty;
unsigned int comRedefinition;
int count;
-unsigned int isRemote;
+int isRemote;
unsigned int internalDecl;
void * data;
unsigned int computeSize;
char * defaultProperty;
unsigned int comRedefinition;
int count;
-unsigned int isRemote;
+int isRemote;
unsigned int internalDecl;
void * data;
unsigned int computeSize;
char * defaultProperty;
unsigned int comRedefinition;
int count;
-unsigned int isRemote;
+int isRemote;
unsigned int internalDecl;
void * data;
unsigned int computeSize;
char * defaultProperty;
unsigned int comRedefinition;
int count;
-unsigned int isRemote;
+int isRemote;
unsigned int internalDecl;
void * data;
unsigned int computeSize;
char * defaultProperty;
unsigned int comRedefinition;
int count;
-unsigned int isRemote;
+int isRemote;
unsigned int internalDecl;
void * data;
unsigned int computeSize;
char * defaultProperty;
unsigned int comRedefinition;
int count;
-unsigned int isRemote;
+int isRemote;
unsigned int internalDecl;
void * data;
unsigned int computeSize;
{
struct __ecereNameSpace__ecere__sys__DualPipe * __ecerePointer___ecereNameSpace__ecere__sys__DualPipe = (struct __ecereNameSpace__ecere__sys__DualPipe *)(this ? (((char *)this) + __ecereClass___ecereNameSpace__ecere__sys__DualPipe->offset) : 0);
-return (__ecereProp___ecereNameSpace__ecere__sys__File_Get_input(this) || __ecereProp___ecereNameSpace__ecere__sys__File_Get_output(this)) ? (unsigned int)((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *))__ecereClass___ecereNameSpace__ecere__sys__File->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_GetSize])(this) : DualPipe_GetSize(__ecerePointer___ecereNameSpace__ecere__sys__DualPipe->dp);
+return (__ecereProp___ecereNameSpace__ecere__sys__File_Get_input(this) || __ecereProp___ecereNameSpace__ecere__sys__File_Get_output(this)) ? ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *))__ecereClass___ecereNameSpace__ecere__sys__File->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_GetSize])(this) : DualPipe_GetSize(__ecerePointer___ecereNameSpace__ecere__sys__DualPipe->dp);
}
unsigned int __ecereMethod___ecereNameSpace__ecere__sys__DualPipe_Peek(struct __ecereNameSpace__ecere__com__Instance * this)
char * defaultProperty;
unsigned int comRedefinition;
int count;
-unsigned int isRemote;
+int isRemote;
unsigned int internalDecl;
void * data;
unsigned int computeSize;
{
struct __ecereNameSpace__ecere__sys__File * __ecerePointer___ecereNameSpace__ecere__sys__File = (struct __ecereNameSpace__ecere__sys__File *)(this ? (((char *)this) + __ecereClass___ecereNameSpace__ecere__sys__File->offset) : 0);
-return __ecerePointer___ecereNameSpace__ecere__sys__File->input ? (unsigned int)feof(__ecerePointer___ecereNameSpace__ecere__sys__File->input) : 0x1;
+return __ecerePointer___ecereNameSpace__ecere__sys__File->input ? feof(__ecerePointer___ecereNameSpace__ecere__sys__File->input) != 0 : 0x1;
}
unsigned int __ecereMethod___ecereNameSpace__ecere__sys__File_Truncate(struct __ecereNameSpace__ecere__com__Instance * this, unsigned int size)
char * defaultProperty;
unsigned int comRedefinition;
int count;
-unsigned int isRemote;
+int isRemote;
unsigned int internalDecl;
void * data;
unsigned int computeSize;
char * defaultProperty;
unsigned int comRedefinition;
int count;
-unsigned int isRemote;
+int isRemote;
unsigned int internalDecl;
void * data;
unsigned int computeSize;
char * defaultProperty;
unsigned int comRedefinition;
int count;
-unsigned int isRemote;
+int isRemote;
unsigned int internalDecl;
void * data;
unsigned int computeSize;
char * defaultProperty;
unsigned int comRedefinition;
int count;
-unsigned int isRemote;
+int isRemote;
unsigned int internalDecl;
void * data;
unsigned int computeSize;
char * defaultProperty;
unsigned int comRedefinition;
int count;
-unsigned int isRemote;
+int isRemote;
unsigned int internalDecl;
void * data;
unsigned int computeSize;
}
for(; addedPath[c]; )
{
-char directory[4384LL];
+char directory[4384];
int len = 0;
char ch;
int count;
}
for(; addedPath[c]; )
{
-char directory[4384LL];
+char directory[4384];
int len = 0;
char ch;
int count;
memmove(destination, path, strlen(path) + 1);
else
{
-char pathPart[4384LL], pathRest[797];
-char toPart[4384LL], toRest[797];
+char pathPart[4384], pathRest[797];
+char toPart[4384], toRest[797];
unsigned int different = 0x0;
strcpy(pathRest, path);
char * defaultProperty;
unsigned int comRedefinition;
int count;
-unsigned int isRemote;
+int isRemote;
unsigned int internalDecl;
void * data;
unsigned int computeSize;
char * defaultProperty;
unsigned int comRedefinition;
int count;
-unsigned int isRemote;
+int isRemote;
unsigned int internalDecl;
void * data;
unsigned int computeSize;
{
struct __ecereNameSpace__ecere__sys__TempFile * __ecerePointer___ecereNameSpace__ecere__sys__TempFile = (struct __ecereNameSpace__ecere__sys__TempFile *)(this ? (((char *)this) + __ecereClass___ecereNameSpace__ecere__sys__TempFile->offset) : 0);
-return (unsigned int)__ecerePointer___ecereNameSpace__ecere__sys__TempFile->size;
+return __ecerePointer___ecereNameSpace__ecere__sys__TempFile->size;
}
unsigned int __ecereMethod___ecereNameSpace__ecere__sys__TempFile_Truncate(struct __ecereNameSpace__ecere__com__Instance * this, unsigned int size)
__ecerePointer___ecereNameSpace__ecere__sys__TempFile->buffer = __ecereNameSpace__ecere__com__eSystem_Renew(__ecerePointer___ecereNameSpace__ecere__sys__TempFile->buffer, sizeof(unsigned char) * (size));
__ecerePointer___ecereNameSpace__ecere__sys__TempFile->size = (unsigned int)size;
__ecerePointer___ecereNameSpace__ecere__sys__TempFile->allocated = (unsigned int)size;
-if(__ecerePointer___ecereNameSpace__ecere__sys__TempFile->position > (unsigned int)size)
+if(__ecerePointer___ecereNameSpace__ecere__sys__TempFile->position > size)
__ecerePointer___ecereNameSpace__ecere__sys__TempFile->position = (unsigned int)size;
return 0x1;
}
char * defaultProperty;
unsigned int comRedefinition;
int count;
-unsigned int isRemote;
+int isRemote;
unsigned int internalDecl;
void * data;
unsigned int computeSize;
char * defaultProperty;
unsigned int comRedefinition;
int count;
-unsigned int isRemote;
+int isRemote;
unsigned int internalDecl;
void * data;
unsigned int computeSize;
char * defaultProperty;
unsigned int comRedefinition;
int count;
-unsigned int isRemote;
+int isRemote;
unsigned int internalDecl;
void * data;
unsigned int computeSize;
char * defaultProperty;
unsigned int comRedefinition;
int count;
-unsigned int isRemote;
+int isRemote;
unsigned int internalDecl;
void * data;
unsigned int computeSize;
{
int start = 0, c;
struct __ecereNameSpace__ecere__com__NameSpace * nameSpace = (((void *)0));
-unsigned int force64Bits = ((unsigned int)((struct __ecereNameSpace__ecere__com__Application *)(((char *)((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->application + structSize_Module)))->isGUIApp & 2) ? 0x1 : 0x0;
-unsigned int force32Bits = ((unsigned int)((struct __ecereNameSpace__ecere__com__Application *)(((char *)((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->application + structSize_Module)))->isGUIApp & 4) ? 0x1 : 0x0;
-unsigned int inCompiler = ((unsigned int)((struct __ecereNameSpace__ecere__com__Application *)(((char *)((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->application + structSize_Module)))->isGUIApp & 8) ? 0x1 : 0x0;
+unsigned int force64Bits = (((struct __ecereNameSpace__ecere__com__Application *)(((char *)((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->application + structSize_Module)))->isGUIApp & 2) ? 0x1 : 0x0;
+unsigned int force32Bits = (((struct __ecereNameSpace__ecere__com__Application *)(((char *)((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->application + structSize_Module)))->isGUIApp & 4) ? 0x1 : 0x0;
+unsigned int inCompiler = (((struct __ecereNameSpace__ecere__com__Application *)(((char *)((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->application + structSize_Module)))->isGUIApp & 8) ? 0x1 : 0x0;
unsigned int crossBits = force32Bits || force64Bits;
unsigned int fixed = 0x0;
{
{
int size = _class->structSize;
-int flags = (unsigned int)((struct __ecereNameSpace__ecere__com__Application *)(((char *)((struct __ecereNameSpace__ecere__com__Module *)(((char *)_class->module + structSize_Instance)))->application + structSize_Module)))->isGUIApp;
+int flags = ((struct __ecereNameSpace__ecere__com__Application *)(((char *)((struct __ecereNameSpace__ecere__com__Module *)(((char *)_class->module + structSize_Instance)))->application + structSize_Module)))->isGUIApp;
unsigned int inCompiler = (flags & 8) ? 0x1 : 0x0;
unsigned int force32Bits = (flags & 4) ? 0x1 : 0x0;
{
struct __ecereNameSpace__ecere__com__Instance * module = ((struct __ecereNameSpace__ecere__com__Instance *)(char *)instance)->_class ? ((struct __ecereNameSpace__ecere__com__Instance *)(char *)instance)->_class->module : (((void *)0));
struct __ecereNameSpace__ecere__com__Instance * application = module ? ((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->application : (((void *)0));
-int flags = application ? (unsigned int)((struct __ecereNameSpace__ecere__com__Application *)(((char *)application + structSize_Module)))->isGUIApp : 0;
+int flags = application ? ((struct __ecereNameSpace__ecere__com__Application *)(((char *)application + structSize_Module)))->isGUIApp : 0;
unsigned int inCompiler = (flags & 8) ? 0x1 : 0x0;
unsigned int force32Bits = (flags & 4) ? 0x1 : 0x0;
static void __ecereNameSpace__ecere__com__LoadCOM(struct __ecereNameSpace__ecere__com__Instance * module)
{
-unsigned int force64Bits = ((unsigned int)((struct __ecereNameSpace__ecere__com__Application *)(((char *)((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->application + structSize_Module)))->isGUIApp & 2) ? 0x1 : 0x0;
-unsigned int force32Bits = ((unsigned int)((struct __ecereNameSpace__ecere__com__Application *)(((char *)((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->application + structSize_Module)))->isGUIApp & 4) ? 0x1 : 0x0;
-unsigned int inCompiler = ((unsigned int)((struct __ecereNameSpace__ecere__com__Application *)(((char *)((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->application + structSize_Module)))->isGUIApp & 8) ? 0x1 : 0x0;
+unsigned int force64Bits = (((struct __ecereNameSpace__ecere__com__Application *)(((char *)((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->application + structSize_Module)))->isGUIApp & 2) ? 0x1 : 0x0;
+unsigned int force32Bits = (((struct __ecereNameSpace__ecere__com__Application *)(((char *)((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->application + structSize_Module)))->isGUIApp & 4) ? 0x1 : 0x0;
+unsigned int inCompiler = (((struct __ecereNameSpace__ecere__com__Application *)(((char *)((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->application + structSize_Module)))->isGUIApp & 8) ? 0x1 : 0x0;
int pointerSize = force64Bits ? 8 : force32Bits ? 4 : sizeof(void *);
struct __ecereNameSpace__ecere__com__Class * applicationClass;
struct __ecereNameSpace__ecere__com__Class * enumClass, * structClass, * boolClass;
structClass->typeSize = 0;
__ecereNameSpace__ecere__com__InitializeDataTypes(module);
boolClass = __ecereNameSpace__ecere__com__eSystem_RegisterClass(4, "bool", "uint", 0, 0, (((void *)0)), (((void *)0)), module, 4, 1);
-__ecereNameSpace__ecere__com__eEnum_AddFixedValue(boolClass, "true", (unsigned int)0x1);
-__ecereNameSpace__ecere__com__eEnum_AddFixedValue(boolClass, "false", (unsigned int)0x0);
+__ecereNameSpace__ecere__com__eEnum_AddFixedValue(boolClass, "true", 0x1);
+__ecereNameSpace__ecere__com__eEnum_AddFixedValue(boolClass, "false", 0x0);
moduleClass = __ecereNameSpace__ecere__com__eSystem_RegisterClass(0, "ecere::com::Module", (((void *)0)), force64Bits ? 8 + 32 + 32 + 32 + 32 + 8 + 8 + 8 + 8 + 8 + 4 + 4 + (32 + 8 + 8 + 4 * 32) + (32 + 8 + 8 + 4 * 32) : sizeof(struct __ecereNameSpace__ecere__com__Module), 0, (void *)__ecereNameSpace__ecere__com__Module_Constructor, (void *)__ecereNameSpace__ecere__com__Module_Destructor, module, 4, 1);
__ecereNameSpace__ecere__com__eClass_AddVirtualMethod(moduleClass, "OnLoad", "bool()", (((void *)0)), 1);
__ecereNameSpace__ecere__com__eClass_AddVirtualMethod(moduleClass, "OnUnload", "void()", (((void *)0)), 1);
__ecereNameSpace__ecere__com__eClass_AddDataMember(class, "defaultProperty", "char *", arch_PointerSize, arch_PointerSize, 1);
__ecereNameSpace__ecere__com__eClass_AddDataMember(class, "comRedefinition", "bool", 4, 4, 1);
__ecereNameSpace__ecere__com__eClass_AddDataMember(class, "count", "int", 4, 4, 1);
-__ecereNameSpace__ecere__com__eClass_AddDataMember(class, "isRemote", "bool", 4, 4, 1);
+__ecereNameSpace__ecere__com__eClass_AddDataMember(class, "isRemote", "int", 4, 4, 1);
__ecereNameSpace__ecere__com__eClass_AddDataMember(class, "internalDecl", "bool", 4, 4, 1);
__ecereNameSpace__ecere__com__eClass_AddDataMember(class, "data", "void *", arch_PointerSize, arch_PointerSize, 1);
__ecereNameSpace__ecere__com__eClass_AddDataMember(class, "computeSize", "bool", 4, 4, 1);
char * defaultProperty;
unsigned int comRedefinition;
int count;
-unsigned int isRemote;
+int isRemote;
unsigned int internalDecl;
void * data;
unsigned int computeSize;
unsigned int addedThis;
unsigned int needCast;
unsigned int thisPtr;
+unsigned int opDestType;
} __attribute__ ((gcc_struct));
extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_TemplateDatatype;
char * defaultProperty;
unsigned int comRedefinition;
int count;
-unsigned int isRemote;
+int isRemote;
unsigned int internalDecl;
void * data;
unsigned int computeSize;
else
{
struct __ecereNameSpace__ecere__com__Instance * cppOutput;
-char command[3075LL];
+char command[3075];
SetGlobalData(&globalData);
SetExcludedSymbols(&_excludedSymbols);
SetTargetPlatform(targetPlatform);
SetTargetBits(targetBits);
SetEchoOn(0x0);
-privateModule = (struct __ecereNameSpace__ecere__com__Instance *)__ecereNameSpace__ecere__com____ecere_COM_Initialize(0x1 | (targetBits == sizeof(uintptr_t) * 8 ? (unsigned int)0 : targetBits == 64 ? (unsigned int)2 : targetBits == 32 ? (unsigned int)4 : (unsigned int)0) | (unsigned int)8, 1, (((void *)0)));
+privateModule = (struct __ecereNameSpace__ecere__com__Instance *)__ecereNameSpace__ecere__com____ecere_COM_Initialize((unsigned int)(0x1 | (targetBits == sizeof(uintptr_t) * 8 ? (unsigned int)0 : targetBits == 64 ? 2 : targetBits == 32 ? 4 : (unsigned int)0) | 8), 1, (((void *)0)));
SetPrivateModule(privateModule);
__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&globalContext->types, (struct __ecereNameSpace__ecere__sys__BTNode *)__extension__ ({
struct Symbol * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
if(__ecereNameSpace__ecere__sys__FileExists(outputFilePath))
__ecereNameSpace__ecere__sys__DeleteFile(outputFilePath);
}
-snprintf(command, sizeof command, "%s%s -x c -E \"%s\"", cppCommand, cppOptions ? cppOptions : "", GetSourceFile());
-command[sizeof command - 1] = (char)0;
+snprintf(command, sizeof (command), "%s%s -x c -E \"%s\"", cppCommand, cppOptions ? cppOptions : "", GetSourceFile());
+command[sizeof (command) - 1] = (char)0;
if((cppOutput = __ecereNameSpace__ecere__sys__DualPipeOpen((((unsigned int)(0x1))), command)))
{
int exitCode;
char * defaultProperty;
unsigned int comRedefinition;
int count;
-unsigned int isRemote;
+int isRemote;
unsigned int internalDecl;
void * data;
unsigned int computeSize;
struct __ecereNameSpace__ecere__sys__OldList methods;
struct __ecereNameSpace__ecere__sys__OldList properties;
unsigned int itself;
-unsigned int isRemote;
+int isRemote;
} __attribute__ ((gcc_struct));
extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Symbol;
char * defaultProperty;
unsigned int comRedefinition;
int count;
-unsigned int isRemote;
+int isRemote;
unsigned int internalDecl;
void * data;
unsigned int computeSize;
}
else if(!strcmp(line, "[Remote]"))
{
-_class->isRemote = (unsigned int)1;
+_class->isRemote = 1;
}
else if(!strcmp(line, "[Imported Methods]"))
{
for(_class = ((struct __ecereNameSpace__ecere__com__Module *)(((char *)privateModule + structSize_Instance)))->classes.first; _class; _class = _class->next)
{
-if(_class->isRemote == (unsigned int)3)
+if(_class->isRemote == 3)
break;
}
if(_class)
DeclareClass(FindClass("ecere::net::DCOMServerObject"), "__ecereClass___ecereNameSpace__ecere__net__DCOMServerObject");
for(_class = ((struct __ecereNameSpace__ecere__com__Module *)(((char *)privateModule + structSize_Instance)))->classes.first; _class; _class = _class->next)
{
-if(_class->isRemote == (unsigned int)3)
+if(_class->isRemote == 3)
{
struct __ecereNameSpace__ecere__com__Method * method;
int id = 0;
SetTargetPlatform(targetPlatform);
SetTargetBits(targetBits);
SetInSymbolGen(0x1);
-privateModule = (struct __ecereNameSpace__ecere__com__Instance *)__ecereNameSpace__ecere__com____ecere_COM_Initialize(0x1 | (targetBits == sizeof(uintptr_t) * 8 ? (unsigned int)0 : targetBits == 64 ? (unsigned int)2 : targetBits == 32 ? (unsigned int)4 : (unsigned int)0) | (unsigned int)8, 1, (((void *)0)));
+privateModule = (struct __ecereNameSpace__ecere__com__Instance *)__ecereNameSpace__ecere__com____ecere_COM_Initialize((unsigned int)(0x1 | (targetBits == sizeof(uintptr_t) * 8 ? (unsigned int)0 : targetBits == 64 ? 2 : targetBits == 32 ? 4 : (unsigned int)0) | 8), 1, (((void *)0)));
SetPrivateModule(privateModule);
mainModule = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_ModuleImport);
SetMainModule(mainModule);
char * defaultProperty;
unsigned int comRedefinition;
int count;
-unsigned int isRemote;
+int isRemote;
unsigned int internalDecl;
void * data;
unsigned int computeSize;
unsigned int addedThis;
unsigned int needCast;
unsigned int thisPtr;
+unsigned int opDestType;
} __attribute__ ((gcc_struct));
extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_TemplateDatatype;
char * defaultProperty;
unsigned int comRedefinition;
int count;
-unsigned int isRemote;
+int isRemote;
unsigned int internalDecl;
void * data;
unsigned int computeSize;
else
symbol = FindClass(name);
}
-if(symbol && symbol->registered && symbol->registered->isRemote == (unsigned int)1)
+if(symbol && symbol->registered && symbol->registered->isRemote == 1)
{
char className[1024];
unsigned int addedThis;
unsigned int needCast;
unsigned int thisPtr;
+unsigned int opDestType;
} __attribute__ ((gcc_struct));
extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_TemplateDatatype;
char * defaultProperty;
unsigned int comRedefinition;
int count;
-unsigned int isRemote;
+int isRemote;
unsigned int internalDecl;
void * data;
unsigned int computeSize;
result->loc = exp->loc;
result->isConstant = exp->isConstant;
result->byReference = exp->byReference;
+result->opDestType = exp->opDestType;
}
return result;
}
unsigned int addedThis;
unsigned int needCast;
unsigned int thisPtr;
+unsigned int opDestType;
} __attribute__ ((gcc_struct));
extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_TemplateDatatype;
char * defaultProperty;
unsigned int comRedefinition;
int count;
-unsigned int isRemote;
+int isRemote;
unsigned int internalDecl;
void * data;
unsigned int computeSize;
char * defaultProperty;
unsigned int comRedefinition;
int count;
-unsigned int isRemote;
+int isRemote;
unsigned int internalDecl;
void * data;
unsigned int computeSize;
unsigned int addedThis;
unsigned int needCast;
unsigned int thisPtr;
+unsigned int opDestType;
} __attribute__ ((gcc_struct));
static struct __ecereNameSpace__ecere__com__Class * __ecereClass_Expression;
struct __ecereNameSpace__ecere__sys__OldList methods;
struct __ecereNameSpace__ecere__sys__OldList properties;
unsigned int itself;
-unsigned int isRemote;
+int isRemote;
} __attribute__ ((gcc_struct));
static struct __ecereNameSpace__ecere__com__Class * __ecereClass_ClassImport;
char * defaultProperty;
unsigned int comRedefinition;
int count;
-unsigned int isRemote;
+int isRemote;
unsigned int internalDecl;
void * data;
unsigned int computeSize;
this->addedThis = 0x0;
this->needCast = 0x0;
this->thisPtr = 0x0;
+this->opDestType = 0x0;
}
static struct __ecereNameSpace__ecere__com__Class * __ecereClass_DeclaratorType;
__ecereNameSpace__ecere__com__eClass_AddDataMember(class, "addedThis", "bool", 4, 4, 1);
__ecereNameSpace__ecere__com__eClass_AddDataMember(class, "needCast", "bool", 4, 4, 1);
__ecereNameSpace__ecere__com__eClass_AddDataMember(class, "thisPtr", "bool", 4, 4, 1);
+__ecereNameSpace__ecere__com__eClass_AddDataMember(class, "opDestType", "bool", 4, 4, 1);
class = __ecereNameSpace__ecere__com__eSystem_RegisterClass(5, "Enumerator", 0, sizeof(struct Enumerator), 0, 0, 0, module, 1, 1);
if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->application == ((struct __ecereNameSpace__ecere__com__Module *)(((char *)__thisModule + structSize_Instance)))->application && class)
__ecereClass_Enumerator = class;
__ecereNameSpace__ecere__com__eClass_AddDataMember(class, "methods", "ecere::sys::OldList", structSize_OldList, arch_PointerSize, 1);
__ecereNameSpace__ecere__com__eClass_AddDataMember(class, "properties", "ecere::sys::OldList", structSize_OldList, arch_PointerSize, 1);
__ecereNameSpace__ecere__com__eClass_AddDataMember(class, "itself", "bool", 4, 4, 1);
-__ecereNameSpace__ecere__com__eClass_AddDataMember(class, "isRemote", "bool", 4, 4, 1);
+__ecereNameSpace__ecere__com__eClass_AddDataMember(class, "isRemote", "int", 4, 4, 1);
class = __ecereNameSpace__ecere__com__eSystem_RegisterClass(5, "FunctionImport", 0, sizeof(struct FunctionImport), 0, 0, 0, module, 1, 1);
if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->application == ((struct __ecereNameSpace__ecere__com__Module *)(((char *)__thisModule + structSize_Instance)))->application && class)
__ecereClass_FunctionImport = class;
unsigned int addedThis;
unsigned int needCast;
unsigned int thisPtr;
+unsigned int opDestType;
} __attribute__ ((gcc_struct));
extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_TemplateDatatype;
char * defaultProperty;
unsigned int comRedefinition;
int count;
-unsigned int isRemote;
+int isRemote;
unsigned int internalDecl;
void * data;
unsigned int computeSize;
unsigned int addedThis;
unsigned int needCast;
unsigned int thisPtr;
+unsigned int opDestType;
} __attribute__ ((gcc_struct));
extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_TemplateDatatype;
char * defaultProperty;
unsigned int comRedefinition;
int count;
-unsigned int isRemote;
+int isRemote;
unsigned int internalDecl;
void * data;
unsigned int computeSize;
unsigned int addedThis;
unsigned int needCast;
unsigned int thisPtr;
+unsigned int opDestType;
} __attribute__ ((gcc_struct));
extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_TemplateDatatype;
struct __ecereNameSpace__ecere__sys__OldList methods;
struct __ecereNameSpace__ecere__sys__OldList properties;
unsigned int itself;
-unsigned int isRemote;
+int isRemote;
} __attribute__ ((gcc_struct));
extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Symbol;
char * defaultProperty;
unsigned int comRedefinition;
int count;
-unsigned int isRemote;
+int isRemote;
unsigned int internalDecl;
void * data;
unsigned int computeSize;
unsigned int addedThis;
unsigned int needCast;
unsigned int thisPtr;
+unsigned int opDestType;
} __attribute__ ((gcc_struct));
extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_TemplateDatatype;
char * defaultProperty;
unsigned int comRedefinition;
int count;
-unsigned int isRemote;
+int isRemote;
unsigned int internalDecl;
void * data;
unsigned int computeSize;
char * defaultProperty;
unsigned int comRedefinition;
int count;
-unsigned int isRemote;
+int isRemote;
unsigned int internalDecl;
void * data;
unsigned int computeSize;
unsigned int addedThis;
unsigned int needCast;
unsigned int thisPtr;
+unsigned int opDestType;
} __attribute__ ((gcc_struct));
extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_TemplateDatatype;
char * defaultProperty;
unsigned int comRedefinition;
int count;
-unsigned int isRemote;
+int isRemote;
unsigned int internalDecl;
void * data;
unsigned int computeSize;
if(!regClass || regClass->internalDecl)
regClass = __ecereNameSpace__ecere__com__eSystem_RegisterClass(classType, name, isRemote ? (((void *)0)) : baseName, 0, 0, (((void *)0)), (((void *)0)), privateModule, ecereCOMModule ? 4 : 1, inheritanceAccess);
if(regClass && isRemote)
-regClass->isRemote = (importType == 2) ? (unsigned int)1 : (unsigned int)2;
+regClass->isRemote = (importType == 2) ? 1 : 2;
if(isRemote)
{
if(importType == 2)
regClass = __ecereNameSpace__ecere__com__eSystem_RegisterClass(classType, className, baseName, 0, 0, (((void *)0)), (((void *)0)), privateModule, ecereCOMModule ? 4 : 1, inheritanceAccess);
}
if(regClass)
-regClass->isRemote = (importType == 2) ? (unsigned int)1 : (unsigned int)3;
+regClass->isRemote = (importType == 2) ? 1 : 3;
}
if(existingClass)
{
__ecereNameSpace__ecere__sys__TrimLSpaces(line, line);
if(regClass)
{
-struct __ecereNameSpace__ecere__com__Property * prop = __ecereNameSpace__ecere__com__eClass_AddProperty(regClass, conversion ? (((void *)0)) : name, line[0] ? line : 0, (void *)(unsigned int)setStmt, (void *)(unsigned int)getStmt, memberAccess);
+struct __ecereNameSpace__ecere__com__Property * prop = __ecereNameSpace__ecere__com__eClass_AddProperty(regClass, conversion ? (((void *)0)) : name, line[0] ? line : 0, (void *)setStmt, (void *)getStmt, memberAccess);
if(prop)
{
__ecereNameSpace__ecere__sys__TrimLSpaces(line, line);
if(regClass)
{
-__ecereNameSpace__ecere__com__eClass_AddClassProperty(regClass, name, line, (void *)(unsigned int)setStmt, (void *)(unsigned int)getStmt);
+__ecereNameSpace__ecere__com__eClass_AddClassProperty(regClass, name, line, (void *)setStmt, (void *)getStmt);
}
}
else if(!strcmp(line, "[Set]"))
unsigned int addedThis;
unsigned int needCast;
unsigned int thisPtr;
+unsigned int opDestType;
} __attribute__ ((gcc_struct));
extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_TemplateDatatype;
char * defaultProperty;
unsigned int comRedefinition;
int count;
-unsigned int isRemote;
+int isRemote;
unsigned int internalDecl;
void * data;
unsigned int computeSize;
unsigned int addedThis;
unsigned int needCast;
unsigned int thisPtr;
+unsigned int opDestType;
} __attribute__ ((gcc_struct));
extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_TemplateDatatype;
char * defaultProperty;
unsigned int comRedefinition;
int count;
-unsigned int isRemote;
+int isRemote;
unsigned int internalDecl;
void * data;
unsigned int computeSize;
unsigned int addedThis;
unsigned int needCast;
unsigned int thisPtr;
+unsigned int opDestType;
} __attribute__ ((gcc_struct));
extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_TemplateDatatype;
char * defaultProperty;
unsigned int comRedefinition;
int count;
-unsigned int isRemote;
+int isRemote;
unsigned int internalDecl;
void * data;
unsigned int computeSize;
unsigned int addedThis;
unsigned int needCast;
unsigned int thisPtr;
+unsigned int opDestType;
} __attribute__ ((gcc_struct));
extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_TemplateDatatype;
struct __ecereNameSpace__ecere__sys__OldList methods;
struct __ecereNameSpace__ecere__sys__OldList properties;
unsigned int itself;
-unsigned int isRemote;
+int isRemote;
} __attribute__ ((gcc_struct));
extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Symbol;
char * defaultProperty;
unsigned int comRedefinition;
int count;
-unsigned int isRemote;
+int isRemote;
unsigned int internalDecl;
void * data;
unsigned int computeSize;
if(!convert->dataType)
convert->dataType = ProcessTypeString(convert->dataTypeString, 0x0);
-if(MatchTypes(convert->dataType, dest, conversions, (((void *)0)), (((void *)0)), 0x0, 0x1, 0x0, 0x1))
+if((!isConversionExploration || convert->dataType->kind == 8 || !strcmp(_class->name, "String")) && MatchTypes(convert->dataType, dest, conversions, (((void *)0)), (((void *)0)), (convert->dataType->kind == 8 && !strcmp(convert->dataTypeString, "String")) ? 0x1 : 0x0, convert->dataType->kind == 8, 0x0, 0x1))
{
if(!conversions && !convert->Get)
return 0x1;
dest->_class->registered->dataType = ProcessTypeString(dest->_class->registered->dataTypeString, 0x0);
if(dest->_class->registered->dataType->kind == 8 || source->truth || dest->truth)
{
-if(MatchTypes(source, dest->_class->registered->dataType, conversions, (((void *)0)), (((void *)0)), 0x1, 0x1, 0x0, 0x0))
+if(MatchTypes(source, dest->_class->registered->dataType, conversions, (((void *)0)), (((void *)0)), 0x1, dest->_class->registered->dataType->kind == 8, 0x0, 0x0))
{
return 0x1;
}
if(!convert->dataType)
convert->dataType = ProcessTypeString(convert->dataTypeString, 0x0);
-if(convert->dataType != source && MatchTypes(convert->dataType, dest, conversions, (((void *)0)), (((void *)0)), 0x1, 0x1, 0x0, 0x1))
+if(convert->dataType != source && (!isConversionExploration || convert->dataType->kind == 8 || !strcmp(_class->name, "String")) && MatchTypes(convert->dataType, dest, conversions, (((void *)0)), (((void *)0)), convert->dataType->kind == 8, convert->dataType->kind == 8, 0x0, 0x1))
{
if(!conversions && !convert->Get)
return 0x1;
{
if(!source->_class->registered->dataType)
source->_class->registered->dataType = ProcessTypeString(source->_class->registered->dataTypeString, 0x0);
-if(MatchTypes(source->_class->registered->dataType, dest, conversions, (((void *)0)), (((void *)0)), 0x1, 0x1, 0x0, 0x0))
+if(!isConversionExploration || source->_class->registered->dataType->kind == 8 || !strcmp(source->_class->registered->name, "String"))
{
+if(MatchTypes(source->_class->registered->dataType, dest, conversions, (((void *)0)), (((void *)0)), source->_class->registered->dataType->kind == 8, source->_class->registered->dataType->kind == 8, 0x0, 0x0))
+return 0x1;
+else if(MatchTypes(dest, source->_class->registered->dataType, (((void *)0)), (((void *)0)), (((void *)0)), 0x0, 0x0, 0x0, 0x0))
return 0x1;
}
}
return 0x1;
else if(source->kind == 15 && (dest->kind == 3 || dest->kind == 2 || dest->kind == 1 || source->kind == 24 || dest->kind == 5 || dest->kind == 4 || dest->kind == 22 || dest->kind == 23))
return 0x1;
-else if(dest->kind == 15 && (source->kind == 3 || source->kind == 2 || source->kind == 1 || source->kind == 24 || source->kind == 5 || source->kind == 4 || source->kind == 22 || source->kind == 23))
+else if(dest->kind == 15 && !isConversionExploration && (source->kind == 3 || source->kind == 2 || source->kind == 1 || source->kind == 24 || source->kind == 5 || source->kind == 4 || source->kind == 22 || source->kind == 23))
return 0x1;
else if((dest->kind == 11 || (dest->kind == 13 && dest->type->kind == 11) || dest->kind == 16) && ((source->kind == 11 || (source->kind == 13 && source->type->kind == 11) || source->kind == 16)))
{
return 0x0;
}
+extern struct Expression * CopyExpression(struct Expression * exp);
+
extern unsigned long strtoul(const char * nptr, char * * endptr, int base);
void ReadString(char * output, char * string);
unsigned int MatchTypeExpression(struct Expression * sourceExp, struct Type * dest, struct __ecereNameSpace__ecere__sys__OldList * conversions, unsigned int skipUnitBla)
{
-struct Type * source = sourceExp->expType;
+struct Type * source;
struct Type * realDest = dest;
struct Type * backupSourceExpType = (((void *)0));
+struct Expression * computedExp = sourceExp;
+dest->refCount++;
+if(sourceExp->isConstant && sourceExp->type != 2 && sourceExp->type != 0 && sourceExp->type != 11 && dest->kind == 8 && dest->_class && dest->_class->registered && dest->_class->registered->type == 4)
+{
+computedExp = CopyExpression(sourceExp);
+ComputeExpression(computedExp);
+}
+source = sourceExp->expType;
if(dest->kind == 13 && sourceExp->type == 2 && !strtoul(sourceExp->constant, (((void *)0)), 0))
+{
+if(computedExp != sourceExp)
+{
+FreeExpression(computedExp);
+computedExp = sourceExp;
+}
+FreeType(dest);
return 0x1;
+}
if(!skipUnitBla && source && dest && source->kind == 8 && dest->kind == 8)
{
if(source->_class && source->_class->registered && source->_class->registered->type == 3)
for(destBase = dest->_class->registered; destBase && destBase->base && destBase->base->type != 1000; destBase = destBase->base)
;
if(sourceBase == destBase)
+{
+if(computedExp != sourceExp)
+{
+FreeExpression(computedExp);
+computedExp = sourceExp;
+}
+FreeType(dest);
return 0x1;
}
}
+}
if(source)
{
struct __ecereNameSpace__ecere__sys__OldList * specs;
long long value = (((int)0x7fffffff));
source->refCount++;
-dest->refCount++;
-if(sourceExp->type == 2)
+if(computedExp->type == 2)
{
if(source->isSigned)
-value = strtoll(sourceExp->constant, (((void *)0)), 0);
+value = strtoll(computedExp->constant, (((void *)0)), 0);
else
-value = strtoull(sourceExp->constant, (((void *)0)), 0);
+value = strtoull(computedExp->constant, (((void *)0)), 0);
}
-else if(sourceExp->type == 4 && sourceExp->op.op == '-' && !sourceExp->op.exp1 && sourceExp->op.exp2 && sourceExp->op.exp2->type == 2)
+else if(computedExp->type == 4 && sourceExp->op.op == '-' && !computedExp->op.exp1 && computedExp->op.exp2 && computedExp->op.exp2->type == 2)
{
if(source->isSigned)
-value = -strtoll(sourceExp->op.exp2->constant, (((void *)0)), 0);
+value = -strtoll(computedExp->op.exp2->constant, (((void *)0)), 0);
else
-value = -strtoull(sourceExp->op.exp2->constant, (((void *)0)), 0);
+value = -strtoull(computedExp->op.exp2->constant, (((void *)0)), 0);
+}
+if(computedExp != sourceExp)
+{
+FreeExpression(computedExp);
+computedExp = sourceExp;
}
if(dest->kind != 8 && source->kind == 8 && source->_class && source->_class->registered && !strcmp(source->_class->registered->fullName, "ecere::com::unichar"))
{
{
struct __ecereNameSpace__ecere__com__Class * _class = source->_class ? source->_class->registered : (((void *)0));
-if(_class && (_class->type == 3 || !strcmp(_class->fullName, "bool") || _class->type == 2))
+if(_class && (_class->type == 3 || _class->type == 2))
{
if(dest->kind != 8)
{
if(dest->kind == 8)
{
struct __ecereNameSpace__ecere__com__Class * _class = dest->_class ? dest->_class->registered : (((void *)0));
+unsigned int fittingValue = 0x0;
-if(_class && !dest->truth && (_class->type == 3 || !strcmp(_class->fullName, "bool") || (_class->type != 1 && !value && source->kind == 3) || _class->type == 2))
+if(_class && _class->type == 4)
+{
+struct __ecereNameSpace__ecere__com__Class * enumClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "enum");
+struct __ecereNameSpace__ecere__com__EnumClassData * c = (_class ? ((void *)(((char *)_class->data) + enumClass->offsetClass)) : (((void *)0)));
+
+if(c && value >= 0 && value <= c->largest)
+fittingValue = 0x1;
+}
+if(_class && !dest->truth && (_class->type == 3 || fittingValue || (_class->type != 1 && !value && source->kind == 3) || _class->type == 2))
{
if(_class->type == 0 || _class->type == 5)
{
}
return 0x0;
}
-if(!flag)
+if(!flag && !sourceExp->opDestType)
{
struct Expression * newExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
}
else
{
+if(computedExp != sourceExp)
+{
+FreeExpression(computedExp);
+computedExp = sourceExp;
+}
while((sourceExp->type == 5 || sourceExp->type == 32) && sourceExp->list)
sourceExp = (*sourceExp->list).last;
if(sourceExp->type == 0)
sprintf(constant, "0x%X", (int)value->data);
sourceExp->constant = __ecereNameSpace__ecere__sys__CopyString(constant);
}
+FreeType(dest);
return 0x1;
}
}
}
}
if(dest->classObjectType != 2 && dest->kind == 8 && MatchWithEnums_Module(privateModule, sourceExp, dest, id->string, conversions))
+{
+FreeType(dest);
return 0x1;
}
}
+FreeType(dest);
+}
return 0x0;
}
int value2 = op2->i;
exp->type = 2;
-exp->string = PrintInt(op1->i + value2);
+exp->string = PrintInt((op1->i + value2));
if(!exp->expType)
{
exp->expType = op1->type;
unsigned int value2 = op2->ui;
exp->type = 2;
-exp->string = PrintUInt(op1->ui + value2);
+exp->string = PrintUInt((op1->ui + value2));
if(!exp->expType)
{
exp->expType = op1->type;
long long value2 = op2->i64;
exp->type = 2;
-exp->string = PrintInt64(op1->i64 + value2);
+exp->string = PrintInt64((op1->i64 + value2));
if(!exp->expType)
{
exp->expType = op1->type;
uint64 value2 = op2->ui64;
exp->type = 2;
-exp->string = PrintUInt64(op1->ui64 + value2);
+exp->string = PrintUInt64((op1->ui64 + value2));
if(!exp->expType)
{
exp->expType = op1->type;
short value2 = op2->s;
exp->type = 2;
-exp->string = PrintShort(op1->s + value2);
+exp->string = PrintShort((op1->s + value2));
if(!exp->expType)
{
exp->expType = op1->type;
unsigned short value2 = op2->us;
exp->type = 2;
-exp->string = PrintUShort(op1->us + value2);
+exp->string = PrintUShort((op1->us + value2));
if(!exp->expType)
{
exp->expType = op1->type;
char value2 = op2->c;
exp->type = 2;
-exp->string = PrintChar(op1->c + value2);
+exp->string = PrintChar((op1->c + value2));
if(!exp->expType)
{
exp->expType = op1->type;
unsigned char value2 = op2->uc;
exp->type = 2;
-exp->string = PrintUChar(op1->uc + value2);
+exp->string = PrintUChar((op1->uc + value2));
if(!exp->expType)
{
exp->expType = op1->type;
float value2 = op2->f;
exp->type = 2;
-exp->string = PrintFloat(op1->f + value2);
+exp->string = PrintFloat((float)(op1->f + value2));
if(!exp->expType)
{
exp->expType = op1->type;
double value2 = op2->d;
exp->type = 2;
-exp->string = PrintDouble(op1->d + value2);
+exp->string = PrintDouble((double)(op1->d + value2));
if(!exp->expType)
{
exp->expType = op1->type;
int value2 = op2->i;
exp->type = 2;
-exp->string = PrintInt(op1->i - value2);
+exp->string = PrintInt((op1->i - value2));
if(!exp->expType)
{
exp->expType = op1->type;
unsigned int value2 = op2->ui;
exp->type = 2;
-exp->string = PrintUInt(op1->ui - value2);
+exp->string = PrintUInt((op1->ui - value2));
if(!exp->expType)
{
exp->expType = op1->type;
long long value2 = op2->i64;
exp->type = 2;
-exp->string = PrintInt64(op1->i64 - value2);
+exp->string = PrintInt64((op1->i64 - value2));
if(!exp->expType)
{
exp->expType = op1->type;
uint64 value2 = op2->ui64;
exp->type = 2;
-exp->string = PrintUInt64(op1->ui64 - value2);
+exp->string = PrintUInt64((op1->ui64 - value2));
if(!exp->expType)
{
exp->expType = op1->type;
short value2 = op2->s;
exp->type = 2;
-exp->string = PrintShort(op1->s - value2);
+exp->string = PrintShort((op1->s - value2));
if(!exp->expType)
{
exp->expType = op1->type;
unsigned short value2 = op2->us;
exp->type = 2;
-exp->string = PrintUShort(op1->us - value2);
+exp->string = PrintUShort((op1->us - value2));
if(!exp->expType)
{
exp->expType = op1->type;
char value2 = op2->c;
exp->type = 2;
-exp->string = PrintChar(op1->c - value2);
+exp->string = PrintChar((op1->c - value2));
if(!exp->expType)
{
exp->expType = op1->type;
unsigned char value2 = op2->uc;
exp->type = 2;
-exp->string = PrintUChar(op1->uc - value2);
+exp->string = PrintUChar((op1->uc - value2));
if(!exp->expType)
{
exp->expType = op1->type;
float value2 = op2->f;
exp->type = 2;
-exp->string = PrintFloat(op1->f - value2);
+exp->string = PrintFloat((float)(op1->f - value2));
if(!exp->expType)
{
exp->expType = op1->type;
double value2 = op2->d;
exp->type = 2;
-exp->string = PrintDouble(op1->d - value2);
+exp->string = PrintDouble((double)(op1->d - value2));
if(!exp->expType)
{
exp->expType = op1->type;
int value2 = op2->i;
exp->type = 2;
-exp->string = PrintInt(op1->i * value2);
+exp->string = PrintInt((op1->i * value2));
if(!exp->expType)
{
exp->expType = op1->type;
unsigned int value2 = op2->ui;
exp->type = 2;
-exp->string = PrintUInt(op1->ui * value2);
+exp->string = PrintUInt((op1->ui * value2));
if(!exp->expType)
{
exp->expType = op1->type;
long long value2 = op2->i64;
exp->type = 2;
-exp->string = PrintInt64(op1->i64 * value2);
+exp->string = PrintInt64((op1->i64 * value2));
if(!exp->expType)
{
exp->expType = op1->type;
uint64 value2 = op2->ui64;
exp->type = 2;
-exp->string = PrintUInt64(op1->ui64 * value2);
+exp->string = PrintUInt64((op1->ui64 * value2));
if(!exp->expType)
{
exp->expType = op1->type;
short value2 = op2->s;
exp->type = 2;
-exp->string = PrintShort(op1->s * value2);
+exp->string = PrintShort((op1->s * value2));
if(!exp->expType)
{
exp->expType = op1->type;
unsigned short value2 = op2->us;
exp->type = 2;
-exp->string = PrintUShort(op1->us * value2);
+exp->string = PrintUShort((op1->us * value2));
if(!exp->expType)
{
exp->expType = op1->type;
char value2 = op2->c;
exp->type = 2;
-exp->string = PrintChar(op1->c * value2);
+exp->string = PrintChar((op1->c * value2));
if(!exp->expType)
{
exp->expType = op1->type;
unsigned char value2 = op2->uc;
exp->type = 2;
-exp->string = PrintUChar(op1->uc * value2);
+exp->string = PrintUChar((op1->uc * value2));
if(!exp->expType)
{
exp->expType = op1->type;
float value2 = op2->f;
exp->type = 2;
-exp->string = PrintFloat(op1->f * value2);
+exp->string = PrintFloat((float)(op1->f * value2));
if(!exp->expType)
{
exp->expType = op1->type;
double value2 = op2->d;
exp->type = 2;
-exp->string = PrintDouble(op1->d * value2);
+exp->string = PrintDouble((double)(op1->d * value2));
if(!exp->expType)
{
exp->expType = op1->type;
int value2 = op2->i;
exp->type = 2;
-exp->string = PrintInt(op1->i = value2);
+exp->string = PrintInt((op1->i = value2));
if(!exp->expType)
{
exp->expType = op1->type;
unsigned int value2 = op2->ui;
exp->type = 2;
-exp->string = PrintUInt(op1->ui = value2);
+exp->string = PrintUInt((op1->ui = value2));
if(!exp->expType)
{
exp->expType = op1->type;
long long value2 = op2->i64;
exp->type = 2;
-exp->string = PrintInt64(op1->i64 = value2);
+exp->string = PrintInt64((op1->i64 = value2));
if(!exp->expType)
{
exp->expType = op1->type;
uint64 value2 = op2->ui64;
exp->type = 2;
-exp->string = PrintUInt64(op1->ui64 = value2);
+exp->string = PrintUInt64((op1->ui64 = value2));
if(!exp->expType)
{
exp->expType = op1->type;
short value2 = op2->s;
exp->type = 2;
-exp->string = PrintShort(op1->s = value2);
+exp->string = PrintShort((op1->s = value2));
if(!exp->expType)
{
exp->expType = op1->type;
unsigned short value2 = op2->us;
exp->type = 2;
-exp->string = PrintUShort(op1->us = value2);
+exp->string = PrintUShort((op1->us = value2));
if(!exp->expType)
{
exp->expType = op1->type;
char value2 = op2->c;
exp->type = 2;
-exp->string = PrintChar(op1->c = value2);
+exp->string = PrintChar((op1->c = value2));
if(!exp->expType)
{
exp->expType = op1->type;
unsigned char value2 = op2->uc;
exp->type = 2;
-exp->string = PrintUChar(op1->uc = value2);
+exp->string = PrintUChar((op1->uc = value2));
if(!exp->expType)
{
exp->expType = op1->type;
float value2 = op2->f;
exp->type = 2;
-exp->string = PrintFloat(op1->f = value2);
+exp->string = PrintFloat((float)(op1->f = value2));
if(!exp->expType)
{
exp->expType = op1->type;
double value2 = op2->d;
exp->type = 2;
-exp->string = PrintDouble(op1->d = value2);
+exp->string = PrintDouble((double)(op1->d = value2));
if(!exp->expType)
{
exp->expType = op1->type;
int value2 = op2->i;
exp->type = 2;
-exp->string = PrintInt(op1->i += value2);
+exp->string = PrintInt((op1->i += value2));
if(!exp->expType)
{
exp->expType = op1->type;
unsigned int value2 = op2->ui;
exp->type = 2;
-exp->string = PrintUInt(op1->ui += value2);
+exp->string = PrintUInt((op1->ui += value2));
if(!exp->expType)
{
exp->expType = op1->type;
long long value2 = op2->i64;
exp->type = 2;
-exp->string = PrintInt64(op1->i64 += value2);
+exp->string = PrintInt64((op1->i64 += value2));
if(!exp->expType)
{
exp->expType = op1->type;
uint64 value2 = op2->ui64;
exp->type = 2;
-exp->string = PrintUInt64(op1->ui64 += value2);
+exp->string = PrintUInt64((op1->ui64 += value2));
if(!exp->expType)
{
exp->expType = op1->type;
short value2 = op2->s;
exp->type = 2;
-exp->string = PrintShort(op1->s += value2);
+exp->string = PrintShort((op1->s += value2));
if(!exp->expType)
{
exp->expType = op1->type;
unsigned short value2 = op2->us;
exp->type = 2;
-exp->string = PrintUShort(op1->us += value2);
+exp->string = PrintUShort((op1->us += value2));
if(!exp->expType)
{
exp->expType = op1->type;
char value2 = op2->c;
exp->type = 2;
-exp->string = PrintChar(op1->c += value2);
+exp->string = PrintChar((op1->c += value2));
if(!exp->expType)
{
exp->expType = op1->type;
unsigned char value2 = op2->uc;
exp->type = 2;
-exp->string = PrintUChar(op1->uc += value2);
+exp->string = PrintUChar((op1->uc += value2));
if(!exp->expType)
{
exp->expType = op1->type;
float value2 = op2->f;
exp->type = 2;
-exp->string = PrintFloat(op1->f += value2);
+exp->string = PrintFloat((float)(op1->f += value2));
if(!exp->expType)
{
exp->expType = op1->type;
double value2 = op2->d;
exp->type = 2;
-exp->string = PrintDouble(op1->d += value2);
+exp->string = PrintDouble((double)(op1->d += value2));
if(!exp->expType)
{
exp->expType = op1->type;
int value2 = op2->i;
exp->type = 2;
-exp->string = PrintInt(op1->i -= value2);
+exp->string = PrintInt((op1->i -= value2));
if(!exp->expType)
{
exp->expType = op1->type;
unsigned int value2 = op2->ui;
exp->type = 2;
-exp->string = PrintUInt(op1->ui -= value2);
+exp->string = PrintUInt((op1->ui -= value2));
if(!exp->expType)
{
exp->expType = op1->type;
long long value2 = op2->i64;
exp->type = 2;
-exp->string = PrintInt64(op1->i64 -= value2);
+exp->string = PrintInt64((op1->i64 -= value2));
if(!exp->expType)
{
exp->expType = op1->type;
uint64 value2 = op2->ui64;
exp->type = 2;
-exp->string = PrintUInt64(op1->ui64 -= value2);
+exp->string = PrintUInt64((op1->ui64 -= value2));
if(!exp->expType)
{
exp->expType = op1->type;
short value2 = op2->s;
exp->type = 2;
-exp->string = PrintShort(op1->s -= value2);
+exp->string = PrintShort((op1->s -= value2));
if(!exp->expType)
{
exp->expType = op1->type;
unsigned short value2 = op2->us;
exp->type = 2;
-exp->string = PrintUShort(op1->us -= value2);
+exp->string = PrintUShort((op1->us -= value2));
if(!exp->expType)
{
exp->expType = op1->type;
char value2 = op2->c;
exp->type = 2;
-exp->string = PrintChar(op1->c -= value2);
+exp->string = PrintChar((op1->c -= value2));
if(!exp->expType)
{
exp->expType = op1->type;
unsigned char value2 = op2->uc;
exp->type = 2;
-exp->string = PrintUChar(op1->uc -= value2);
+exp->string = PrintUChar((op1->uc -= value2));
if(!exp->expType)
{
exp->expType = op1->type;
float value2 = op2->f;
exp->type = 2;
-exp->string = PrintFloat(op1->f -= value2);
+exp->string = PrintFloat((float)(op1->f -= value2));
if(!exp->expType)
{
exp->expType = op1->type;
double value2 = op2->d;
exp->type = 2;
-exp->string = PrintDouble(op1->d -= value2);
+exp->string = PrintDouble((double)(op1->d -= value2));
if(!exp->expType)
{
exp->expType = op1->type;
int value2 = op2->i;
exp->type = 2;
-exp->string = PrintInt(op1->i *= value2);
+exp->string = PrintInt((op1->i *= value2));
if(!exp->expType)
{
exp->expType = op1->type;
unsigned int value2 = op2->ui;
exp->type = 2;
-exp->string = PrintUInt(op1->ui *= value2);
+exp->string = PrintUInt((op1->ui *= value2));
if(!exp->expType)
{
exp->expType = op1->type;
long long value2 = op2->i64;
exp->type = 2;
-exp->string = PrintInt64(op1->i64 *= value2);
+exp->string = PrintInt64((op1->i64 *= value2));
if(!exp->expType)
{
exp->expType = op1->type;
uint64 value2 = op2->ui64;
exp->type = 2;
-exp->string = PrintUInt64(op1->ui64 *= value2);
+exp->string = PrintUInt64((op1->ui64 *= value2));
if(!exp->expType)
{
exp->expType = op1->type;
short value2 = op2->s;
exp->type = 2;
-exp->string = PrintShort(op1->s *= value2);
+exp->string = PrintShort((op1->s *= value2));
if(!exp->expType)
{
exp->expType = op1->type;
unsigned short value2 = op2->us;
exp->type = 2;
-exp->string = PrintUShort(op1->us *= value2);
+exp->string = PrintUShort((op1->us *= value2));
if(!exp->expType)
{
exp->expType = op1->type;
char value2 = op2->c;
exp->type = 2;
-exp->string = PrintChar(op1->c *= value2);
+exp->string = PrintChar((op1->c *= value2));
if(!exp->expType)
{
exp->expType = op1->type;
unsigned char value2 = op2->uc;
exp->type = 2;
-exp->string = PrintUChar(op1->uc *= value2);
+exp->string = PrintUChar((op1->uc *= value2));
if(!exp->expType)
{
exp->expType = op1->type;
float value2 = op2->f;
exp->type = 2;
-exp->string = PrintFloat(op1->f *= value2);
+exp->string = PrintFloat((float)(op1->f *= value2));
if(!exp->expType)
{
exp->expType = op1->type;
double value2 = op2->d;
exp->type = 2;
-exp->string = PrintDouble(op1->d *= value2);
+exp->string = PrintDouble((double)(op1->d *= value2));
if(!exp->expType)
{
exp->expType = op1->type;
int value2 = op2->i;
exp->type = 2;
-exp->string = PrintInt(op1->i & value2);
+exp->string = PrintInt((op1->i & value2));
if(!exp->expType)
{
exp->expType = op1->type;
unsigned int value2 = op2->ui;
exp->type = 2;
-exp->string = PrintUInt(op1->ui & value2);
+exp->string = PrintUInt((op1->ui & value2));
if(!exp->expType)
{
exp->expType = op1->type;
long long value2 = op2->i64;
exp->type = 2;
-exp->string = PrintInt64(op1->i64 & value2);
+exp->string = PrintInt64((op1->i64 & value2));
if(!exp->expType)
{
exp->expType = op1->type;
uint64 value2 = op2->ui64;
exp->type = 2;
-exp->string = PrintUInt64(op1->ui64 & value2);
+exp->string = PrintUInt64((op1->ui64 & value2));
if(!exp->expType)
{
exp->expType = op1->type;
short value2 = op2->s;
exp->type = 2;
-exp->string = PrintShort(op1->s & value2);
+exp->string = PrintShort((op1->s & value2));
if(!exp->expType)
{
exp->expType = op1->type;
unsigned short value2 = op2->us;
exp->type = 2;
-exp->string = PrintUShort(op1->us & value2);
+exp->string = PrintUShort((op1->us & value2));
if(!exp->expType)
{
exp->expType = op1->type;
char value2 = op2->c;
exp->type = 2;
-exp->string = PrintChar(op1->c & value2);
+exp->string = PrintChar((op1->c & value2));
if(!exp->expType)
{
exp->expType = op1->type;
unsigned char value2 = op2->uc;
exp->type = 2;
-exp->string = PrintUChar(op1->uc & value2);
+exp->string = PrintUChar((op1->uc & value2));
if(!exp->expType)
{
exp->expType = op1->type;
int value2 = op2->i;
exp->type = 2;
-exp->string = PrintInt(op1->i | value2);
+exp->string = PrintInt((op1->i | value2));
if(!exp->expType)
{
exp->expType = op1->type;
unsigned int value2 = op2->ui;
exp->type = 2;
-exp->string = PrintUInt(op1->ui | value2);
+exp->string = PrintUInt((op1->ui | value2));
if(!exp->expType)
{
exp->expType = op1->type;
long long value2 = op2->i64;
exp->type = 2;
-exp->string = PrintInt64(op1->i64 | value2);
+exp->string = PrintInt64((op1->i64 | value2));
if(!exp->expType)
{
exp->expType = op1->type;
uint64 value2 = op2->ui64;
exp->type = 2;
-exp->string = PrintUInt64(op1->ui64 | value2);
+exp->string = PrintUInt64((op1->ui64 | value2));
if(!exp->expType)
{
exp->expType = op1->type;
short value2 = op2->s;
exp->type = 2;
-exp->string = PrintShort(op1->s | value2);
+exp->string = PrintShort((op1->s | value2));
if(!exp->expType)
{
exp->expType = op1->type;
unsigned short value2 = op2->us;
exp->type = 2;
-exp->string = PrintUShort(op1->us | value2);
+exp->string = PrintUShort((op1->us | value2));
if(!exp->expType)
{
exp->expType = op1->type;
char value2 = op2->c;
exp->type = 2;
-exp->string = PrintChar(op1->c | value2);
+exp->string = PrintChar((op1->c | value2));
if(!exp->expType)
{
exp->expType = op1->type;
unsigned char value2 = op2->uc;
exp->type = 2;
-exp->string = PrintUChar(op1->uc | value2);
+exp->string = PrintUChar((op1->uc | value2));
if(!exp->expType)
{
exp->expType = op1->type;
int value2 = op2->i;
exp->type = 2;
-exp->string = PrintInt(op1->i ^ value2);
+exp->string = PrintInt((op1->i ^ value2));
if(!exp->expType)
{
exp->expType = op1->type;
unsigned int value2 = op2->ui;
exp->type = 2;
-exp->string = PrintUInt(op1->ui ^ value2);
+exp->string = PrintUInt((op1->ui ^ value2));
if(!exp->expType)
{
exp->expType = op1->type;
long long value2 = op2->i64;
exp->type = 2;
-exp->string = PrintInt64(op1->i64 ^ value2);
+exp->string = PrintInt64((op1->i64 ^ value2));
if(!exp->expType)
{
exp->expType = op1->type;
uint64 value2 = op2->ui64;
exp->type = 2;
-exp->string = PrintUInt64(op1->ui64 ^ value2);
+exp->string = PrintUInt64((op1->ui64 ^ value2));
if(!exp->expType)
{
exp->expType = op1->type;
short value2 = op2->s;
exp->type = 2;
-exp->string = PrintShort(op1->s ^ value2);
+exp->string = PrintShort((op1->s ^ value2));
if(!exp->expType)
{
exp->expType = op1->type;
unsigned short value2 = op2->us;
exp->type = 2;
-exp->string = PrintUShort(op1->us ^ value2);
+exp->string = PrintUShort((op1->us ^ value2));
if(!exp->expType)
{
exp->expType = op1->type;
char value2 = op2->c;
exp->type = 2;
-exp->string = PrintChar(op1->c ^ value2);
+exp->string = PrintChar((op1->c ^ value2));
if(!exp->expType)
{
exp->expType = op1->type;
unsigned char value2 = op2->uc;
exp->type = 2;
-exp->string = PrintUChar(op1->uc ^ value2);
+exp->string = PrintUChar((op1->uc ^ value2));
if(!exp->expType)
{
exp->expType = op1->type;
int value2 = op2->i;
exp->type = 2;
-exp->string = PrintInt(op1->i << value2);
+exp->string = PrintInt((op1->i << value2));
if(!exp->expType)
{
exp->expType = op1->type;
unsigned int value2 = op2->ui;
exp->type = 2;
-exp->string = PrintUInt(op1->ui << value2);
+exp->string = PrintUInt((op1->ui << value2));
if(!exp->expType)
{
exp->expType = op1->type;
long long value2 = op2->i64;
exp->type = 2;
-exp->string = PrintInt64(op1->i64 << value2);
+exp->string = PrintInt64((op1->i64 << value2));
if(!exp->expType)
{
exp->expType = op1->type;
uint64 value2 = op2->ui64;
exp->type = 2;
-exp->string = PrintUInt64(op1->ui64 << value2);
+exp->string = PrintUInt64((op1->ui64 << value2));
if(!exp->expType)
{
exp->expType = op1->type;
short value2 = op2->s;
exp->type = 2;
-exp->string = PrintShort(op1->s << value2);
+exp->string = PrintShort((op1->s << value2));
if(!exp->expType)
{
exp->expType = op1->type;
unsigned short value2 = op2->us;
exp->type = 2;
-exp->string = PrintUShort(op1->us << value2);
+exp->string = PrintUShort((op1->us << value2));
if(!exp->expType)
{
exp->expType = op1->type;
char value2 = op2->c;
exp->type = 2;
-exp->string = PrintChar(op1->c << value2);
+exp->string = PrintChar((op1->c << value2));
if(!exp->expType)
{
exp->expType = op1->type;
unsigned char value2 = op2->uc;
exp->type = 2;
-exp->string = PrintUChar(op1->uc << value2);
+exp->string = PrintUChar((op1->uc << value2));
if(!exp->expType)
{
exp->expType = op1->type;
int value2 = op2->i;
exp->type = 2;
-exp->string = PrintInt(op1->i >> value2);
+exp->string = PrintInt((op1->i >> value2));
if(!exp->expType)
{
exp->expType = op1->type;
unsigned int value2 = op2->ui;
exp->type = 2;
-exp->string = PrintUInt(op1->ui >> value2);
+exp->string = PrintUInt((op1->ui >> value2));
if(!exp->expType)
{
exp->expType = op1->type;
long long value2 = op2->i64;
exp->type = 2;
-exp->string = PrintInt64(op1->i64 >> value2);
+exp->string = PrintInt64((op1->i64 >> value2));
if(!exp->expType)
{
exp->expType = op1->type;
uint64 value2 = op2->ui64;
exp->type = 2;
-exp->string = PrintUInt64(op1->ui64 >> value2);
+exp->string = PrintUInt64((op1->ui64 >> value2));
if(!exp->expType)
{
exp->expType = op1->type;
short value2 = op2->s;
exp->type = 2;
-exp->string = PrintShort(op1->s >> value2);
+exp->string = PrintShort((op1->s >> value2));
if(!exp->expType)
{
exp->expType = op1->type;
unsigned short value2 = op2->us;
exp->type = 2;
-exp->string = PrintUShort(op1->us >> value2);
+exp->string = PrintUShort((op1->us >> value2));
if(!exp->expType)
{
exp->expType = op1->type;
char value2 = op2->c;
exp->type = 2;
-exp->string = PrintChar(op1->c >> value2);
+exp->string = PrintChar((op1->c >> value2));
if(!exp->expType)
{
exp->expType = op1->type;
unsigned char value2 = op2->uc;
exp->type = 2;
-exp->string = PrintUChar(op1->uc >> value2);
+exp->string = PrintUChar((op1->uc >> value2));
if(!exp->expType)
{
exp->expType = op1->type;
int value2 = op2->i;
exp->type = 2;
-exp->string = PrintInt(op1->i &= value2);
+exp->string = PrintInt((op1->i &= value2));
if(!exp->expType)
{
exp->expType = op1->type;
unsigned int value2 = op2->ui;
exp->type = 2;
-exp->string = PrintUInt(op1->ui &= value2);
+exp->string = PrintUInt((op1->ui &= value2));
if(!exp->expType)
{
exp->expType = op1->type;
long long value2 = op2->i64;
exp->type = 2;
-exp->string = PrintInt64(op1->i64 &= value2);
+exp->string = PrintInt64((op1->i64 &= value2));
if(!exp->expType)
{
exp->expType = op1->type;
uint64 value2 = op2->ui64;
exp->type = 2;
-exp->string = PrintUInt64(op1->ui64 &= value2);
+exp->string = PrintUInt64((op1->ui64 &= value2));
if(!exp->expType)
{
exp->expType = op1->type;
short value2 = op2->s;
exp->type = 2;
-exp->string = PrintShort(op1->s &= value2);
+exp->string = PrintShort((op1->s &= value2));
if(!exp->expType)
{
exp->expType = op1->type;
unsigned short value2 = op2->us;
exp->type = 2;
-exp->string = PrintUShort(op1->us &= value2);
+exp->string = PrintUShort((op1->us &= value2));
if(!exp->expType)
{
exp->expType = op1->type;
char value2 = op2->c;
exp->type = 2;
-exp->string = PrintChar(op1->c &= value2);
+exp->string = PrintChar((op1->c &= value2));
if(!exp->expType)
{
exp->expType = op1->type;
unsigned char value2 = op2->uc;
exp->type = 2;
-exp->string = PrintUChar(op1->uc &= value2);
+exp->string = PrintUChar((op1->uc &= value2));
if(!exp->expType)
{
exp->expType = op1->type;
int value2 = op2->i;
exp->type = 2;
-exp->string = PrintInt(op1->i |= value2);
+exp->string = PrintInt((op1->i |= value2));
if(!exp->expType)
{
exp->expType = op1->type;
unsigned int value2 = op2->ui;
exp->type = 2;
-exp->string = PrintUInt(op1->ui |= value2);
+exp->string = PrintUInt((op1->ui |= value2));
if(!exp->expType)
{
exp->expType = op1->type;
long long value2 = op2->i64;
exp->type = 2;
-exp->string = PrintInt64(op1->i64 |= value2);
+exp->string = PrintInt64((op1->i64 |= value2));
if(!exp->expType)
{
exp->expType = op1->type;
uint64 value2 = op2->ui64;
exp->type = 2;
-exp->string = PrintUInt64(op1->ui64 |= value2);
+exp->string = PrintUInt64((op1->ui64 |= value2));
if(!exp->expType)
{
exp->expType = op1->type;
short value2 = op2->s;
exp->type = 2;
-exp->string = PrintShort(op1->s |= value2);
+exp->string = PrintShort((op1->s |= value2));
if(!exp->expType)
{
exp->expType = op1->type;
unsigned short value2 = op2->us;
exp->type = 2;
-exp->string = PrintUShort(op1->us |= value2);
+exp->string = PrintUShort((op1->us |= value2));
if(!exp->expType)
{
exp->expType = op1->type;
char value2 = op2->c;
exp->type = 2;
-exp->string = PrintChar(op1->c |= value2);
+exp->string = PrintChar((op1->c |= value2));
if(!exp->expType)
{
exp->expType = op1->type;
unsigned char value2 = op2->uc;
exp->type = 2;
-exp->string = PrintUChar(op1->uc |= value2);
+exp->string = PrintUChar((op1->uc |= value2));
if(!exp->expType)
{
exp->expType = op1->type;
int value2 = op2->i;
exp->type = 2;
-exp->string = PrintInt(op1->i ^= value2);
+exp->string = PrintInt((op1->i ^= value2));
if(!exp->expType)
{
exp->expType = op1->type;
unsigned int value2 = op2->ui;
exp->type = 2;
-exp->string = PrintUInt(op1->ui ^= value2);
+exp->string = PrintUInt((op1->ui ^= value2));
if(!exp->expType)
{
exp->expType = op1->type;
long long value2 = op2->i64;
exp->type = 2;
-exp->string = PrintInt64(op1->i64 ^= value2);
+exp->string = PrintInt64((op1->i64 ^= value2));
if(!exp->expType)
{
exp->expType = op1->type;
uint64 value2 = op2->ui64;
exp->type = 2;
-exp->string = PrintUInt64(op1->ui64 ^= value2);
+exp->string = PrintUInt64((op1->ui64 ^= value2));
if(!exp->expType)
{
exp->expType = op1->type;
short value2 = op2->s;
exp->type = 2;
-exp->string = PrintShort(op1->s ^= value2);
+exp->string = PrintShort((op1->s ^= value2));
if(!exp->expType)
{
exp->expType = op1->type;
unsigned short value2 = op2->us;
exp->type = 2;
-exp->string = PrintUShort(op1->us ^= value2);
+exp->string = PrintUShort((op1->us ^= value2));
if(!exp->expType)
{
exp->expType = op1->type;
char value2 = op2->c;
exp->type = 2;
-exp->string = PrintChar(op1->c ^= value2);
+exp->string = PrintChar((op1->c ^= value2));
if(!exp->expType)
{
exp->expType = op1->type;
unsigned char value2 = op2->uc;
exp->type = 2;
-exp->string = PrintUChar(op1->uc ^= value2);
+exp->string = PrintUChar((op1->uc ^= value2));
if(!exp->expType)
{
exp->expType = op1->type;
int value2 = op2->i;
exp->type = 2;
-exp->string = PrintInt(op1->i <<= value2);
+exp->string = PrintInt((op1->i <<= value2));
if(!exp->expType)
{
exp->expType = op1->type;
unsigned int value2 = op2->ui;
exp->type = 2;
-exp->string = PrintUInt(op1->ui <<= value2);
+exp->string = PrintUInt((op1->ui <<= value2));
if(!exp->expType)
{
exp->expType = op1->type;
long long value2 = op2->i64;
exp->type = 2;
-exp->string = PrintInt64(op1->i64 <<= value2);
+exp->string = PrintInt64((op1->i64 <<= value2));
if(!exp->expType)
{
exp->expType = op1->type;
uint64 value2 = op2->ui64;
exp->type = 2;
-exp->string = PrintUInt64(op1->ui64 <<= value2);
+exp->string = PrintUInt64((op1->ui64 <<= value2));
if(!exp->expType)
{
exp->expType = op1->type;
short value2 = op2->s;
exp->type = 2;
-exp->string = PrintShort(op1->s <<= value2);
+exp->string = PrintShort((op1->s <<= value2));
if(!exp->expType)
{
exp->expType = op1->type;
unsigned short value2 = op2->us;
exp->type = 2;
-exp->string = PrintUShort(op1->us <<= value2);
+exp->string = PrintUShort((op1->us <<= value2));
if(!exp->expType)
{
exp->expType = op1->type;
char value2 = op2->c;
exp->type = 2;
-exp->string = PrintChar(op1->c <<= value2);
+exp->string = PrintChar((op1->c <<= value2));
if(!exp->expType)
{
exp->expType = op1->type;
unsigned char value2 = op2->uc;
exp->type = 2;
-exp->string = PrintUChar(op1->uc <<= value2);
+exp->string = PrintUChar((op1->uc <<= value2));
if(!exp->expType)
{
exp->expType = op1->type;
int value2 = op2->i;
exp->type = 2;
-exp->string = PrintInt(op1->i >>= value2);
+exp->string = PrintInt((op1->i >>= value2));
if(!exp->expType)
{
exp->expType = op1->type;
unsigned int value2 = op2->ui;
exp->type = 2;
-exp->string = PrintUInt(op1->ui >>= value2);
+exp->string = PrintUInt((op1->ui >>= value2));
if(!exp->expType)
{
exp->expType = op1->type;
long long value2 = op2->i64;
exp->type = 2;
-exp->string = PrintInt64(op1->i64 >>= value2);
+exp->string = PrintInt64((op1->i64 >>= value2));
if(!exp->expType)
{
exp->expType = op1->type;
uint64 value2 = op2->ui64;
exp->type = 2;
-exp->string = PrintUInt64(op1->ui64 >>= value2);
+exp->string = PrintUInt64((op1->ui64 >>= value2));
if(!exp->expType)
{
exp->expType = op1->type;
short value2 = op2->s;
exp->type = 2;
-exp->string = PrintShort(op1->s >>= value2);
+exp->string = PrintShort((op1->s >>= value2));
if(!exp->expType)
{
exp->expType = op1->type;
unsigned short value2 = op2->us;
exp->type = 2;
-exp->string = PrintUShort(op1->us >>= value2);
+exp->string = PrintUShort((op1->us >>= value2));
if(!exp->expType)
{
exp->expType = op1->type;
char value2 = op2->c;
exp->type = 2;
-exp->string = PrintChar(op1->c >>= value2);
+exp->string = PrintChar((op1->c >>= value2));
if(!exp->expType)
{
exp->expType = op1->type;
unsigned char value2 = op2->uc;
exp->type = 2;
-exp->string = PrintUChar(op1->uc >>= value2);
+exp->string = PrintUChar((op1->uc >>= value2));
if(!exp->expType)
{
exp->expType = op1->type;
int value2 = op2->i;
exp->type = 2;
-exp->string = PrintInt(op1->i == value2);
+exp->string = PrintInt((int)(op1->i == value2));
if(!exp->expType)
{
exp->expType = op1->type;
unsigned int value2 = op2->ui;
exp->type = 2;
-exp->string = PrintUInt(op1->ui == value2);
+exp->string = PrintUInt((unsigned int)(op1->ui == value2));
if(!exp->expType)
{
exp->expType = op1->type;
long long value2 = op2->i64;
exp->type = 2;
-exp->string = PrintInt64(op1->i64 == value2);
+exp->string = PrintInt64((long long)(op1->i64 == value2));
if(!exp->expType)
{
exp->expType = op1->type;
uint64 value2 = op2->ui64;
exp->type = 2;
-exp->string = PrintUInt64(op1->ui64 == value2);
+exp->string = PrintUInt64((uint64)(op1->ui64 == value2));
if(!exp->expType)
{
exp->expType = op1->type;
short value2 = op2->s;
exp->type = 2;
-exp->string = PrintShort(op1->s == value2);
+exp->string = PrintShort((short)(op1->s == value2));
if(!exp->expType)
{
exp->expType = op1->type;
unsigned short value2 = op2->us;
exp->type = 2;
-exp->string = PrintUShort(op1->us == value2);
+exp->string = PrintUShort((unsigned short)(op1->us == value2));
if(!exp->expType)
{
exp->expType = op1->type;
char value2 = op2->c;
exp->type = 2;
-exp->string = PrintChar(op1->c == value2);
+exp->string = PrintChar((char)(op1->c == value2));
if(!exp->expType)
{
exp->expType = op1->type;
unsigned char value2 = op2->uc;
exp->type = 2;
-exp->string = PrintUChar(op1->uc == value2);
+exp->string = PrintUChar((unsigned char)(op1->uc == value2));
if(!exp->expType)
{
exp->expType = op1->type;
float value2 = op2->f;
exp->type = 2;
-exp->string = PrintFloat(op1->f == value2);
+exp->string = PrintFloat((float)(op1->f == value2));
if(!exp->expType)
{
exp->expType = op1->type;
double value2 = op2->d;
exp->type = 2;
-exp->string = PrintDouble(op1->d == value2);
+exp->string = PrintDouble((double)(op1->d == value2));
if(!exp->expType)
{
exp->expType = op1->type;
int value2 = op2->i;
exp->type = 2;
-exp->string = PrintInt(op1->i != value2);
+exp->string = PrintInt((int)(op1->i != value2));
if(!exp->expType)
{
exp->expType = op1->type;
unsigned int value2 = op2->ui;
exp->type = 2;
-exp->string = PrintUInt(op1->ui != value2);
+exp->string = PrintUInt((unsigned int)(op1->ui != value2));
if(!exp->expType)
{
exp->expType = op1->type;
long long value2 = op2->i64;
exp->type = 2;
-exp->string = PrintInt64(op1->i64 != value2);
+exp->string = PrintInt64((long long)(op1->i64 != value2));
if(!exp->expType)
{
exp->expType = op1->type;
uint64 value2 = op2->ui64;
exp->type = 2;
-exp->string = PrintUInt64(op1->ui64 != value2);
+exp->string = PrintUInt64((uint64)(op1->ui64 != value2));
if(!exp->expType)
{
exp->expType = op1->type;
short value2 = op2->s;
exp->type = 2;
-exp->string = PrintShort(op1->s != value2);
+exp->string = PrintShort((short)(op1->s != value2));
if(!exp->expType)
{
exp->expType = op1->type;
unsigned short value2 = op2->us;
exp->type = 2;
-exp->string = PrintUShort(op1->us != value2);
+exp->string = PrintUShort((unsigned short)(op1->us != value2));
if(!exp->expType)
{
exp->expType = op1->type;
char value2 = op2->c;
exp->type = 2;
-exp->string = PrintChar(op1->c != value2);
+exp->string = PrintChar((char)(op1->c != value2));
if(!exp->expType)
{
exp->expType = op1->type;
unsigned char value2 = op2->uc;
exp->type = 2;
-exp->string = PrintUChar(op1->uc != value2);
+exp->string = PrintUChar((unsigned char)(op1->uc != value2));
if(!exp->expType)
{
exp->expType = op1->type;
float value2 = op2->f;
exp->type = 2;
-exp->string = PrintFloat(op1->f != value2);
+exp->string = PrintFloat((float)(op1->f != value2));
if(!exp->expType)
{
exp->expType = op1->type;
double value2 = op2->d;
exp->type = 2;
-exp->string = PrintDouble(op1->d != value2);
+exp->string = PrintDouble((double)(op1->d != value2));
if(!exp->expType)
{
exp->expType = op1->type;
int value2 = op2->i;
exp->type = 2;
-exp->string = PrintInt(op1->i && value2);
+exp->string = PrintInt((int)(op1->i && value2));
if(!exp->expType)
{
exp->expType = op1->type;
unsigned int value2 = op2->ui;
exp->type = 2;
-exp->string = PrintUInt(op1->ui && value2);
+exp->string = PrintUInt((unsigned int)(op1->ui && value2));
if(!exp->expType)
{
exp->expType = op1->type;
long long value2 = op2->i64;
exp->type = 2;
-exp->string = PrintInt64(op1->i64 && value2);
+exp->string = PrintInt64((long long)(op1->i64 && value2));
if(!exp->expType)
{
exp->expType = op1->type;
uint64 value2 = op2->ui64;
exp->type = 2;
-exp->string = PrintUInt64(op1->ui64 && value2);
+exp->string = PrintUInt64((uint64)(op1->ui64 && value2));
if(!exp->expType)
{
exp->expType = op1->type;
short value2 = op2->s;
exp->type = 2;
-exp->string = PrintShort(op1->s && value2);
+exp->string = PrintShort((short)(op1->s && value2));
if(!exp->expType)
{
exp->expType = op1->type;
unsigned short value2 = op2->us;
exp->type = 2;
-exp->string = PrintUShort(op1->us && value2);
+exp->string = PrintUShort((unsigned short)(op1->us && value2));
if(!exp->expType)
{
exp->expType = op1->type;
char value2 = op2->c;
exp->type = 2;
-exp->string = PrintChar(op1->c && value2);
+exp->string = PrintChar((char)(op1->c && value2));
if(!exp->expType)
{
exp->expType = op1->type;
unsigned char value2 = op2->uc;
exp->type = 2;
-exp->string = PrintUChar(op1->uc && value2);
+exp->string = PrintUChar((unsigned char)(op1->uc && value2));
if(!exp->expType)
{
exp->expType = op1->type;
float value2 = op2->f;
exp->type = 2;
-exp->string = PrintFloat(op1->f && value2);
+exp->string = PrintFloat((float)(op1->f && value2));
if(!exp->expType)
{
exp->expType = op1->type;
double value2 = op2->d;
exp->type = 2;
-exp->string = PrintDouble(op1->d && value2);
+exp->string = PrintDouble((double)(op1->d && value2));
if(!exp->expType)
{
exp->expType = op1->type;
int value2 = op2->i;
exp->type = 2;
-exp->string = PrintInt(op1->i || value2);
+exp->string = PrintInt((int)(op1->i || value2));
if(!exp->expType)
{
exp->expType = op1->type;
unsigned int value2 = op2->ui;
exp->type = 2;
-exp->string = PrintUInt(op1->ui || value2);
+exp->string = PrintUInt((unsigned int)(op1->ui || value2));
if(!exp->expType)
{
exp->expType = op1->type;
long long value2 = op2->i64;
exp->type = 2;
-exp->string = PrintInt64(op1->i64 || value2);
+exp->string = PrintInt64((long long)(op1->i64 || value2));
if(!exp->expType)
{
exp->expType = op1->type;
uint64 value2 = op2->ui64;
exp->type = 2;
-exp->string = PrintUInt64(op1->ui64 || value2);
+exp->string = PrintUInt64((uint64)(op1->ui64 || value2));
if(!exp->expType)
{
exp->expType = op1->type;
short value2 = op2->s;
exp->type = 2;
-exp->string = PrintShort(op1->s || value2);
+exp->string = PrintShort((short)(op1->s || value2));
if(!exp->expType)
{
exp->expType = op1->type;
unsigned short value2 = op2->us;
exp->type = 2;
-exp->string = PrintUShort(op1->us || value2);
+exp->string = PrintUShort((unsigned short)(op1->us || value2));
if(!exp->expType)
{
exp->expType = op1->type;
char value2 = op2->c;
exp->type = 2;
-exp->string = PrintChar(op1->c || value2);
+exp->string = PrintChar((char)(op1->c || value2));
if(!exp->expType)
{
exp->expType = op1->type;
unsigned char value2 = op2->uc;
exp->type = 2;
-exp->string = PrintUChar(op1->uc || value2);
+exp->string = PrintUChar((unsigned char)(op1->uc || value2));
if(!exp->expType)
{
exp->expType = op1->type;
float value2 = op2->f;
exp->type = 2;
-exp->string = PrintFloat(op1->f || value2);
+exp->string = PrintFloat((float)(op1->f || value2));
if(!exp->expType)
{
exp->expType = op1->type;
double value2 = op2->d;
exp->type = 2;
-exp->string = PrintDouble(op1->d || value2);
+exp->string = PrintDouble((double)(op1->d || value2));
if(!exp->expType)
{
exp->expType = op1->type;
int value2 = op2->i;
exp->type = 2;
-exp->string = PrintInt(op1->i > value2);
+exp->string = PrintInt((int)(op1->i > value2));
if(!exp->expType)
{
exp->expType = op1->type;
unsigned int value2 = op2->ui;
exp->type = 2;
-exp->string = PrintUInt(op1->ui > value2);
+exp->string = PrintUInt((unsigned int)(op1->ui > value2));
if(!exp->expType)
{
exp->expType = op1->type;
long long value2 = op2->i64;
exp->type = 2;
-exp->string = PrintInt64(op1->i64 > value2);
+exp->string = PrintInt64((long long)(op1->i64 > value2));
if(!exp->expType)
{
exp->expType = op1->type;
uint64 value2 = op2->ui64;
exp->type = 2;
-exp->string = PrintUInt64(op1->ui64 > value2);
+exp->string = PrintUInt64((uint64)(op1->ui64 > value2));
if(!exp->expType)
{
exp->expType = op1->type;
short value2 = op2->s;
exp->type = 2;
-exp->string = PrintShort(op1->s > value2);
+exp->string = PrintShort((short)(op1->s > value2));
if(!exp->expType)
{
exp->expType = op1->type;
unsigned short value2 = op2->us;
exp->type = 2;
-exp->string = PrintUShort(op1->us > value2);
+exp->string = PrintUShort((unsigned short)(op1->us > value2));
if(!exp->expType)
{
exp->expType = op1->type;
char value2 = op2->c;
exp->type = 2;
-exp->string = PrintChar(op1->c > value2);
+exp->string = PrintChar((char)(op1->c > value2));
if(!exp->expType)
{
exp->expType = op1->type;
unsigned char value2 = op2->uc;
exp->type = 2;
-exp->string = PrintUChar(op1->uc > value2);
+exp->string = PrintUChar((unsigned char)(op1->uc > value2));
if(!exp->expType)
{
exp->expType = op1->type;
float value2 = op2->f;
exp->type = 2;
-exp->string = PrintFloat(op1->f > value2);
+exp->string = PrintFloat((float)(op1->f > value2));
if(!exp->expType)
{
exp->expType = op1->type;
double value2 = op2->d;
exp->type = 2;
-exp->string = PrintDouble(op1->d > value2);
+exp->string = PrintDouble((double)(op1->d > value2));
if(!exp->expType)
{
exp->expType = op1->type;
int value2 = op2->i;
exp->type = 2;
-exp->string = PrintInt(op1->i < value2);
+exp->string = PrintInt((int)(op1->i < value2));
if(!exp->expType)
{
exp->expType = op1->type;
unsigned int value2 = op2->ui;
exp->type = 2;
-exp->string = PrintUInt(op1->ui < value2);
+exp->string = PrintUInt((unsigned int)(op1->ui < value2));
if(!exp->expType)
{
exp->expType = op1->type;
long long value2 = op2->i64;
exp->type = 2;
-exp->string = PrintInt64(op1->i64 < value2);
+exp->string = PrintInt64((long long)(op1->i64 < value2));
if(!exp->expType)
{
exp->expType = op1->type;
uint64 value2 = op2->ui64;
exp->type = 2;
-exp->string = PrintUInt64(op1->ui64 < value2);
+exp->string = PrintUInt64((uint64)(op1->ui64 < value2));
if(!exp->expType)
{
exp->expType = op1->type;
short value2 = op2->s;
exp->type = 2;
-exp->string = PrintShort(op1->s < value2);
+exp->string = PrintShort((short)(op1->s < value2));
if(!exp->expType)
{
exp->expType = op1->type;
unsigned short value2 = op2->us;
exp->type = 2;
-exp->string = PrintUShort(op1->us < value2);
+exp->string = PrintUShort((unsigned short)(op1->us < value2));
if(!exp->expType)
{
exp->expType = op1->type;
char value2 = op2->c;
exp->type = 2;
-exp->string = PrintChar(op1->c < value2);
+exp->string = PrintChar((char)(op1->c < value2));
if(!exp->expType)
{
exp->expType = op1->type;
unsigned char value2 = op2->uc;
exp->type = 2;
-exp->string = PrintUChar(op1->uc < value2);
+exp->string = PrintUChar((unsigned char)(op1->uc < value2));
if(!exp->expType)
{
exp->expType = op1->type;
float value2 = op2->f;
exp->type = 2;
-exp->string = PrintFloat(op1->f < value2);
+exp->string = PrintFloat((float)(op1->f < value2));
if(!exp->expType)
{
exp->expType = op1->type;
double value2 = op2->d;
exp->type = 2;
-exp->string = PrintDouble(op1->d < value2);
+exp->string = PrintDouble((double)(op1->d < value2));
if(!exp->expType)
{
exp->expType = op1->type;
int value2 = op2->i;
exp->type = 2;
-exp->string = PrintInt(op1->i >= value2);
+exp->string = PrintInt((int)(op1->i >= value2));
if(!exp->expType)
{
exp->expType = op1->type;
unsigned int value2 = op2->ui;
exp->type = 2;
-exp->string = PrintUInt(op1->ui >= value2);
+exp->string = PrintUInt((unsigned int)(op1->ui >= value2));
if(!exp->expType)
{
exp->expType = op1->type;
long long value2 = op2->i64;
exp->type = 2;
-exp->string = PrintInt64(op1->i64 >= value2);
+exp->string = PrintInt64((long long)(op1->i64 >= value2));
if(!exp->expType)
{
exp->expType = op1->type;
uint64 value2 = op2->ui64;
exp->type = 2;
-exp->string = PrintUInt64(op1->ui64 >= value2);
+exp->string = PrintUInt64((uint64)(op1->ui64 >= value2));
if(!exp->expType)
{
exp->expType = op1->type;
short value2 = op2->s;
exp->type = 2;
-exp->string = PrintShort(op1->s >= value2);
+exp->string = PrintShort((short)(op1->s >= value2));
if(!exp->expType)
{
exp->expType = op1->type;
unsigned short value2 = op2->us;
exp->type = 2;
-exp->string = PrintUShort(op1->us >= value2);
+exp->string = PrintUShort((unsigned short)(op1->us >= value2));
if(!exp->expType)
{
exp->expType = op1->type;
char value2 = op2->c;
exp->type = 2;
-exp->string = PrintChar(op1->c >= value2);
+exp->string = PrintChar((char)(op1->c >= value2));
if(!exp->expType)
{
exp->expType = op1->type;
unsigned char value2 = op2->uc;
exp->type = 2;
-exp->string = PrintUChar(op1->uc >= value2);
+exp->string = PrintUChar((unsigned char)(op1->uc >= value2));
if(!exp->expType)
{
exp->expType = op1->type;
float value2 = op2->f;
exp->type = 2;
-exp->string = PrintFloat(op1->f >= value2);
+exp->string = PrintFloat((float)(op1->f >= value2));
if(!exp->expType)
{
exp->expType = op1->type;
double value2 = op2->d;
exp->type = 2;
-exp->string = PrintDouble(op1->d >= value2);
+exp->string = PrintDouble((double)(op1->d >= value2));
if(!exp->expType)
{
exp->expType = op1->type;
int value2 = op2->i;
exp->type = 2;
-exp->string = PrintInt(op1->i <= value2);
+exp->string = PrintInt((int)(op1->i <= value2));
if(!exp->expType)
{
exp->expType = op1->type;
unsigned int value2 = op2->ui;
exp->type = 2;
-exp->string = PrintUInt(op1->ui <= value2);
+exp->string = PrintUInt((unsigned int)(op1->ui <= value2));
if(!exp->expType)
{
exp->expType = op1->type;
long long value2 = op2->i64;
exp->type = 2;
-exp->string = PrintInt64(op1->i64 <= value2);
+exp->string = PrintInt64((long long)(op1->i64 <= value2));
if(!exp->expType)
{
exp->expType = op1->type;
uint64 value2 = op2->ui64;
exp->type = 2;
-exp->string = PrintUInt64(op1->ui64 <= value2);
+exp->string = PrintUInt64((uint64)(op1->ui64 <= value2));
if(!exp->expType)
{
exp->expType = op1->type;
short value2 = op2->s;
exp->type = 2;
-exp->string = PrintShort(op1->s <= value2);
+exp->string = PrintShort((short)(op1->s <= value2));
if(!exp->expType)
{
exp->expType = op1->type;
unsigned short value2 = op2->us;
exp->type = 2;
-exp->string = PrintUShort(op1->us <= value2);
+exp->string = PrintUShort((unsigned short)(op1->us <= value2));
if(!exp->expType)
{
exp->expType = op1->type;
char value2 = op2->c;
exp->type = 2;
-exp->string = PrintChar(op1->c <= value2);
+exp->string = PrintChar((char)(op1->c <= value2));
if(!exp->expType)
{
exp->expType = op1->type;
unsigned char value2 = op2->uc;
exp->type = 2;
-exp->string = PrintUChar(op1->uc <= value2);
+exp->string = PrintUChar((unsigned char)(op1->uc <= value2));
if(!exp->expType)
{
exp->expType = op1->type;
float value2 = op2->f;
exp->type = 2;
-exp->string = PrintFloat(op1->f <= value2);
+exp->string = PrintFloat((float)(op1->f <= value2));
if(!exp->expType)
{
exp->expType = op1->type;
double value2 = op2->d;
exp->type = 2;
-exp->string = PrintDouble(op1->d <= value2);
+exp->string = PrintDouble((double)(op1->d <= value2));
if(!exp->expType)
{
exp->expType = op1->type;
extern struct Expression * MkExpCondition(struct Expression * cond, struct __ecereNameSpace__ecere__sys__OldList * expressions, struct Expression * elseExp);
-extern struct Expression * CopyExpression(struct Expression * exp);
-
extern struct Expression * MkExpTypeSize(struct TypeName * typeName);
extern struct Expression * MkExpClass(struct __ecereNameSpace__ecere__sys__OldList * specifiers, struct Declarator * decl);
exp->expType = type;
if(type)
type->refCount++;
-if(type && (type->kind == 15 || (_class && _class->type == 4)))
+if(type && (type->kind == 15))
exp->isConstant = 0x1;
if(symbol->isParam || !strcmp(id->string, "this"))
{
unsigned int useDestType = 0x0, useSideType = 0x0;
struct Location oldyylloc = yylloc;
unsigned int useSideUnit = 0x0;
+struct __ecereNameSpace__ecere__com__Class * destClass = (exp->destType && exp->destType->kind == 8 && exp->destType->_class) ? exp->destType->_class->registered : (((void *)0));
struct Type * dummy = (dummy = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type), dummy->count = 1, dummy->refCount = 1, dummy);
switch(exp->op.op)
case '+':
case '-':
useSideUnit = 0x1;
+useSideType = 0x1;
+useDestType = 0x1;
+break;
+case LEFT_OP:
+case RIGHT_OP:
+useSideType = 0x1;
+useDestType = 0x1;
+break;
case '|':
-case '&':
case '^':
+useSideType = 0x1;
+useDestType = 0x1;
+break;
case '/':
case '%':
+useSideType = 0x1;
+useDestType = 0x1;
+break;
+case '&':
case '*':
-if(exp->op.op != '*' || exp->op.exp1)
+if(exp->op.exp1)
{
useSideType = 0x1;
useDestType = 0x1;
}
if(exp->op.exp1)
{
-if(exp->destType && exp->destType->kind == 8 && exp->destType->_class && exp->destType->_class->registered && useDestType && ((exp->destType->_class->registered->type == 3 && useSideUnit) || exp->destType->_class->registered->type == 4 || exp->destType->_class->registered->type == 2))
+if(exp->op.exp2 && useSideUnit && useDestType && destClass && destClass->type == 3 && destClass->base->type != 3)
+useDestType = 0x0;
+if(destClass && useDestType && ((destClass->type == 3 && useSideUnit) || destClass->type == 4 || destClass->type == 2))
{
if(exp->op.exp1->destType)
FreeType(exp->op.exp1->destType);
exp->op.exp1->destType = exp->destType;
+exp->op.exp1->opDestType = 0x1;
if(exp->destType)
exp->destType->refCount++;
}
ProcessExpressionType(exp->op.exp1);
if(exp->op.exp1->destType && exp->op.op != '=')
exp->op.exp1->destType->count--;
+exp->op.exp1->opDestType = 0x0;
if(!exp->op.exp2 && (exp->op.op == INC_OP || exp->op.op == DEC_OP) && exp->op.exp1->expType && exp->op.exp1->expType->kind == 8 && exp->op.exp1->expType->_class && exp->op.exp1->expType->_class->registered && exp->op.exp1->expType->_class->registered->type == 3)
{
exp->op.exp2 = MkExpConstant("1");
else
{
exp->op.exp2->destType = exp->destType;
+if(!exp->op.exp1 || exp->op.op != '&')
+exp->op.exp2->opDestType = 0x1;
if(exp->destType)
exp->destType->refCount++;
}
type1->refCount++;
exp->expType = type1;
}
-else if(exp->destType && exp->destType->kind == 8 && exp->destType->_class && exp->destType->_class->registered && ((exp->destType->_class->registered->type == 3 && useDestType && useSideUnit) || (exp->destType->_class->registered->type == 4 && useDestType)))
+else if(destClass && ((destClass->type == 3 && useDestType && useSideUnit) || (destClass->type == 4 && useDestType)))
{
if(exp->op.exp2->destType)
FreeType(exp->op.exp2->destType);
exp->op.exp2->destType = exp->destType;
+if(exp->op.op != '&')
+exp->op.exp2->opDestType = 0x1;
if(exp->destType)
exp->destType->refCount++;
}
e->cast.exp->needCast = 0x1;
}
ProcessExpressionType(exp->op.exp2);
+exp->op.exp2->opDestType = 0x0;
if(exp->op.exp2->destType && exp->op.op != '=')
exp->op.exp2->destType->count--;
if(assign && type1 && type1->kind == 13 && exp->op.exp2->expType)
{
if(type1 && type2 && ((type1->kind == 8 && type1->_class && strcmp(type1->_class->string, "String")) == (type2->kind == 8 && type2->_class && strcmp(type2->_class->string, "String"))))
{
+if(exp->op.op == '-' && ((type1->kind == 8 && type1->_class->registered && type1->_class->registered->type == 4) || (type2->kind == 8 && type2->_class->registered && type2->_class->registered->type == 4)))
+{
+struct Type * intType;
+
+if(!type1->_class->registered->dataType)
+type1->_class->registered->dataType = ProcessTypeString(type1->_class->registered->dataTypeString, 0x0);
+if(!type2->_class->registered->dataType)
+type2->_class->registered->dataType = ProcessTypeString(type2->_class->registered->dataTypeString, 0x0);
+intType = ProcessTypeString((type1->_class->registered->dataType->kind == 4 || type2->_class->registered->dataType->kind == 4) ? "int64" : "int", 0x0);
+if(exp->op.exp1->destType)
+FreeType(exp->op.exp1->destType);
+if(exp->op.exp2->destType)
+FreeType(exp->op.exp2->destType);
+exp->op.exp1->destType = intType;
+exp->op.exp2->destType = intType;
+intType->refCount++;
+}
+else
+{
if(exp->op.exp2->destType)
FreeType(exp->op.exp2->destType);
exp->op.exp2->destType = type1;
FreeType(exp->op.exp1->destType);
exp->op.exp1->destType = type2;
type2->refCount++;
+}
if(!boolResult && type1->kind == 8 && (!exp->destType || exp->destType->kind != 8) && type1->_class->registered && type1->_class->registered->type == 3 && type2->_class->registered && type2->_class->registered->type == 3 && type1->_class->registered != type2->_class->registered)
Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "operating on %s and %s with an untyped result, assuming %s\n", (((void *)0))), type1->_class->string, type2->_class->string, type1->_class->string);
if(type1->kind == 13 && type1->type->kind == 20 && type2->kind != 13)
exp->expType = type1;
type1->refCount++;
}
-if(!boolResult || exp->op.op == '>' || exp->op.op == '<')
+if(!boolResult || exp->op.op == '>' || exp->op.op == '<' || exp->op.op == GE_OP || exp->op.op == LE_OP)
{
-if(type1->kind == 8 && type1->_class && type1->_class->registered && type1->_class->registered->type == 4 && exp->op.exp2->expType)
+unsigned int op1IsEnum = type1 && type1->kind == 8 && type1->_class && type1->_class->registered && type1->_class->registered->type == 4;
+unsigned int op2IsEnum = type2 && type2->kind == 8 && type2->_class && type2->_class->registered && type2->_class->registered->type == 4;
+
+if(exp->op.op == '*' || exp->op.op == '/' || exp->op.op == '-' || exp->op.op == '|' || exp->op.op == '^')
+{
+if(op1IsEnum && exp->op.exp2->expType)
{
if(CheckExpressionType(exp->op.exp1, exp->op.exp2->expType, 0x0))
{
if(exp->expType)
FreeType(exp->expType);
-exp->expType = exp->op.exp1->expType;
+exp->expType = exp->op.exp2->expType;
if(exp->op.exp2->expType)
+exp->op.exp2->expType->refCount++;
+valid = 0x1;
+}
+}
+else if(op2IsEnum && exp->op.exp1->expType)
+{
+if(CheckExpressionType(exp->op.exp2, exp->op.exp1->expType, 0x0))
+{
+if(exp->expType)
+FreeType(exp->expType);
+exp->expType = exp->op.exp1->expType;
+if(exp->op.exp1->expType)
+exp->op.exp1->expType->refCount++;
+valid = 0x1;
+}
+}
+}
+else
+{
+if(op1IsEnum && exp->op.exp2->expType)
+{
+if(CheckExpressionType(exp->op.exp1, exp->op.exp2->expType, 0x0))
+{
+if(exp->expType)
+FreeType(exp->expType);
+exp->expType = exp->op.exp1->expType;
+if(exp->op.exp1->expType)
exp->op.exp1->expType->refCount++;
valid = 0x1;
}
}
-else if(type2 && (type2->kind == 8 && type2->_class && type2->_class->registered && type2->_class->registered->type == 4 && exp->op.exp1->expType))
+else if(op2IsEnum && exp->op.exp1->expType)
{
if(CheckExpressionType(exp->op.exp2, exp->op.exp1->expType, 0x0))
{
}
}
}
+}
if(!valid)
{
+if(type2 && type2->kind == 8 && type2->_class && type2->_class->registered && type2->_class->registered->type == 3 && (type1->kind != 8 || !type1->_class || !type1->_class->registered || type1->_class->registered->type != 3))
+{
+if(exp->op.exp1->destType)
+FreeType(exp->op.exp1->destType);
+exp->op.exp1->destType = type2;
+type2->refCount++;
+if(CheckExpressionType(exp->op.exp1, exp->op.exp1->destType, 0x0))
+{
+if(exp->expType)
+FreeType(exp->expType);
+exp->expType = exp->op.exp1->destType;
+if(exp->op.exp1->destType)
+exp->op.exp1->destType->refCount++;
+}
+}
+else
+{
if(exp->op.exp2->destType)
FreeType(exp->op.exp2->destType);
exp->op.exp2->destType = type1;
}
}
}
+}
else if(type2)
{
if(type2->kind == 8 && type2->_class && type2->_class->registered && type2->_class->registered->type == 4)
if(!e->next)
{
FreeType(e->destType);
+e->opDestType = exp->opDestType;
e->destType = exp->destType;
if(e->destType)
{
unsigned int addedThis;
unsigned int needCast;
unsigned int thisPtr;
+unsigned int opDestType;
} __attribute__ ((gcc_struct));
extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_TemplateDatatype;
struct __ecereNameSpace__ecere__sys__OldList methods;
struct __ecereNameSpace__ecere__sys__OldList properties;
unsigned int itself;
-unsigned int isRemote;
+int isRemote;
} __attribute__ ((gcc_struct));
extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Symbol;
char * defaultProperty;
unsigned int comRedefinition;
int count;
-unsigned int isRemote;
+int isRemote;
unsigned int internalDecl;
void * data;
unsigned int computeSize;
classSym->_import = __extension__ ({
struct ClassImport * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_ClassImport);
-__ecereInstance1->isRemote = classSym->registered ? classSym->registered->isRemote : 0x0, __ecereInstance1->name = __ecereNameSpace__ecere__sys__CopyString(classSym->string), __ecereInstance1;
+__ecereInstance1->isRemote = classSym->registered ? classSym->registered->isRemote : 0, __ecereInstance1->name = __ecereNameSpace__ecere__sys__CopyString(classSym->string), __ecereInstance1;
});
__ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&classSym->module->classes, classSym->_import);
}
unsigned int addedThis;
unsigned int needCast;
unsigned int thisPtr;
+unsigned int opDestType;
} __attribute__ ((gcc_struct));
extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_TemplateDatatype;
char * defaultProperty;
unsigned int comRedefinition;
int count;
-unsigned int isRemote;
+int isRemote;
unsigned int internalDecl;
void * data;
unsigned int computeSize;
unsigned int addedThis;
unsigned int needCast;
unsigned int thisPtr;
+unsigned int opDestType;
} __attribute__ ((gcc_struct));
extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_TemplateDatatype;
char * defaultProperty;
unsigned int comRedefinition;
int count;
-unsigned int isRemote;
+int isRemote;
unsigned int internalDecl;
void * data;
unsigned int computeSize;
extern struct Type * ProcessTypeString(char * string, unsigned int staticMethod);
-static unsigned int ReplaceClassSpec(struct __ecereNameSpace__ecere__sys__OldList * specs, struct Specifier * spec, unsigned int param)
+static int ReplaceClassSpec(struct __ecereNameSpace__ecere__sys__OldList * specs, struct Specifier * spec, unsigned int param)
{
if(spec->type == 8)
{
if(decl)
FreeDeclarator(decl);
if(isPointer)
-return 0x1;
+return 1;
}
}
else if(!param && parameter->dataType)
unsigned int isPointer = decl->type == 5;
if(isPointer)
-return 0x1;
+return 1;
}
}
else
{
spec->type = 0;
spec->specifier = VOID;
-return 0x1;
+return 1;
}
}
else
spec->addNameSpace = 0x0;
}
if(_class && _class->dataTypeString && !strcmp(_class->dataTypeString, "char *"))
-return 0x1;
+return 1;
if(!_class || _class->type == 0 || _class->type == 5)
-return 0x1;
+return 1;
else if(param && _class->type == 1)
-return (unsigned int)2;
+return 2;
}
}
else if(spec->type == 0)
if(spec->specifier == ANY_OBJECT)
{
spec->specifier = VOID;
-return 0x1;
+return 1;
}
}
-return 0x0;
+return 0;
}
extern struct Pointer * MkPointer(struct __ecereNameSpace__ecere__sys__OldList * qualifiers, struct Pointer * pointer);
{
int result;
-if((result = (unsigned int)ReplaceClassSpec(type->qualifiers, spec, param)))
+if((result = ReplaceClassSpec(type->qualifiers, spec, param)))
ReplaceByInstancePtr(spec, &type->declarator, result);
else
{
{
int type;
-if((type = (unsigned int)ReplaceClassSpec(decl->specifiers, spec, 0x0)))
+if((type = ReplaceClassSpec(decl->specifiers, spec, 0x0)))
{
struct InitDeclarator * d;
{
int type;
-if((type = (unsigned int)ReplaceClassSpec(decl->specifiers, spec, 0x0)))
+if((type = ReplaceClassSpec(decl->specifiers, spec, 0x0)))
{
if(decl->declarators)
{
{
int type;
-if((type = (unsigned int)ReplaceClassSpec(func->specifiers, spec, 0x0)))
+if((type = ReplaceClassSpec(func->specifiers, spec, 0x0)))
ReplaceByInstancePtr(spec, &func->declarator, type);
InstDeclPassSpecifier(spec);
}
char * defaultProperty;
unsigned int comRedefinition;
int count;
-unsigned int isRemote;
+int isRemote;
unsigned int internalDecl;
void * data;
unsigned int computeSize;
unsigned int addedThis;
unsigned int needCast;
unsigned int thisPtr;
+unsigned int opDestType;
} __attribute__ ((gcc_struct));
extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_TemplateDatatype;
char * defaultProperty;
unsigned int comRedefinition;
int count;
-unsigned int isRemote;
+int isRemote;
unsigned int internalDecl;
void * data;
unsigned int computeSize;
SetTargetBits(targetBits);
SetEchoOn(false);
- privateModule = (Module)__ecere_COM_Initialize(true | (targetBits == sizeof(uintptr)*8 ? 0 : targetBits == 64 ? 2 : targetBits==32 ? 4 : 0) | 8, 1, null);
+ privateModule = (Module)__ecere_COM_Initialize((bool)(true | (targetBits == sizeof(uintptr)*8 ? 0 : targetBits == 64 ? 2 : targetBits==32 ? 4 : 0) | 8), 1, null);
SetPrivateModule(privateModule);
globalContext.types.Add((BTNode)Symbol { string = CopyString("uint"), type = ProcessTypeString("unsigned int", false) });
SetTargetBits(targetBits);
SetInSymbolGen(true);
- privateModule = (Module)__ecere_COM_Initialize(true | (targetBits == sizeof(uintptr)*8 ? 0 : targetBits == 64 ? 2 : targetBits==32 ? 4 : 0) | 8, 1, null);
+ privateModule = (Module)__ecere_COM_Initialize((bool)(true | (targetBits == sizeof(uintptr)*8 ? 0 : targetBits == 64 ? 2 : targetBits==32 ? 4 : 0) | 8), 1, null);
SetPrivateModule(privateModule);
mainModule = ModuleImport { };
SetMainModule(mainModule);
unsigned int addedThis;
unsigned int needCast;
unsigned int thisPtr;
+unsigned int opDestType;
} __attribute__ ((gcc_struct));
extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_TemplateDatatype;
char * defaultProperty;
unsigned int comRedefinition;
int count;
-unsigned int isRemote;
+int isRemote;
unsigned int internalDecl;
void * data;
unsigned int computeSize;
unsigned int addedThis;
unsigned int needCast;
unsigned int thisPtr;
+unsigned int opDestType;
} __attribute__ ((gcc_struct));
extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_TemplateDatatype;
char * defaultProperty;
unsigned int comRedefinition;
int count;
-unsigned int isRemote;
+int isRemote;
unsigned int internalDecl;
void * data;
unsigned int computeSize;
unsigned int addedThis;
unsigned int needCast;
unsigned int thisPtr;
+unsigned int opDestType;
} __attribute__ ((gcc_struct));
extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_TemplateDatatype;
char * defaultProperty;
unsigned int comRedefinition;
int count;
-unsigned int isRemote;
+int isRemote;
unsigned int internalDecl;
void * data;
unsigned int computeSize;
result.loc = exp.loc;
result.isConstant = exp.isConstant;
result.byReference = exp.byReference;
+ result.opDestType = exp.opDestType;
}
return result;
bool addedThis;
bool needCast;
bool thisPtr;
+ bool opDestType;
void Clear()
{
addedThis = false;
needCast = false;
thisPtr = false;
+ opDestType = false;
}
};
OldList methods;
OldList properties;
bool itself;
- bool isRemote;
+ int isRemote;
};
public class FunctionImport : struct
if(!convert.dataType)
convert.dataType = ProcessTypeString(convert.dataTypeString, false);
- if(MatchTypes(convert.dataType, dest, conversions, null, null, false, true, false, true))
+ // Only go ahead with this conversion flow while processing an existing conversion if the conversion data type is a class
+ if((!isConversionExploration || convert.dataType.kind == classType || !strcmp(_class.name, "String")) &&
+ MatchTypes(convert.dataType, dest, conversions, null, null,
+ (convert.dataType.kind == classType && !strcmp(convert.dataTypeString, "String")) ? true : false,
+ convert.dataType.kind == classType, false, true))
{
if(!conversions && !convert.Get)
return true;
if(dest._class.registered.dataType.kind == classType || source.truth || dest.truth/* ||
!strcmp(dest._class.registered.name, "bool") || (source.kind == classType && !strcmp(source._class.string, "bool"))*/)
{
- if(MatchTypes(source, dest._class.registered.dataType, conversions, null, null, true, true, false, false))
+ if(MatchTypes(source, dest._class.registered.dataType, conversions, null, null, true, dest._class.registered.dataType.kind == classType, false, false))
{
return true;
}
if(!convert.dataType)
convert.dataType = ProcessTypeString(convert.dataTypeString, false);
- if(convert.dataType != source && MatchTypes(convert.dataType, dest, conversions, null, null, true, true, false, true))
+ if(convert.dataType != source &&
+ (!isConversionExploration || convert.dataType.kind == classType || !strcmp(_class.name, "String")) &&
+ MatchTypes(convert.dataType, dest, conversions, null, null, convert.dataType.kind == classType, convert.dataType.kind == classType, false, true))
{
if(!conversions && !convert.Get)
return true;
{
if(!source._class.registered.dataType)
source._class.registered.dataType = ProcessTypeString(source._class.registered.dataTypeString, false);
- if(MatchTypes(source._class.registered.dataType, dest, conversions, null, null, true, true, false, false))
+ if(!isConversionExploration || source._class.registered.dataType.kind == classType || !strcmp(source._class.registered.name, "String"))
{
- return true;
+ if(MatchTypes(source._class.registered.dataType, dest, conversions, null, null, source._class.registered.dataType.kind == classType, source._class.registered.dataType.kind == classType, false, false))
+ return true;
+ // For bool to be accepted by byte, short, etc.
+ else if(MatchTypes(dest, source._class.registered.dataType, null, null, null, false, false, false, false))
+ return true;
}
}
}
else if(source.kind == enumType &&
(dest.kind == intType || dest.kind == shortType || dest.kind == charType || source.kind == _BoolType || dest.kind == longType || dest.kind == int64Type || dest.kind == intPtrType || dest.kind == intSizeType))
return true;
- else if(dest.kind == enumType &&
+ else if(dest.kind == enumType && !isConversionExploration &&
(source.kind == intType || source.kind == shortType || source.kind == charType || source.kind == _BoolType || source.kind == longType || source.kind == int64Type || source.kind == intPtrType || source.kind == intSizeType))
return true;
else if((dest.kind == functionType || (dest.kind == pointerType && dest.type.kind == functionType) || dest.kind == methodType) &&
bool MatchTypeExpression(Expression sourceExp, Type dest, OldList conversions, bool skipUnitBla)
{
- Type source = sourceExp.expType;
+ Type source;
Type realDest = dest;
Type backupSourceExpType = null;
+ Expression computedExp = sourceExp;
+ dest.refCount++;
+
+ if(sourceExp.isConstant && sourceExp.type != constantExp && sourceExp.type != identifierExp && sourceExp.type != castExp &&
+ dest.kind == classType && dest._class && dest._class.registered && dest._class.registered.type == enumClass)
+ {
+ computedExp = CopyExpression(sourceExp); // Keep the original expression, but compute for checking enum ranges
+ ComputeExpression(computedExp /*sourceExp*/);
+ }
+
+ source = sourceExp.expType;
if(dest.kind == pointerType && sourceExp.type == constantExp && !strtoul(sourceExp.constant, null, 0))
+ {
+ if(computedExp != sourceExp)
+ {
+ FreeExpression(computedExp);
+ computedExp = sourceExp;
+ }
+ FreeType(dest);
return true;
+ }
if(!skipUnitBla && source && dest && source.kind == classType && dest.kind == classType)
{
destBase = destBase.base);
//if(source._class.registered == dest._class.registered)
if(sourceBase == destBase)
- return true;
- }
+ {
+ if(computedExp != sourceExp)
+ {
+ FreeExpression(computedExp);
+ computedExp = sourceExp;
+ }
+ FreeType(dest);
+ return true;
+ }
+ }
}
if(source)
int64 value = MAXINT;
source.refCount++;
- dest.refCount++;
- if(sourceExp.type == constantExp)
+ if(computedExp.type == constantExp)
{
if(source.isSigned)
- value = strtoll(sourceExp.constant, null, 0);
+ value = strtoll(computedExp.constant, null, 0);
else
- value = strtoull(sourceExp.constant, null, 0);
+ value = strtoull(computedExp.constant, null, 0);
}
- else if(sourceExp.type == opExp && sourceExp.op.op == '-' && !sourceExp.op.exp1 && sourceExp.op.exp2 && sourceExp.op.exp2.type == constantExp)
+ else if(computedExp.type == opExp && sourceExp.op.op == '-' && !computedExp.op.exp1 && computedExp.op.exp2 && computedExp.op.exp2.type == constantExp)
{
if(source.isSigned)
- value = -strtoll(sourceExp.op.exp2.constant, null, 0);
+ value = -strtoll(computedExp.op.exp2.constant, null, 0);
else
- value = -strtoull(sourceExp.op.exp2.constant, null, 0);
+ value = -strtoull(computedExp.op.exp2.constant, null, 0);
+ }
+ if(computedExp != sourceExp)
+ {
+ FreeExpression(computedExp);
+ computedExp = sourceExp;
}
if(dest.kind != classType && source.kind == classType && source._class && source._class.registered &&
{
Class _class = source._class ? source._class.registered : null;
- if(_class && (_class.type == unitClass || !strcmp(_class.fullName, "bool") || /*_class.type == enumClass || */_class.type == bitClass )) // TOCHECK: enumClass, bitClass is new here...
+ if(_class && (_class.type == unitClass || /*!strcmp(_class.fullName, "bool") || /*_class.type == enumClass || */_class.type == bitClass )) // TOCHECK: enumClass, bitClass is new here...
{
/*
if(dest.kind != classType)
if(dest.kind == classType)
{
Class _class = dest._class ? dest._class.registered : null;
- if(_class && !dest.truth && (_class.type == unitClass || !strcmp(_class.fullName, "bool") ||
+ bool fittingValue = false;
+ if(_class && _class.type == enumClass)
+ {
+ Class enumClass = eSystem_FindClass(privateModule, "enum");
+ EnumClassData c = ACCESS_CLASSDATA(_class, enumClass);
+ if(c && value >= 0 && value <= c.largest)
+ fittingValue = true;
+ }
+
+ if(_class && !dest.truth && (_class.type == unitClass || fittingValue ||
(/*_class.type == enumClass*/_class.type != structClass && !value && source.kind == intType) || _class.type == bitClass)) // TOCHECK: enumClass, bitClass is new here...
{
if(_class.type == normalClass || _class.type == noHeadClass)
return false;
}
- if(!flag)
+ if(!flag && !sourceExp.opDestType)
{
Expression newExp { };
*newExp = *sourceExp;
}
else
{
+ if(computedExp != sourceExp)
+ {
+ FreeExpression(computedExp);
+ computedExp = sourceExp;
+ }
+
while((sourceExp.type == bracketsExp || sourceExp.type == extensionExpressionExp) && sourceExp.list) sourceExp = sourceExp.list->last;
if(sourceExp.type == identifierExp)
{
sourceExp.constant = CopyString(constant);
//for(;_class.base && _class.base.type != systemClass; _class = _class.base);
}
+ FreeType(dest);
return true;
}
}
// Loop through all enum classes
if(dest.classObjectType != typedObject && dest.kind == classType /*!= ellipsisType */&& MatchWithEnums_Module(privateModule, sourceExp, dest, id.string, conversions))
+ {
+ FreeType(dest);
return true;
+ }
}
+ FreeType(dest);
}
return false;
}
{ \
t value2 = op2.m; \
exp.type = constantExp; \
- exp.string = p(op1.m o value2); \
+ exp.string = p((t)(op1.m o value2)); \
if(!exp.expType) \
{ exp.expType = op1.type; if(op1.type) op1.type.refCount++; } \
return true; \
exp.expType = type;
if(type)
type.refCount++;
- if(type && (type.kind == enumType || (_class && _class.type == enumClass)))
+
+ // Commented this out, it was making non-constant enum parameters seen as constant
+ // enums should have been resolved by ResolveIdWithClass, changed to constantExp and marked as constant
+ if(type && (type.kind == enumType /*|| (_class && _class.type == enumClass)*/))
// Add missing cases here... enum Classes...
exp.isConstant = true;
bool useDestType = false, useSideType = false;
Location oldyylloc = yylloc;
bool useSideUnit = false;
+ Class destClass = (exp.destType && exp.destType.kind == classType && exp.destType._class) ? exp.destType._class.registered : null;
// Dummy type to prevent ProcessExpression of operands to say unresolved identifiers yet
Type dummy
case '+':
case '-':
useSideUnit = true;
+ useSideType = true;
+ useDestType = true;
+ break;
+
+ case LEFT_OP:
+ case RIGHT_OP:
+ useSideType = true;
+ useDestType = true;
+ break;
- // Just added these... testing
case '|':
- case '&':
case '^':
+ useSideType = true;
+ useDestType = true;
+ break;
- // DANGER: Verify units
case '/':
case '%':
+ useSideType = true;
+ useDestType = true;
+ break;
+ case '&':
case '*':
-
- if(exp.op.op != '*' || exp.op.exp1)
+ if(exp.op.exp1)
{
+ // For & operator, useDestType nicely ensures the result will fit in a bool (TODO: Fix for generic enum)
useSideType = true;
useDestType = true;
}
}
//dummy.kind = TypeDummy;
-
if(exp.op.exp1)
{
- if(exp.destType && exp.destType.kind == classType &&
- exp.destType._class && exp.destType._class.registered && useDestType &&
+ // Added this check here to use the dest type only for units derived from the base unit
+ // So that untyped units will use the side unit as opposed to the untyped destination unit
+ // This fixes (#771) sin(Degrees { 5 } + 5) to be equivalent to sin(Degrees { 10 }), since sin expects a generic Angle
+ if(exp.op.exp2 && useSideUnit && useDestType && destClass && destClass.type == unitClass && destClass.base.type != unitClass)
+ useDestType = false;
- ((exp.destType._class.registered.type == unitClass && useSideUnit) ||
- exp.destType._class.registered.type == enumClass ||
- exp.destType._class.registered.type == bitClass
- ))
+ if(destClass && useDestType &&
+ ((destClass.type == unitClass && useSideUnit) || destClass.type == enumClass || destClass.type == bitClass))
//(exp.destType._class.registered.type == unitClass || exp.destType._class.registered.type == enumClass) && useDestType)
{
if(exp.op.exp1.destType) FreeType(exp.op.exp1.destType);
exp.op.exp1.destType = exp.destType;
+ exp.op.exp1.opDestType = true;
if(exp.destType)
exp.destType.refCount++;
}
ProcessExpressionType(exp.op.exp1);
if(exp.op.exp1.destType && exp.op.op != '=') exp.op.exp1.destType.count--;
+ exp.op.exp1.opDestType = false;
+
// Fix for unit and ++ / --
if(!exp.op.exp2 && (exp.op.op == INC_OP || exp.op.op == DEC_OP) && exp.op.exp1.expType && exp.op.exp1.expType.kind == classType &&
exp.op.exp1.expType._class && exp.op.exp1.expType._class.registered && exp.op.exp1.expType._class.registered.type == unitClass)
else
{
exp.op.exp2.destType = exp.destType;
+ if(!exp.op.exp1 || exp.op.op != '&')
+ exp.op.exp2.opDestType = true;
if(exp.destType)
exp.destType.refCount++;
}
if(type1) type1.refCount++;
exp.expType = type1;
}
- else if(exp.destType && exp.destType.kind == classType &&
- exp.destType._class && exp.destType._class.registered &&
-
- ((exp.destType._class.registered.type == unitClass && useDestType && useSideUnit) ||
- (exp.destType._class.registered.type == enumClass && useDestType))
- )
+ else if(destClass &&
+ ((destClass.type == unitClass && useDestType && useSideUnit) ||
+ (destClass.type == enumClass && useDestType)))
{
if(exp.op.exp2.destType) FreeType(exp.op.exp2.destType);
exp.op.exp2.destType = exp.destType;
+ if(exp.op.op != '&')
+ exp.op.exp2.opDestType = true;
if(exp.destType)
exp.destType.refCount++;
}
e.cast.exp.needCast = true;
}
ProcessExpressionType(exp.op.exp2);
+ exp.op.exp2.opDestType = false;
if(exp.op.exp2.destType && exp.op.op != '=') exp.op.exp2.destType.count--;
if(assign && type1 && type1.kind == pointerType && exp.op.exp2.expType)
// If either both are class or both are not class
((type1.kind == classType && type1._class && strcmp(type1._class.string, "String")) == (type2.kind == classType && type2._class && strcmp(type2._class.string, "String"))))
{
- if(exp.op.exp2.destType) FreeType(exp.op.exp2.destType);
- exp.op.exp2.destType = type1;
- type1.refCount++;
- if(exp.op.exp1.destType) FreeType(exp.op.exp1.destType);
- exp.op.exp1.destType = type2;
- type2.refCount++;
+ // Added this check for enum subtraction to result in an int type:
+ if(exp.op.op == '-' &&
+ ((type1.kind == classType && type1._class.registered && type1._class.registered.type == enumClass) ||
+ (type2.kind == classType && type2._class.registered && type2._class.registered.type == enumClass)) )
+ {
+ Type intType;
+ if(!type1._class.registered.dataType)
+ type1._class.registered.dataType = ProcessTypeString(type1._class.registered.dataTypeString, false);
+ if(!type2._class.registered.dataType)
+ type2._class.registered.dataType = ProcessTypeString(type2._class.registered.dataTypeString, false);
+
+ intType = ProcessTypeString(
+ (type1._class.registered.dataType.kind == int64Type || type2._class.registered.dataType.kind == int64Type) ? "int64" : "int", false);
+
+ if(exp.op.exp1.destType) FreeType(exp.op.exp1.destType);
+ if(exp.op.exp2.destType) FreeType(exp.op.exp2.destType);
+ exp.op.exp1.destType = intType;
+ exp.op.exp2.destType = intType;
+ intType.refCount++;
+ }
+ else
+ {
+ if(exp.op.exp2.destType) FreeType(exp.op.exp2.destType);
+ exp.op.exp2.destType = type1;
+ type1.refCount++;
+ if(exp.op.exp1.destType) FreeType(exp.op.exp1.destType);
+ exp.op.exp1.destType = type2;
+ type2.refCount++;
+ }
+
// Warning here for adding Radians + Degrees with no destination type
if(!boolResult && type1.kind == classType && (!exp.destType || exp.destType.kind != classType) &&
type1._class.registered && type1._class.registered.type == unitClass &&
}
// TESTING THIS NEW CODE
- if(!boolResult || exp.op.op == '>' || exp.op.op == '<')
+ if(!boolResult || exp.op.op == '>' || exp.op.op == '<' || exp.op.op == GE_OP || exp.op.op == LE_OP)
{
- if(type1.kind == classType && type1._class && type1._class.registered && type1._class.registered.type == enumClass && exp.op.exp2.expType)
+ bool op1IsEnum = type1 && type1.kind == classType && type1._class && type1._class.registered && type1._class.registered.type == enumClass;
+ bool op2IsEnum = type2 && type2.kind == classType && type2._class && type2._class.registered && type2._class.registered.type == enumClass;
+ if(exp.op.op == '*' || exp.op.op == '/' || exp.op.op == '-' || exp.op.op == '|' || exp.op.op == '^')
{
- if(CheckExpressionType(exp.op.exp1, exp.op.exp2.expType, false))
+ // Convert the enum to an int instead for these operators
+ if(op1IsEnum && exp.op.exp2.expType)
{
- if(exp.expType) FreeType(exp.expType);
- exp.expType = exp.op.exp1.expType;
- if(exp.op.exp2.expType) exp.op.exp1.expType.refCount++;
- valid = true;
+ if(CheckExpressionType(exp.op.exp1, exp.op.exp2.expType, false))
+ {
+ if(exp.expType) FreeType(exp.expType);
+ exp.expType = exp.op.exp2.expType;
+ if(exp.op.exp2.expType) exp.op.exp2.expType.refCount++;
+ valid = true;
+ }
+ }
+ else if(op2IsEnum && exp.op.exp1.expType)
+ {
+ if(CheckExpressionType(exp.op.exp2, exp.op.exp1.expType, false))
+ {
+ if(exp.expType) FreeType(exp.expType);
+ exp.expType = exp.op.exp1.expType;
+ if(exp.op.exp1.expType) exp.op.exp1.expType.refCount++;
+ valid = true;
+ }
}
}
-
- else if(type2 && (type2.kind == classType && type2._class && type2._class.registered && type2._class.registered.type == enumClass && exp.op.exp1.expType))
+ else
{
- if(CheckExpressionType(exp.op.exp2, exp.op.exp1.expType, false))
+ if(op1IsEnum && exp.op.exp2.expType)
{
- if(exp.expType) FreeType(exp.expType);
- exp.expType = exp.op.exp2.expType;
- if(exp.op.exp2.expType) exp.op.exp2.expType.refCount++;
- valid = true;
+ if(CheckExpressionType(exp.op.exp1, exp.op.exp2.expType, false))
+ {
+ if(exp.expType) FreeType(exp.expType);
+ exp.expType = exp.op.exp1.expType;
+ if(exp.op.exp1.expType) exp.op.exp1.expType.refCount++;
+ valid = true;
+ }
+ }
+ else if(op2IsEnum && exp.op.exp1.expType)
+ {
+ if(CheckExpressionType(exp.op.exp2, exp.op.exp1.expType, false))
+ {
+ if(exp.expType) FreeType(exp.expType);
+ exp.expType = exp.op.exp2.expType;
+ if(exp.op.exp2.expType) exp.op.exp2.expType.refCount++;
+ valid = true;
+ }
}
}
}
if(!valid)
{
- if(exp.op.exp2.destType) FreeType(exp.op.exp2.destType);
- exp.op.exp2.destType = type1;
- type1.refCount++;
+ // Added this first part of the if here to handle 5 + Degrees { 5 } with either a base unit dest or not a unit dest type
+ if(type2 && type2.kind == classType && type2._class && type2._class.registered && type2._class.registered.type == unitClass &&
+ (type1.kind != classType || !type1._class || !type1._class.registered || type1._class.registered.type != unitClass))
+ {
+ if(exp.op.exp1.destType) FreeType(exp.op.exp1.destType);
+ exp.op.exp1.destType = type2;
+ type2.refCount++;
+
+ if(CheckExpressionType(exp.op.exp1, exp.op.exp1.destType, false))
+ {
+ if(exp.expType) FreeType(exp.expType);
+ exp.expType = exp.op.exp1.destType;
+ if(exp.op.exp1.destType) exp.op.exp1.destType.refCount++;
+ }
+ }
+ else
+ {
+ if(exp.op.exp2.destType) FreeType(exp.op.exp2.destType);
+ exp.op.exp2.destType = type1;
+ type1.refCount++;
/*
// Maybe this was meant to be an enum...
}
*/
- if(CheckExpressionType(exp.op.exp2, exp.op.exp2.destType, false))
- {
- if(exp.expType) FreeType(exp.expType);
- exp.expType = exp.op.exp2.destType;
- if(exp.op.exp2.destType) exp.op.exp2.destType.refCount++;
- }
- else if(type1 && type2)
- {
- char expString1[10240];
- char expString2[10240];
- char type1String[1024];
- char type2String[1024];
- expString1[0] = '\0';
- expString2[0] = '\0';
- type1String[0] = '\0';
- type2String[0] = '\0';
- if(inCompiler)
+ if(CheckExpressionType(exp.op.exp2, exp.op.exp2.destType, false))
{
- PrintExpression(exp.op.exp1, expString1);
- ChangeCh(expString1, '\n', ' ');
- PrintExpression(exp.op.exp2, expString2);
- ChangeCh(expString2, '\n', ' ');
- PrintType(exp.op.exp1.expType, type1String, false, true);
- PrintType(exp.op.exp2.expType, type2String, false, true);
+ if(exp.expType) FreeType(exp.expType);
+ exp.expType = exp.op.exp2.destType;
+ if(exp.op.exp2.destType) exp.op.exp2.destType.refCount++;
}
+ else if(type1 && type2)
+ {
+ char expString1[10240];
+ char expString2[10240];
+ char type1String[1024];
+ char type2String[1024];
+ expString1[0] = '\0';
+ expString2[0] = '\0';
+ type1String[0] = '\0';
+ type2String[0] = '\0';
+ if(inCompiler)
+ {
+ PrintExpression(exp.op.exp1, expString1);
+ ChangeCh(expString1, '\n', ' ');
+ PrintExpression(exp.op.exp2, expString2);
+ ChangeCh(expString2, '\n', ' ');
+ PrintType(exp.op.exp1.expType, type1String, false, true);
+ PrintType(exp.op.exp2.expType, type2String, false, true);
+ }
- Compiler_Warning($"incompatible expressions %s (%s) and %s (%s)\n", expString1, type1String, expString2, type2String);
+ Compiler_Warning($"incompatible expressions %s (%s) and %s (%s)\n", expString1, type1String, expString2, type2String);
- if(type1.kind == classType && type1._class && type1._class.registered && type1._class.registered.type == enumClass)
- {
- exp.expType = exp.op.exp1.expType;
- if(exp.op.exp1.expType) exp.op.exp1.expType.refCount++;
- }
- else if(type2.kind == classType && type2._class && type2._class.registered && type2._class.registered.type == enumClass)
- {
- exp.expType = exp.op.exp2.expType;
- if(exp.op.exp2.expType) exp.op.exp2.expType.refCount++;
+ if(type1.kind == classType && type1._class && type1._class.registered && type1._class.registered.type == enumClass)
+ {
+ exp.expType = exp.op.exp1.expType;
+ if(exp.op.exp1.expType) exp.op.exp1.expType.refCount++;
+ }
+ else if(type2.kind == classType && type2._class && type2._class.registered && type2._class.registered.type == enumClass)
+ {
+ exp.expType = exp.op.exp2.expType;
+ if(exp.op.exp2.expType) exp.op.exp2.expType.refCount++;
+ }
}
}
}
if(!e.next)
{
FreeType(e.destType);
+ e.opDestType = exp.opDestType;
e.destType = exp.destType;
if(e.destType) { exp.destType.refCount++; e.destType.count++; inced = true; }
}
if(!classSym.module) return;
classSym._import = ClassImport
{
- isRemote = classSym.registered ? classSym.registered.isRemote : false;
+ isRemote = classSym.registered ? classSym.registered.isRemote : 0;
name = CopyString(classSym.string);
};
classSym.module.classes.Add(classSym._import);
///////////////// INSTANCE DECLARATION PASS ///////////////////////
// Returns true if we should add a * to the declarator
-static bool ReplaceClassSpec(OldList specs, Specifier spec, bool param)
+static int ReplaceClassSpec(OldList specs, Specifier spec, bool param)
{
if(spec.type == templateTypeSpecifier)
{
if(decl)
FreeDeclarator(decl);
if(isPointer)
- return true;
+ return 1;
}
}
else if(!param && parameter.dataType)
{
bool isPointer = decl.type == pointerDeclarator;
if(isPointer)
- return true;
+ return 1;
}
}
else
{
spec.type = baseSpecifier;
spec.specifier = VOID;
- return true;
+ return 1;
}
}
else
}
if(_class && _class.dataTypeString && !strcmp(_class.dataTypeString, "char *"))
- return true; //false;
+ return 1; //false;
if(!_class || _class.type == normalClass || _class.type == noHeadClass)
- return true;
+ return 1;
else if(param && _class.type == structClass)
return 2;
}
if(spec.specifier == ANY_OBJECT)
{
spec.specifier = VOID;
- return true;
+ return 1;
}
}
- return false;
+ return 0;
}
static void ReplaceByInstancePtr(Specifier spec, Declarator * declPtr, int type)
int count; // DEBUGGING
- bool isRemote;
+ int isRemote; // TODO: Convert to an enum, can have values 0..3
bool internalDecl;
void * data;
bool computeSize;
triangle->material = mat;
- face->done = (byte)bool::true;
+ face->done = true;
object.flags.translucent = true;
}
}
group.indices32[c*3+1] = face->indices[1];
group.indices32[c*3+2] = face->indices[2];
}
- face->done = (byte)bool::true;
+ face->done = true;
c++;
}
mesh.UnlockPrimitiveGroup(group);
for(item = ((EnumClassData)class(DefinedColor).data).values.first; item; item = item.next)
{
DataRow row = defined.AddRow();
- row.SetData(definedColorField, (Color)item.data);
+ row.SetData(definedColorField, (Color)(uint)item.data);
strcpy(tempString, item.name);
tempString[0] = (char)toupper(tempString[0]);
row.SetData(definedColorName, tempString);
for(item = ((EnumClassData)class(SystemColor).data).values.first; item; item = item.next)
{
DataRow row = system.AddRow();
- row.SetData(sysColorField, (Color)item.data);
+ row.SetData(sysColorField, (Color)(uint)item.data);
strcpy(tempString, item.name);
tempString[0] = (char)toupper(tempString[0]);
row.SetData(sysColorName, tempString);
break;
case vSync:
{
- if(d3dDisplay.vSync != value)
+ if(d3dDisplay.vSync != (bool)value)
{
- d3dDisplay.vSync = value;
+ d3dDisplay.vSync = (bool)value;
DisplaySize(display, display.width, display.height);
}
break;
FontEntry fontEntry = null;
FT_Face faces[128];
float scales[128];
- bool isGlyph = (uint)key & 0x80000000;
+ bool isGlyph = ((uint)key & 0x80000000) != 0;
int curScript = ((uint)key & 0x7F000000) >> 24;
unichar testChar = 0;
/*
}
*numGlyphs = shaper_item.num_glyphs;
- *rightToLeft = shaper_item.item.bidiLevel % 2;
+ *rightToLeft = (bool)(shaper_item.item.bidiLevel % 2);
return shaper_item.glyphs;
}
break;
case depthWrite:
if(value) glDepthMask((byte)bool::true); else glDepthMask((byte)bool::false);
- oglDisplay.depthWrite = value;
+ oglDisplay.depthWrite = (bool)value;
break;
case fogColor:
{
int distance;
float percent;
};
+ property MinMaxValue
+ {
+ set { distance = value; type = offset; }
+ get { return distance; }
+ }
property int
{
set { distance = value; type = offset; }
int distance;
float percent;
};
+ property MinMaxValue
+ {
+ set { distance = value; type = none; }
+ get { return distance; }
+ }
property int
{
set { distance = value; type = none; }
}
}
- int CheckColors(EditLine line, int wc, bool selection, int selX, int editX, bool *selected,
- Color selectionForeground, Color selectionBackground, Color textColor, Color *foreground, Color *background, bool *opacity, bool *overwrite)
+ bool CheckColors(EditLine line, int wc, bool selection, int selX, int editX, bool *selected,
+ Color selectionForeground, Color selectionBackground, Color textColor, Color *foreground, Color *background, bool *opacity, int *overwrite)
{
bool flush = false;
if((style.stuckCaret && wc == line.count && !line.next) ||
(!mouseMove && line == this.line && wc == editX))
{
- *overwrite = true;
+ *overwrite = 1;
flush = true;
}
}
bool opacity;
// Overwrite Caret Stuff
- bool overWrite = false;
+ int overWrite = 0;
int overWriteX, overWriteY;
- byte overWriteCh;
+ char overWriteCh;
// ****** SYNTAX STATES ******
bool inMultiLineComment = style.inMultiLineComment;
{
flush = CheckColors(line, wc, selection, selX, editX, &selected, selectionForeground,
selectionBackground, textColor, &foreground, &background, &opacity, &overWrite);
- if(overWrite == true)
+ if(overWrite == 1)
{
overWriteCh = (wc < line.count) ? line.buffer[wc] : ' ';
if(overWriteCh == '\t') overWriteCh = ' ';
flagTrailingSpace = numSpaces && trailingSpace && style.syntax && start + bufferLen == line.count && line != this.line;
if(flagTrailingSpace) surface.SetBackground(red);
FlushBuffer(surface, line, wc, &renderStart, &x, y, numSpaces, flagTrailingSpace, box);
- if(overWrite == true)
+ if(overWrite == 1)
{
overWriteX = x;
overWriteY = y;
if(CheckColors(line, c, selection, selX, editX, &selected, selectionForeground,
selectionBackground, textColor, &foreground, &background, &opacity, &overWrite))
{
- if(overWrite == true)
+ if(overWrite == 1)
{
overWriteX = x;
overWriteY = y;
bool GetKeyState(Key key)
{
if(key < 256)
- return keys[key];
+ return keys[key] != 0;
else if(key == capsState)
return GetKeyState(VK_CAPITAL) & 0x00000001;
else if(key == numState)
}
if(!windowData.ic)
{
- ch = (byte)Interface::TranslateKey(key, event->state & ShiftMask);
+ ch = (byte)Interface::TranslateKey(key, (event->state & ShiftMask) != 0);
// 127 is delete, we don't treat that as a character (Use (SmartKey)key == del)
if(ch == 128 || ch == 127) ch = 0;
}
return eof;
}
- bool GetSize()
+ uint GetSize()
{
return totalSize;
}
{
if(thread)
thread.connected = false;
- answered = 2;
+ answered = true; //2;
}
dllexport bool CallMethod(unsigned int methodID)
bool Seek(int pos, FileSeekMode mode) { return (input || output) ? File::Seek(pos, mode) : DualPipe_Seek(dp, pos, mode); }
uint Tell() { return (input || output) ? File::Tell() : DualPipe_Tell(dp); }
bool Eof() { return DualPipe_Eof(dp); }
- bool GetSize() { return (input || output) ? File::GetSize() : DualPipe_GetSize(dp); }
+ uint GetSize() { return (input || output) ? File::GetSize() : DualPipe_GetSize(dp); }
public:
bool Peek() { return DualPipe_Peek(dp); }
return position >= size || (f && f.Eof());
}
- bool GetSize()
+ uint GetSize()
{
return size;
}
virtual bool Eof(void)
{
- return input ? feof(input) : true;
+ return input ? feof(input) != 0 : true;
}
virtual bool Truncate(FileSize size)
return eof;
}
- bool GetSize()
+ uint GetSize()
{
return size;
}
result = GoToSysID(*(int *)data);
if(result)
findSysID = true;
- return result;
+ return result != 0;
}
useIndex = tbl.GetIndexOrder(order, false);
{
set
{
- if(value != (compileFlags & REG_ICASE))
+ if(value != ((compileFlags & REG_ICASE) != 0))
{
- compileFlags = value ? compileFlags | REG_ICASE : compileFlags & ~REG_ICASE;
+ value ? (compileFlags |= REG_ICASE) : (compileFlags &= ~REG_ICASE);
if(regex)
Compile();
}
{
set
{
- if(value != (compileFlags & REG_NEWLINE))
- compileFlags = value ? compileFlags | REG_NEWLINE : compileFlags & ~REG_NEWLINE;
- if(regex)
- Compile();
+ //if(value != ((compileFlags & REG_NEWLINE) != 0))
+ if(value != ((compileFlags & REG_EXTENDED)))
+ {
+ value ? (compileFlags |= REG_NEWLINE) : (compileFlags &= ~REG_NEWLINE);
+ if(regex)
+ Compile();
+ }
}
get { return (compileFlags & REG_NEWLINE) != 0; }
}
{
set
{
- if(value != (executeFlags & REG_NOTBOL))
- executeFlags = value ? executeFlags | REG_NOTBOL : executeFlags & ~REG_NOTBOL;
+ if(value != ((executeFlags & REG_NOTBOL) != 0))
+ value ? (executeFlags |= REG_NOTBOL) : (executeFlags &= ~REG_NOTBOL);
}
get { return (executeFlags & REG_NOTBOL) != 0; }
}
{
set
{
- if(value != (executeFlags & REG_NOTEOL))
- executeFlags = value ? executeFlags | REG_NOTEOL : executeFlags & ~REG_NOTEOL;
+ if(value != ((executeFlags & REG_NOTEOL) != 0))
+ value ? (executeFlags |= executeFlags | REG_NOTEOL) : (executeFlags &= ~REG_NOTEOL);
}
get { return (executeFlags & REG_NOTEOL) != 0; }
}
{
set
{
- if(value != (compileFlags & REG_EXTENDED))
+ if(value != ((compileFlags & REG_EXTENDED) != 0))
{
- compileFlags = value ? compileFlags | REG_EXTENDED : compileFlags & ~REG_EXTENDED;
+ value ? (compileFlags |= REG_EXTENDED) : (compileFlags &= ~REG_EXTENDED);
if(regex)
Compile();
}
{
{ Color { 40,40,40 }, 0.0f },
{ darkGray, 0.5f },
- { Color { 40,40,40 }, 1.0f },
+ { Color { 40,40,40 }, 1.0f }
};
class SimSkin_Window : Window
return renew output char[len];
}
-/*static */bool GetKeyWordEx(char ** input, char * keyWord, int maxSize, bool treatEqual, bool acceptSingleQuote)
+/*static */int GetKeyWordEx(char ** input, char * keyWord, int maxSize, bool treatEqual, bool acceptSingleQuote)
{
char * string = *input;
char ch;
return (c > 0) ? (wasQuoted ? WORD_QUOTED : WORD_NORMAL) : WORD_NONE;
}
-static bool GetKeyWord(char ** input, char * keyWord, int maxSize)
+static int GetKeyWord(char ** input, char * keyWord, int maxSize)
{
return GetKeyWordEx(input, keyWord, maxSize, true, false);
}
{
if(value)
{
- Platform c;
+ CompilerType c;
for(c = firstCompilerType; c <= lastCompilerType; c++)
if(!strcmpi(value, compilerTypeNames[c]))
return c;
f.Puts("\n");
}
- topNode.GenMakeCollectAssignNodeFlags(config, numCObjects,
+ topNode.GenMakeCollectAssignNodeFlags(config, numCObjects != 0,
cflagsVariations, nodeCFlagsMapping,
ecflagsVariations, nodeECFlagsMapping, null);
Button tabScl { tabButtons, master = this, stayDown = true, size = { 70, 20 }, anchor = { right = 10 + 3 * 80 }, caption = "Sub-Classes", id = (int64)sclEditor, NotifyClicked = NotifyClicked };
Button tabCls { tabButtons, master = this, stayDown = true, size = { 70, 20 }, anchor = { right = 10 + 2 * 80 }, caption = "Classes", id = (int64)clsEditor, NotifyClicked = NotifyClicked };
Button tabRes { tabButtons, master = this, stayDown = true, size = { 70, 20 }, anchor = { right = 10 + 1 * 80 }, caption = "Restrictions", id = (int64)rstEditor, NotifyClicked = NotifyClicked };
- Button tabMed { tabButtons, master = this, stayDown = true, size = { 70, 20 }, anchor = { right = 10 + 0 * 80}, caption = "Drugs", id = (int64)medEditor, NotifyClicked = NotifyClicked };
+ Button tabMed { tabButtons, master = this, stayDown = true, size = { 70, 20 }, anchor = { right = 10 + 0 * 80 }, caption = "Drugs", id = (int64)medEditor, NotifyClicked = NotifyClicked };
}
class RestrictionEditor : Window
outputNeurons[c].Unactivate();
inputNeurons[0].activation = (double)example->health;
- inputNeurons[1].activation = example->hasKnife;
- inputNeurons[2].activation = example->hasGun;
+ inputNeurons[1].activation = (double)example->hasKnife;
+ inputNeurons[2].activation = (double)example->hasGun;
inputNeurons[3].activation = example->ennemies;
for(c = 0; c<NUM_OUTPUT; c++)
outputNeurons[c].Activate();
for(c = 0; c<NUM_OUTPUT; c++)
- outputNeurons[c].error = ((double)example->result == c) - outputNeurons[c].activation;
+ outputNeurons[c].error = (double)((int)example->result == c) - outputNeurons[c].activation;
for(c = 0; c<NUM_INPUT; c++)
inputNeurons[c].BackPropagate();
outputNeurons[o].Unactivate();
inputNeurons[0].activation = (double)example->health;
- inputNeurons[1].activation = example->hasKnife;
- inputNeurons[2].activation = example->hasGun;
+ inputNeurons[1].activation = (double)example->hasKnife;
+ inputNeurons[2].activation = (double)example->hasGun;
inputNeurons[3].activation = example->ennemies;
for(o = 0; o<NUM_OUTPUT; o++)
outputNeurons[o].Unactivate();
inputNeurons[0].activation = (double)example->health;
- inputNeurons[1].activation = example->hasKnife;
- inputNeurons[2].activation = example->hasGun;
+ inputNeurons[1].activation = (double)example->hasKnife;
+ inputNeurons[2].activation = (double)example->hasGun;
inputNeurons[3].activation = example->ennemies;
for(o = 0; o<NUM_OUTPUT; o++)
rest[d++] = cards[c];
}
}
- return numPairs;
+ return numPairs != 0;
}
// --- External Functions ---
class AboutChess : Window
{
- background = black;
+ background = black;
foreground = white, size = Size { 440, 200 }, hasClose = true,
text = APPNAME;
Button ok
{
- this, isDefault = true, text = "OK",
+ this, isDefault = true, text = "OK",
anchor = { bottom = 10 }, size = { 80 };
NotifyClicked = ButtonCloseDialog;
static MoveStack moveStack[MAXDEPTH_PASS2];
-void AddMoveToList(MoveStack stack, ChessState state, PieceType type, Player player,
+void AddMoveToList(MoveStack stack, ChessState state, PieceType type, Player player,
int x1, int y1, int x2, int y2)
{
if(IsMoveValid(x1,y1,x2,y2, state, null, true))
AddMoveToList(stack, state, type, player, x,y,x,y2);
}
}
- break;
+ break;
case King:
AddMoveToList(stack, state, type, player, x,y, x,y+1);
AddMoveToList(stack, state, type, player, x,y, x+1,y+1);
bool abortAI;
ChessMove aiMove;
- Timer aiTimer
- {
+ Timer aiTimer
+ {
this, 0.1;
bool DelayExpired()
if(!flip) y = 7-y; else x = 7-x;
if(chessState->gameRunning &&
- x < 8 && y < 8 && x >= 0 && y >= 0 && chessState->board[y][x] &&
- chessState->isLocalPlayer[chessState->turn] &&
+ x < 8 && y < 8 && x >= 0 && y >= 0 && chessState->board[y][x] &&
+ chessState->isLocalPlayer[chessState->turn] &&
chessState->board[y][x].player == chessState->turn)
{
dragging = true;
if(x < 8 && y < 8 && x >= 0 && y >= 0 && dragging)
{
- drag.x = x;
+ drag.x = x;
drag.y = y;
Update(null);
}
static char * names[Player][PieceType] =
{
{ "", "WhitePawn", "WhiteKnigh", "WhiteBisho", "WhiteRook", "WhiteQueen", "WhiteKing" },
- { "", "BlackPawn", "BlackKnigh", "BlackBisho", "BlackRook", "BlackQueen", "BlackKing" },
+ { "", "BlackPawn", "BlackKnigh", "BlackBisho", "BlackRook", "BlackQueen", "BlackKing" }
};
define SQUARE = squareSize; // 160;
class Chess3D : Window
{
- Camera camera
- {
- attached, fov = 45, zMin = 50,zMax = 5000,
+ Camera camera
+ {
+ attached, fov = 45, zMin = 50,zMax = 5000,
position = { 0, 0, -1000 },
orientation = Euler { 30, 30, 0 }
};
{
Player player = atBoard.player;
PieceType type = atBoard.type;
-
+
if(type)
{
char * name = names[player][type];
Object object = chessSet.Find(name);
if(object)
{
-
+
float height = 0;
if(high)
{
x * SQUARE - SQUARE_OFFSET,
offsetY - height;
y * SQUARE - SQUARE_OFFSET };
-
+
object.UpdateTransform();
object.tag = (void *)(((y)*8)+(x)+1);
RenderPiece(atBoard, x, y, false);
}
}
-
+
void RenderBoard()
{
display.DrawObject(chessBoard);
-
+
if(chessState->gameRunning)
{
int x,y;
for(y=0; y<8; y++)
for(x=0; x<8; x++)
RenderSquare(x, y);
-
+
if(useDrag && pieceSelected)
{
Piece atBoard = chessState->board[start.y][start.x];
bool OnLeftButtonDown(int x, int y, Modifiers mods)
{
OldList list {};
-
+
display.StartSelection(x,y, 0,0);
display.SetCamera(null, camera);
display.CollectHits();
pieceSelected = false;
((Chess)master).ProcessUserMove(start.x, start.y, sx, sy);
}
- else if(chessState->board[sy][sx] &&
- chessState->isLocalPlayer[chessState->turn] &&
+ else if(chessState->board[sy][sx] &&
+ chessState->isLocalPlayer[chessState->turn] &&
chessState->board[sy][sx].player == chessState->turn)
{
if(useDrag)
{
Vector3D viewSpace, worldSpace;
display.IntersectPolygons();
- RenderSquare(sx, sy);
+ RenderSquare(sx, sy);
display.GetIntersect(viewSpace);
camera.Untransform(viewSpace, worldSpace);
OnMouseMove(x, y, mods);
}
-
+
list.Free(null);
}
else if(display.DrawObject(chessBoard) && !moving && !lightMoving)
else if(lightMoving)
{
light.orientation = Euler
- {
- startOrientation.yaw + (x - startPosition.x),
- startOrientation.pitch + (y - startPosition.y),
- 90
+ {
+ startOrientation.yaw + (x - startPosition.x),
+ startOrientation.pitch + (y - startPosition.y),
+ 90
};
-
+
Update(null);
}
else if(pieceSelected && useDrag)
Update(null);
break;
case wheelUp:
- case equal: camera.position.z /= 1.1f;
+ case equal: camera.position.z /= 1.1f;
if(camera.position.z >= -1100)
camera.position.z = -1100;
Update(null);
Copyright (c) 2001 Jerome Jacovella-St-Louis
All Rights Reserved.
-
+
chessutils.ec - Utilities to validate moves
****************************************************************************/
import "chess.ec"
valid = true;
break;
case Queen:
- if((!Abs(dx) || !Abs(dy) || Abs(dx) == Abs(dy)) &&
+ if((!Abs(dx) || !Abs(dy) || Abs(dx) == Abs(dy)) &&
FreeWay(board, x1,y1,x2,y2))
valid = true;
- break;
+ break;
case King:
if(Abs(dx) <= 1 && Abs(dy) <= 1)
valid = true;
if(x1 == x2 && !state.board[y2][x2])
valid = true;
// En Passant
- else if(Abs(dx) == 1 &&
+ else if(Abs(dx) == 1 &&
x2 == state.enPassant.x && y2 == state.enPassant.y + direction)
valid = true;
}
// First 2 Squares Move
- else if(y2 - y1 == direction * 2 && y1 == start && x1 == x2
+ else if(y2 - y1 == direction * 2 && y1 == start && x1 == x2
&& !state.board[y1+direction][x1] && !state.board[y2][x1])
valid = true;
break;
if(!state.kingMoved[player] && !Check(state, player, x1, y1))
{
// King Side
- if(dx == 2 && !state.kRookMoved[player] &&
+ if(dx == 2 && !state.kRookMoved[player] &&
!state.board[y1][5] && !state.board[y1][6] &&
!Check(state, player, 5, y1))
valid = true;
if(delta)
*delta = materialValues[Pawn];
}
-
+
if(IsMoveValid(x1,y1,x2,y2, state, state.board, validate))
{
valid = true;
state.turn ^= 1;
state.numMoves ++;
}
- return valid;
+ return valid;
}
Copyright (c) 2001 Jerome Jacovella-St-Louis
All Rights Reserved.
-
+
promotion.c - Pawn Promotion Window
****************************************************************************/
import "chessutils.ec"
blue, yellow, red, green;
property CornerBlocksColor
{
- // TOFIX: get { return (CornerBlocksColor)((int)this+1); }
- get { return (CornerBlocksColor)*(int *)&this+1; }
+ get { return (CornerBlocksColor)((int)this+1); }
}
};
PlayerColor p;
int i;
- // TOFIX: for(p = 0; p < PlayerColor::enumSize; p++)
- for(p = blue; p <= green; p++)
+ for(p = 0; p < PlayerColor::enumSize; p++)
{
for(i = 0; i < numPieces; i++)
playerPieces[p][i] = 1;
{
for(x = 0; x < boardSize && !validMove; x++)
{
- int flip;
+ bool flip;
int direction;
for(direction = 0; direction < 4 && !validMove; direction++)
{
- for(flip = 0; flip <=1 && !validMove; flip++)
+ for(flip = 0; flip <= 1 && !validMove; flip++)
{
if(ValidMove(playerColor, p, direction, flip, x, y))
result = validMove = true;
{
for(x = 0; x < boardSize && !validMove; x++)
{
- int flip;
+ bool flip;
int direction;
for(direction = 0; direction < 4 && !validMove; direction++)
{
- for(flip = 0; flip <=1 && !validMove; flip++)
+ for(flip = 0; flip <= 1 && !validMove; flip++)
{
if(gameState.ValidMove(colorPlayed, p, direction, flip, x, y))
{
for(p = blue; p <= green; p++)
{
- // TOFIX: bug here, why is -1 required?
- int x = 80 + (p-1) * 120;
+ int x = 80 + p * 120;
surface.foreground = colors[1][p];
/* // GCC internal compiler error with -O2, MinGW GCC 4.4.0
s = (state->numPlayers == 3 && p == green) ? "* Green *" : cornerBlocks.playerNames[p];
if((state->numPlayers == 2 && p <= yellow) ||
(state->numPlayers == 1 && p == blue))
{
- // TOFIX: Annoying +2 conversion issue
if(state->numPlayers == 2)
grandTotals[p] = state->scores[p] + state->bonus[p] +
- state->scores[p+red /*2*/] + state->bonus[p+red /*2*/];
+ state->scores[p+2] + state->bonus[p+2];
else
grandTotals[p] = state->scores[0] + state->bonus[0] +
state->scores[1] + state->bonus[1] +
anchored = true;
}
if(wordEnd > wordStart)
- if(!CheckWord(newBoard, !direction, c, wordStart, wordEnd, score))
+ if(!CheckWord(newBoard, direction^1, c, wordStart, wordEnd, score))
return false;
}
else
},
"Configurations" : [
{
- "Name" : "Default",
+ "Name" : "Debug",
"Options" : {
"Debug" : true,
"FastMath" : false
}
+ },
+ {
+ "Name" : "Release",
+ "Options" : {
+ "Optimization" : "Speed",
+ "FastMath" : true
+ }
}
],
"Files" : [
{
board[sy][sx] = color;
this.numChips[color] += numChips + 1;
- this.numChips[1-color] -= numChips;
- this.turn = 1-color;
+ this.numChips[color^1] -= numChips;
+ this.turn = color^1;
if(!PossibleMove())
{
surface.SetForeground(tomato);
if(gameOver)
surface.WriteTextf(100, 420, "GAME OVER");
- else if(!local && sockets[1-turn])
+ else if(!local && sockets[turn^1])
surface.WriteTextf(50, 420, "It is your turn to move.");
}
}
x /= WIDTH;
y /= HEIGHT;
- if(sockets[1-turn] || local)
+ if(sockets[turn^1] || local)
{
if(x < NUM_COLUMNS && y < NUM_ROWS && board[y][x] == empty)
{
if(TurnChips(x, y, turn, 1))
{
if(!local)
- sockets[1-packet.player].Send((byte *)&packet, sizeof(OPacket));
+ sockets[packet.player^1].Send((byte *)&packet, sizeof(OPacket));
}
}
}
};
static FileType fractalTypes[] =
{
- { "ECERE Fractal", "frc", always },
+ { "Ecere Fractal", "frc", always }
};
static FileFilter imageFilters[] =
{
mandelbrot.thread.loop = loop;
mandelbrot.thread.maxLoops = f.GetFloat();
- mandelbrot.thread.useBlack = f.GetValue();
- mandelbrot.thread.doLoop = f.GetValue();
+ mandelbrot.thread.useBlack = (bool)f.GetValue();
+ mandelbrot.thread.doLoop = (bool)f.GetValue();
}
loop = f.GetValue();
if(loop)
{
julia.thread.loop = loop;
julia.thread.maxLoops = f.GetFloat();
- julia.thread.useBlack = f.GetValue();
- julia.thread.doLoop = f.GetValue();
+ julia.thread.useBlack = (bool)f.GetValue();
+ julia.thread.doLoop = (bool)f.GetValue();
}
else
{
Vector3Df position { };
while(GetWord())
{
- if(!strcmpi(keyWord, "x")) { GetWord(); position.x = atof(keyWord); }
- else if(!strcmpi(keyWord, "y")) { GetWord(); position.y = atof(keyWord); }
- else if(!strcmpi(keyWord, "z")) { GetWord(); position.z = atof(keyWord); }
- else if(!strcmpi(keyWord, "speed")) { GetWord(); object.speed = atof(keyWord); }
- else if(!strcmpi(keyWord, "dir")) { GetWord(); object.direction = atof(keyWord); }
+ if(!strcmpi(keyWord, "x")) { GetWord(); position.x = (float)atof(keyWord); }
+ else if(!strcmpi(keyWord, "y")) { GetWord(); position.y = (float)atof(keyWord); }
+ else if(!strcmpi(keyWord, "z")) { GetWord(); position.z = (float)atof(keyWord); }
+ else if(!strcmpi(keyWord, "speed")) { GetWord(); object.speed = (float)atof(keyWord); }
+ else if(!strcmpi(keyWord, "dir")) { GetWord(); object.direction = (float)atof(keyWord); }
}
object.position = position;
}