'S', 0213, 0342, 0,
'R', 0224, 0362, 0,
'B', 0212, 0160, 0,
- 'N', 0225, 0340, 0,
+ 'N', 0214, 0152, 0,
'L', 0215, 0201, 0,
- 'P', 0214, 0152, 0,
- 'r', 0224, 0156, 0,
- 'b', 0227, 0264, 0,
+ 'P', 0225, 0340, 0,
+ 'r', 0227, 0264, 0,
+ 'b', 0224, 0156, 0,
'p', 0202, 0306, 0,
'r', 0227, 0263, 0,
'+', 0220, 0254, 0,
int i;
if((*q & 0x80) == 0) return 0; // plain ASCII, refuse to parse
-fprintf(debugFP, "kanji %03o %03o\n", *q, q[1]);
if((**p & 0xC0) == 0x80) { // this is an illegal starting code in utf-8, so assume shift-JIS
for(i=start+JIS; kanjiTab[i]; i+=4) {
if(q[0] == kanjiTab[i+1] && q[1] == kanjiTab[i+2]) {
commentEnd = *p; if(i) return Comment; // return comment that runs to EOF immediately
}
if(commentEnd) SkipWhite(p);
- if(lastChar == '\n' && kifu && **p == '*') { while(**p && **p != '\n') (*p)++; return Comment; } // .kif comment
+ if(kifu && **p == '*') { // .kif comment
+ char *q = yytext;
+ while(**p && **p != '\n') { if(q < yytext + 10*MSG_SIZ-3) *q++ = **p; (*p)++; }
+ parseStart = yytext; *yytext = '{'; strcpy(q, "}\n"); // wrap in braces
+ return Comment;
+ }
if(Match("*", p)) result = GameUnfinished;
else if(**p == '0') {
if( Match("0-1", p) || Match("0/1", p) || Match("0:1", p) ||