home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / unix / volume19 / rkive / part02 / rkive.h < prev   
Encoding:
C/C++ Source or Header  |  1989-06-29  |  7.3 KB  |  222 lines

  1. /*
  2. **     @(#)rkive.h    1.1 6/1/89 
  3. **
  4. **    This is the rkive source configuration header file. 
  5. **    Please examine and change to suite your own site's needs..
  6. **
  7. */
  8.  
  9. /*
  10. ** The default owner, group and modes of the archived files
  11. ** need to be stated below. The values are only used if the
  12. ** appropriate values are not in the configuration file.
  13. */ 
  14.  
  15. #define OWNER    0
  16. #define GROUP    3
  17. #define MODES    0444
  18.  
  19. /* 
  20. ** If you have a smart mailer that supports a "-s subject" command
  21. ** and you wish to have the subject line added when archived mail
  22. ** is sent, define SUBJECT_LINE. 
  23. */
  24.  
  25. #define SUBJECT_LINE 
  26.  
  27. #ifdef SUBJECT_LINE
  28. #define MAIL        "/usr/bin/mailx"     /* mail program to use */
  29. /* #define MAIL        "/usr/local/bin/elm" */
  30. #else
  31. #define MAIL        "/bin/mail"     /* mail program to use */
  32. #endif
  33.  
  34. /*
  35. ** The PROBLEMS_DIR is the default directory to use in the event 
  36. ** problems are encountered such as duplicate article names and 
  37. ** the execution flags do not specify overwriting. 
  38. **
  39. ** The new, inbound article is stored in the PROBLEMS_DIR in the 
  40. ** problems_dir/newsgroup/volume/filename so that the administrator 
  41. ** can review and fix the problem whenever time becomes available...
  42. **
  43. ** The PROBLEMS_DIR define is used only if the administrator has not 
  44. ** specified the PROBLEMS path variable inside of the LOCATION 
  45. ** (config) file.
  46. */
  47.  
  48. #define PROBLEMS_DIR "/usenet/problems"  
  49.  
  50. /* 
  51. ** Home directory for news    
  52. */
  53.  
  54. #define SPOOLDIR     "/usr/spool/news"   
  55.  
  56. /* 
  57. ** Location of the default rkive configuration file.
  58. */
  59.  
  60. #define LOCATION     "/usr/local/lib/rkive.cf"  
  61.  
  62. /*
  63. ** Defines to control the handling of repostings.
  64. **
  65. ** ADD_REPOST_SUFFIX && REPOST_SUFFIX
  66. **
  67. **     If ADD_REPOST_SUFFIX is defined, all reposts will have the 
  68. **     string specified in REPOST_SUFFIX appended to the archive
  69. **     filename so that a repost of elm/part07 would appear in
  70. **     the archive as elm/part07-repost prior to any compression.
  71. **
  72. **     CAUTION: This should *not* be used on a filesystem with
  73. **        14 character file name limits. If you are going
  74. **        to be making your archive available to the general
  75. **        community do *not* use this. The portability of
  76. **        filenames is greatly reduced. This has been added
  77. **        with much hesitation. The rational was that there
  78. **        was no reason to punish/limit the functionality
  79. **        just because of limitations of a specific "brand"
  80. **        of unix and since that "brand" was correcting its
  81. **        "error" in the future, why not put it in now ?
  82. **        This is not a configuration item on a per newsgroup
  83. **        basis. It might be useful for Historical archiving
  84. **        using only Volume/Issue archiving with no COMPRESSION.
  85. **
  86. ** MV_ORIGINAL
  87. **     The original article is placed into a "original" directory in 
  88. **     the problems directory (if duplicated). The inbound reposted
  89. **     article is placed into the archive in the correct position.
  90. **
  91. ** No Reposting Defines specified:
  92. **    The inbound article would be placed into the archive in the 
  93. **    correct position only if the initial article is not in the archive.
  94. **    Otherwise the reposted article is placed in the problems directory 
  95. **    as a normal duplicate article is now.
  96. */
  97.  
  98. /* #define ADD_REPOST_SUFFIX */
  99. #define MV_ORIGINAL 
  100.  
  101. #ifdef ADD_REPOST_SUFFIX 
  102. #define REPOST_SUFFIX  "-repost" 
  103. #endif
  104.  
  105. /* 
  106. ** If you wish your volume directories to be Volume, VOL, vOLuMe
  107. ** or any other such nonsense, change the VOLUME define below.
  108. */
  109.  
  110. #define VOLUME       "volume"
  111.  
  112. /* 
  113. ** If you wish to have the headers "trimmed" when the file is archived,
  114. ** assure that REDUCE_HEADERS is defined. Currenlty all header lines that
  115. ** are not either;
  116. **     From:, Newsgroups:, Subject:, Message-ID:, and Date:
  117. ** will be removed. See news_arc.c if you wish to add or subtract header
  118. ** lines to keep. This can produce a savings of between 200 to 500 bytes
  119. ** per archived article.
  120. */
  121.  
  122. #define REDUCE_HEADERS 
  123.  
  124. /* 
  125. ** The following define specifies a default format for generating
  126. ** index file records in the event that there is no index format
  127. ** specified for either the newsgroup or for the global default.
  128. ** See article.1 for a discussion of the different types of selection
  129. ** characters available for use in the format specifications.
  130. */
  131.  
  132. #define DEFAULT_INDEX_FORMAT       "%B\t%S"
  133.  
  134. /* 
  135. ** The following define specifies a default format for generating
  136. ** log file records in the event that there is no log format
  137. ** specified for either the newsgroup or for the global default.
  138. */
  139. #define DEFAULT_LOG_FORMAT         "%O\t%T"
  140.  
  141. /*
  142. ** The size of the group array. If you are archiving the world
  143. ** you might need to bump this up...
  144. */
  145.  
  146. #define NUM_NEWSGROUPS  32
  147.  
  148. /**********************************************************************
  149. *******************  NO CHANGES REQUIRED PAST HERE  *******************
  150. **********************************************************************/
  151.  
  152. /*
  153. ** check to assure repost defines are in order...
  154. */
  155.  
  156. #if defined(ADD_REPOST_SUFFIX) + defined(MV_ORIGINAL) > 1
  157. #include "ERROR - Can only specify a maximum of one way to handle reposts!"
  158. #endif
  159.  
  160. /*
  161. ** Standard stuff
  162. */
  163.  
  164. #ifndef TRUE
  165. #define TRUE   1
  166. #endif
  167.  
  168. #ifndef FALSE
  169. #define FALSE  0
  170. #endif
  171.  
  172. /*
  173. ** archive type defines 
  174. **
  175. ** These defines are used to determine which type of archiving 
  176. ** methods the administrator has requested for the newsgroup.
  177. **
  178. */
  179.  
  180. #define ARCHIVE_NAME     0    /* Archive as "elm/part03"  */
  181. #define VOLUME_ISSUE     1    /* Archive as "v16i003"     */
  182. #define ARTICLE_NUMBER   2    /* Archive with same name   */
  183.                 /* as the file to archive   */
  184.  
  185. /*
  186. ** patch handling type defines 
  187. **
  188. ** These defines are used to determine which type of 
  189. ** method the administrator has requested for the the
  190. ** handling of patches received in the newsgroup.
  191. **
  192. */
  193.  
  194. #define HISTORICAL   0        /* Archive as normally done.        */
  195. #define PACKAGE      1        /* Archive patches in the directory */
  196.                                 /* containing the initial posting.  */
  197.  
  198. struct group_archive {
  199.     int owner;                  /* owner id of the archive files     */
  200.     int group;                  /* group id of the archive files     */
  201.     int modes;                  /* modes of the stored archive files */
  202.     int type;                   /* Type of archiving to be used.     */
  203.                 /*        0 = Archive-Name           */
  204.                                 /*        1 = Volume-Issue           */
  205.                                 /*        2 = Article-Number         */
  206.     int patch_type;             /* Method of handling patches.       */
  207.                                 /*        0 = Historical             */
  208.                                 /*        1 = Package                */
  209.     char ng_name[MAXNAMLEN];    /* Newsgroup to be archived.         */
  210.     char location[MAXNAMLEN];    /* Path to archive's base directory. */
  211.     char arc_done[MAXNAMLEN];    /* Archive's .archived already file  */
  212.     char mail_list[BUFSIZ];    /* List of users to mail when new    */
  213.                 /* members are added to the archive. */
  214.     char logfile[MAXNAMLEN];    /* Path to archive specific log file */
  215.     char index[MAXNAMLEN];     /* Path to archive specific index.   */
  216.     char patchlog[MAXNAMLEN];    /* Path to archive's patches log.    */
  217.     char logformat[BUFSIZ];    /* Format of the logfile entry.      */
  218.     char indformat[BUFSIZ];    /* Format of the index entry.        */
  219.     char compress[MAXNAMLEN];    /* Command line to use to compress   */
  220.                 /* new archive members, optional.    */
  221. };
  222.