engine: look dictionaries up synchronously

The dictionary thread ran in imthread's own proc, so a lookup could
only start once the engine blocked, and it was a trie probe anyway; the
emoji and Hanja searches already called dictlookup directly. The
request/result channels, sequence numbers, staleness checks and the
second draw per Japanese key are gone; dictqjp fills the candidates
in place. Emit.dict and Lang.dictq only ever triggered lookups for
Vietnamese, which has no dictionary. dictlookup(Lang*, key, out, max)
returns the count. The Hanja lookup no longer pre-checks for a single
syllable; a reading either has an entry or it does not.
This commit is contained in:
2026-08-16 16:02:09 +09:00
parent ebcec3af6b
commit abaea77248
10 changed files with 123 additions and 473 deletions

3
fn.h
View File

@@ -20,8 +20,7 @@ int trielookup(Trie*, Str*, char**, int*);
Lang* getlang(int);
void langinit(char*);
void dictthread(void*);
void dictlookup(Dictreq*, Dictres*);
int dictlookup(Lang*, Str*, Str*, int);
void drawthread(void*);
void popuparea(Area*, int, Area*, int, int, Area*);