{
int n = 0;
if(!*escapes) return strlen(s);
- while(*s) n += (*s != '/' && *s != '-' && *s != '^' && *s != '*' && !strchr(escapes, *s)), s++;
+ while(*s) n += (*s != '/' && *s != '-' && *s != '^' && *s != '*' && !strchr(escapes, *s)) - 2*(*s == '='), s++;
return n;
}
table[i+offs] = map[j++];
if(p = strchr(escapes, map[j])) j++, table[i+offs] += 64*(p - escapes + 1);
if(c) partner[i+offs] = table[i+offs], table[i+offs] = c;
+ if(*escapes && map[j] == '=') pieceNickName[i+offs] = map[++j], j++;
}
table[(int) WhiteKing] = map[j++];
for( ii=offs=0; ii<NrPieces/2-1; ii++ ) {
table[i+offs] = map[j++];
if(p = strchr(escapes, map[j])) j++, table[i+offs] += 64*(p - escapes + 1);
if(c) partner[i+offs] = table[i+offs], table[i+offs] = c;
+ if(*escapes && map[j] == '=') pieceNickName[i+offs] = map[++j], j++;
}
table[(int) BlackKing] = map[j++];