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 *);
112 void runescpy(Rune*, Rune*);
115 long oednextoff(long);
116 void oedprintentry(Entry, int);
117 void oedprintkey(void);
118 long ahdnextoff(long);
119 void ahdprintentry(Entry, int);
120 void ahdprintkey(void);
121 long pcollnextoff(long);
122 void pcollprintentry(Entry, int);
123 void pcollprintkey(void);
124 long pcollgnextoff(long);
125 void pcollgprintentry(Entry, int);
126 void pcollgprintkey(void);
127 long movienextoff(long);
128 void movieprintentry(Entry, int);
129 void movieprintkey(void);
130 long pgwnextoff(long);
131 void pgwprintentry(Entry,int);
132 void pgwprintkey(void);
133 long slangnextoff(long);
134 void slangprintentry(Entry, int);
135 void slangprintkey(void);
136 long robertnextoff(long);
137 void robertindexentry(Entry, int);
138 void robertprintkey(void);
139 long robertnextflex(long);
140 void robertflexentry(Entry, int);
141 long simplenextoff(long);
142 void simpleprintentry(Entry, int);
143 void simpleprintkey(void);
144 long thesnextoff(long);
145 void thesprintentry(Entry, int);
146 void thesprintkey(void);
147 long worldnextoff(long);
148 void worldprintentry(Entry, int);
149 void worldprintkey(void);
151 extern Biobuf *bdict;
155 extern int outinhibit;
157 extern Rune multitab[][5];
160 #define asize(a) (sizeof (a)/sizeof(a[0]))