bf_torek.h
上传用户:xu_441
上传日期:2007-01-04
资源大小:1640k
文件大小:1k
源码类别:

Email客户端

开发平台:

Unix_Linux

  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. #ifndef BF_TOREK_H
  15. #define BF_TOREK_H 1
  16. /*
  17. **  Data structure for storing information about each buffered file
  18. */
  19. struct bf
  20. {
  21. bool bf_committed; /* Has this buffered file been committed? */
  22. bool bf_ondisk; /* On disk: committed or buffer overflow */
  23. int bf_flags;
  24. int bf_disk_fd; /* If on disk, associated file descriptor */
  25. char *bf_buf; /* Memory buffer */
  26. int bf_bufsize; /* Length of above buffer */
  27. int bf_buffilled; /* Bytes of buffer actually filled */
  28. char *bf_filename; /* Name of buffered file, if ever committed */
  29. mode_t bf_filemode; /* Mode of buffered file, if ever committed */
  30. fpos_t bf_offset; /* Currect file offset */
  31. int bf_size; /* Total current size of file */
  32. int bf_refcount; /* Reference count */
  33. };
  34. /* Our lower-level I/O routines */
  35. extern int _bfclose __P((void *));
  36. extern int _bfread __P((void *, char *, int));
  37. extern fpos_t _bfseek __P((void *, fpos_t, int));
  38. extern int _bfwrite __P((void *, const char *, int));
  39. #endif /* BF_TOREK_H */