5 extern long ninput, noutput, nrunes, nerrors;
7 enum { From = 1, Table = 2, Func = 4 };
9 typedef void (*Fnptr)(void);
17 extern struct convert convert[];
18 struct convert *conv(char *, int);
19 typedef void (*Infn)(int, long *, struct convert *);
20 typedef void (*Outfn)(Rune *, int, long *);
21 void outtable(Rune *, int, long *);
22 int fixsurrogate(Rune *rp, Rune r2);
24 void utf_in(int, long *, struct convert *);
25 void utf_out(Rune *, int, long *);
26 void isoutf_in(int, long *, struct convert *);
27 void isoutf_out(Rune *, int, long *);
29 #define N 10000 /* just blocking */
30 #define OUT(out, r, n) if(out->flags&Table) outtable(r, n, (long *)out->data);\
31 else ((Outfn)(out->fn))(r, n, (long *)0)
34 extern char obuf[UTFmax*N]; /* maximum bloat from N runes */
36 #define BADMAP (0xFFFD)
37 #define BYTEBADMAP ('?') /* badmap but has to fit in a byte */
40 void warn(char*, ...);