Don't use "offset" as an identifier

This commit is contained in:
Jeff Epler 2022-11-09 07:57:36 -06:00
parent e5b83821f8
commit fb66a6bfe5
No known key found for this signature in database
GPG Key ID: D5BF15AB975AB4DE
2 changed files with 4 additions and 4 deletions

View File

@ -380,8 +380,8 @@ def compute_huffman_coding(translation_name, translations, f):
f.write("#define word_end {}\n".format(word_end))
f.write("#define minlen {}\n".format(minlen))
f.write("#define maxlen {}\n".format(maxlen))
f.write("#define offstart {}\n".format(offstart))
f.write("#define offset {}\n".format(offset))
f.write("#define translation_offstart {}\n".format(offstart))
f.write("#define translation_offset {}\n".format(offset))
return EncodingTable(values, lengths, words, canonical, extractor, apply_offset, remove_offset)

View File

@ -57,8 +57,8 @@ STATIC void get_word(int n, const mchar_t **pos, const mchar_t **end) {
}
STATIC int put_utf8(char *buf, int u) {
if (u >= offstart) {
u += offset;
if (u >= translation_offstart) {
u += translation_offset;
}
if (u <= 0x7f) {
*buf = u;