Pelles C forum
C language => Expert questions => Topic started by: TimoVJL on April 06, 2010, 10:15:43 AM
-
Problem with this partial code from TinyCC:
#include <stdio.h>
/* WARNING: the content of this string encodes token numbers */
static const unsigned char tok_two_chars[] =
"<=\236>=\235!=\225&&\240||\241++\244--\242==\224<<\1>>\2+=\253"
"-=\255*=\252/=\257%=\245&=\246^=\336|=\374->\313..\250##\266";
int main(int argc, char **argv)
{
int i;
for (i=0; i<sizeof(tok_two_chars); i+=3)
printf("%c%c %2X\n", tok_two_chars[i], tok_two_chars[i+1], tok_two_chars[i+2]);
}
/*
<= 9E
>= 9D
!= 95
&& A0
|| A1
++ A4
-- A2
== 94
<< 1
>> 2
+= AB
-= AD
*= AA
/= AF
%= A5
&= A6
^= DE
|= FC
-> CB
.. A8
## B6
% 63
*/
tok_two_chars_test.c(5): warning #2223: Unable to convert character '\u009e' to codepage 1252; using default character.
tok_two_chars_test.c(5): warning #2223: Unable to convert character '\u0095' to codepage 1252; using default character.
tok_two_chars_test.c(5): warning #2223: Unable to convert character '\u0094' to codepage 1252; using default character.
Portable way to handle that string:
static const unsigned char tok_two_chars[] =
"<=\x9E>=\x9D!=\x95&&\xA0||\xA1++\xA4--\xA2==\x94<<\x01>>\x02+=\xAB"
"-=\xAD*=\xAA/=\xAF%=\xA5&=\xA6^=\xDE|=\xFC->\xCB..\xA8##\xB6";
-
Witch version of TinyCC do you use (I get much more error messages with the version 9.25)?
Can you again post, what is necessary to compile TinyCC with Pelles C?
Have you also tried to compile TinyCC for PocketPC?
-
Witch version of TinyCC do you use (I get much more error messages with the version 9.25)?
Many of them. Now tcc version 0.9.25 ->
http://forum.pellesc.de/index.php?topic=2278.0
I use these defines now: -DNOTALLINONE -D__GNUC__ -DMSVC_COMP
Can you again post, what is necessary to compile TinyCC with Pelles C?
Just for debugging purboses.
Have you also tried to compile TinyCC for PocketPC?
Not recently, last time i failed to do that.
Tip:
//MsgBox.c
void _start(void)
{
MessageBoxA(0, "Test", "Test", 0);
ExitProcess(0);
}
With plain tcc.exe without any headers/libraries:
tcc.exe MsgBox.c -nostdlib -lkernel32 -luser32