source: trunk/third/nmh/h/dropsbr.h @ 12455

Revision 12455, 1.6 KB checked in by danw, 26 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r12454, which included commits to RCS files with non-trunk default branches.
Line 
1
2/*
3 * dropsbr.h -- definitions for maildrop-style files
4 *
5 * $Id: dropsbr.h,v 1.1.1.1 1999-02-07 18:14:06 danw Exp $
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
39struct 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 */
49int mbx_open (char *, int, uid_t, gid_t, mode_t);
50int mbx_read (FILE *, long, struct drop **, int);
51int mbx_write(char *, int, FILE *, int, long, long, off_t, int, int);
52int mbx_copy (char *, int, int, int, int, char *, int);
53int mbx_size (int, off_t, off_t);
54int mbx_close (char *, int);
55char *map_name (char *);
56int map_read (char *, long, struct drop **, int);
57int map_write (char *, int, int, long, off_t, off_t, long, int, int);
58int map_chk (char *, int, struct drop *, long, int);
59
Note: See TracBrowser for help on using the repository browser.