home *** CD-ROM | disk | FTP | other *** search
/ The Fred Fish Collection 1.5 / ffcollection-1-5-1992-11.iso / ff_disks / 300-399 / ff319.lzh / CNewsSrc / cnews.orig.lzh / relay / headers.h < prev    next >
C/C++ Source or Header  |  1989-06-27  |  2KB  |  41 lines

  1. /*
  2.  * All the article header values worth retaining.
  3.  * (strictly from headers in input.)
  4.  *
  5.  * All members of struct headers must point at malloced memory so that
  6.  * freeheaders() can free it without having to keep track of what's
  7.  * malloced and what's static.
  8.  *
  9.  * Furthermore, each member of headers must point at its own private copy
  10.  * of its value string, for the above reason, and no code outside hdr*.c
  11.  * may copy any member nor a modified copy of any member, though it may
  12.  * copy the string pointed to by a (possibly modified) member.
  13.  *
  14.  * Perhaps C++ will allow this to be enforced by a strings class.
  15.  * See section 6.9 of The C++ Programming Language for a candidate.
  16.  */
  17. struct headers {
  18.     char *h_subj;    /* subject: only needed for controls, -> h_ctlcmd */
  19.     char *h_ngs;    /* newsgroups: used in filing, sys matching & all.all.ctl matchin
  20.  */
  21.     char *h_distr;    /* distribution for transmit */
  22.     char *h_ctlcmd;    /* control command */
  23.     char *h_approved;    /* needed for acceptance in moderated groups */
  24.     char *h_msgid;    /* needed for history & rejection */
  25.     char *h_artid;    /* needed for history & rejection (obs.) */
  26.     char *h_expiry;    /* needed for history */
  27.     char *h_path;    /* needed for transmit - must munge */
  28.     char *h_sender;    /* needed for transmit in case of moderation */
  29. };
  30.  
  31. /* common */
  32. extern void hdrdebug(), hdrinit(), freeheaders();
  33. extern boolean oldctl();
  34.  
  35. /* munge */
  36. extern void emitxref(), hdrdump(), hdrdigest();
  37.  
  38. /* parse */
  39. extern void hdrwretch(), hdrparse(), hdrdeflt();
  40. extern boolean ishdr(), contin();
  41.