]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/sendmail/src/bf_torek.h
Import of sendmail version 8.11.1 into vendor branch SENDMAIL with
[FreeBSD/FreeBSD.git] / contrib / sendmail / src / bf_torek.h
1 /*
2  * Copyright (c) 1999 Sendmail, Inc. and its suppliers.
3  *      All rights reserved.
4  *
5  * By using this file, you agree to the terms and conditions set
6  * forth in the LICENSE file which can be found at the top level of
7  * the sendmail distribution.
8  *
9  *      $Id: bf_torek.h,v 8.6 1999/11/04 19:31:25 ca Exp $
10  *
11  * Contributed by Exactis.com, Inc.
12  *
13  */
14
15 #ifndef BF_TOREK_H
16 #define BF_TOREK_H 1
17 /*
18 **  Data structure for storing information about each buffered file
19 */
20
21 struct bf
22 {
23         bool    bf_committed;   /* Has this buffered file been committed? */
24         bool    bf_ondisk;      /* On disk: committed or buffer overflow */
25         int     bf_flags;
26         int     bf_disk_fd;     /* If on disk, associated file descriptor */
27         char    *bf_buf;        /* Memory buffer */
28         int     bf_bufsize;     /* Length of above buffer */
29         int     bf_buffilled;   /* Bytes of buffer actually filled */
30         char    *bf_filename;   /* Name of buffered file, if ever committed */
31         mode_t  bf_filemode;    /* Mode of buffered file, if ever committed */
32         fpos_t  bf_offset;      /* Currect file offset */
33         int     bf_size;        /* Total current size of file */
34         int     bf_refcount;    /* Reference count */
35 };
36
37 /* Our lower-level I/O routines */
38 extern int      _bfclose __P((void *));
39 extern int      _bfread __P((void *, char *, int));
40 extern fpos_t   _bfseek __P((void *, fpos_t, int));
41 extern int      _bfwrite __P((void *, const char *, int));
42 #endif /* BF_TOREK_H */