mkemoji wrote a row for every prefix of every alias, so that a query matched as it was typed; the trie is a prefix index already, and with a real emoji list those rows would be four times the aliases themselves. Now emoji.dict has one row per alias, trienode() names a key's node, and dictlookup walks the entries at and below it, the key's own first, up to Maxkouho. Trie children are appended rather than pushed, so the walk keeps the file's order and a bare digit still picks the superscript or subscript it always did. The hand-written symbol rows move to symbol.src; emoji.src is left to the emoji. mkemoji reads both by default, or the files it is given.
54 lines
1.2 KiB
C
54 lines
1.2 KiB
C
void die(char*, ...);
|
|
|
|
int sinit(Str*, char*, int);
|
|
void sclear(Str*);
|
|
void sputr(Str*, Rune);
|
|
void spopr(Str*);
|
|
void sappend(Str*, Str*);
|
|
int scmp(Str*, Str*);
|
|
int stoutf(Str*, char*, int);
|
|
Rune slastr(Str*);
|
|
|
|
int mapget(Trie*, Str*, Str*);
|
|
|
|
Trie* trienew(void);
|
|
void trieput(Trie*, char*, int, char*, int);
|
|
Trie* trieopen(char*);
|
|
void trieclose(Trie*);
|
|
int trienode(Trie*, Str*);
|
|
int trielookup(Trie*, Str*, char**, int*);
|
|
|
|
Lang* getlang(int);
|
|
void langinit(char*);
|
|
|
|
int dictlookup(Lang*, Str*, Str*, int);
|
|
|
|
void drawthread(void*);
|
|
void popuparea(Area*, int, Area*, int, int, Area*);
|
|
void popupposition(Caret*, int, int, Area*, int, int, int*, int*);
|
|
int pagemarker(char*, int, int, int, int);
|
|
void popuplayout(Drawcmd*, int, int, Popup*);
|
|
void popupdraw(u32int*, Drawcmd*, Popup*);
|
|
void imthread(void*);
|
|
void impre(Im*, Str*);
|
|
void transstr(Lang*, Str*, Str*);
|
|
Emit transmap(Im*, Rune);
|
|
Emit transko(Im*, Rune);
|
|
Emit transvi(Im*, Rune);
|
|
void backko(Im*);
|
|
void backvi(Im*);
|
|
|
|
void srvinit(void);
|
|
void srvthread(void*);
|
|
void ibusthread(void*);
|
|
void ximthread(void*);
|
|
int keymeaningful(u32int);
|
|
|
|
void* emalloc(ulong);
|
|
void* erealloc(void*, ulong);
|
|
|
|
int textinit(void);
|
|
void textclose(void);
|
|
int textwidth(Str*);
|
|
void textdraw(u32int*, int, int, int, int, int, u32int, Str*);
|