From 06582fa4a691da57ca3f54c0d64d8ae35b69ebf2 Mon Sep 17 00:00:00 2001 From: coah <100182500+coah80@users.noreply.github.com> Date: Fri, 2 Oct 2026 13:59:05 -0500 Subject: [PATCH] cleanup(eZiText): rename work unk_0x1A to separator Init to space (0x20); Matching zi8space emits it; zi8cgetc saves as separator. --- libs/RVLMiddleware/eZiText/include/zi8clib/zitypes.h | 2 +- libs/RVLMiddleware/eZiText/src/clib/zi8cgetc.c | 12 ++++++------ libs/RVLMiddleware/eZiText/src/clib/zi8initd.c | 2 +- libs/RVLMiddleware/eZiText/src/clib/zi8space.c | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/libs/RVLMiddleware/eZiText/include/zi8clib/zitypes.h b/libs/RVLMiddleware/eZiText/include/zi8clib/zitypes.h index e4bf1bba..29706709 100644 --- a/libs/RVLMiddleware/eZiText/include/zi8clib/zitypes.h +++ b/libs/RVLMiddleware/eZiText/include/zi8clib/zitypes.h @@ -219,7 +219,7 @@ struct __zi8_work_data_s { ziU8 unk_0x17; ziU8 subLanguage; // 0x18 ziU8 unk_0x19; - ziU16 unk_0x1A; + ziU16 separator; // 0x1A ziU8 unk_0x1C[3]; ziU8 unk_0x1F; ziU16 unk_0x20[0x40]; diff --git a/libs/RVLMiddleware/eZiText/src/clib/zi8cgetc.c b/libs/RVLMiddleware/eZiText/src/clib/zi8cgetc.c index f72e5f87..957856d7 100644 --- a/libs/RVLMiddleware/eZiText/src/clib/zi8cgetc.c +++ b/libs/RVLMiddleware/eZiText/src/clib/zi8cgetc.c @@ -18,7 +18,7 @@ static Zi8UInt Zi8SetFindCand(ziU8* foundCandidates, Zi8UInt ordinal, ziPtr work } ziWChar* ZiGetNextPhonetic(ziWChar* spelling, ziWChar* end ZI_NEED_WORK) { - while (*spelling && *spelling != ZI_WORK->unk_0x1A && *spelling != 0xF360 && spelling < end) { + while (*spelling && *spelling != ZI_WORK->separator && *spelling != 0xF360 && spelling < end) { ++spelling; } if (!*spelling || spelling == end) { @@ -37,8 +37,8 @@ int ZiPartialMatch(ziWChar* spelling, ziWChar* spellingEnd, if (spelling == spellingEnd || candidate == candidateEnd || !*spelling || !*candidate) { return 1; } - while (*spelling != ZI_WORK->unk_0x1A && *spelling != 0xF360) { - if (*candidate == ZI_WORK->unk_0x1A || *candidate == 0xF360) { + while (*spelling != ZI_WORK->separator && *spelling != 0xF360) { + if (*candidate == ZI_WORK->separator || *candidate == 0xF360) { break; } if (*spelling != *candidate) { @@ -2868,7 +2868,7 @@ ziU8 Zi8GetElementCount(ziWChar* elements, ziU8 elementCount, ziU8 charCount ZI_ ziU8 count; ziWChar spacedElements[256]; struct { ziWChar separator; } savedState; - savedState.separator = ZI_WORK->unk_0x1A; + savedState.separator = ZI_WORK->separator; if (elementCount <= 1 || !charCount) { return elementCount; } @@ -2881,9 +2881,9 @@ ziU8 Zi8GetElementCount(ziWChar* elements, ziU8 elementCount, ziU8 charCount ZI_ if (spacedIndex == elementCount) { return elementCount; } - ZI_WORK->unk_0x1A = 0xF360; + ZI_WORK->separator = 0xF360; Zi8ZHaddSpace(elements, elementCount, spacedElements, 256, __zi8_work_data); - ZI_WORK->unk_0x1A = savedState.separator; + ZI_WORK->separator = savedState.separator; spacedIndex = elementIndex = count = 0; while (charCount && elementIndex < elementCount) { if (spacedElements[spacedIndex] == 0xF360) { diff --git a/libs/RVLMiddleware/eZiText/src/clib/zi8initd.c b/libs/RVLMiddleware/eZiText/src/clib/zi8initd.c index dae27d7e..37ac1de7 100644 --- a/libs/RVLMiddleware/eZiText/src/clib/zi8initd.c +++ b/libs/RVLMiddleware/eZiText/src/clib/zi8initd.c @@ -21,7 +21,7 @@ ziU8 Zi8InitializeDynamic(ziLanguageEntry* langEntries ZI_NEED_WORK) { ZI_WORK->unk_0x0A = 0xFF; ZI_WORK->unk_0x10 = 0x64; *(ziU16*)&ZI_WORK->unk_0x0C = 0xFFFF; - ZI_WORK->unk_0x1A = 0x20; + ZI_WORK->separator = 0x20; ZI_WORK->unk_0x1C[2] = 0; ZI_WORK->unk_0x1B30 = 0; ZI_WORK->unk_0x1B3A = 0; diff --git a/libs/RVLMiddleware/eZiText/src/clib/zi8space.c b/libs/RVLMiddleware/eZiText/src/clib/zi8space.c index 07902a35..eb8e03d3 100644 --- a/libs/RVLMiddleware/eZiText/src/clib/zi8space.c +++ b/libs/RVLMiddleware/eZiText/src/clib/zi8space.c @@ -68,7 +68,7 @@ ziU8 Zi8ZHaddSpace(ziWChar* src, ziU8 count, ziWChar* dst, } if (pdst[k - 1] != 0xF360 && (pdst[k - 1] < 0xF331 || pdst[k - 1] > 0xF335)) { - pdst[k++] = ZI_WORK->unk_0x1A; + pdst[k++] = ZI_WORK->separator; } psrc += i; n -= i; -- 2.49.1