home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / unix / volume19 / rkive / part01 / article.h next >
C/C++ Source or Header  |  1989-06-29  |  4KB  |  130 lines

  1. /*
  2. **     @(#)article.h    1.1 6/1/89 
  3. **
  4. */
  5.  
  6. #define BUFLEN    128    /* standard buffer size                     */
  7. #define LBUFLEN  1024    /* big buffer size                          */
  8. #define PATHLEN   512    /* length of longest source string          */
  9. #define DATELEN    64    /* length of longest allowed date string    */
  10. #define TRUE        1    
  11. #define FALSE       0    
  12.  
  13. /*
  14. ** Format output called from defines 
  15. */
  16. #define ARCHIVE     1
  17. #define ARTICLE     2
  18.  
  19. /*
  20. ** Line type defines -  index uses
  21. */
  22.  
  23. #define FROM            1
  24. #define PATH            2
  25. #define NEWSGROUP       3
  26. #define SUBJECT         4
  27. #define MSG_ID            5
  28. #define REPLY_TO        6
  29. #define REFERENCES      7
  30. #define DATE            8
  31. #define EXPIRE          9
  32. #define CONTROL        10
  33. #define SENDER         11
  34. #define FOLLOWUP_TO    12
  35. #define DISTRIBUTION   13
  36. #define ORGANIZATION   14
  37. #define NUMLINES       15
  38. #define KEYWORDS       16
  39. #define SUMMARY        17
  40. #define APPROVED       18
  41. #define SUPERSEDES     19
  42. #define XREF           20
  43. #define POSTING_NUMBER 21
  44. #define SUBMITTED_BY   22
  45. #define ARCH_NAME      23
  46. #define ARTICLEID      24
  47. #define PATCH_TO       25
  48. #define OTHER          99
  49.  
  50. /* 
  51. ** article header storage structure
  52. */
  53.  
  54. struct    header {
  55.     char    from[BUFLEN];         /* From:                 */
  56.     char    path[PATHLEN];        /* Path:                 */
  57.     char    nbuf[LBUFLEN];        /* Newsgroups:           */
  58.     char    subject[BUFLEN];      /* Subject:              */
  59.     char    ident[BUFLEN];        /* Message-ID:           */
  60.     char    replyto[BUFLEN];      /* Reply-To:             */
  61.     char    references[BUFLEN];   /* References:           */
  62.     char    subdate[DATELEN];     /* Date: (submission)    */
  63.     time_t  subtime;              /* subdate in secs       */
  64.     char    expdate[DATELEN];     /* Expires:              */
  65.     char    ctlmsg[PATHLEN];      /* Control:              */
  66.     char    sender[BUFLEN];       /* Sender:               */
  67.     char    followup_to[BUFLEN];  /* Followup-to:          */
  68.     char    distribution[BUFLEN]; /* Distribution:         */
  69.     char    organization[BUFLEN]; /* Organization:         */
  70.     char    numlines[8];          /* Lines:                */
  71.     int     intnumlines;          /* Integer version       */
  72.     char    keywords[BUFLEN];     /* Keywords:             */
  73.     char    summary[BUFLEN];      /* Summary:              */
  74.     char    approved[BUFLEN];     /* Approved:             */
  75.     char    xref[BUFLEN];         /* Xref:                 */
  76.     char    supersedes[BUFLEN];   /* Supersedes:           */
  77.     char    submitted_by[BUFLEN]; /* Submitted_by:         */
  78.     char    posting_num[BUFLEN];  /* Posting-number:       */
  79.     char    archive_name[BUFLEN]; /* Archive-name:         */
  80.     char    patch_to[BUFLEN];     /* Patch-To:             */
  81. };
  82.  
  83. /*
  84. ** Type of archive file defines
  85. */
  86. #define NORMAL         0
  87. #define INFORMATIONAL  1
  88. #define PATCH          2
  89.  
  90. /* 
  91. ** archive information structure
  92. */
  93.  
  94. struct archive_rec {
  95.     char newsgroup[LBUFLEN];      /* news group            */
  96.     char newsarticle[LBUFLEN];    /* news article          */
  97.     char filename[BUFLEN];        /* destination file      */
  98.     int  volume;                  /* storage volume        */
  99.     int  issue;                   /* article issue number  */
  100.     int  rectype;                 /* type of article       */
  101.                                   /*   NORMAL article =  0 */
  102.                                   /*   INFORMATIONAL  =  1 */
  103.                                   /*   PATCH          =  2 */
  104.     int  repost;                  /* REPOST'ed article ?   */
  105.     int  patch_volume;            /* Initially posted      */
  106.                                   /*   storage volume      */
  107.     int  patch_issue;             /* Initially posted      */
  108.                                   /*   article issue number*/
  109.     char description[BUFLEN];     /* information           */
  110.     char author_name[BUFLEN];     /* author full name      */
  111.     char author_signon[BUFLEN];   /* author sign on        */
  112. };
  113.  
  114. extern FILE *logfp;
  115.  
  116. #ifndef ARTICLE_DEF
  117. #define ARTICLE_DEF 1
  118.     struct archive_rec article;
  119.     struct header header;
  120.     char s[BUFSIZ];
  121.     int debug;
  122.     int verbose;
  123. #else
  124.     extern char s[];
  125.     extern int debug;
  126.     extern int verbose;
  127.     extern struct archive_rec article;
  128.     extern struct header header;
  129. #endif /* ARTICLE_DEF */
  130.