add inc command to read new mails
[mailx.git] / mbox.h
blob79cb7db7d3ec2fd1c1a6714946e639b965f70588
1 #define MAXMAILS (1 << 14)
2 #define MAXHDRS (1 << 6)
3 #define MAXPATHLEN (1 << 12)
5 struct mail {
6 char *hdrs[MAXHDRS + 1];
7 int nhdrs;
8 char *head;
9 char *body;
10 char *subject;
11 int len;
12 int body_len;
15 struct mbox {
16 struct mail mails[MAXMAILS];
17 char path[MAXPATHLEN];
18 int n;
19 char *mbox;
20 int len;
21 int size;
22 int c;
25 struct mbox *mbox_alloc(char *filename);
26 void mbox_free(struct mbox *mbox);
27 void mbox_inc(struct mbox *mbox);
29 int mail_head(struct mail *mail, char *dst, int len, char **hdrs, int n);