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:
3
fn.h
3
fn.h
@@ -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*);
|
||||
|
||||
Reference in New Issue
Block a user