home *** CD-ROM | disk | FTP | other *** search
/ Unix System Administration Handbook 1997 October / usah_oct97.iso / news / cnews.tar / relay / relay.h < prev    next >
C/C++ Source or Header  |  1993-11-20  |  2KB  |  59 lines

  1. /* relaynews-specific declarations */
  2.  
  3. #define MINSHPTRS 30        /* initial value for sh_alloced */
  4.  
  5. /* All the information needed to describe an article as it is processed. */
  6. struct article {
  7.     statust a_status;    /* article status bits */
  8.     struct headers h;    /* strictly from headers in input */
  9.     char *a_haccum;        /* accumulated output headers, if any */
  10.     char *a_hnext;        /* -> first free byte in a_haccum */
  11.     short a_hpalloced;    /* indices in a_hptrs */
  12.     short a_hpused;        /* indices currently in use */
  13.     char **a_hptrs;        /* -> array of ptrs to lines in a_haccum */
  14.     unsigned a_hbytesleft;    /* in a_haccum */
  15.     char *a_files; /* names for history, added in filing, from h.h_ngs */
  16.     char *a_tmpf;        /* temp link name or first spool dir link */
  17.     FILE *a_artf;        /* stream corresponding to a_tmpf */
  18.     boolean a_unlink;    /* true iff a_tmpf should be unlinked at end */
  19.     boolean a_filed;    /* true iff article has been filed */
  20.     boolean a_xref;        /* true iff Xref: header generated yet */
  21.     boolean a_blvmax;    /* true iff a_unread is to be believed */
  22.     long a_charswritten;    /* into spool directory, for batcher */
  23.     long a_unread;        /* bytes of article input yet unread */
  24.     long a_id;        /* article id #, unique within this batch */
  25.     boolean a_badhdr;    /* true iff non-header is before blank line */
  26. };
  27.  
  28. struct options {
  29.     boolean    okrefusal;        /* okay to refuse articles? */
  30.     char    *exclude;        /* site to exclude, for erik */
  31.     boolean    histreject;        /* keep history of rejects? */
  32.     long    staledays;        /* articles stale after this many days */
  33.     boolean    genxref;        /* iff true, always generate Xref: */
  34.     boolean    blvxref;        /* iff true, believe Xref: contents */
  35.     char    *blvsite;        /* ... for this site only. */
  36.     boolean    dupsokay;        /* iff true, allow duplicates ... */
  37.     char    *dupsite;        /* ... from this site only. */
  38.     char    *currdir;
  39. };
  40. extern struct options opts;
  41.  
  42. /* return name of at least one link, for printing in error messages, etc. */
  43. #define spoolnm(art) ((art)->a_unlink? (art)->a_tmpf: (art)->a_files)
  44.  
  45. #define CONTROL "control"        /* control message pseudo-ng. */
  46. #define JUNK "junk"            /* lost+found pseudo-ng. */
  47.  
  48. /* imports */
  49. extern void artinit(), artfree();
  50. extern statust loadcaches(), synccaches();
  51. extern void ctlmsg();
  52. extern char *hackhybrid();
  53. extern void filedebug(), fileart();
  54. extern void nnfclose();
  55. extern boolean mkdirs();
  56. extern void fulldisk();
  57. extern statust trclose();
  58. extern void transdebug(), transmit(), trcmd(), trbatch();
  59.