__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;
+command[sizeof (command) - 1] = 0;
if((cppOutput = __ecereNameSpace__ecere__sys__DualPipeOpen((((unsigned int)(1))), command)))
{
char impFile[797];
char * __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Print(struct __ecereNameSpace__ecere__sys__BinaryTree * this, char * output, int tps)
{
-output[0] = (char)0;
+output[0] = 0;
if(this->root)
__ecereMethod___ecereNameSpace__ecere__sys__BTNode_Print(this->root, output, tps);
return output;
}
}
else
-tempString[0] = (char)0;
+tempString[0] = 0;
return tempString;
}
}
}
else
-tempString[0] = (char)0;
+tempString[0] = 0;
return tempString;
}
__builtin_va_start(args, command);
vsnprintf(commandLine, sizeof (commandLine), command, args);
-commandLine[sizeof (commandLine) - 1] = (char)0;
+commandLine[sizeof (commandLine) - 1] = 0;
__builtin_va_end(args);
return __ecereNameSpace__ecere__sys__DualPipeOpen(mode, commandLine);
}
__builtin_va_start(args, command);
vsnprintf(commandLine, sizeof (commandLine), command, args);
-commandLine[sizeof (commandLine) - 1] = (char)0;
+commandLine[sizeof (commandLine) - 1] = 0;
__builtin_va_end(args);
return __ecereNameSpace__ecere__sys__DualPipeOpenEnv(mode, env, commandLine);
}
__builtin_va_start(args, format);
vsnprintf(text, sizeof (text), format, args);
-text[sizeof (text) - 1] = (char)0;
+text[sizeof (text) - 1] = 0;
if(((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))__extension__ ({
struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = this;
int c = 0;
unsigned int result = 1;
-s[c] = (char)0;
+s[c] = 0;
if(((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *))__extension__ ({
struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = this;
s[c++] = ch;
}
}
-s[c] = (char)0;
+s[c] = 0;
return result || c > 1;
}
unsigned int quoted = 0;
unsigned int result = 1;
-*string = (char)0;
+*string = 0;
while(1)
{
if(!((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, char * ch))__extension__ ({
break;
}
}
-string[c] = (char)0;
+string[c] = 0;
}
return result;
}
for(c = 0; c < count; c++)
string[c] = ch;
-string[c] = (char)0;
+string[c] = 0;
}
unsigned int __ecereNameSpace__ecere__sys__GetString(char ** buffer, char * string, int max)
if(!* *buffer)
{
-string[0] = (char)0;
+string[0] = 0;
return 0;
}
for(; ; )
}
(*buffer)++;
}
-string[c] = (char)0;
+string[c] = 0;
}
return result;
}
int len = protocolSymbol - addedPath + 3;
memcpy(fileName, addedPath, len);
-fileName[len] = (char)0;
+fileName[len] = 0;
isURL = 1;
c = len;
}
int len = protocolSymbol - addedPath + 3;
memcpy(fileName, addedPath, len);
-fileName[len] = (char)0;
+fileName[len] = 0;
isURL = 1;
c = len;
}
__ecereNameSpace__ecere__sys__globalSystem.errorBufferSize = (100 * (1025));
__ecereNameSpace__ecere__sys__globalSystem.errorBuffer = __ecereNameSpace__ecere__com__eSystem_New(sizeof(char) * ((100 * (1025))));
}
-__ecereNameSpace__ecere__sys__globalSystem.errorBuffer[0] = (char)0;
+__ecereNameSpace__ecere__sys__globalSystem.errorBuffer[0] = 0;
}
else if(mode == 3)
{
__builtin_va_start(args, format);
vsnprintf(string, sizeof (string), format, args);
-string[sizeof (string) - 1] = (char)0;
+string[sizeof (string) - 1] = 0;
__ecereNameSpace__ecere__sys__Log(string);
__builtin_va_end(args);
}
strcpy(string, "'\\a'");
else if(ch == '\\')
strcpy(string, "'\\\\'");
-else if(ch < (char)32 || ch >= (char)127)
+else if(ch < 32 || ch >= 127)
sprintf(string, "'\\x%x'", ch);
else
sprintf(string, "'%c'", ch);
if(string[c] == '.')
{
if(last == c)
-string[c] = (char)0;
+string[c] = 0;
else
-string[last + 1] = (char)0;
+string[last + 1] = 0;
break;
}
}
if(string[c] == '.')
{
if(last == c)
-string[c] = (char)0;
+string[c] = 0;
else
-string[last + 1] = (char)0;
+string[last + 1] = 0;
break;
}
}
}
}
}
-buffer[len] = (char)0;
+buffer[len] = 0;
return len;
}
__internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__com__IOChannel->_vTbl;
})[__ecereVMethodID___ecereNameSpace__ecere__com__IOChannel_ReadData])(channel, data, 1) != 1)
-*data = (unsigned char)0;
+*data = 0;
}
void __ecereNameSpace__ecere__com__Int_OnSerialize(struct __ecereNameSpace__ecere__com__Class * _class, int * data, struct __ecereNameSpace__ecere__com__Instance * channel)
__internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__com__IOChannel->_vTbl;
})[__ecereVMethodID___ecereNameSpace__ecere__com__IOChannel_ReadData])(channel, bytes, 4) == 4)
-*data = (unsigned int)(((bytes)[0] << (unsigned char)24) | ((bytes)[1] << (unsigned char)16) | ((bytes)[2] << (unsigned char)8) | (bytes)[3]);
+*data = (unsigned int)(((bytes)[0] << 24) | ((bytes)[1] << 16) | ((bytes)[2] << 8) | (bytes)[3]);
else
*data = 0;
}
__internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__com__IOChannel->_vTbl;
})[__ecereVMethodID___ecereNameSpace__ecere__com__IOChannel_ReadData])(channel, bytes, 8) == 8)
-*data = (((uint64)(bytes)[0] << 56) | ((uint64)(bytes)[1] << 48) | ((uint64)(bytes)[2] << 40) | ((uint64)(bytes)[3] << 32) | ((uint64)(bytes)[4] << 24) | ((bytes)[5] << (unsigned char)16) | ((bytes)[6] << (unsigned char)8) | (bytes)[7]);
+*data = (((uint64)(bytes)[0] << 56) | ((uint64)(bytes)[1] << 48) | ((uint64)(bytes)[2] << 40) | ((uint64)(bytes)[3] << 32) | ((uint64)(bytes)[4] << 24) | ((bytes)[5] << 16) | ((bytes)[6] << 8) | (bytes)[7]);
else
*data = 0;
}
{
unsigned char bytes[2];
-(bytes)[0] = (unsigned char)(((*data) >> (unsigned short)8) & (unsigned short)0xFF);
-(bytes)[1] = (unsigned char)(((*data)) & (unsigned short)0xFF);
+(bytes)[0] = (unsigned char)(((*data) >> 8) & 0xFF);
+(bytes)[1] = (unsigned char)(((*data)) & 0xFF);
;
((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const void * data, unsigned int numBytes))__extension__ ({
struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = channel;
__internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__com__IOChannel->_vTbl;
})[__ecereVMethodID___ecereNameSpace__ecere__com__IOChannel_ReadData])(channel, bytes, 2) == 2)
-*data = (unsigned short)(((bytes)[0] << (unsigned char)8) | (bytes)[1]);
+*data = (unsigned short)(((bytes)[0] << 8) | (bytes)[1]);
else
-*data = (unsigned short)0;
+*data = 0;
}
static void __ecereNameSpace__ecere__com__Float_OnSerialize(struct __ecereNameSpace__ecere__com__Class * _class, float * data, struct __ecereNameSpace__ecere__com__Instance * channel)
__internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__com__IOChannel->_vTbl;
})[__ecereVMethodID___ecereNameSpace__ecere__com__IOChannel_ReadData])(channel, bytes, 4) == 4)
-*(unsigned int *)data = (unsigned int)(((bytes)[0] << (unsigned char)24) | ((bytes)[1] << (unsigned char)16) | ((bytes)[2] << (unsigned char)8) | (bytes)[3]);
+*(unsigned int *)data = (unsigned int)(((bytes)[0] << 24) | ((bytes)[1] << 16) | ((bytes)[2] << 8) | (bytes)[3]);
else
*data = 0;
}
__internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__com__IOChannel->_vTbl;
})[__ecereVMethodID___ecereNameSpace__ecere__com__IOChannel_ReadData])(channel, bytes, 8) == 8)
-*(uint64 *)data = (((uint64)(bytes)[0] << 56) | ((uint64)(bytes)[1] << 48) | ((uint64)(bytes)[2] << 40) | ((uint64)(bytes)[3] << 32) | ((uint64)(bytes)[4] << 24) | ((bytes)[5] << (unsigned char)16) | ((bytes)[6] << (unsigned char)8) | (bytes)[7]);
+*(uint64 *)data = (((uint64)(bytes)[0] << 56) | ((uint64)(bytes)[1] << 48) | ((uint64)(bytes)[2] << 40) | ((uint64)(bytes)[3] << 32) | ((uint64)(bytes)[4] << 24) | ((bytes)[5] << 16) | ((bytes)[6] << 8) | (bytes)[7]);
else
*data = 0;
}
if(member->id < 0)
continue;
-memberString[0] = (char)0;
+memberString[0] = 0;
if(!memberType)
memberType = member->dataTypeClass = __ecereNameSpace__ecere__com__eSystem_FindClass(module, member->dataTypeString);
if(!memberType)
else
{
tempString[len++] = memberString[c];
-tempString[len] = (char)0;
+tempString[len] = 0;
}
}
strcat(tempString, "\"");
char * locale = (((void *)0));
char genericLocale[256];
-genericLocale[0] = (char)0;
+genericLocale[0] = 0;
if(__ecereNameSpace__ecere__sys__GetEnvironment("ECERE_LANGUAGE", language, sizeof (language)))
locale = language;
else if(__ecereNameSpace__ecere__sys__GetEnvironment("LANGUAGE", language, sizeof (language)))
strcpy(language, locale);
dot = strstr(language, ".");
if(dot)
-*dot = (char)0;
+*dot = 0;
colon = strstr(language, ":");
if(colon)
-*colon = (char)0;
+*colon = 0;
locale = language;
if(!(strcasecmp)(locale, "zh"))
strcpy(locale, "zh_CN");
strcpy(genericLocale, locale);
under = strchr(genericLocale, '_');
if(under)
-*under = (char)0;
+*under = 0;
if(!(strcasecmp)(genericLocale, "zh"))
strcpy(genericLocale, "zh_CN");
}
int i;
unsigned char mask = (unsigned char)0x7F;
-if(ch & (unsigned char)0x80)
+if(ch & 0x80)
{
-if(ch & (unsigned char)0x40)
+if(ch & 0x40)
{
mask >>= 2;
numBytes++;
-if(ch & (unsigned char)0x20)
+if(ch & 0x20)
{
numBytes++;
mask >>= 1;
-if(ch & (unsigned char)0x10)
+if(ch & 0x10)
{
-if(ch & (unsigned char)0x08)
+if(ch & 0x08)
return 0;
numBytes++;
mask >>= 1;
{
codePoint <<= 6;
codePoint |= ch & mask;
-mask = (unsigned char)0x3F;
+mask = 0x3F;
if(i > 1)
{
-if(!(ch & (unsigned char)0x80) || (ch & (unsigned char)0x40))
+if(!(ch & 0x80) || (ch & 0x40))
return 0;
}
}
{
if(d + 2 >= max)
break;
-dest[d++] = (unsigned char)0xC0 | (unsigned char)((ch & 0x7C0) >> 6);
-dest[d++] = (unsigned char)0x80 | (unsigned char)(ch & 0x03F);
+dest[d++] = 0xC0 | (unsigned char)((ch & 0x7C0) >> 6);
+dest[d++] = 0x80 | (unsigned char)(ch & 0x03F);
}
else if(ch < 0x10000)
{
if(d + 3 >= max)
break;
-dest[d++] = (unsigned char)0xE0 | (unsigned char)((ch & 0xF000) >> 12);
-dest[d++] = (unsigned char)0x80 | (unsigned char)((ch & 0xFC0) >> 6);
-dest[d++] = (unsigned char)0x80 | (unsigned char)(ch & 0x03F);
+dest[d++] = 0xE0 | (unsigned char)((ch & 0xF000) >> 12);
+dest[d++] = 0x80 | (unsigned char)((ch & 0xFC0) >> 6);
+dest[d++] = 0x80 | (unsigned char)(ch & 0x03F);
}
else
{
if(d + 4 >= max)
break;
-dest[d++] = (unsigned char)0xF0 | (unsigned char)((ch & 0x1C0000) >> 18);
-dest[d++] = (unsigned char)0x80 | (unsigned char)((ch & 0x3F000) >> 12);
-dest[d++] = (unsigned char)0x80 | (unsigned char)((ch & 0xFC0) >> 6);
-dest[d++] = (unsigned char)0x80 | (unsigned char)(ch & 0x03F);
+dest[d++] = 0xF0 | (unsigned char)((ch & 0x1C0000) >> 18);
+dest[d++] = 0x80 | (unsigned char)((ch & 0x3F000) >> 12);
+dest[d++] = 0x80 | (unsigned char)((ch & 0xFC0) >> 6);
+dest[d++] = 0x80 | (unsigned char)(ch & 0x03F);
}
}
-dest[d] = (char)0;
+dest[d] = 0;
return d;
}
{
unsigned int ch;
-if(u16 < (unsigned short)0xD800 || u16 > (unsigned short)0xDBFF)
+if(u16 < 0xD800 || u16 > 0xDBFF)
ch = u16;
else
ch = (u16 << 10) + source[c++] + (0x10000 - (0xD800 << 10) - 0xDC00);
{
if(d + 2 >= max)
break;
-dest[d++] = (unsigned char)0xC0 | (unsigned char)((ch & 0x7C0) >> 6);
-dest[d++] = (unsigned char)0x80 | (unsigned char)(ch & 0x03F);
+dest[d++] = 0xC0 | (unsigned char)((ch & 0x7C0) >> 6);
+dest[d++] = 0x80 | (unsigned char)(ch & 0x03F);
}
else if(ch < 0x10000)
{
if(d + 3 >= max)
break;
-dest[d++] = (unsigned char)0xE0 | (unsigned char)((ch & 0xF000) >> 12);
-dest[d++] = (unsigned char)0x80 | (unsigned char)((ch & 0xFC0) >> 6);
-dest[d++] = (unsigned char)0x80 | (unsigned char)(ch & 0x03F);
+dest[d++] = 0xE0 | (unsigned char)((ch & 0xF000) >> 12);
+dest[d++] = 0x80 | (unsigned char)((ch & 0xFC0) >> 6);
+dest[d++] = 0x80 | (unsigned char)(ch & 0x03F);
}
else
{
if(d + 4 >= max)
break;
-dest[d++] = (unsigned char)0xF0 | (unsigned char)((ch & 0x1C0000) >> 18);
-dest[d++] = (unsigned char)0x80 | (unsigned char)((ch & 0x3F000) >> 12);
-dest[d++] = (unsigned char)0x80 | (unsigned char)((ch & 0xFC0) >> 6);
-dest[d++] = (unsigned char)0x80 | (unsigned char)(ch & 0x03F);
+dest[d++] = 0xF0 | (unsigned char)((ch & 0x1C0000) >> 18);
+dest[d++] = 0x80 | (unsigned char)((ch & 0x3F000) >> 12);
+dest[d++] = 0x80 | (unsigned char)((ch & 0xFC0) >> 6);
+dest[d++] = 0x80 | (unsigned char)(ch & 0x03F);
}
}
-dest[d] = (char)0;
+dest[d] = 0;
return d;
}
int nb = b ? 1 : 0;
ch = 0;
-if(b & (unsigned char)0x80)
+if(b & 0x80)
{
-if(b & (unsigned char)0x40)
+if(b & 0x40)
{
mask >>= 2;
nb++;
-if(b & (unsigned char)0x20)
+if(b & 0x20)
{
nb++;
mask >>= 1;
-if(b & (unsigned char)0x10)
+if(b & 0x10)
{
-if(b & (unsigned char)0x08)
+if(b & 0x08)
{
nb = 0;
}
{
ch <<= 6;
ch |= (b = ((unsigned char *)string)[i]) & mask;
-mask = (unsigned char)0x3F;
-if(i > 1 && (!(b & (unsigned char)0x80) || (b & (unsigned char)0x40)))
+mask = 0x3F;
+if(i > 1 && (!(b & 0x80) || (b & 0x40)))
{
nb = 0;
ch = 0;
int i;
unsigned char mask = (unsigned char)0x7F;
-if(ch & (unsigned char)0x80 && ch & (unsigned char)0x40)
+if(ch & 0x80 && ch & 0x40)
{
mask >>= 2;
numBytes++;
-if(ch & (unsigned char)0x20)
+if(ch & 0x20)
{
numBytes++;
mask >>= 1;
-if(ch & (unsigned char)0x10)
+if(ch & 0x10)
{
numBytes++;
mask >>= 1;
{
codePoint <<= 6;
codePoint |= source[c++] & mask;
-mask = (unsigned char)0x3F;
+mask = 0x3F;
}
if(codePoint > 0xFFFF)
{
unsigned short lead = (unsigned short)((0xD800 - (0x10000 >> 10)) + (codePoint >> 10));
-unsigned short trail = (unsigned short)0xDC00 + (unsigned short)(codePoint & 0x3FF);
+unsigned short trail = (unsigned short)(0xDC00 | (codePoint & 0x3FF));
if(d >= max - 1)
break;
dest[d++] = (unsigned short)codePoint;
}
}
-dest[d] = (unsigned short)0;
+dest[d] = 0;
return d;
}
return 0;
{
if(d + 2 >= max)
break;
-dest[d++] = (unsigned char)0xC0 | (unsigned char)((ch & 0x7C0) >> 6);
-dest[d++] = (unsigned char)0x80 | (unsigned char)(ch & 0x03F);
+dest[d++] = 0xC0 | (unsigned char)((ch & 0x7C0) >> 6);
+dest[d++] = 0x80 | (unsigned char)(ch & 0x03F);
}
else if(ch < 0x10000)
{
if(d + 3 >= max)
break;
-dest[d++] = (unsigned char)0xE0 | (unsigned char)((ch & 0xF000) >> 12);
-dest[d++] = (unsigned char)0x80 | (unsigned char)((ch & 0xFC0) >> 6);
-dest[d++] = (unsigned char)0x80 | (unsigned char)(ch & 0x03F);
+dest[d++] = 0xE0 | (unsigned char)((ch & 0xF000) >> 12);
+dest[d++] = 0x80 | (unsigned char)((ch & 0xFC0) >> 6);
+dest[d++] = 0x80 | (unsigned char)(ch & 0x03F);
}
else
{
if(d + 4 >= max)
break;
-dest[d++] = (unsigned char)0xF0 | (unsigned char)((ch & 0x1C0000) >> 18);
-dest[d++] = (unsigned char)0x80 | (unsigned char)((ch & 0x3F000) >> 12);
-dest[d++] = (unsigned char)0x80 | (unsigned char)((ch & 0xFC0) >> 6);
-dest[d++] = (unsigned char)0x80 | (unsigned char)(ch & 0x03F);
+dest[d++] = 0xF0 | (unsigned char)((ch & 0x1C0000) >> 18);
+dest[d++] = 0x80 | (unsigned char)((ch & 0x3F000) >> 12);
+dest[d++] = 0x80 | (unsigned char)((ch & 0xFC0) >> 6);
+dest[d++] = 0x80 | (unsigned char)(ch & 0x03F);
}
}
-dest[d] = (char)0;
+dest[d] = 0;
return d;
}
{
unsigned int ch;
-if(!c && (u16 == (unsigned short)0xFFFE || u16 == (unsigned short)0xFEFF))
+if(!c && (u16 == 0xFFFE || u16 == 0xFEFF))
{
-if(u16 == (unsigned short)0xFFFE)
+if(u16 == 0xFFFE)
invert = 1;
continue;
}
if(invert)
{
-u16 = ((u16 & (unsigned short)0xFF00) >> (unsigned short)8) | ((u16 & (unsigned short)0x00FF) << (unsigned short)8);
+u16 = ((u16 & 0xFF00) >> 8) | ((u16 & 0x00FF) << 8);
}
-if(u16 < (unsigned short)0xD800 || u16 > (unsigned short)0xDBFF)
+if(u16 < 0xD800 || u16 > 0xDBFF)
ch = u16;
else
ch = (u16 << 10) + source[c++] + (0x10000 - (0xD800 << 10) - 0xDC00);
}
else if(ch < 0x800)
{
-dest[d++] = (unsigned char)0xC0 | (unsigned char)((ch & 0x7C0) >> 6);
-dest[d++] = (unsigned char)0x80 | (unsigned char)(ch & 0x03F);
+dest[d++] = 0xC0 | (unsigned char)((ch & 0x7C0) >> 6);
+dest[d++] = 0x80 | (unsigned char)(ch & 0x03F);
}
else if(ch < 0x10000)
{
-dest[d++] = (unsigned char)0xE0 | (unsigned char)((ch & 0xF000) >> 12);
-dest[d++] = (unsigned char)0x80 | (unsigned char)((ch & 0xFC0) >> 6);
-dest[d++] = (unsigned char)0x80 | (unsigned char)(ch & 0x03F);
+dest[d++] = 0xE0 | (unsigned char)((ch & 0xF000) >> 12);
+dest[d++] = 0x80 | (unsigned char)((ch & 0xFC0) >> 6);
+dest[d++] = 0x80 | (unsigned char)(ch & 0x03F);
}
else
{
-dest[d++] = (unsigned char)0xF0 | (unsigned char)((ch & 0x1C0000) >> 18);
-dest[d++] = (unsigned char)0x80 | (unsigned char)((ch & 0x3F000) >> 12);
-dest[d++] = (unsigned char)0x80 | (unsigned char)((ch & 0xFC0) >> 6);
-dest[d++] = (unsigned char)0x80 | (unsigned char)(ch & 0x03F);
+dest[d++] = 0xF0 | (unsigned char)((ch & 0x1C0000) >> 18);
+dest[d++] = 0x80 | (unsigned char)((ch & 0x3F000) >> 12);
+dest[d++] = 0x80 | (unsigned char)((ch & 0xFC0) >> 6);
+dest[d++] = 0x80 | (unsigned char)(ch & 0x03F);
}
}
-dest[d] = (char)0;
+dest[d] = 0;
dest = __ecereNameSpace__ecere__com__eSystem_Renew(dest, sizeof(char) * (d + 1));
return dest;
}
int i;
unsigned char mask = (unsigned char)0x7F;
-if(ch & (unsigned char)0x80 && ch & (unsigned char)0x40)
+if(ch & 0x80 && ch & 0x40)
{
mask >>= 2;
numBytes++;
-if(ch & (unsigned char)0x20)
+if(ch & 0x20)
{
numBytes++;
mask >>= 1;
-if(ch & (unsigned char)0x10)
+if(ch & 0x10)
{
numBytes++;
mask >>= 1;
{
codePoint <<= 6;
codePoint |= source[c++] & mask;
-mask = (unsigned char)0x3F;
+mask = 0x3F;
}
if(codePoint > 0xFFFF)
{
unsigned short lead = (unsigned short)((0xD800 - (0x10000 >> 10)) + (codePoint >> 10));
-unsigned short trail = (unsigned short)0xDC00 + (unsigned short)(codePoint & 0x3FF);
+unsigned short trail = (unsigned short)(0xDC00 | (codePoint & 0x3FF));
dest[d++] = lead;
dest[d++] = trail;
dest[d++] = (unsigned short)codePoint;
}
}
-dest[d] = (unsigned short)0;
+dest[d] = 0;
if(wordCount)
*wordCount = d;
return dest;
if(pointerAlignment)
alignment = sizeof(void *);
-if(pointerAlignment && member->structAlignment <= (short)4)
-member->pointerAlignment = (short)1;
+if(pointerAlignment && member->structAlignment <= 4)
+member->pointerAlignment = 1;
else if(!pointerAlignment && alignment >= 8)
-member->pointerAlignment = (short)0;
+member->pointerAlignment = 0;
member->structAlignment = (__simpleStruct0 = member->structAlignment, (__simpleStruct0 > alignment) ? __simpleStruct0 : alignment);
if(member->memberOffset % alignment)
member->memberOffset += alignment - (member->memberOffset % alignment);
if(pointerAlignment)
alignment = sizeof(void *);
-if(pointerAlignment && _class->structAlignment <= (short)4)
-_class->pointerAlignment = (short)1;
+if(pointerAlignment && _class->structAlignment <= 4)
+_class->pointerAlignment = 1;
else if(!pointerAlignment && alignment >= 8)
-_class->pointerAlignment = (short)0;
+_class->pointerAlignment = 0;
_class->structAlignment = (__simpleStruct0 = _class->structAlignment, (__simpleStruct0 > alignment) ? __simpleStruct0 : alignment);
if(_class->memberOffset % alignment)
_class->memberOffset += alignment - (_class->memberOffset % alignment);
addTo->memberID += 1;
else
addTo->memberID += dataMember->memberID;
-if(dataMember->pointerAlignment && dataMember->structAlignment <= (short)4)
-addTo->pointerAlignment = (short)1;
-else if(!dataMember->pointerAlignment && dataMember->structAlignment >= (short)8)
-addTo->pointerAlignment = (short)0;
+if(dataMember->pointerAlignment && dataMember->structAlignment <= 4)
+addTo->pointerAlignment = 1;
+else if(!dataMember->pointerAlignment && dataMember->structAlignment >= 8)
+addTo->pointerAlignment = 0;
addTo->structAlignment = (__simpleStruct0 = addTo->structAlignment, __simpleStruct1 = dataMember->structAlignment, (__simpleStruct0 > __simpleStruct1) ? __simpleStruct0 : __simpleStruct1);
dataMember->offset = (addTo->type == 1) ? 0 : addTo->memberOffset;
if(dataMember->structAlignment)
}));
__ecereNameSpace__ecere__com__SetMemberClass(dataMember, _class);
dataMember->id = _class->memberID;
-if(dataMember->pointerAlignment && dataMember->structAlignment <= (short)4)
-_class->pointerAlignment = (short)1;
-else if(!dataMember->pointerAlignment && dataMember->structAlignment >= (short)8)
-_class->pointerAlignment = (short)0;
+if(dataMember->pointerAlignment && dataMember->structAlignment <= 4)
+_class->pointerAlignment = 1;
+else if(!dataMember->pointerAlignment && dataMember->structAlignment >= 8)
+_class->pointerAlignment = 0;
_class->structAlignment = (__simpleStruct0 = _class->structAlignment, __simpleStruct1 = dataMember->structAlignment, (__simpleStruct0 > __simpleStruct1) ? __simpleStruct0 : __simpleStruct1);
if(dataMember->type == 1)
_class->memberID += 1;
while(*end == ' ')
end--;
strncpy(ident, paramStart, end + 1 - paramStart);
-ident[end + 1 - paramStart] = (char)0;
+ident[end + 1 - paramStart] = 0;
for(sClass = _class; sClass; sClass = sClass->base)
{
if(sClass->templateClass)
while(*equal == ' ')
equal++;
memcpy(value, equal, paramEnd - equal);
-value[paramEnd - equal] = (char)0;
+value[paramEnd - equal] = 0;
}
else
{
memcpy(value, paramStart, paramEnd - paramStart);
-value[paramEnd - paramStart] = (char)0;
+value[paramEnd - paramStart] = 0;
}
__ecereNameSpace__ecere__sys__TrimRSpaces(value, value);
switch(curParam->type)
if(!strcmp(name, "ecere::sys::FileListing"))
{
size = 3 * (force32Bits ? 4 : 8);
-_class->structAlignment = force32Bits ? (short)4 : (short)8;
-_class->pointerAlignment = (short)1;
+_class->structAlignment = force32Bits ? 4 : 8;
+_class->pointerAlignment = 1;
}
else if(!strcmp(name, "ecere::com::Class"))
size = 0;
int len = (int)strlen(moduleName) - 3;
memmove(moduleName, moduleName + 3, len);
-moduleName[len] = (char)0;
+moduleName[len] = 0;
}
((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->name = __ecereNameSpace__ecere__sys__CopyString(moduleName);
}
if(_class->nameSpace)
{
struct __ecereNameSpace__ecere__com__BTNamedLink * classLink = (struct __ecereNameSpace__ecere__com__BTNamedLink *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString(&(*_class->nameSpace).classes, _class->name);
+
+if(classLink)
+{
struct __ecereNameSpace__ecere__sys__OldLink * t;
for(t = _class->templatized.first; t; t = t->next)
template->nameSpace = (((void *)0));
}
__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Delete(&(*_class->nameSpace).classes, (struct __ecereNameSpace__ecere__sys__BTNode *)classLink);
+}
_class->nameSpace = (((void *)0));
}
_class->module = (((void *)0));
char * name;
char * typeName;
struct __ecereNameSpace__ecere__com__Class * thisClassFrom;
+int promotedFrom;
int classObjectType;
int alignment;
unsigned int offset;
int bitFieldCount;
int count;
+int bitMemberSize;
unsigned int isSigned : 1;
unsigned int constant : 1;
unsigned int truth : 1;
unsigned int casted : 1;
unsigned int pointerAlignment : 1;
unsigned int isLong : 1;
+unsigned int signedBeforePromotion : 1;
} ecere_gcc_struct;
struct __ecereNameSpace__ecere__com__ClassTemplateParameter;
{
char temp[8192];
-temp[0] = (char)0;
+temp[0] = 0;
PrintExpression(tp->defaultArgument->__anon1.expression, temp);
__ecereNameSpace__ecere__sys__ChangeCh(temp, '\n', ' ');
__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " ");
{
char expString[8192];
-expString[0] = (char)0;
+expString[0] = 0;
PrintExpression(e->exp, expString);
printf(__ecereNameSpace__ecere__GetTranslatedString("ecp", "error: could not resolve value %s for enum %s in precompiler\n", (((void *)0))), expString, regClass->name);
((struct __ecereNameSpace__ecere__com__Application *)(((char *)((struct __ecereNameSpace__ecere__com__Instance *)__thisModule) + sizeof(struct __ecereNameSpace__ecere__com__Module) + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->exitCode = 1;
__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;
+command[sizeof (command) - 1] = 0;
if((cppOutput = __ecereNameSpace__ecere__sys__DualPipeOpen((((unsigned int)(1))), command)))
{
int exitCode;
char * name;
char * typeName;
struct __ecereNameSpace__ecere__com__Class * thisClassFrom;
+int promotedFrom;
int classObjectType;
int alignment;
unsigned int offset;
int bitFieldCount;
int count;
+int bitMemberSize;
unsigned int isSigned : 1;
unsigned int constant : 1;
unsigned int truth : 1;
unsigned int casted : 1;
unsigned int pointerAlignment : 1;
unsigned int isLong : 1;
+unsigned int signedBeforePromotion : 1;
} ecere_gcc_struct;
extern void DeclareMethod(struct External * neededFor, struct __ecereNameSpace__ecere__com__Method * method, const char * name);
{
PrintTypeNoConst(method->dataType->__anon1.__anon2.returnType, type, 0, 1);
classSym = FindClass(type);
-type[0] = (char)0;
+type[0] = 0;
}
strcpy(className, "__ecereClass_");
FullClassNameCat(className, classSym->string, 1);
{
PrintTypeNoConst(param, type, 0, 1);
classSym = FindClass(type);
-type[0] = (char)0;
+type[0] = 0;
}
strcpy(className, "__ecereClass_");
FullClassNameCat(className, classSym->string, 1);
{
PrintTypeNoConst(method->dataType->__anon1.__anon2.returnType, type, 0, 1);
classSym = FindClass(type);
-type[0] = (char)0;
+type[0] = 0;
}
strcpy(className, "__ecereClass_");
FullClassNameCat(className, classSym->string, 1);
{
PrintTypeNoConst(param, type, 0, 1);
classSym = FindClass(type);
-type[0] = (char)0;
+type[0] = 0;
}
strcpy(className, "__ecereClass_");
FullClassNameCat(className, classSym->string, 1);
{
PrintTypeNoConst(method->dataType->__anon1.__anon2.returnType, type, 0, 1);
classSym = FindClass(type);
-type[0] = (char)0;
+type[0] = 0;
}
strcpy(className, "__ecereClass_");
FullClassNameCat(className, classSym->string, 1);
{
PrintTypeNoConst(param, type, 0, 1);
classSym = FindClass(type);
-type[0] = (char)0;
+type[0] = 0;
}
strcpy(className, "__ecereClass_");
FullClassNameCat(className, classSym->string, 1);
{
PrintTypeNoConst(method->dataType->__anon1.__anon2.returnType, type, 0, 1);
classSym = FindClass(type);
-type[0] = (char)0;
+type[0] = 0;
}
strcpy(className, "__ecereClass_");
FullClassNameCat(className, classSym->string, 1);
{
PrintTypeNoConst(param, type, 0, 1);
classSym = FindClass(type);
-type[0] = (char)0;
+type[0] = 0;
}
strcpy(className, "__ecereClass_");
FullClassNameCat(className, classSym->string, 1);
{
char propName[1024];
-propName[0] = (char)0;
+propName[0] = 0;
FullClassNameCat(propName, prop->name, 1);
if((!strcmp(_class->name, "float") || !strcmp(_class->name, "double") || module->name) && module->importType != 1)
{
{
char functionName[1024];
-functionName[0] = (char)0;
+functionName[0] = 0;
FullClassNameCat(functionName, function->name, 0);
__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "void * __ecereFunction_%s;\n", functionName);
anyFunction = 1;
{
char propName[1024];
-propName[0] = (char)0;
+propName[0] = 0;
FullClassNameCat(propName, prop->name, 1);
__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " __ecereProp_%s_%s = _property = eClass_FindProperty(%s, \"%s\", module);\n", className, propName, classID, prop->name);
if((!strcmp(_class->name, "float") || !strcmp(_class->name, "double") || module->name) && module->importType != 1)
{
char functionName[1024];
-functionName[0] = (char)0;
+functionName[0] = 0;
FullClassNameCat(functionName, function->name, 0);
if(isDynamicLibrary && !isStaticLibrary)
__ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " function = eSystem_FindFunction(__currentModule, \"%s\");\n", function->name);
msgid = __ecereNameSpace__ecere__sys__CopyString(line + 7);
len = strlen(msgid);
if(len)
-msgid[len - 1] = (unsigned char)0;
+msgid[len - 1] = 0;
}
else if(strstr(line, "msgctxt \"") == line)
{
msgctxt = __ecereNameSpace__ecere__sys__CopyString(line + 9);
len = strlen(msgctxt);
if(len)
-msgctxt[len - 1] = (unsigned char)0;
+msgctxt[len - 1] = 0;
}
else if(strstr(line, "msgstr \"") == line)
{
msgstr = __ecereNameSpace__ecere__sys__CopyString(line + 8);
len = strlen(msgstr);
if(len)
-msgstr[len - 1] = (unsigned char)0;
+msgstr[len - 1] = 0;
}
if(msgid && msgstr)
{
char * name;
char * typeName;
struct __ecereNameSpace__ecere__com__Class * thisClassFrom;
+int promotedFrom;
int classObjectType;
int alignment;
unsigned int offset;
int bitFieldCount;
int count;
+int bitMemberSize;
unsigned int isSigned : 1;
unsigned int constant : 1;
unsigned int truth : 1;
unsigned int casted : 1;
unsigned int pointerAlignment : 1;
unsigned int isLong : 1;
+unsigned int signedBeforePromotion : 1;
} ecere_gcc_struct;
struct TemplatedType * FindTemplateTypeParameter(struct Context * ctx, const char * name);
stringLen = strlen(className);
memcpy(name + len, className, stringLen);
len += stringLen;
-name[len] = (char)0;
+name[len] = 0;
return _DeclClass(_class, name);
}
msgid[0] = '\"';
memcpy(msgid + 1, context + 1, lenContext - 2);
-msgid[1 + lenContext - 2] = (char)4;
+msgid[1 + lenContext - 2] = 4;
memcpy(msgid + 1 + lenContext - 2 + 1, string + 1, lenString - 2);
memcpy(msgid + 1 + lenContext - 2 + 1 + lenString - 2, "\"", 2);
ListAdd(list, MkExpString(msgid));
stringLen = strlen(name);
memcpy(fullName + len, name, stringLen);
len += stringLen;
-fullName[len] = (char)0;
+fullName[len] = 0;
cl = globalContext ? (struct Symbol *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString(&globalContext->classes, fullName) : (((void *)0));
}
if(!cl)
strcpy(name, ((struct Specifier *)baseSpecs->first)->__anon1.__anon1.name);
tpl = strchr(name, '<');
if(tpl)
-*tpl = (char)0;
+*tpl = 0;
baseClass = FindClass(name);
if(baseClass && baseClass->ctx)
{
if(c > name + 2)
{
memcpy(nameSpace, name, c - name - 2);
-nameSpace[c - name] = (char)0;
+nameSpace[c - name] = 0;
spec->__anon1.__anon1.nsSpec = _MkSpecifierName(nameSpace, (((void *)0)), (((void *)0)));
}
else
stringLen = strlen(inst->exp->__anon1.__anon1.identifier->string);
memcpy(name + len, inst->exp->__anon1.__anon1.identifier->string, stringLen);
len += stringLen;
-name[len] = (char)0;
+name[len] = 0;
(__ecereNameSpace__ecere__com__eSystem_Delete(inst->exp->__anon1.__anon1.identifier->string), inst->exp->__anon1.__anon1.identifier->string = 0);
inst->exp->__anon1.__anon1.identifier->string = __ecereNameSpace__ecere__sys__CopyString(name);
}
stringLen = strlen(id->string);
memcpy(name + len, id->string, stringLen);
len += stringLen;
-name[len] = (char)0;
+name[len] = 0;
(__ecereNameSpace__ecere__com__eSystem_Delete(id->string), id->string = 0);
id->string = __ecereNameSpace__ecere__sys__CopyString(name);
}
stringLen = strlen(id->string);
memcpy(name + len, id->string, stringLen);
len += stringLen;
-name[len] = (char)0;
+name[len] = 0;
(__ecereNameSpace__ecere__com__eSystem_Delete(id->string), id->string = 0);
id->string = __ecereNameSpace__ecere__sys__CopyString(name);
}
stringLen = strlen(id->string);
memcpy(name + len, id->string, stringLen);
len += stringLen;
-name[len] = (char)0;
+name[len] = 0;
(__ecereNameSpace__ecere__com__eSystem_Delete(id->string), id->string = 0);
id->string = __ecereNameSpace__ecere__sys__CopyString(name);
}
{
char * string = __ecereNameSpace__ecere__sys__CopyString(id->string + c + 1);
-id->string[c - 1] = (char)0;
+id->string[c - 1] = 0;
id->_class = MkSpecifierName(id->string);
(__ecereNameSpace__ecere__com__eSystem_Delete(id->string), id->string = 0);
id->string = string;
char * name;
char * typeName;
struct __ecereNameSpace__ecere__com__Class * thisClassFrom;
+int promotedFrom;
int classObjectType;
int alignment;
unsigned int offset;
int bitFieldCount;
int count;
+int bitMemberSize;
unsigned int isSigned : 1;
unsigned int constant : 1;
unsigned int truth : 1;
unsigned int casted : 1;
unsigned int pointerAlignment : 1;
unsigned int isLong : 1;
+unsigned int signedBeforePromotion : 1;
} ecere_gcc_struct;
struct Instantiation;
char * name;
char * typeName;
struct __ecereNameSpace__ecere__com__Class * thisClassFrom;
+int promotedFrom;
int classObjectType;
int alignment;
unsigned int offset;
int bitFieldCount;
int count;
+int bitMemberSize;
unsigned int isSigned : 1;
unsigned int constant : 1;
unsigned int truth : 1;
unsigned int casted : 1;
unsigned int pointerAlignment : 1;
unsigned int isLong : 1;
+unsigned int signedBeforePromotion : 1;
} ecere_gcc_struct;
struct TypeName;
int len = strlen(exp->__anon1.db.table);
memcpy(tableName, exp->__anon1.db.table + 1, len - 2);
-tableName[len - 2] = (char)0;
+tableName[len - 2] = 0;
__ecereNameSpace__ecere__sys__ChangeCh(tableName, ' ', '_');
sprintf(name, "__ecereDBField_%s_%s", tableName, exp->__anon1.db.id->string);
FreeExpContents(exp);
int len = strlen(exp->__anon1.db.table);
memcpy(tableName, exp->__anon1.db.table + 1, len - 2);
-tableName[len - 2] = (char)0;
+tableName[len - 2] = 0;
__ecereNameSpace__ecere__sys__ChangeCh(tableName, ' ', '_');
sprintf(name, "__ecereDBTable_%s", tableName);
FreeExpContents(exp);
int len = strlen(exp->__anon1.db.table);
memcpy(tableName, exp->__anon1.db.table + 1, len - 2);
-tableName[len - 2] = (char)0;
+tableName[len - 2] = 0;
__ecereNameSpace__ecere__sys__ChangeCh(tableName, ' ', '_');
sprintf(name, "__ecereDBIndex_%s_%s", tableName, exp->__anon1.db.id->string);
FreeExpContents(exp);
if(table->symbol)
idClassDefs = MkList();
-nameField[0] = (char)0;
+nameField[0] = 0;
memcpy(tableName, table->name + 1, len - 2);
-tableName[len - 2] = (char)0;
+tableName[len - 2] = 0;
__ecereNameSpace__ecere__sys__ChangeCh(tableName, ' ', '_');
sprintf(tableID, "__ecereDBTable_%s", tableName);
sprintf(rowClassName, "Row%s", tableName);
printf(__ecereNameSpace__ecere__GetTranslatedString("ec", ":%d:%d: warning: ", (((void *)0))), yylloc.start.line, yylloc.start.charPos);
__builtin_va_start(args, format);
vsnprintf(string, sizeof (string), format, args);
-string[sizeof (string) - 1] = (char)0;
+string[sizeof (string) - 1] = 0;
__builtin_va_end(args);
fputs(string, (bsl_stdout()));
fflush((bsl_stdout()));
char * name;
char * typeName;
struct __ecereNameSpace__ecere__com__Class * thisClassFrom;
+int promotedFrom;
int classObjectType;
int alignment;
unsigned int offset;
int bitFieldCount;
int count;
+int bitMemberSize;
unsigned int isSigned : 1;
unsigned int constant : 1;
unsigned int truth : 1;
unsigned int casted : 1;
unsigned int pointerAlignment : 1;
unsigned int isLong : 1;
+unsigned int signedBeforePromotion : 1;
} ecere_gcc_struct;
struct Symbol
printf(__ecereNameSpace__ecere__GetTranslatedString("ec", ":%d:%d: error: ", (((void *)0))), yylloc.start.line, yylloc.start.charPos);
__builtin_va_start(args, format);
vsnprintf(string, sizeof (string), format, args);
-string[sizeof (string) - 1] = (char)0;
+string[sizeof (string) - 1] = 0;
__builtin_va_end(args);
fputs(string, (bsl_stdout()));
fflush((bsl_stdout()));
__ecereNameSpace__ecere__com__eClass_AddDataMember(class, "name", "char *", sizeof(void *), 0xF000F000, 1);
__ecereNameSpace__ecere__com__eClass_AddDataMember(class, "typeName", "char *", sizeof(void *), 0xF000F000, 1);
__ecereNameSpace__ecere__com__eClass_AddDataMember(class, "thisClassFrom", "ecere::com::Class", sizeof(void *), 0xF000F000, 1);
+__ecereNameSpace__ecere__com__eClass_AddDataMember(class, "promotedFrom", "TypeKind", 4, 4, 1);
__ecereNameSpace__ecere__com__eClass_AddDataMember(class, "classObjectType", "ClassObjectType", 4, 4, 1);
__ecereNameSpace__ecere__com__eClass_AddDataMember(class, "alignment", "int", 4, 4, 1);
__ecereNameSpace__ecere__com__eClass_AddDataMember(class, "offset", "uint", 4, 4, 1);
__ecereNameSpace__ecere__com__eClass_AddDataMember(class, "bitFieldCount", "int", 4, 4, 1);
__ecereNameSpace__ecere__com__eClass_AddDataMember(class, "count", "int", 4, 4, 1);
+__ecereNameSpace__ecere__com__eClass_AddDataMember(class, "bitMemberSize", "int", 4, 4, 1);
__ecereNameSpace__ecere__com__eClass_AddDataMember(class, "isSigned", "bool:1", 4, 4, 1);
__ecereNameSpace__ecere__com__eClass_AddDataMember(class, "constant", "bool:1", 4, 4, 1);
__ecereNameSpace__ecere__com__eClass_AddDataMember(class, "truth", "bool:1", 4, 4, 1);
__ecereNameSpace__ecere__com__eClass_AddDataMember(class, "casted", "bool:1", 4, 4, 1);
__ecereNameSpace__ecere__com__eClass_AddDataMember(class, "pointerAlignment", "bool:1", 4, 4, 1);
__ecereNameSpace__ecere__com__eClass_AddDataMember(class, "isLong", "bool:1", 4, 4, 1);
+__ecereNameSpace__ecere__com__eClass_AddDataMember(class, "signedBeforePromotion", "bool:1", 4, 4, 1);
__ecerePropM_Type_specConst = __ecereNameSpace__ecere__com__eClass_AddProperty(class, "specConst", "bool", 0, __ecereProp_Type_Get_specConst, 1);
if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->application == ((struct __ecereNameSpace__ecere__com__Module *)(((char *)__thisModule + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->application)
__ecereProp_Type_specConst = __ecerePropM_Type_specConst, __ecerePropM_Type_specConst = (void *)0;
if(constant && constant[len - 1] == '.')
{
-constant[len - 1] = (char)0;
+constant[len - 1] = 0;
yyval.exp = MkExpMember(yyvsp[(1) - (2)].exp, yyvsp[(2) - (2)].id);
yyval.exp->loc = (yyloc);
}
if(yyn != -619)
{
yyn += 1;
-if(0 <= yyn && yyn <= 7700 && yycheck[yyn] == (short)1)
+if(0 <= yyn && yyn <= 7700 && yycheck[yyn] == 1)
{
yyn = yytable[yyn];
if(0 < yyn)
char * name;
char * typeName;
struct __ecereNameSpace__ecere__com__Class * thisClassFrom;
+int promotedFrom;
int classObjectType;
int alignment;
unsigned int offset;
int bitFieldCount;
int count;
+int bitMemberSize;
unsigned int isSigned : 1;
unsigned int constant : 1;
unsigned int truth : 1;
unsigned int casted : 1;
unsigned int pointerAlignment : 1;
unsigned int isLong : 1;
+unsigned int signedBeforePromotion : 1;
} ecere_gcc_struct;
struct PropertyDef;
int bitSize = 0, bitPos = -1;
char dataTypeString[8192];
-dataTypeString[0] = (char)0;
+dataTypeString[0] = 0;
if(sizeExp)
{
ProcessExpressionType(sizeExp);
{
char typeString[8192];
-typeString[0] = (char)0;
+typeString[0] = 0;
dataType = ProcessType(decl->__anon1.__anon1.specifiers, d);
PrintType(dataType, typeString, 0, 1);
if(member)
struct Identifier * id = spec->__anon1.__anon2.id;
char typeString[8192];
-typeString[0] = (char)0;
+typeString[0] = 0;
spec->__anon1.__anon2.id = (((void *)0));
decl->__anon1.__anon1.declarators = MkListOne(MkDeclaratorIdentifier(id));
dataType = ProcessType(decl->__anon1.__anon1.specifiers, (((void *)0)));
char * name;
char * typeName;
struct __ecereNameSpace__ecere__com__Class * thisClassFrom;
+int promotedFrom;
int classObjectType;
int alignment;
unsigned int offset;
int bitFieldCount;
int count;
+int bitMemberSize;
unsigned int isSigned : 1;
unsigned int constant : 1;
unsigned int truth : 1;
unsigned int casted : 1;
unsigned int pointerAlignment : 1;
unsigned int isLong : 1;
+unsigned int signedBeforePromotion : 1;
} ecere_gcc_struct;
struct Specifier
if(constant[len - 1] == '.')
{
-constant[len - 1] = (char)0;
+constant[len - 1] = 0;
yyval.exp = MkExpMember(yyvsp[(1) - (2)].exp, yyvsp[(2) - (2)].id);
yyval.exp->loc = (yyloc);
}
if(yyn != -1980)
{
yyn += 1;
-if(0 <= yyn && yyn <= 41266 && yycheck[yyn] == (short)1)
+if(0 <= yyn && yyn <= 41266 && yycheck[yyn] == 1)
{
yyn = yytable[yyn];
if(0 < yyn)
int c;
*yy_c_buf_p = yy_hold_char;
-if(*yy_c_buf_p == (char)0)
+if(*yy_c_buf_p == 0)
{
if(yy_c_buf_p < &(*yy_current_buffer).yy_ch_buf[yy_n_chars])
*yy_c_buf_p = '\0';
if(!b)
return ;
(*b).yy_n_chars = 0;
-(*b).yy_ch_buf[0] = (char)0;
-(*b).yy_ch_buf[1] = (char)0;
+(*b).yy_ch_buf[0] = 0;
+(*b).yy_ch_buf[1] = 0;
(*b).yy_buf_pos = &(*b).yy_ch_buf[0];
(*b).yy_at_bol = 1;
(*b).yy_buffer_status = 0;
{
YY_BUFFER_STATE b;
-if(size < 2 || base[size - 2] != (char)0 || base[size - 1] != (char)0)
+if(size < 2 || base[size - 2] != 0 || base[size - 1] != 0)
return 0;
b = (YY_BUFFER_STATE)yy_flex_alloc(sizeof(struct yy_buffer_state));
if(!b)
yy_fatal_error("out of dynamic memory in yy_scan_bytes()");
for(i = 0; i < len; ++i)
buf[i] = bytes[i];
-buf[len] = buf[len + 1] = (char)0;
+buf[len] = buf[len + 1] = 0;
b = yy_scan_buffer(buf, n);
if(!b)
yy_fatal_error("bad buffer in yy_scan_bytes()");
char * pointer = line + 1;
int lineNumber;
-line[count] = (char)0;
+line[count] = 0;
lineNumber = __ecereNameSpace__ecere__sys__GetValue(&pointer);
if(lineNumber)
{
char fileName[797];
int inOut;
-fileName[0] = (char)0;
+fileName[0] = 0;
__ecereNameSpace__ecere__sys__GetString(&pointer, fileName, (797));
inOut = __ecereNameSpace__ecere__sys__GetValue(&pointer);
if(inOut == 1)
last = c;
}
yylloc.start = yylloc.end;
-line[count] = (char)0;
+line[count] = 0;
__ecereNameSpace__ecere__sys__TrimLSpaces(line, line);
for(c = 0; line[c] && line[c] != ' '; c++)
;
}
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int)yy_c];
++yy_cp;
-}while(yy_base[yy_current_state] != (short)2575);
+}while(yy_base[yy_current_state] != 2575);
yy_find_action:
yy_act = yy_accept[yy_current_state];
if(yy_act == 0)
else
ret_val = 0;
yy_n_chars += number_to_move;
-(*yy_current_buffer).yy_ch_buf[yy_n_chars] = (char)0;
-(*yy_current_buffer).yy_ch_buf[yy_n_chars + 1] = (char)0;
+(*yy_current_buffer).yy_ch_buf[yy_n_chars] = 0;
+(*yy_current_buffer).yy_ch_buf[yy_n_chars + 1] = 0;
yytext = &(*yy_current_buffer).yy_ch_buf[0];
return ret_val;
}
char moduleName[797];
strncpy(moduleName, name, (797) - 1);
-moduleName[(797) - 1] = (char)0;
+moduleName[(797) - 1] = 0;
__ecereNameSpace__ecere__sys__StripExtension(moduleName);
for(module = (*defines).first; module; module = module->next)
{
static void GetSourceName(char * name, const char * src)
{
-name[0] = (char)0;
+name[0] = 0;
if(src)
{
if(!strchr(src, '/') && !strchr(src, '\\'))
char * name;
char * typeName;
struct __ecereNameSpace__ecere__com__Class * thisClassFrom;
+int promotedFrom;
int classObjectType;
int alignment;
unsigned int offset;
int bitFieldCount;
int count;
+int bitMemberSize;
unsigned int isSigned : 1;
unsigned int constant : 1;
unsigned int truth : 1;
unsigned int casted : 1;
unsigned int pointerAlignment : 1;
unsigned int isLong : 1;
+unsigned int signedBeforePromotion : 1;
} ecere_gcc_struct;
struct Declaration;
else
output[len++] = ch;
}
-output[len++] = (char)0;
+output[len++] = 0;
}
extern struct Location yylloc;
char * name;
char * typeName;
struct __ecereNameSpace__ecere__com__Class * thisClassFrom;
+int promotedFrom;
int classObjectType;
int alignment;
unsigned int offset;
int bitFieldCount;
int count;
+int bitMemberSize;
unsigned int isSigned : 1;
unsigned int constant : 1;
unsigned int truth : 1;
unsigned int casted : 1;
unsigned int pointerAlignment : 1;
unsigned int isLong : 1;
+unsigned int signedBeforePromotion : 1;
} ecere_gcc_struct;
extern struct __ecereNameSpace__ecere__com__Method * __ecereNameSpace__ecere__com__eClass_AddMethod(struct __ecereNameSpace__ecere__com__Class * _class, const char * name, const char * type, void * function, int declMode);
char * name;
char * typeName;
struct __ecereNameSpace__ecere__com__Class * thisClassFrom;
+int promotedFrom;
int classObjectType;
int alignment;
unsigned int offset;
int bitFieldCount;
int count;
+int bitMemberSize;
unsigned int isSigned : 1;
unsigned int constant : 1;
unsigned int truth : 1;
unsigned int casted : 1;
unsigned int pointerAlignment : 1;
unsigned int isLong : 1;
+unsigned int signedBeforePromotion : 1;
} ecere_gcc_struct;
unsigned int __ecereProp_Type_Get_isPointerTypeSize(struct Type * this);
{
char baseStructName[1024];
-baseStructName[0] = (char)0;
+baseStructName[0] = 0;
strcpy(baseStructName, (regClass->base->templateClass ? regClass->base->templateClass : regClass->base)->fullName);
ListAdd(args, MkExpOp(MkExpTypeSize(MkTypeName(MkListOne(MkStructOrUnion(3, MkIdentifier(symbol->structName), (((void *)0)))), (((void *)0)))), '-', MkExpTypeSize(MkTypeName(MkListOne(MkStructOrUnion(3, MkIdentifier(baseStructName), (((void *)0)))), (((void *)0))))));
}
{
char temp[100];
-if(result > (unsigned short)32767)
+if(result > 32767)
sprintf(temp, "0x%X", (int)result);
else
sprintf(temp, "%d", (int)result);
{
char temp[100];
-if(result > (char)0 && isprint(result))
+if(result > 0 && isprint(result))
sprintf(temp, "'%c'", result);
-else if(result < (char)0)
+else if(result < 0)
sprintf(temp, "%d", (int)result);
else
sprintf(temp, "0x%X", (unsigned char)result);
char * name;
char * typeName;
struct __ecereNameSpace__ecere__com__Class * thisClassFrom;
+int promotedFrom;
int classObjectType;
int alignment;
unsigned int offset;
int bitFieldCount;
int count;
+int bitMemberSize;
unsigned int isSigned : 1;
unsigned int constant : 1;
unsigned int truth : 1;
unsigned int casted : 1;
unsigned int pointerAlignment : 1;
unsigned int isLong : 1;
+unsigned int signedBeforePromotion : 1;
} ecere_gcc_struct;
struct Specifier
short value2 = op2->__anon1.s;
exp->type = 2;
-exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s + value2));
+exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s + value2));
if(!exp->expType)
{
exp->expType = op1->type;
unsigned short value2 = op2->__anon1.us;
exp->type = 2;
-exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us + value2));
+exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us + value2));
if(!exp->expType)
{
exp->expType = op1->type;
char value2 = op2->__anon1.c;
exp->type = 2;
-exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c + value2));
+exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c + value2));
if(!exp->expType)
{
exp->expType = op1->type;
unsigned char value2 = op2->__anon1.uc;
exp->type = 2;
-exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc + value2));
+exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc + value2));
if(!exp->expType)
{
exp->expType = op1->type;
short value2 = op2->__anon1.s;
exp->type = 2;
-exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s - value2));
+exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s - value2));
if(!exp->expType)
{
exp->expType = op1->type;
unsigned short value2 = op2->__anon1.us;
exp->type = 2;
-exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us - value2));
+exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us - value2));
if(!exp->expType)
{
exp->expType = op1->type;
char value2 = op2->__anon1.c;
exp->type = 2;
-exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c - value2));
+exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c - value2));
if(!exp->expType)
{
exp->expType = op1->type;
unsigned char value2 = op2->__anon1.uc;
exp->type = 2;
-exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc - value2));
+exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc - value2));
if(!exp->expType)
{
exp->expType = op1->type;
short value2 = op2->__anon1.s;
exp->type = 2;
-exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s * value2));
+exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s * value2));
if(!exp->expType)
{
exp->expType = op1->type;
unsigned short value2 = op2->__anon1.us;
exp->type = 2;
-exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us * value2));
+exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us * value2));
if(!exp->expType)
{
exp->expType = op1->type;
char value2 = op2->__anon1.c;
exp->type = 2;
-exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c * value2));
+exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c * value2));
if(!exp->expType)
{
exp->expType = op1->type;
unsigned char value2 = op2->__anon1.uc;
exp->type = 2;
-exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc * value2));
+exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc * value2));
if(!exp->expType)
{
exp->expType = op1->type;
int value2 = op2->__anon1.i;
exp->type = 2;
-exp->__anon1.__anon2.string = PrintInt(value2 ? (op1->__anon1.i / value2) : 0);
+exp->__anon1.__anon2.string = PrintInt(value2 ? ((op1->__anon1.i / value2)) : 0);
if(!exp->expType)
{
exp->expType = op1->type;
unsigned int value2 = op2->__anon1.ui;
exp->type = 2;
-exp->__anon1.__anon2.string = PrintUInt(value2 ? (op1->__anon1.ui / value2) : 0);
+exp->__anon1.__anon2.string = PrintUInt(value2 ? ((op1->__anon1.ui / value2)) : 0);
if(!exp->expType)
{
exp->expType = op1->type;
long long value2 = op2->__anon1.i64;
exp->type = 2;
-exp->__anon1.__anon2.string = PrintInt64(value2 ? (op1->__anon1.i64 / value2) : 0);
+exp->__anon1.__anon2.string = PrintInt64(value2 ? ((op1->__anon1.i64 / value2)) : 0);
if(!exp->expType)
{
exp->expType = op1->type;
uint64 value2 = op2->__anon1.ui64;
exp->type = 2;
-exp->__anon1.__anon2.string = PrintUInt64(value2 ? (op1->__anon1.ui64 / value2) : 0);
+exp->__anon1.__anon2.string = PrintUInt64(value2 ? ((op1->__anon1.ui64 / value2)) : 0);
if(!exp->expType)
{
exp->expType = op1->type;
short value2 = op2->__anon1.s;
exp->type = 2;
-exp->__anon1.__anon2.string = PrintShort(value2 ? (op1->__anon1.s / value2) : (short)0);
+exp->__anon1.__anon2.string = PrintShort(value2 ? ((short)(op1->__anon1.s / value2)) : (short)0);
if(!exp->expType)
{
exp->expType = op1->type;
unsigned short value2 = op2->__anon1.us;
exp->type = 2;
-exp->__anon1.__anon2.string = PrintUShort(value2 ? (op1->__anon1.us / value2) : (unsigned short)0);
+exp->__anon1.__anon2.string = PrintUShort(value2 ? ((unsigned short)(op1->__anon1.us / value2)) : (unsigned short)0);
if(!exp->expType)
{
exp->expType = op1->type;
char value2 = op2->__anon1.c;
exp->type = 2;
-exp->__anon1.__anon2.string = PrintChar(value2 ? (op1->__anon1.c / value2) : (char)0);
+exp->__anon1.__anon2.string = PrintChar(value2 ? ((char)(op1->__anon1.c / value2)) : (char)0);
if(!exp->expType)
{
exp->expType = op1->type;
unsigned char value2 = op2->__anon1.uc;
exp->type = 2;
-exp->__anon1.__anon2.string = PrintUChar(value2 ? (op1->__anon1.uc / value2) : (unsigned char)0);
+exp->__anon1.__anon2.string = PrintUChar(value2 ? ((unsigned char)(op1->__anon1.uc / value2)) : (unsigned char)0);
if(!exp->expType)
{
exp->expType = op1->type;
float value2 = op2->__anon1.f;
exp->type = 2;
-exp->__anon1.__anon2.string = PrintFloat(op1->__anon1.f / value2);
+exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f / value2));
if(!exp->expType)
{
exp->expType = op1->type;
double value2 = op2->__anon1.d;
exp->type = 2;
-exp->__anon1.__anon2.string = PrintDouble(op1->__anon1.d / value2);
+exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d / value2));
if(!exp->expType)
{
exp->expType = op1->type;
int value2 = op2->__anon1.i;
exp->type = 2;
-exp->__anon1.__anon2.string = PrintInt(value2 ? (op1->__anon1.i % value2) : 0);
+exp->__anon1.__anon2.string = PrintInt(value2 ? ((op1->__anon1.i % value2)) : 0);
if(!exp->expType)
{
exp->expType = op1->type;
unsigned int value2 = op2->__anon1.ui;
exp->type = 2;
-exp->__anon1.__anon2.string = PrintUInt(value2 ? (op1->__anon1.ui % value2) : 0);
+exp->__anon1.__anon2.string = PrintUInt(value2 ? ((op1->__anon1.ui % value2)) : 0);
if(!exp->expType)
{
exp->expType = op1->type;
long long value2 = op2->__anon1.i64;
exp->type = 2;
-exp->__anon1.__anon2.string = PrintInt64(value2 ? (op1->__anon1.i64 % value2) : 0);
+exp->__anon1.__anon2.string = PrintInt64(value2 ? ((op1->__anon1.i64 % value2)) : 0);
if(!exp->expType)
{
exp->expType = op1->type;
uint64 value2 = op2->__anon1.ui64;
exp->type = 2;
-exp->__anon1.__anon2.string = PrintUInt64(value2 ? (op1->__anon1.ui64 % value2) : 0);
+exp->__anon1.__anon2.string = PrintUInt64(value2 ? ((op1->__anon1.ui64 % value2)) : 0);
if(!exp->expType)
{
exp->expType = op1->type;
short value2 = op2->__anon1.s;
exp->type = 2;
-exp->__anon1.__anon2.string = PrintShort(value2 ? (op1->__anon1.s % value2) : (short)0);
+exp->__anon1.__anon2.string = PrintShort(value2 ? ((short)(op1->__anon1.s % value2)) : (short)0);
if(!exp->expType)
{
exp->expType = op1->type;
unsigned short value2 = op2->__anon1.us;
exp->type = 2;
-exp->__anon1.__anon2.string = PrintUShort(value2 ? (op1->__anon1.us % value2) : (unsigned short)0);
+exp->__anon1.__anon2.string = PrintUShort(value2 ? ((unsigned short)(op1->__anon1.us % value2)) : (unsigned short)0);
if(!exp->expType)
{
exp->expType = op1->type;
char value2 = op2->__anon1.c;
exp->type = 2;
-exp->__anon1.__anon2.string = PrintChar(value2 ? (op1->__anon1.c % value2) : (char)0);
+exp->__anon1.__anon2.string = PrintChar(value2 ? ((char)(op1->__anon1.c % value2)) : (char)0);
if(!exp->expType)
{
exp->expType = op1->type;
unsigned char value2 = op2->__anon1.uc;
exp->type = 2;
-exp->__anon1.__anon2.string = PrintUChar(value2 ? (op1->__anon1.uc % value2) : (unsigned char)0);
+exp->__anon1.__anon2.string = PrintUChar(value2 ? ((unsigned char)(op1->__anon1.uc % value2)) : (unsigned char)0);
if(!exp->expType)
{
exp->expType = op1->type;
short value2 = op2->__anon1.s;
exp->type = 2;
-exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s = value2));
+exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s = value2));
if(!exp->expType)
{
exp->expType = op1->type;
unsigned short value2 = op2->__anon1.us;
exp->type = 2;
-exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us = value2));
+exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us = value2));
if(!exp->expType)
{
exp->expType = op1->type;
char value2 = op2->__anon1.c;
exp->type = 2;
-exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c = value2));
+exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c = value2));
if(!exp->expType)
{
exp->expType = op1->type;
unsigned char value2 = op2->__anon1.uc;
exp->type = 2;
-exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc = value2));
+exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc = value2));
if(!exp->expType)
{
exp->expType = op1->type;
short value2 = op2->__anon1.s;
exp->type = 2;
-exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s += value2));
+exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s += value2));
if(!exp->expType)
{
exp->expType = op1->type;
unsigned short value2 = op2->__anon1.us;
exp->type = 2;
-exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us += value2));
+exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us += value2));
if(!exp->expType)
{
exp->expType = op1->type;
char value2 = op2->__anon1.c;
exp->type = 2;
-exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c += value2));
+exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c += value2));
if(!exp->expType)
{
exp->expType = op1->type;
unsigned char value2 = op2->__anon1.uc;
exp->type = 2;
-exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc += value2));
+exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc += value2));
if(!exp->expType)
{
exp->expType = op1->type;
short value2 = op2->__anon1.s;
exp->type = 2;
-exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s -= value2));
+exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s -= value2));
if(!exp->expType)
{
exp->expType = op1->type;
unsigned short value2 = op2->__anon1.us;
exp->type = 2;
-exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us -= value2));
+exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us -= value2));
if(!exp->expType)
{
exp->expType = op1->type;
char value2 = op2->__anon1.c;
exp->type = 2;
-exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c -= value2));
+exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c -= value2));
if(!exp->expType)
{
exp->expType = op1->type;
unsigned char value2 = op2->__anon1.uc;
exp->type = 2;
-exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc -= value2));
+exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc -= value2));
if(!exp->expType)
{
exp->expType = op1->type;
short value2 = op2->__anon1.s;
exp->type = 2;
-exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s *= value2));
+exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s *= value2));
if(!exp->expType)
{
exp->expType = op1->type;
unsigned short value2 = op2->__anon1.us;
exp->type = 2;
-exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us *= value2));
+exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us *= value2));
if(!exp->expType)
{
exp->expType = op1->type;
char value2 = op2->__anon1.c;
exp->type = 2;
-exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c *= value2));
+exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c *= value2));
if(!exp->expType)
{
exp->expType = op1->type;
unsigned char value2 = op2->__anon1.uc;
exp->type = 2;
-exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc *= value2));
+exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc *= value2));
if(!exp->expType)
{
exp->expType = op1->type;
int value2 = op2->__anon1.i;
exp->type = 2;
-exp->__anon1.__anon2.string = PrintInt(value2 ? (op1->__anon1.i /= value2) : 0);
+exp->__anon1.__anon2.string = PrintInt(value2 ? ((op1->__anon1.i /= value2)) : 0);
if(!exp->expType)
{
exp->expType = op1->type;
unsigned int value2 = op2->__anon1.ui;
exp->type = 2;
-exp->__anon1.__anon2.string = PrintUInt(value2 ? (op1->__anon1.ui /= value2) : 0);
+exp->__anon1.__anon2.string = PrintUInt(value2 ? ((op1->__anon1.ui /= value2)) : 0);
if(!exp->expType)
{
exp->expType = op1->type;
long long value2 = op2->__anon1.i64;
exp->type = 2;
-exp->__anon1.__anon2.string = PrintInt64(value2 ? (op1->__anon1.i64 /= value2) : 0);
+exp->__anon1.__anon2.string = PrintInt64(value2 ? ((op1->__anon1.i64 /= value2)) : 0);
if(!exp->expType)
{
exp->expType = op1->type;
uint64 value2 = op2->__anon1.ui64;
exp->type = 2;
-exp->__anon1.__anon2.string = PrintUInt64(value2 ? (op1->__anon1.ui64 /= value2) : 0);
+exp->__anon1.__anon2.string = PrintUInt64(value2 ? ((op1->__anon1.ui64 /= value2)) : 0);
if(!exp->expType)
{
exp->expType = op1->type;
short value2 = op2->__anon1.s;
exp->type = 2;
-exp->__anon1.__anon2.string = PrintShort(value2 ? (op1->__anon1.s /= value2) : (short)0);
+exp->__anon1.__anon2.string = PrintShort(value2 ? ((short)(op1->__anon1.s /= value2)) : (short)0);
if(!exp->expType)
{
exp->expType = op1->type;
unsigned short value2 = op2->__anon1.us;
exp->type = 2;
-exp->__anon1.__anon2.string = PrintUShort(value2 ? (op1->__anon1.us /= value2) : (unsigned short)0);
+exp->__anon1.__anon2.string = PrintUShort(value2 ? ((unsigned short)(op1->__anon1.us /= value2)) : (unsigned short)0);
if(!exp->expType)
{
exp->expType = op1->type;
char value2 = op2->__anon1.c;
exp->type = 2;
-exp->__anon1.__anon2.string = PrintChar(value2 ? (op1->__anon1.c /= value2) : (char)0);
+exp->__anon1.__anon2.string = PrintChar(value2 ? ((char)(op1->__anon1.c /= value2)) : (char)0);
if(!exp->expType)
{
exp->expType = op1->type;
unsigned char value2 = op2->__anon1.uc;
exp->type = 2;
-exp->__anon1.__anon2.string = PrintUChar(value2 ? (op1->__anon1.uc /= value2) : (unsigned char)0);
+exp->__anon1.__anon2.string = PrintUChar(value2 ? ((unsigned char)(op1->__anon1.uc /= value2)) : (unsigned char)0);
if(!exp->expType)
{
exp->expType = op1->type;
float value2 = op2->__anon1.f;
exp->type = 2;
-exp->__anon1.__anon2.string = PrintFloat(op1->__anon1.f /= value2);
+exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f /= value2));
if(!exp->expType)
{
exp->expType = op1->type;
double value2 = op2->__anon1.d;
exp->type = 2;
-exp->__anon1.__anon2.string = PrintDouble(op1->__anon1.d /= value2);
+exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d /= value2));
if(!exp->expType)
{
exp->expType = op1->type;
int value2 = op2->__anon1.i;
exp->type = 2;
-exp->__anon1.__anon2.string = PrintInt(value2 ? (op1->__anon1.i %= value2) : 0);
+exp->__anon1.__anon2.string = PrintInt(value2 ? ((op1->__anon1.i %= value2)) : 0);
if(!exp->expType)
{
exp->expType = op1->type;
unsigned int value2 = op2->__anon1.ui;
exp->type = 2;
-exp->__anon1.__anon2.string = PrintUInt(value2 ? (op1->__anon1.ui %= value2) : 0);
+exp->__anon1.__anon2.string = PrintUInt(value2 ? ((op1->__anon1.ui %= value2)) : 0);
if(!exp->expType)
{
exp->expType = op1->type;
long long value2 = op2->__anon1.i64;
exp->type = 2;
-exp->__anon1.__anon2.string = PrintInt64(value2 ? (op1->__anon1.i64 %= value2) : 0);
+exp->__anon1.__anon2.string = PrintInt64(value2 ? ((op1->__anon1.i64 %= value2)) : 0);
if(!exp->expType)
{
exp->expType = op1->type;
uint64 value2 = op2->__anon1.ui64;
exp->type = 2;
-exp->__anon1.__anon2.string = PrintUInt64(value2 ? (op1->__anon1.ui64 %= value2) : 0);
+exp->__anon1.__anon2.string = PrintUInt64(value2 ? ((op1->__anon1.ui64 %= value2)) : 0);
if(!exp->expType)
{
exp->expType = op1->type;
short value2 = op2->__anon1.s;
exp->type = 2;
-exp->__anon1.__anon2.string = PrintShort(value2 ? (op1->__anon1.s %= value2) : (short)0);
+exp->__anon1.__anon2.string = PrintShort(value2 ? ((short)(op1->__anon1.s %= value2)) : (short)0);
if(!exp->expType)
{
exp->expType = op1->type;
unsigned short value2 = op2->__anon1.us;
exp->type = 2;
-exp->__anon1.__anon2.string = PrintUShort(value2 ? (op1->__anon1.us %= value2) : (unsigned short)0);
+exp->__anon1.__anon2.string = PrintUShort(value2 ? ((unsigned short)(op1->__anon1.us %= value2)) : (unsigned short)0);
if(!exp->expType)
{
exp->expType = op1->type;
char value2 = op2->__anon1.c;
exp->type = 2;
-exp->__anon1.__anon2.string = PrintChar(value2 ? (op1->__anon1.c %= value2) : (char)0);
+exp->__anon1.__anon2.string = PrintChar(value2 ? ((char)(op1->__anon1.c %= value2)) : (char)0);
if(!exp->expType)
{
exp->expType = op1->type;
unsigned char value2 = op2->__anon1.uc;
exp->type = 2;
-exp->__anon1.__anon2.string = PrintUChar(value2 ? (op1->__anon1.uc %= value2) : (unsigned char)0);
+exp->__anon1.__anon2.string = PrintUChar(value2 ? ((unsigned char)(op1->__anon1.uc %= value2)) : (unsigned char)0);
if(!exp->expType)
{
exp->expType = op1->type;
short value2 = op2->__anon1.s;
exp->type = 2;
-exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s & value2));
+exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s & value2));
if(!exp->expType)
{
exp->expType = op1->type;
unsigned short value2 = op2->__anon1.us;
exp->type = 2;
-exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us & value2));
+exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us & value2));
if(!exp->expType)
{
exp->expType = op1->type;
char value2 = op2->__anon1.c;
exp->type = 2;
-exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c & value2));
+exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c & value2));
if(!exp->expType)
{
exp->expType = op1->type;
unsigned char value2 = op2->__anon1.uc;
exp->type = 2;
-exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc & value2));
+exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc & value2));
if(!exp->expType)
{
exp->expType = op1->type;
short value2 = op2->__anon1.s;
exp->type = 2;
-exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s | value2));
+exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s | value2));
if(!exp->expType)
{
exp->expType = op1->type;
unsigned short value2 = op2->__anon1.us;
exp->type = 2;
-exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us | value2));
+exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us | value2));
if(!exp->expType)
{
exp->expType = op1->type;
char value2 = op2->__anon1.c;
exp->type = 2;
-exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c | value2));
+exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c | value2));
if(!exp->expType)
{
exp->expType = op1->type;
unsigned char value2 = op2->__anon1.uc;
exp->type = 2;
-exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc | value2));
+exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc | value2));
if(!exp->expType)
{
exp->expType = op1->type;
short value2 = op2->__anon1.s;
exp->type = 2;
-exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s ^ value2));
+exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s ^ value2));
if(!exp->expType)
{
exp->expType = op1->type;
unsigned short value2 = op2->__anon1.us;
exp->type = 2;
-exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us ^ value2));
+exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us ^ value2));
if(!exp->expType)
{
exp->expType = op1->type;
char value2 = op2->__anon1.c;
exp->type = 2;
-exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c ^ value2));
+exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c ^ value2));
if(!exp->expType)
{
exp->expType = op1->type;
unsigned char value2 = op2->__anon1.uc;
exp->type = 2;
-exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc ^ value2));
+exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc ^ value2));
if(!exp->expType)
{
exp->expType = op1->type;
short value2 = op2->__anon1.s;
exp->type = 2;
-exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s << value2));
+exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s << value2));
if(!exp->expType)
{
exp->expType = op1->type;
unsigned short value2 = op2->__anon1.us;
exp->type = 2;
-exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us << value2));
+exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us << value2));
if(!exp->expType)
{
exp->expType = op1->type;
char value2 = op2->__anon1.c;
exp->type = 2;
-exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c << value2));
+exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c << value2));
if(!exp->expType)
{
exp->expType = op1->type;
unsigned char value2 = op2->__anon1.uc;
exp->type = 2;
-exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc << value2));
+exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc << value2));
if(!exp->expType)
{
exp->expType = op1->type;
short value2 = op2->__anon1.s;
exp->type = 2;
-exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s >> value2));
+exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s >> value2));
if(!exp->expType)
{
exp->expType = op1->type;
unsigned short value2 = op2->__anon1.us;
exp->type = 2;
-exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us >> value2));
+exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us >> value2));
if(!exp->expType)
{
exp->expType = op1->type;
char value2 = op2->__anon1.c;
exp->type = 2;
-exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c >> value2));
+exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c >> value2));
if(!exp->expType)
{
exp->expType = op1->type;
unsigned char value2 = op2->__anon1.uc;
exp->type = 2;
-exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc >> value2));
+exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc >> value2));
if(!exp->expType)
{
exp->expType = op1->type;
short value2 = op2->__anon1.s;
exp->type = 2;
-exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s &= value2));
+exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s &= value2));
if(!exp->expType)
{
exp->expType = op1->type;
unsigned short value2 = op2->__anon1.us;
exp->type = 2;
-exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us &= value2));
+exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us &= value2));
if(!exp->expType)
{
exp->expType = op1->type;
char value2 = op2->__anon1.c;
exp->type = 2;
-exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c &= value2));
+exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c &= value2));
if(!exp->expType)
{
exp->expType = op1->type;
unsigned char value2 = op2->__anon1.uc;
exp->type = 2;
-exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc &= value2));
+exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc &= value2));
if(!exp->expType)
{
exp->expType = op1->type;
short value2 = op2->__anon1.s;
exp->type = 2;
-exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s |= value2));
+exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s |= value2));
if(!exp->expType)
{
exp->expType = op1->type;
unsigned short value2 = op2->__anon1.us;
exp->type = 2;
-exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us |= value2));
+exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us |= value2));
if(!exp->expType)
{
exp->expType = op1->type;
char value2 = op2->__anon1.c;
exp->type = 2;
-exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c |= value2));
+exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c |= value2));
if(!exp->expType)
{
exp->expType = op1->type;
unsigned char value2 = op2->__anon1.uc;
exp->type = 2;
-exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc |= value2));
+exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc |= value2));
if(!exp->expType)
{
exp->expType = op1->type;
short value2 = op2->__anon1.s;
exp->type = 2;
-exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s ^= value2));
+exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s ^= value2));
if(!exp->expType)
{
exp->expType = op1->type;
unsigned short value2 = op2->__anon1.us;
exp->type = 2;
-exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us ^= value2));
+exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us ^= value2));
if(!exp->expType)
{
exp->expType = op1->type;
char value2 = op2->__anon1.c;
exp->type = 2;
-exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c ^= value2));
+exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c ^= value2));
if(!exp->expType)
{
exp->expType = op1->type;
unsigned char value2 = op2->__anon1.uc;
exp->type = 2;
-exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc ^= value2));
+exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc ^= value2));
if(!exp->expType)
{
exp->expType = op1->type;
short value2 = op2->__anon1.s;
exp->type = 2;
-exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s <<= value2));
+exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s <<= value2));
if(!exp->expType)
{
exp->expType = op1->type;
unsigned short value2 = op2->__anon1.us;
exp->type = 2;
-exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us <<= value2));
+exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us <<= value2));
if(!exp->expType)
{
exp->expType = op1->type;
char value2 = op2->__anon1.c;
exp->type = 2;
-exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c <<= value2));
+exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c <<= value2));
if(!exp->expType)
{
exp->expType = op1->type;
unsigned char value2 = op2->__anon1.uc;
exp->type = 2;
-exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc <<= value2));
+exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc <<= value2));
if(!exp->expType)
{
exp->expType = op1->type;
short value2 = op2->__anon1.s;
exp->type = 2;
-exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s >>= value2));
+exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s >>= value2));
if(!exp->expType)
{
exp->expType = op1->type;
unsigned short value2 = op2->__anon1.us;
exp->type = 2;
-exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us >>= value2));
+exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us >>= value2));
if(!exp->expType)
{
exp->expType = op1->type;
char value2 = op2->__anon1.c;
exp->type = 2;
-exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c >>= value2));
+exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c >>= value2));
if(!exp->expType)
{
exp->expType = op1->type;
unsigned char value2 = op2->__anon1.uc;
exp->type = 2;
-exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc >>= value2));
+exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc >>= value2));
if(!exp->expType)
{
exp->expType = op1->type;
break;
}
case 2:
-if(type->isSigned)
+if(exp->__anon1.__anon1.constant[0] == '\'')
+{
+op.__anon1.s = exp->__anon1.__anon1.constant[1];
+op.ops = shortOps;
+}
+else if(type->isSigned)
{
op.__anon1.s = (short)strtol(exp->__anon1.__anon1.constant, (((void *)0)), 0);
op.ops = shortOps;
break;
case 3:
case 5:
-if(type->isSigned)
+if(exp->__anon1.__anon1.constant[0] == '\'')
+{
+op.__anon1.i = exp->__anon1.__anon1.constant[1];
+op.ops = intOps;
+}
+else if(type->isSigned)
{
op.__anon1.i = strtol(exp->__anon1.__anon1.constant, (((void *)0)), 0);
op.ops = intOps;
if(symbol)
return symbol;
memcpy(nameSpace, name, c + 1);
-nameSpace[c + 1] = (char)0;
+nameSpace[c + 1] = 0;
return ScanWithNameSpace(tree, nameSpace, namePart);
}
else if(gotColon)
{
char name[1024];
-name[0] = (char)0;
+name[0] = 0;
if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)function->module + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->importType != 1 && (!function->dataType || !function->dataType->dllExport))
strcpy(name, "__ecereFunction_");
FullClassNameCat(name, s, 0);
{
member->memberOffset = 0;
if(targetBits < sizeof(void *) * 8)
-member->structAlignment = (short)0;
+member->structAlignment = 0;
}
else if(targetBits < sizeof(void *) * 8)
-_class->structAlignment = (short)0;
+_class->structAlignment = 0;
if(!member && ((_class->type == 0 || _class->type == 5) || (_class->type == 1 && _class->memberOffset && _class->memberOffset > _class->base->structSize)))
_class->memberOffset = (_class->base && _class->type == 1) ? _class->base->structSize : 0;
if(!member && _class->destructionWatchOffset)
{
char type[1024];
-type[0] = (char)0;
+type[0] = 0;
PrintType(paramDest, type, 0, 1);
Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "incompatible parameter %s (expected %s)\n", (((void *)0))), paramSource->name, type);
if(paramDestType != paramDest)
}
return external;
}
-structName[0] = (char)0;
+structName[0] = 0;
FullClassNameCat(structName, name, 0);
classSym->declaredStructSym = 1;
if(!external || (classSym->__anon1.registered->type == 5 && !skipNoHead && !curDeclarations))
(__ecereNameSpace__ecere__com__eSystem_Delete(id->string), id->string = 0);
id->string = __ecereNameSpace__ecere__sys__CopyString(function->name);
-name[0] = (char)0;
+name[0] = 0;
if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)function->module + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->importType != 1 && (!function->dataType || !function->dataType->dllExport))
strcpy(name, "__ecereFunction_");
FullClassNameCat(name, id->string, 0);
break;
case LEFT_OP:
case RIGHT_OP:
-useSideType = 1;
-useDestType = 1;
break;
case '|':
case '^':
FreeType(dummy);
exp->__anon1.op.exp1->destType = (((void *)0));
}
+if(exp->__anon1.op.exp2)
+{
+if(exp->__anon1.op.exp1->expType && (exp->__anon1.op.exp1->expType->kind == 1 || exp->__anon1.op.exp1->expType->kind == 2))
+{
+struct Type * type = (type = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type), type->kind = 3, type->isSigned = 1, type->refCount = 1, type->signedBeforePromotion = exp->__anon1.op.exp1->expType->isSigned, type->bitMemberSize = exp->__anon1.op.exp1->expType->bitMemberSize, type->promotedFrom = exp->__anon1.op.exp1->expType->kind, type);
+
+FreeType(exp->__anon1.op.exp1->expType);
+exp->__anon1.op.exp1->expType = type;
+}
+}
type1 = exp->__anon1.op.exp1->expType;
}
if(exp->__anon1.op.exp2)
exp->__anon1.op.exp2->opDestType = 0;
if(exp->__anon1.op.exp2->destType && exp->__anon1.op.op != '=')
exp->__anon1.op.exp2->destType->count--;
+if(exp->__anon1.op.exp1 || exp->__anon1.op.op == '~')
+{
+if(exp->__anon1.op.exp2->expType && (exp->__anon1.op.exp2->expType->kind == 1 || exp->__anon1.op.exp2->expType->kind == 2))
+{
+struct Type * type = (type = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type), type->kind = 3, type->isSigned = 1, type->refCount = 1, type->signedBeforePromotion = exp->__anon1.op.exp2->expType->isSigned, type->bitMemberSize = exp->__anon1.op.exp2->expType->bitMemberSize, type->promotedFrom = exp->__anon1.op.exp2->expType->kind, type);
+
+FreeType(exp->__anon1.op.exp2->expType);
+exp->__anon1.op.exp2->expType = type;
+}
+}
if(assign && type1 && type1->kind == 13 && exp->__anon1.op.exp2->expType)
{
if(exp->__anon1.op.exp2->expType->kind == 23 || exp->__anon1.op.exp2->expType->kind == 22 || exp->__anon1.op.exp2->expType->kind == 4 || exp->__anon1.op.exp2->expType->kind == 3 || exp->__anon1.op.exp2->expType->kind == 2 || exp->__anon1.op.exp2->expType->kind == 1)
}
else if(exp->__anon1.op.op == '&' && !exp->__anon1.op.exp1)
exp->expType = Reference(type2);
+else if(exp->__anon1.op.op == LEFT_OP || exp->__anon1.op.op == RIGHT_OP)
+{
+if(exp->__anon1.op.exp1->expType)
+{
+exp->expType = exp->__anon1.op.exp1->expType;
+exp->expType->refCount++;
+}
+}
else if(!assign)
{
if(boolOps)
member->dataType = ProcessTypeString(member->dataTypeString, 0);
FinishTemplatesContext(context);
}
+if(exp->__anon1.member.exp->expType->kind == 8 && exp->__anon1.member.exp->expType->__anon1._class && exp->__anon1.member.exp->expType->__anon1._class->__anon1.registered && exp->__anon1.member.exp->expType->__anon1._class->__anon1.registered->type == 2)
+member->dataType->bitMemberSize = ((struct __ecereNameSpace__ecere__com__BitMember *)member)->size;
exp->expType = member->dataType;
if(member->dataType)
member->dataType->refCount++;
;
else
{
+struct Expression * nbExp = GetNonBracketsExp(exp);
+unsigned int skipWarning = 0;
+int kind = exp->destType->kind;
+
+if((kind == 1 || kind == 2) && exp->destType->isSigned == exp->expType->signedBeforePromotion && nbExp->type == 4 && nbExp->__anon1.op.exp1 && nbExp->__anon1.op.exp2)
+{
+int op = nbExp->__anon1.op.op;
+struct Expression * nbExp1, * nbExp2;
+int from;
+
+switch(op)
+{
+case '%':
+case '/':
+nbExp1 = GetNonBracketsExp(nbExp->__anon1.op.exp1);
+from = nbExp1->expType->promotedFrom;
+if(from == 1 || (kind == 2 && from == 2))
+skipWarning = 1;
+break;
+case LEFT_OP:
+case RIGHT_OP:
+nbExp1 = GetNonBracketsExp(nbExp->__anon1.op.exp1);
+nbExp2 = GetNonBracketsExp(nbExp->__anon1.op.exp2);
+from = nbExp1->expType->promotedFrom;
+if(op == RIGHT_OP && (from == 1 || (kind == 2 && from == 2)))
+skipWarning = 1;
+else if(nbExp2->isConstant && nbExp2->type == 2 && (nbExp->__anon1.op.op == RIGHT_OP || nbExp1->expType->bitMemberSize))
+{
+int n = strtol(nbExp2->__anon1.__anon1.constant, (((void *)0)), 0);
+int s = from == 1 ? 8 : 16;
+
+if(nbExp1->expType->bitMemberSize && nbExp1->expType->bitMemberSize < s)
+s = nbExp1->expType->bitMemberSize;
+if(nbExp->__anon1.op.op == RIGHT_OP)
+s -= n;
+else
+s += n;
+if(s <= (kind == 1 ? 8 : 16))
+skipWarning = 1;
+}
+break;
+case '-':
+if(!exp->destType->isSigned)
+{
+struct Expression * nbExp1 = GetNonBracketsExp(nbExp->__anon1.op.exp1);
+struct Expression * nbExp2 = GetNonBracketsExp(nbExp->__anon1.op.exp2);
+int from = nbExp2->expType->promotedFrom;
+
+if((from == 1 || from == 2) && nbExp1->isConstant && nbExp1->type == 2)
+{
+int n = strtol(nbExp1->__anon1.__anon1.constant, (((void *)0)), 0);
+
+if(n == (from == 1 ? 255 : 65535))
+skipWarning = 1;
+}
+}
+break;
+}
+}
+if(!skipWarning)
+{
char expString[10240];
expString[0] = '\0';
else
Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "incompatible expression %s (%s); expected %s\n", (((void *)0))), expString, type1, type2);
}
+}
if(!inCompiler)
{
FreeType(exp->expType);
}
strcpy(className, "__ecereClass_");
FullClassNameCat(className, _class->fullName, 1);
-structName[0] = (char)0;
+structName[0] = 0;
FullClassNameCat(structName, _class->fullName, 0);
funcDecl = GetFuncDecl(function->declarator);
if(funcDecl)
char * name;
char * typeName;
struct __ecereNameSpace__ecere__com__Class * thisClassFrom;
+int promotedFrom;
int classObjectType;
int alignment;
unsigned int offset;
int bitFieldCount;
int count;
+int bitMemberSize;
unsigned int isSigned : 1;
unsigned int constant : 1;
unsigned int truth : 1;
unsigned int casted : 1;
unsigned int pointerAlignment : 1;
unsigned int isLong : 1;
+unsigned int signedBeforePromotion : 1;
} ecere_gcc_struct;
extern void ProcessMethodType(struct __ecereNameSpace__ecere__com__Method * method);
{
char className[1024];
-className[0] = (char)0;
+className[0] = 0;
decl->type = 1;
decl->__anon1.__anon1.specifiers = MkList();
decl->__anon1.__anon1.declarators = MkList();
char * name;
char * typeName;
struct __ecereNameSpace__ecere__com__Class * thisClassFrom;
+int promotedFrom;
int classObjectType;
int alignment;
unsigned int offset;
int bitFieldCount;
int count;
+int bitMemberSize;
unsigned int isSigned : 1;
unsigned int constant : 1;
unsigned int truth : 1;
unsigned int casted : 1;
unsigned int pointerAlignment : 1;
unsigned int isLong : 1;
+unsigned int signedBeforePromotion : 1;
} ecere_gcc_struct;
struct Specifier
struct __ecereNameSpace__ecere__com__Class * regClass = (type && type->kind == 8 && type->__anon1._class) ? type->__anon1._class->__anon1.registered : (((void *)0));
struct __ecereNameSpace__ecere__com__Class * cl = argClass ? argClass : regClass;
-className[0] = (char)0;
+className[0] = 0;
if(memberExp->__anon1.member.exp && memberExp->__anon1.member.exp->expType && memberExp->__anon1.member.exp->expType->classObjectType == 2)
strcpy(className, "class");
else if(cl)
struct __ecereNameSpace__ecere__sys__OldList * specs = MkList(), * decls = MkList();
struct Expression * tempExp;
-className[0] = (char)0;
+className[0] = 0;
FullClassNameCat(className, propertyClass->fullName, 0);
DeclareStruct(curExternal, propertyClass->fullName, 0, 1);
ListAdd(specs, MkStructOrUnion(3, MkIdentifier(className), (((void *)0))));
struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
struct Declarator * decl;
-typeString[0] = (char)0;
+typeString[0] = 0;
PrintType(exp->expType, typeString, 0, 0);
decl = SpecDeclFromString(typeString, specs, (((void *)0)));
exp->__anon1.cast.typeName = MkTypeName(specs, decl);
member->_class->symbol = FindClass(member->_class->fullName);
DeclareClass(curExternal, member->_class->symbol, className);
DeclareStruct(curExternal, member->_class->fullName, 0, 1);
-structName[0] = (char)0;
+structName[0] = 0;
FullClassNameCat(structName, member->_class->fullName, 0);
checkedExp = exp->__anon1.member.exp;
while(((checkedExp->type == 5 || checkedExp->type == 32) && checkedExp->__anon1.list && (*checkedExp->__anon1.list).count == 1) || checkedExp->type == 11)
ch = '_';
newID[len++] = ch;
}
-newID[len] = (char)0;
+newID[len] = 0;
(__ecereNameSpace__ecere__com__eSystem_Delete(id->string), id->string = 0);
id->string = __ecereNameSpace__ecere__sys__CopyString(newID);
}
char * name;
char * typeName;
struct __ecereNameSpace__ecere__com__Class * thisClassFrom;
+int promotedFrom;
int classObjectType;
int alignment;
unsigned int offset;
int bitFieldCount;
int count;
+int bitMemberSize;
unsigned int isSigned : 1;
unsigned int constant : 1;
unsigned int truth : 1;
unsigned int casted : 1;
unsigned int pointerAlignment : 1;
unsigned int isLong : 1;
+unsigned int signedBeforePromotion : 1;
} ecere_gcc_struct;
unsigned int IsVoidPtrCast(struct TypeName * typeName)
{
char name[1024];
-name[0] = (char)0;
+name[0] = 0;
FullClassNameCat(name, _class->fullName, 0);
FreeSpecifierContents(spec);
spec->type = 3;
if(constant && constant[len - 1] == '.')
{
-constant[len - 1] = (char)0;
+constant[len - 1] = 0;
yyval.exp = MkExpMember(yyvsp[(1) - (2)].exp, yyvsp[(2) - (2)].id);
yyval.exp->loc = (yyloc);
}
if(yyn != -760)
{
yyn += 1;
-if(0 <= yyn && yyn <= 9157 && yycheck[yyn] == (short)1)
+if(0 <= yyn && yyn <= 9157 && yycheck[yyn] == 1)
{
yyn = yytable[yyn];
if(0 < yyn)
char * name;
char * typeName;
Class thisClassFrom;
+ TypeKind promotedFrom;
ClassObjectType classObjectType;
int alignment;
uint offset;
int bitFieldCount;
int count; // This is used to avoid outputting warnings when non-zero
+ int bitMemberSize;
bool isSigned:1;
bool constant:1;
bool casted:1;
bool pointerAlignment:1; // true if the alignment is the pointer size
bool isLong:1; // true if this is truly a long set as a int/int64 (need to improve long support)
+ bool signedBeforePromotion:1;
// bool wasThisClass:1;
// TODO: Add _Complex & _Imaginary support
// bool complex:1, imaginary:1;
{ \
t value2 = op2.m; \
exp.type = constantExp; \
- exp.string = p(value2 ? (op1.m o value2) : 0); \
+ exp.string = p(value2 ? ((t)(op1.m o value2)) : 0); \
if(!exp.expType) \
{ exp.expType = op1.type; if(op1.type) op1.type.refCount++; } \
return true; \
{ \
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; \
break;
}
case shortType:
- if(type.isSigned)
+ if(exp.constant[0] == '\'')
+ {
+ op.s = exp.constant[1];
+ op.ops = shortOps;
+ }
+ else if(type.isSigned)
{
op.s = (short)strtol(exp.constant, null, 0);
op.ops = shortOps;
break;
case intType:
case longType:
- if(type.isSigned)
+ if(exp.constant[0] == '\'')
+ {
+ op.i = exp.constant[1];
+ op.ops = intOps;
+ }
+ else if(type.isSigned)
{
op.i = (int)strtol(exp.constant, null, 0);
op.ops = intOps;
case LEFT_OP:
case RIGHT_OP:
- useSideType = true;
- useDestType = true;
+ // useSideType = true;
+ // useDestType = true;
break;
case '|':
FreeType(dummy);
exp.op.exp1.destType = null;
}
+
+ if(exp.op.exp2)
+ {
+ if(exp.op.exp1.expType && (exp.op.exp1.expType.kind == charType || exp.op.exp1.expType.kind == shortType))
+ {
+ Type type { kind = intType, isSigned = true, refCount = 1, signedBeforePromotion = exp.op.exp1.expType.isSigned, bitMemberSize = exp.op.exp1.expType.bitMemberSize, promotedFrom = exp.op.exp1.expType.kind };
+ FreeType(exp.op.exp1.expType);
+ exp.op.exp1.expType = type;
+ }
+ }
+
type1 = exp.op.exp1.expType;
}
exp.op.exp2.opDestType = false;
if(exp.op.exp2.destType && exp.op.op != '=') exp.op.exp2.destType.count--;
+ if(exp.op.exp1 || exp.op.op == '~')
+ {
+ if(exp.op.exp2.expType && (exp.op.exp2.expType.kind == charType || exp.op.exp2.expType.kind == shortType))
+ {
+ Type type { kind = intType, isSigned = true, refCount = 1, signedBeforePromotion = exp.op.exp2.expType.isSigned, bitMemberSize = exp.op.exp2.expType.bitMemberSize, promotedFrom = exp.op.exp2.expType.kind };
+ FreeType(exp.op.exp2.expType);
+ exp.op.exp2.expType = type;
+ }
+ }
+
if(assign && type1 && type1.kind == pointerType && exp.op.exp2.expType)
{
if(exp.op.exp2.expType.kind == intSizeType || exp.op.exp2.expType.kind == intPtrType || exp.op.exp2.expType.kind == int64Type || exp.op.exp2.expType.kind == intType || exp.op.exp2.expType.kind == shortType || exp.op.exp2.expType.kind == charType)
}
else if(exp.op.op == '&' && !exp.op.exp1)
exp.expType = Reference(type2);
+ else if(exp.op.op == LEFT_OP || exp.op.op == RIGHT_OP)
+ {
+ if(exp.op.exp1.expType)
+ {
+ exp.expType = exp.op.exp1.expType;
+ exp.expType.refCount++;
+ }
+ }
else if(!assign)
{
if(boolOps)
member.dataType = ProcessTypeString(member.dataTypeString, false);
FinishTemplatesContext(context);
}
+ if(exp.member.exp.expType.kind == classType && exp.member.exp.expType._class && exp.member.exp.expType._class.registered && exp.member.exp.expType._class.registered.type == bitClass)
+ member.dataType.bitMemberSize = ((BitMember)member).size;
exp.expType = member.dataType;
if(member.dataType) member.dataType.refCount++;
}
(exp.expType.kind != classType || exp.expType.classObjectType || (exp.expType._class && exp.expType._class.registered && exp.expType._class.registered.type != structClass)));
else
{
- char expString[10240];
- expString[0] = '\0';
- if(inCompiler) { PrintExpression(exp, expString); ChangeCh(expString, '\n', ' '); }
+ Expression nbExp = GetNonBracketsExp(exp);
+ bool skipWarning = false;
+ TypeKind kind = exp.destType.kind;
+ if((kind == charType || kind == shortType) && exp.destType.isSigned == exp.expType.signedBeforePromotion && nbExp.type == opExp && nbExp.op.exp1 && nbExp.op.exp2)
+ {
+ int op = nbExp.op.op;
+ Expression nbExp1, nbExp2;
+ TypeKind from;
+
+ switch(op)
+ {
+ case '%': case '/':
+ nbExp1 = GetNonBracketsExp(nbExp.op.exp1);
+ from = nbExp1.expType.promotedFrom;
+ // Division and Modulo will not take more room than type before promotion
+ if(from == charType || (kind == shortType && from == shortType))
+ skipWarning = true;
+ break;
+ // Left shift
+ case LEFT_OP: case RIGHT_OP:
+ nbExp1 = GetNonBracketsExp(nbExp.op.exp1);
+ nbExp2 = GetNonBracketsExp(nbExp.op.exp2);
+ from = nbExp1.expType.promotedFrom;
+ // Right shift will not take more room than type before promotion
+ if(op == RIGHT_OP && (from == charType || (kind == shortType && from == shortType)))
+ skipWarning = true;
+ else if(nbExp2.isConstant && nbExp2.type == constantExp && (nbExp.op.op == RIGHT_OP || nbExp1.expType.bitMemberSize))
+ {
+ int n = (int)strtol(nbExp2.constant, null, 0);
+ int s = from == charType ? 8 : 16;
+ // Left shifting a bit member constrained in size may still fit in type before promotion
+ if(nbExp1.expType.bitMemberSize && nbExp1.expType.bitMemberSize < s)
+ s = nbExp1.expType.bitMemberSize;
+
+ // If right shifted enough things will fit in smaller type
+ if(nbExp.op.op == RIGHT_OP)
+ s -= n;
+ else
+ s += n;
+ if(s <= (kind == charType ? 8 : 16))
+ skipWarning = true;
+ }
+ break;
+ case '-':
+ if(!exp.destType.isSigned)
+ {
+ Expression nbExp1 = GetNonBracketsExp(nbExp.op.exp1);
+ Expression nbExp2 = GetNonBracketsExp(nbExp.op.exp2);
+ TypeKind from = nbExp2.expType.promotedFrom;
+ // Max value of unsigned type before promotion minus the same will always fit
+ if((from == charType || from == shortType) && nbExp1.isConstant && nbExp1.type == constantExp)
+ {
+ int n = (int)strtol(nbExp1.constant, null, 0);
+ if(n == (from == charType ? 255 : 65535))
+ skipWarning = true;
+ }
+ }
+ break;
+ }
+ }
+
+ if(!skipWarning)
+ {
+ char expString[10240];
+ expString[0] = '\0';
+ if(inCompiler) { PrintExpression(exp, expString); ChangeCh(expString, '\n', ' '); }
#ifdef _DEBUG
- CheckExpressionType(exp, exp.destType, false, true);
+ CheckExpressionType(exp, exp.destType, false, true);
#endif
- // Flex & Bison generate code that triggers this, so we ignore it for a quiet sdk build:
- if(!sourceFile || (!strstr(sourceFile, "src\\lexer.ec") && !strstr(sourceFile, "src/lexer.ec") &&
- !strstr(sourceFile, "src\\grammar.ec") && !strstr(sourceFile, "src/grammar.ec") &&
- !strstr(sourceFile, "src\\type.ec") && !strstr(sourceFile, "src/type.ec") &&
- !strstr(sourceFile, "src\\expression.ec") && !strstr(sourceFile, "src/expression.ec")))
- {
- if(invalidCast)
- Compiler_Error($"incompatible expression %s (%s); expected %s\n", expString, type1, type2);
- else
- Compiler_Warning($"incompatible expression %s (%s); expected %s\n", expString, type1, type2);
+
+ // Flex & Bison generate code that triggers this, so we ignore it for a quiet sdk build:
+ if(!sourceFile || (!strstr(sourceFile, "src\\lexer.ec") && !strstr(sourceFile, "src/lexer.ec") &&
+ !strstr(sourceFile, "src\\grammar.ec") && !strstr(sourceFile, "src/grammar.ec") &&
+ !strstr(sourceFile, "src\\type.ec") && !strstr(sourceFile, "src/type.ec") &&
+ !strstr(sourceFile, "src\\expression.ec") && !strstr(sourceFile, "src/expression.ec")))
+ {
+ if(invalidCast)
+ Compiler_Error($"incompatible expression %s (%s); expected %s\n", expString, type1, type2);
+ else
+ Compiler_Warning($"incompatible expression %s (%s); expected %s\n", expString, type1, type2);
+ }
}
// TO CHECK: FORCING HERE TO HELP DEBUGGER
if(_class.nameSpace)
{
BTNamedLink classLink = (BTNamedLink)_class.nameSpace->classes.FindString(_class.name);
- OldLink t;
- for(t = _class.templatized.first; t; t = t.next)
+ if(classLink)
{
- Class template = t.data;
- BTNamedLink link;
- link = (BTNamedLink)template.nameSpace->classes.FindString(template.name);
+ OldLink t;
+ for(t = _class.templatized.first; t; t = t.next)
+ {
+ Class template = t.data;
+ BTNamedLink link;
+ link = (BTNamedLink)template.nameSpace->classes.FindString(template.name);
- template.nameSpace->classes.Delete((BTNode)link);
- template.nameSpace = null;
+ template.nameSpace->classes.Delete((BTNode)link);
+ template.nameSpace = null;
+ }
+ _class.nameSpace->classes.Delete((BTNode)classLink);
}
- _class.nameSpace->classes.Delete((BTNode)classLink);
+#ifdef _DEBUG
+ else
+ {
+ printf("Warning: Could not find %s in namespace classes while destructing module %s\n", _class.name, module.name);
+ }
+#endif
_class.nameSpace = null;
}
_class.module = null;
if(codePoint > 0xFFFF)
{
uint16 lead = (uint16)(LEAD_OFFSET + (codePoint >> 10));
- uint16 trail = 0xDC00 + (uint16)(codePoint & 0x3FF);
+ uint16 trail = (uint16)(0xDC00 | (codePoint & 0x3FF));
if(d >= max - 1) break;
dest[d++] = lead;
dest[d++] = trail;
if(codePoint > 0xFFFF)
{
uint16 lead = (uint16)(LEAD_OFFSET + (codePoint >> 10));
- uint16 trail = 0xDC00 + (uint16)(codePoint & 0x3FF);
+ uint16 trail = (uint16)(0xDC00 | (codePoint & 0x3FF));
dest[d++] = lead;
dest[d++] = trail;
}
{
int c;
for(c = 0; c<256; c++)
- result[c] = ColorAlpha { 255, { palette[c*3]<<2, palette[c*3+1]<<2, palette[c*3+2]<<2 } };
+ result[c] = ColorAlpha { 255, { (byte)(palette[c*3]<<2), (byte)(palette[c*3+1]<<2), (byte)(palette[c*3+2]<<2) } };
}
}
delete f;
static define skinMainColor = Color { 0, 71, 128 };
static define skinBackground = Color { 255, 255, 255 };
static define skinTextColor = skinMainColor;
-static define skinInactiveTextColor = Color { skinMainColor.r - 20, skinMainColor.g - 20, skinMainColor.b - 20 };
+static define skinInactiveTextColor = Color { 0, 51, 108 };
#define CAPTION 14
#define NAME_OFFSET 2
if(codePoint > 0xFFFF)
{
uint16 lead = (uint16)(LEAD_OFFSET + (codePoint >> 10));
- uint16 trail = 0xDC00 + (uint16)(codePoint & 0x3FF);
+ uint16 trail = (uint16)(0xDC00 | (codePoint & 0x3FF));
dest[d++] = lead;
dest[d++] = trail;
if(codePoint > 0xFFFF)
{
uint16 lead = (uint16)(LEAD_OFFSET + (codePoint >> 10));
- uint16 trail = 0xDC00 + (uint16)(codePoint & 0x3FF);
+ uint16 trail = (uint16)(0xDC00 | (codePoint & 0x3FF));
if(d >= max - 1) break;
dest[d++] = lead;
dest[d++] = trail;