9 DX, /* definition/example */
14 NU, /* sense number */
15 PR, /* pronunciation */
16 PS, /* grammar part */
17 XR, /* cross reference */
18 XX, /* cross reference (whole entry) */
21 /* Assoc tables must be sorted on first field */
23 static Assoc tagtab[] = {
36 static long sget(char *, char *, char **, char **);
37 static void soutpiece(char *, char *);
40 slangprintentry(Entry e, int cmd)
42 char *p, *pe, *vs, *ve;
48 t = sget(p, pe, &vs, &ve);
55 switch(sget(p, pe, &vs, &ve)) {
110 ve = pe; /* will end loop */
119 slangnextoff(long fromoff)
124 a = Bseek(bdict, fromoff, 0);
128 p = Brdline(bdict, '\n');
131 if(p[0] == 'm' && p[1] == 'e' && p[2] == ' ')
132 return (Boffset(bdict)-Blinelen(bdict));
140 Bprint(bout, "No key\n");
144 * Starting from b, find next line beginning with a tag.
145 * Don't go past e, but assume *e==0.
146 * Return tag value, or -1 if no more tags before e.
147 * Set pvb to beginning of value (after tag).
148 * Set pve to point at newline that ends the value.
151 sget(char *b, char *e, char **pvb, char **pve)
163 t = lookassoc(tagtab, asize(tagtab), buf);
166 err("tag %s\n", buf);
190 soutpiece(char *b, char *e)
199 if(!(c == ' ' && lastc == ' ') && c != '@')