aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/upas/nfs/sx.h
blob: 38a801d45ba3115a0dc70b8e5f23e12b5d821356 (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
/*
 * S-expressions as used by IMAP.
 */

enum
{
	SxUnknown = 0,
	SxAtom,
	SxString,
	SxNumber,
	SxList
};

typedef struct Sx Sx;
struct Sx
{
	int type;
	char *data;
	int ndata;
	vlong number;
	Sx **sx;
	int nsx;
};

Sx*	Brdsx(Biobuf*);
Sx*	Brdsx1(Biobuf*);
void	freesx(Sx*);
int	oksx(Sx*);
int	sxfmt(Fmt*);
int	sxwalk(Sx*);