File: hdr.h

package info (click to toggle)
abiword 0.7.7-1
  • links: PTS
  • area: main
  • in suites: potato
  • size: 20,604 kB
  • ctags: 18,358
  • sloc: cpp: 88,791; ansic: 66,296; sh: 7,777; makefile: 3,397; xml: 687; perl: 361; awk: 273; sed: 36; csh: 28
file content (46 lines) | stat: -rw-r--r-- 1,213 bytes parent folder | download | duplicates (12)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
extern int squawk;
extern int clean;
extern char *file;
extern int verbose;
extern long ninput, noutput, nrunes, nerrors;

enum { From = 1, Table = 2, Func = 4 };

typedef void (*Fnptr)(void);
struct convert{
	char *name;
	char *chatter;
	int flags;
	void *data;
	Fnptr fn;
};
extern struct convert convert[];
struct convert *conv(char *, int);
typedef void (*Infn)(int, long *, struct convert *);
typedef void (*Outfn)(Rune *, int, long *);
void outtable(Rune *, int, long *);

void utf_in(int, long *, struct convert *);
void utf_out(Rune *, int, long *);
void isoutf_in(int, long *, struct convert *);
void isoutf_out(Rune *, int, long *);

#define		N		10000		/* just blocking */
#define	OUT(out, r, n)	if(out->flags&Table) outtable(r, n, (long *)out->data);\
			else ((Outfn)(out->fn))(r, n, (long *)0)

extern Rune runes[N];
extern char obuf[UTFmax*N];	/* maximum bloat from N runes */

#define		BADMAP		(0xFFFD)
#define		BYTEBADMAP	('?')		/* badmap but has to fit in a byte */
#define		ESC		033

#ifdef	PLAN9
#define	EPR		fprint(2,
#define	EXIT(n,s)	exits(s)
#else
#define	EPR		fprintf(stderr,
#define	USED(x)		/* in plan 9, USED(x) tells the compiler to treat x as used */
#define	EXIT(n,s)	exit(n)
#endif