aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/htmlfmt/dat.h
blob: eb9d6fa03c8e6dcaad03d237d1591fb370cb86b2 (plain)
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
47
48
49
50
typedef struct Bytes Bytes;
typedef struct URLwin URLwin;

enum
{
	STACK		= 8192,
	EVENTSIZE	= 256
};

struct Bytes
{
	uchar	*b;
	long		n;
	long		nalloc;
};

struct URLwin
{
	int		infd;
	int		outfd;
	int		type;

	char		*url;
	Item		*items;
	Docinfo	*docinfo;
};

extern	char*	url;
extern	int		aflag;
extern	int		width;
extern	int		defcharset;

extern	char*	loadhtml(int);

extern	char*	readfile(char*, char*, int*);
extern	int	charset(char*);
extern	void*	emalloc(ulong);
extern	char*	estrdup(char*);
extern	char*	estrstrdup(char*, char*);
extern	char*	egrow(char*, char*, char*);
extern	char*	eappend(char*, char*, char*);
extern	void		error(char*, ...);

extern	void		growbytes(Bytes*, char*, long);

extern	void		rendertext(URLwin*, Bytes*);
extern	void		rerender(URLwin*);
extern	void		freeurlwin(URLwin*);

/* #pragma	varargck	argpos	error	1 */