home *** CD-ROM | disk | FTP | other *** search
/ Gold Fish 1 / GoldFishApril1994_CD2.img / d4xx / d473 / cnewssrc / cnews_src.lzh / relay / headers.h < prev    next >
C/C++ Source or Header  |  1990-05-28  |  2KB  |  44 lines

  1. /* :ts=4
  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.  *    $Log$
  18.  */
  19.  
  20. struct headers {
  21.     char *h_subj;    /* subject: only needed for controls, -> h_ctlcmd */
  22.     char *h_ngs;    /* newsgroups: used in filing, sys matching & all.all.ctl matching */
  23.     char *h_distr;    /* distribution for transmit */
  24.     char *h_ctlcmd;    /* control command (NCMP) */
  25.     char *h_etctlcmd;    /* also-control command (NCMP) */
  26.     char *h_approved;    /* needed for acceptance in moderated groups */
  27.     char *h_msgid;    /* needed for history & rejection */
  28.     char *h_artid;    /* needed for history & rejection (obs.) */
  29.     char *h_expiry;    /* needed for history */
  30.     char *h_path;    /* needed for transmit - must munge */
  31.     char *h_sender;    /* needed for transmit in case of moderation */
  32. };
  33.  
  34. /* common */
  35. extern void hdrdebug(), hdrinit(), freeheaders();
  36. extern boolean oldctl();
  37.  
  38. /* munge */
  39. extern void emitxref(), hdrdump(), hdrdigest();
  40.  
  41. /* parse */
  42. extern void hdrparse(), hdrdeflt();
  43. extern boolean ishdr(), contin();
  44.