Added -nocontentid (and -contentid, for symmetry) switch to mhbuild. This allows...
[mmh] / h / dropsbr.h
1
2 /*
3  * dropsbr.h -- definitions for maildrop-style files
4  *
5  * $Id$
6  */
7
8 /*
9  * A file which is formatted like a maildrop may have a corresponding map
10  * file which is an index to the bounds of each message.  The first record
11  * of such an map is special, it contains:
12  *
13  *      d_id    = number of messages in file
14  *      d_size  = version number of map
15  *      d_start = last message read
16  *      d_stop  = size of file
17  *
18  *  Each record after that contains:
19  *
20  *      d_id    = BBoard-ID: of message, or similar info
21  *      d_size  = size of message in ARPA Internet octets (\n == 2 octets)
22  *      d_start = starting position of message in file
23  *      d_stop  = stopping position of message in file
24  *
25  * Note that d_start/d_stop do NOT include the message delimiters, so
26  * programs using the map can simply fseek to d_start and keep reading
27  * until the position is at d_stop.
28  */
29
30 /*
31  * various formats for maildrop files
32  */
33 #define OTHER_FORMAT 0
34 #define MBOX_FORMAT  1
35 #define MMDF_FORMAT  2
36
37 #define DRVRSN 3
38
39 struct drop {
40     int   d_id;
41     int   d_size;
42     off_t d_start;
43     off_t d_stop;
44 };
45
46 /*
47  * prototypes
48  */
49 int mbx_open (char *, int, uid_t, gid_t, mode_t);
50 int mbx_read (FILE *, long, struct drop **, int);
51 int mbx_write(char *, int, FILE *, int, long, long, off_t, int, int);
52 int mbx_copy (char *, int, int, int, int, char *, int);
53 int mbx_size (int, off_t, off_t);
54 int mbx_close (char *, int);
55 char *map_name (char *);
56 int map_read (char *, long, struct drop **, int);
57 int map_write (char *, int, int, long, off_t, off_t, long, int, int);
58 int map_chk (char *, int, struct drop *, long, int);
59