#include "a.h" /* * Translate troff to Unicode by looking in troff's utfmap. * This way we don't have yet another hard-coded table. */ typedef struct Trtab Trtab; struct Trtab { char t[UTFmax]; Rune r; }; static Trtab trtab[200]; int ntrtab; static Trtab trinit[] = { "pl", Upl, "eq", Ueq, "em", 0x2014, "en", 0x2013, "mi", Umi, "fm", 0x2032, }; Rune troff2rune(Rune *rs) { char *file, *f[10], *p, s[3]; int i, nf; Biobuf *b; if(rs[0] >= Runeself || rs[1] >= Runeself) return Runeerror; s[0] = rs[0]; s[1] = rs[1]; s[2] = 0; if(ntrtab == 0){ for(i=0; i= nelem(trtab)) fprint(2, "%s: trtab too small\n", argv0); } for(i=0; i