fix grapheme test to work on unmodified data file

This commit is contained in:
Steven G. Johnson
2020-03-29 08:53:11 -04:00
parent 7e834d7702
commit 11bb3d9dc7
3 changed files with 6 additions and 7 deletions

View File

@@ -18,12 +18,12 @@ int main(int argc, char **argv)
while (buf[bi]) {
bi = skipspaces(buf, bi);
if (buf[bi] == '/') { /* grapheme break */
if ((uint8_t)buf[bi] == 0xc3 && (uint8_t)buf[bi+1] == 0xb7) { /* U+00f7 = grapheme break */
src[si++] = '/';
bi++;
bi += 2;
}
else if (buf[bi] == '+') { /* no break */
bi++;
else if ((uint8_t)buf[bi] == 0xc3 && (uint8_t)buf[bi+1] == 0x97) { /* U+00d7 = no break */
bi += 2;
}
else if (buf[bi] == '#') { /* start of comments */
break;