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";