bf_portable.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_portable.h,v 8.6 1999/11/04 19:31:25 ca Exp $
  10.  *
  11.  * Contributed by Exactis.com, Inc.
  12.  *
  13.  */
  14. #ifndef BF_PORTABLE_H
  15. #define BF_PORTABLE_H 1
  16. /*
  17. **  This implementation will behave differently from the Torek-based code in
  18. **  the following major ways:
  19. **   - The buffer size argument to bfopen() will be sent in, sent back,
  20. **     queried, lost, found, subjected to public inquiry, lost again, and
  21. **     finally buried in soft peat and recycled as firelighters.
  22. **   - Errors in creating the file (but not necessarily writing to it) will
  23. **     always be detected and reported synchronously with the bfopen()
  24. */
  25. /* Linked structure for storing information about each buffered file */
  26. struct bf
  27. {
  28. FILE *bf_key; /* Unused except as a key for lookup */
  29. bool bf_committed; /* buffered file is on disk */
  30. char *bf_filename; /* Name of disk file */
  31. int bf_refcount; /* Reference count */
  32. struct bf *bf_cdr;
  33. };
  34. /*
  35. **  Access routines for looking up bf structures
  36. **
  37. ** maybe replace with a faster data structure later
  38. */
  39. extern void bfinsert __P((struct bf *));
  40. extern struct bf *bflookup __P((FILE *));
  41. extern struct bf *bfdelete __P((FILE *));
  42. #endif /* BF_PORTABLE_H */