home *** CD-ROM | disk | FTP | other *** search
/ Unix System Administration Handbook 1997 October / usah_oct97.iso / news / cnews.tar / include / trbatch.h < prev   
C/C++ Source or Header  |  1993-12-16  |  1KB  |  42 lines

  1. /*
  2.  * interface to the transmit batch files
  3.  */
  4.  
  5. /* tunable parameters */
  6. #ifndef FLUSHEVERY
  7. #define FLUSHEVERY 1    /* fflush batch files every this many lines */
  8. #endif            /* FLUSHEVERY */
  9. #ifndef NOPENBFS
  10. #define NOPENBFS 10    /* # (master) batchfiles kept open for batching */
  11.             /* upper bound computable with dup */
  12.             /* could be NBFSPERMBF given dynamic allocation */
  13. #endif            /* NOPENBFS */
  14.  
  15. struct batchfile {
  16. #ifdef notdef
  17.     int bf_ref;            /* reference count */
  18. #endif
  19.     FILE *bf_str;            /* stream */
  20.     char *bf_name;            /* file name */
  21.     char *bf_msgid;            /* last message id written */
  22.     short bf_lines;            /* until fflush */
  23. };
  24.  
  25. /* imports from trbatch.c */
  26. extern struct batchfile *bfopen(), *bfisopen();
  27. extern statust bffkclose(), bfrealclose();
  28. extern int bfflush();
  29. /* imports from trbatcomm.c */
  30. extern statust bfclose(), bfrclose();
  31. extern struct batchfile *bfincache(), *fakebf();
  32.  
  33. extern struct batchfile batchfile[];    /* try to keep open always */
  34. #define lastbf &batchfile[NOPENBFS-1]
  35. /*
  36.  * More than one pointer in ordtobfs may point at a given batchfile,
  37.  * to permit sharing of open batch files among multiple sys entries.
  38.  * ordtobfs[ordinal # of batch sys entry] -> (usually open) batch file,
  39.  * if the index is in range.
  40.  */
  41. extern struct batchfile *ordtobfs[];
  42.