dict: lookups take a trie; a prefix search is its own function; no self-key rule

dictlookup took a Lang for two reasons that were not its business: to
know whether to walk below the key (the emoji dictionary) and to drop a
candidate equal to the key except there.  No dictionary lists its key
among its candidates — the rule was left from a first version that put
the reading first itself — so it goes, and the walk is dictprefix(),
called by the emoji search alone.
This commit is contained in:
2026-08-17 01:31:51 +09:00
parent 3d862bdc0d
commit 5faefd9a87
6 changed files with 59 additions and 51 deletions

3
fn.h
View File

@@ -21,7 +21,8 @@ int trielookup(Trie*, Str*, char**, int*);
Lang* getlang(int);
void langinit(char*);
int dictlookup(Lang*, Str*, Str*, int);
int dictlookup(Trie*, Str*, Str*, int);
int dictprefix(Trie*, Str*, Str*, int);
void drawthread(void*);
void popuparea(Area*, int, Area*, int, int, Area*);