1 /* Runes for special purposes (0xe800-0xfdff is Private Use Area) */
2 enum { NONE=0xe800, /* Emit nothing */
3 TAGS, /* Start of tag */
5 SPCS, /* Start of special character name */
6 PAR, /* Newline, indent */
7 LIGS, /* Start of ligature codes */
8 LACU=LIGS, /* Acute (´) ligatures */
9 LGRV, /* Grave (ˋ) ligatures */
10 LUML, /* Umlaut (¨) ligatures */
11 LCED, /* Cedilla (¸) ligatures */
12 LTIL, /* Tilde (˜) ligatures */
13 LBRV, /* Breve (˘) ligatures */
14 LRNG, /* Ring (˚) ligatures */
15 LDOT, /* Dot (˙) ligatures */
16 LDTB, /* Dot below (.) ligatures */
17 LFRN, /* Frown (⌢) ligatures */
18 LFRB, /* Frown below (̯) ligatures */
19 LOGO, /* Ogonek (˛) ligatures */
20 LMAC, /* Macron (¯) ligatures */
21 LHCK, /* Hacek (ˇ) ligatures */
22 LASP, /* Asper (ʽ) ligatures */
23 LLEN, /* Lenis (ʼ) ligatures */
24 LBRB, /* Breve below (̮) ligatures */
25 LIGE, /* End of ligature codes */
26 MULTI, /* Start of multi-rune codes */
47 MLLS, /* ll with swing */
61 MULTIE, /* End of multi-rune codes */
63 #define Nligs (LIGE-LIGS)
64 #define Nmulti (MULTIE-MULTI)
66 typedef struct Entry Entry;
67 typedef struct Assoc Assoc;
68 typedef struct Nassoc Nassoc;
69 typedef struct Dict Dict;
72 char *start; /* entry starts at start */
73 char *end; /* and finishes just before end */
74 long doff; /* dictionary offset (for debugging) */
88 char *name; /* dictionary name */
89 char *desc; /* description */
90 char *path; /* path to dictionary data */
91 char *indexpath; /* path to index data */
92 long (*nextoff)(long); /* function to find next entry offset from arg */
93 void (*printentry)(Entry, int); /* function to print entry */
94 void (*printkey)(void); /* function to print pronunciation key */
97 int acomp(Rune*, Rune*);
98 Rune *changett(Rune *, Rune *, int);
101 void foldre(char*, char*);
102 Rune liglookup(Rune, Rune);
103 long lookassoc(Assoc*, int, char*);
104 long looknassoc(Nassoc*, int, long);
105 void outprint(char*, ...);
107 void outrunes(Rune *);
109 void outchars(char *);
111 void outpiece(char *, char *);
114 long oednextoff(long);
115 void oedprintentry(Entry, int);
116 void oedprintkey(void);
117 long ahdnextoff(long);
118 void ahdprintentry(Entry, int);
119 void ahdprintkey(void);
120 long pcollnextoff(long);
121 void pcollprintentry(Entry, int);
122 void pcollprintkey(void);
123 long pcollgnextoff(long);
124 void pcollgprintentry(Entry, int);
125 void pcollgprintkey(void);
126 long movienextoff(long);
127 void movieprintentry(Entry, int);
128 void movieprintkey(void);
129 long pgwnextoff(long);
130 void pgwprintentry(Entry,int);
131 void pgwprintkey(void);
132 void rogetprintentry(Entry, int);
133 long rogetnextoff(long);
134 void rogetprintkey(void);
135 long slangnextoff(long);
136 void slangprintentry(Entry, int);
137 void slangprintkey(void);
138 long robertnextoff(long);
139 void robertindexentry(Entry, int);
140 void robertprintkey(void);
141 long robertnextflex(long);
142 void robertflexentry(Entry, int);
143 long simplenextoff(long);
144 void simpleprintentry(Entry, int);
145 void simpleprintkey(void);
146 long thesnextoff(long);
147 void thesprintentry(Entry, int);
148 void thesprintkey(void);
149 long worldnextoff(long);
150 void worldprintentry(Entry, int);
151 void worldprintkey(void);
153 extern Biobuf *bdict;
157 extern int outinhibit;
159 extern Rune *multitab[];
162 #define asize(a) (sizeof (a)/sizeof(a[0]))