]> git.lizzy.rs Git - plan9front.git/blob - sys/src/cmd/webfs/dat.h
cc: use 7 octal digits for 21 bit runes
[plan9front.git] / sys / src / cmd / webfs / dat.h
1 typedef struct Url Url;
2 typedef struct Buq Buq;
3 typedef struct Buf Buf;
4 typedef struct Key Key;
5
6 typedef struct {
7         char    *s1;
8         char    *s2;
9 } Str2;
10
11 /* 9p */
12 typedef struct Req Req;
13
14 struct Url
15 {
16         char    *scheme;
17         char    *user;
18         char    *pass;
19         char    *host;
20         char    *port;
21         char    *path;
22         char    *query;
23         char    *fragment;
24 };
25
26 struct Buf
27 {
28         Buf     *next;
29         uchar   *rp;
30         uchar   *ep;
31         Req     *wreq;
32         uchar   end[];
33 };
34
35 struct Key
36 {
37         Key     *next;
38         char    *val;
39         char    key[];
40 };
41
42 struct Buq
43 {
44         Ref;
45         QLock;
46
47         Url     *url;
48         Key     *hdr;
49         char    *error;
50
51         int     closed;
52         int     limit;
53         int     size;
54         int     nwq;
55
56         /* write buffers */
57         Buf     *bh;
58         Buf     **bt;
59
60         /* read requests */
61         Req     *rh;
62         Req     **rt;
63
64         Rendez  rz;
65 };
66
67 int     debug;
68 Url     *proxy;
69 int     timeout;
70 char    *whitespace;
71
72 enum {
73         Domlen = 256,
74 };