home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / mail / elm / 3356 < prev    next >
Encoding:
Text File  |  1992-11-17  |  54.8 KB  |  1,735 lines

  1. Xref: sparky comp.mail.elm:3356 comp.sources.bugs:274
  2. Newsgroups: comp.mail.elm,comp.sources.bugs
  3. Path: sparky!uunet!ukma!cs.widener.edu!dsinc!syd
  4. From: syd@dsinc.DSI.COM (Syd Weinstein)
  5. Subject: elm 2.4 Patch #10
  6. Message-ID: <1992Nov17.191905.8133@DSI.COM>
  7. Followup-To: poster
  8. Summary: This is an official patch for elm 2.4 system.  Please apply it.
  9. Sender: syd@DSI.COM (Syd Weinstein)
  10. Priority: HIGH
  11. Organization: Datacomp Systems, Inc., Huntingdon Valley, PA 19006
  12. Date: Tue, 17 Nov 1992 19:19:05 GMT
  13. Lines: 1720
  14.  
  15. part 2 of a 2 part patch
  16.  
  17. Fix:    From rn, say "| patch -p -N -d DIR", where DIR is your elm source
  18.     directory.  Outside of rn, say "cd DIR; patch -p -N <thisarticle".
  19.     If you don't have the patch program, apply the following by hand,
  20.     or get patch (version 2.0, latest patchlevel).
  21.  
  22.     After patching:
  23.         sh Configure -d
  24.         make
  25.         make install
  26.  
  27.     If patch indicates that patchlevel is the wrong version, you may need
  28.     to apply one or more previous patches, or the patch may already
  29.     have been applied.  See the patchlevel.h file to find out what has or
  30.     has not been applied.  In any event, don't continue with the patch.
  31.  
  32.     If you are missing previous patches they can be obtained from our:
  33.     archive server.
  34.  
  35.     Syd Weinstein
  36.     elm@DSI.COM
  37.  
  38.     The patches are available from the dsinc archive server
  39.     Send the following message to archive-server@DSI.COM for
  40.     a list of available patches:
  41.  
  42.     Subject: patch list
  43.     send index elm
  44.  
  45. Index: hdrs/patchlevel.h
  46. Prereq: "9"
  47. *** ../elm2.4/hdrs/patchlevel.h    Tue Nov 10 15:20:28 1992
  48. --- hdrs/patchlevel.h    Sat Nov 14 16:40:24 1992
  49. ***************
  50. *** 1 ****
  51. ! #define PATCHLEVEL "9"
  52. --- 1 ----
  53. ! #define PATCHLEVEL "10"
  54.  
  55. Index: filter/rules.c
  56. Prereq: 5.1
  57. *** ../elm2.4/filter/rules.c    Sat Oct  3 18:18:29 1992
  58. --- filter/rules.c    Mon Nov 16 23:10:02 1992
  59. ***************
  60. *** 1,8 ****
  61.   
  62. ! static char rcsid[] ="@(#)$Id: rules.c,v 5.1 1992/10/03 22:18:09 syd Exp $";
  63.   
  64.   /*******************************************************************************
  65. !  *  The Elm Mail System  -  $Revision: 5.1 $   $State: Exp $
  66.    *
  67.    *             Copyright (c) 1988-1992 USENET Community Trust
  68.    *             Copyright (c) 1986,1987 Dave Taylor
  69. --- 1,8 ----
  70.   
  71. ! static char rcsid[] ="@(#)$Id: rules.c,v 5.3 1992/11/17 04:10:01 syd Exp $";
  72.   
  73.   /*******************************************************************************
  74. !  *  The Elm Mail System  -  $Revision: 5.3 $   $State: Exp $
  75.    *
  76.    *             Copyright (c) 1988-1992 USENET Community Trust
  77.    *             Copyright (c) 1986,1987 Dave Taylor
  78. ***************
  79. *** 14,19 ****
  80. --- 14,33 ----
  81.    *
  82.    *******************************************************************************
  83.    * $Log: rules.c,v $
  84. +  * Revision 5.3  1992/11/17  04:10:01  syd
  85. +  * The changes to filter/regexp.c are to correct compiler warnings about
  86. +  * unreachable statements.
  87. +  *
  88. +  * The changes to filter/rules.c are to correct the fact that we are passing
  89. +  * a pointer to a condition_rec structore to a function expecting a pointer to
  90. +  * a character string.
  91. +  * From: Tom Moore <tmoore@fievel.DaytonOH.NCR.COM>
  92. +  *
  93. +  * Revision 5.2  1992/11/15  01:40:43  syd
  94. +  * Add regexp processing to filter.
  95. +  * Add execc operator
  96. +  * From: Jan Djarv <Jan.Djarv@sa.erisoft.se>
  97. +  *
  98.    * Revision 5.1  1992/10/03  22:18:09  syd
  99.    * Initial checkin as of 2.4 Release at PL0
  100.    *
  101. ***************
  102. *** 43,48 ****
  103. --- 57,97 ----
  104.   
  105.   char *listrule();
  106.   
  107. + static struct regexp *last_regexp = NULL;
  108. + static int
  109. + matches(str, relation, cond)
  110. + char *str;
  111. + int relation;
  112. + struct condition_rec *cond;
  113. + {
  114. +     if (relation == RE) {
  115. +       if (cond->regex == NULL) cond->regex = regcomp(cond->argument1);
  116. +       if (regexec(cond->regex, str)) {
  117. +         last_regexp = cond->regex;
  118. +         return TRUE;
  119. +       } else {
  120. +         return FALSE;
  121. +       }
  122. +     } else {
  123. +       return contains(str, cond->argument1);
  124. +     }
  125. + }
  126. + void
  127. + regerror(s)
  128. + char *s;
  129. + {
  130. +     if (outfd != NULL)
  131. +       fprintf(outfd,
  132. +         catgets(elm_msg_cat,
  133. +             FilterSet,FilterCantCompileRegexp,
  134. +             "filter (%s): Error: can't compile regexp: \"%s\"\n"),
  135. +          username, s);
  136. +     if (outfd != NULL) fclose(outfd);
  137. +     exit(1);         
  138. + }
  139.   int
  140.   action_from_ruleset()
  141.   {
  142. ***************
  143. *** 65,75 ****
  144.       
  145.           switch (cond->matchwhat) {
  146.   
  147. !           case TO     : x = contains(to, cond->argument1);         break;
  148. !           case FROM   : x = contains(from, cond->argument1);     break;
  149. !           case SENDER : x = contains(sender, cond->argument1);    break;
  150. !           case SUBJECT: x = contains(subject, cond->argument1);    break;
  151. !           case LINES  : x = compare(lines, relation, cond->argument1);break;
  152.                  
  153.             case CONTAINS: if (outfd != NULL) fprintf(outfd,
  154.                   catgets(elm_msg_cat,
  155. --- 114,124 ----
  156.       
  157.           switch (cond->matchwhat) {
  158.   
  159. !           case TO     : x = matches(to, relation, cond);        break;
  160. !           case FROM   : x = matches(from, relation, cond);         break;
  161. !           case SENDER : x = matches(sender, relation, cond);    break;
  162. !           case SUBJECT: x = matches(subject, relation, cond);    break;
  163. !           case LINES  : x = compare(lines, relation, cond);        break;
  164.                  
  165.             case CONTAINS: if (outfd != NULL) fprintf(outfd,
  166.                   catgets(elm_msg_cat,
  167. ***************
  168. *** 105,110 ****
  169. --- 154,175 ----
  170.                  gotten_time++;           \
  171.               }
  172.   
  173. + static struct {
  174. +     int    id;
  175. +     char    *str;
  176. + } regmessage[] = {
  177. +     FilterWholeRegsub,    "<match>",
  178. +     FilterRegsubOne,    "<submatch-1>",
  179. +     FilterRegsubTwo,    "<submatch-2>",
  180. +     FilterRegsubThree,    "<submatch-3>",
  181. +     FilterRegsubFour,    "<submatch-4>",
  182. +     FilterRegsubFive,    "<submatch-5>",
  183. +     FilterRegsubSix,    "<submatch-6>",
  184. +     FilterRegsubSeven,    "<submatch-7>",
  185. +     FilterRegsubEight,    "<submatch-8>",
  186. +     FilterRegsubNine,    "<submatch-9>",
  187. + };
  188.   expand_macros(word, buffer, line, display)
  189.   char *word, *buffer;
  190.   int  line, display;
  191. ***************
  192. *** 120,125 ****
  193. --- 185,192 ----
  194.              %S    = "Re: subject of message"  (only add Re: if not there)
  195.           %t    = hour:minute     
  196.           %y    = year          
  197. +         %&    = the whole string that matched last regexp
  198. +         %1-%9    = matched subexpressions in last regexp
  199.           or simply copies word into buffer. If "display" is set then
  200.           instead it puts "<day-of-month>" etc. etc. in the output.
  201.       **/
  202. ***************
  203. *** 131,137 ****
  204.       struct tm *timerec;
  205.       time_t    thetime;
  206.       register int i, j=0, gotten_time = 0, reading_a_percent_sign = 0,
  207. !                      len, backslashed=0;
  208.   
  209.       for (i = 0, len = strlen(word); i < len; i++) {
  210.         if (reading_a_percent_sign) {
  211. --- 198,204 ----
  212.       struct tm *timerec;
  213.       time_t    thetime;
  214.       register int i, j=0, gotten_time = 0, reading_a_percent_sign = 0,
  215. !                      len, backslashed=0, regsub;
  216.   
  217.       for (i = 0, len = strlen(word); i < len; i++) {
  218.         if (reading_a_percent_sign) {
  219. ***************
  220. *** 251,256 ****
  221. --- 318,345 ----
  222.                        j = strlen(buffer);
  223.                break;
  224.   
  225. +           case '&': case '1': case '2': case '3': case '4':
  226. +           case '5': case '6': case '7': case '8': case '9':
  227. +              if (word[i] == '&') regsub = 0;
  228. +              else regsub = word[i] - '0';
  229. +              if (display) {
  230. +                strcat(buffer,catgets(elm_msg_cat,
  231. +                          FilterSet,
  232. +                          regmessage[regsub].id,
  233. +                          regmessage[regsub].str));
  234. +                j = strlen(buffer);
  235. +              } else {
  236. +                if (last_regexp != NULL) {
  237. +                  char *sp = last_regexp->startp[regsub];
  238. +                  char *ep = last_regexp->endp[regsub];
  239. +                  if (sp != NULL && ep != NULL && ep > sp)
  240. +                    while (sp < ep) buffer[j++] = *sp++;
  241. +                }
  242. +              }
  243. +              break;
  244.             default  : if (outfd != NULL) fprintf(outfd,
  245.                   catgets(elm_msg_cat,
  246.                       FilterSet,FilterErrorTranslatingMacro,
  247. ***************
  248. *** 379,384 ****
  249. --- 468,476 ----
  250.         case EXEC       : return(catgets(elm_msg_cat,
  251.                          FilterSet,FilterExecute,
  252.                          "Execute"));
  253. +       case EXECC       : return(catgets(elm_msg_cat,
  254. +                        FilterSet,FilterExecuteAndSave,
  255. +                        "Execute and Save"));
  256.         default         : return(catgets(elm_msg_cat,
  257.                          FilterSet,FilterAction,
  258.                          "?action?"));
  259. ***************
  260. *** 386,394 ****
  261.   }
  262.   
  263.   int
  264. ! compare(line, relop, arg)
  265.   int line, relop;
  266. ! char *arg;
  267.   {
  268.       /** Given the actual number of lines in the message, the relop
  269.           relation, and the number of lines in the rule, as a string (!),
  270. --- 478,486 ----
  271.   }
  272.   
  273.   int
  274. ! compare(line, relop, cond)
  275.   int line, relop;
  276. ! struct condition_rec *cond;
  277.   {
  278.       /** Given the actual number of lines in the message, the relop
  279.           relation, and the number of lines in the rule, as a string (!),
  280. ***************
  281. *** 397,403 ****
  282.   
  283.       int rule_lines;
  284.   
  285. !     rule_lines = atoi(arg);
  286.   
  287.       switch (relop) {
  288.         case LE: return(line <= rule_lines);
  289. --- 489,495 ----
  290.   
  291.       int rule_lines;
  292.   
  293. !     rule_lines = atoi(cond->argument1);
  294.   
  295.       switch (relop) {
  296.         case LE: return(line <= rule_lines);
  297.  
  298. Index: filter/summarize.c
  299. Prereq: 5.3
  300. *** ../elm2.4/filter/summarize.c    Tue Nov 10 15:20:23 1992
  301. --- filter/summarize.c    Sat Nov 14 20:40:43 1992
  302. ***************
  303. *** 1,8 ****
  304.   
  305. ! static char rcsid[] ="@(#)$Id: summarize.c,v 5.3 1992/11/07 20:48:55 syd Exp $";
  306.   
  307.   /*******************************************************************************
  308. !  *  The Elm Mail System  -  $Revision: 5.3 $   $State: Exp $
  309.    *
  310.    *             Copyright (c) 1988-1992 USENET Community Trust
  311.    *             Copyright (c) 1986,1987 Dave Taylor
  312. --- 1,8 ----
  313.   
  314. ! static char rcsid[] ="@(#)$Id: summarize.c,v 5.4 1992/11/15 01:40:43 syd Exp $";
  315.   
  316.   /*******************************************************************************
  317. !  *  The Elm Mail System  -  $Revision: 5.4 $   $State: Exp $
  318.    *
  319.    *             Copyright (c) 1988-1992 USENET Community Trust
  320.    *             Copyright (c) 1986,1987 Dave Taylor
  321. ***************
  322. *** 14,19 ****
  323. --- 14,24 ----
  324.    *
  325.    *******************************************************************************
  326.    * $Log: summarize.c,v $
  327. +  * Revision 5.4  1992/11/15  01:40:43  syd
  328. +  * Add regexp processing to filter.
  329. +  * Add execc operator
  330. +  * From: Jan Djarv <Jan.Djarv@sa.erisoft.se>
  331. +  *
  332.    * Revision 5.3  1992/11/07  20:48:55  syd
  333.    * fix applied rule count message
  334.    *
  335. ***************
  336. *** 199,208 ****
  337.                 "(left in mailbox and forwarded to \"%s\")"),
  338.                           rules[rule].argument2);
  339.                               break;
  340. !           case EXEC  :      fprintf(outfd,catgets(elm_msg_cat,
  341.                                 FilterSet,
  342.                                 FilterExecMesg,
  343.                         "(given to command \"%s\")"),
  344.                           rules[rule].argument2);
  345.                               break;
  346.             }
  347. --- 204,219 ----
  348.                 "(left in mailbox and forwarded to \"%s\")"),
  349.                           rules[rule].argument2);
  350.                               break;
  351. !           case EXEC :      fprintf(outfd,catgets(elm_msg_cat,
  352.                                 FilterSet,
  353.                                 FilterExecMesg,
  354.                         "(given to command \"%s\")"),
  355. +                         rules[rule].argument2);
  356. +                             break;
  357. +           case EXECC :      fprintf(outfd,catgets(elm_msg_cat,
  358. +                               FilterSet,
  359. +                               FilterExecCMesg,
  360. +                "(left in mailbox and given to command \"%s\")"),
  361.                           rules[rule].argument2);
  362.                               break;
  363.             }
  364.  
  365. Index: filter/utils.c
  366. Prereq: 5.1
  367. *** ../elm2.4/filter/utils.c    Sat Oct  3 18:18:29 1992
  368. --- filter/utils.c    Sat Nov 14 20:40:45 1992
  369. ***************
  370. *** 1,8 ****
  371.   
  372. ! static char rcsid[] ="@(#)$Id: utils.c,v 5.1 1992/10/03 22:18:09 syd Exp $";
  373.   
  374.   /*******************************************************************************
  375. !  *  The Elm Mail System  -  $Revision: 5.1 $   $State: Exp $
  376.    *
  377.    *             Copyright (c) 1988-1992 USENET Community Trust
  378.    *             Copyright (c) 1986,1987 Dave Taylor
  379. --- 1,8 ----
  380.   
  381. ! static char rcsid[] ="@(#)$Id: utils.c,v 5.2 1992/11/15 01:40:43 syd Exp $";
  382.   
  383.   /*******************************************************************************
  384. !  *  The Elm Mail System  -  $Revision: 5.2 $   $State: Exp $
  385.    *
  386.    *             Copyright (c) 1988-1992 USENET Community Trust
  387.    *             Copyright (c) 1986,1987 Dave Taylor
  388. ***************
  389. *** 14,19 ****
  390. --- 14,24 ----
  391.    *
  392.    *******************************************************************************
  393.    * $Log: utils.c,v $
  394. +  * Revision 5.2  1992/11/15  01:40:43  syd
  395. +  * Add regexp processing to filter.
  396. +  * Add execc operator
  397. +  * From: Jan Djarv <Jan.Djarv@sa.erisoft.se>
  398. +  *
  399.    * Revision 5.1  1992/10/03  22:18:09  syd
  400.    * Initial checkin as of 2.4 Release at PL0
  401.    *
  402. ***************
  403. *** 141,146 ****
  404. --- 146,156 ----
  405.         case EXEC       : fprintf(fd,catgets(elm_msg_cat,
  406.                              FilterSet,FilterExecutedMesg,
  407.                              "\tEXECUTED \"%s\""),
  408. +                     rules[rule_choosen].argument2);
  409. +                         break;
  410. +       case EXECC      : fprintf(fd,catgets(elm_msg_cat,
  411. +                            FilterSet,FilterExecutedSMesg,
  412. +                 "\tEXECUTED \"%s\" AND PUT in mailbox"),
  413.                       rules[rule_choosen].argument2);
  414.                           break;
  415.         case LEAVE      : fprintf(fd,catgets(elm_msg_cat,
  416.  
  417. Index: hdrs/filter.h
  418. Prereq: 5.2
  419. *** ../elm2.4/hdrs/filter.h    Tue Oct 27 11:17:24 1992
  420. --- hdrs/filter.h    Sat Nov 14 20:42:57 1992
  421. ***************
  422. *** 1,8 ****
  423.   
  424. ! /* $Id: filter.h,v 5.2 1992/10/24 14:20:24 syd Exp $ */
  425.   
  426.   /*******************************************************************************
  427. !  *  The Elm Mail System  -  $Revision: 5.2 $   $State: Exp $
  428.    *
  429.    *             Copyright (c) 1988-1992 USENET Community Trust
  430.    *             Copyright (c) 1986,1987 Dave Taylor
  431. --- 1,8 ----
  432.   
  433. ! /* $Id: filter.h,v 5.3 1992/11/15 01:42:57 syd Exp $ */
  434.   
  435.   /*******************************************************************************
  436. !  *  The Elm Mail System  -  $Revision: 5.3 $   $State: Exp $
  437.    *
  438.    *             Copyright (c) 1988-1992 USENET Community Trust
  439.    *             Copyright (c) 1986,1987 Dave Taylor
  440. ***************
  441. *** 14,19 ****
  442. --- 14,24 ----
  443.    *
  444.    *******************************************************************************
  445.    * $Log: filter.h,v $
  446. +  * Revision 5.3  1992/11/15  01:42:57  syd
  447. +  * Add regexp processing to filter.
  448. +  * Add execc operator
  449. +  * From: Jan Djarv <Jan.Djarv@sa.erisoft.se>
  450. +  *
  451.    * Revision 5.2  1992/10/24  14:20:24  syd
  452.    * remove the 25 (MAXRULES) limitation.
  453.    * Basically it mallocs rules in hunks of RULESINC (25) as it goes along.
  454. ***************
  455. *** 29,34 ****
  456. --- 34,41 ----
  457.   
  458.   **/
  459.   
  460. + #include "regexp.h"
  461.   #ifdef   BSD
  462.   # undef  tolower
  463.   #endif
  464. ***************
  465. *** 83,88 ****
  466. --- 90,96 ----
  467.   #define  EXEC        12
  468.   #define  FORWARDC    13
  469.   #define  SENDER        14
  470. + #define  EXECC        15
  471.   
  472.   #define  FAILED_SAVE    20
  473.   
  474. ***************
  475. *** 94,99 ****
  476. --- 102,108 ----
  477.   #define GT        4
  478.   #define NE        5
  479.   #define EQ        6
  480. + #define RE        7
  481.   
  482.   /** A funky way to open a file using open() to avoid file locking hassles **/
  483.   
  484. ***************
  485. *** 170,180 ****
  486.       int     matchwhat;            /* type of 'if' clause      */
  487.       int     relation;            /* type of match (eq, etc)  */
  488.       char    argument1[SLEN];        /* match against this       */
  489.       struct  condition_rec  *next;        /* next condition...        */
  490.         };
  491.   
  492.   struct ruleset_record {
  493. !     char      printable[SLEN];        /* straight from file...    */
  494.       struct  condition_rec  *condition;
  495.       int     action;                /* what action to take      */
  496.       char    argument2[SLEN];        /* argument for action      */
  497. --- 179,190 ----
  498.       int     matchwhat;            /* type of 'if' clause      */
  499.       int     relation;            /* type of match (eq, etc)  */
  500.       char    argument1[SLEN];        /* match against this       */
  501. +     regexp    *regex;                /* compiled regexp        */
  502.       struct  condition_rec  *next;        /* next condition...        */
  503.         };
  504.   
  505.   struct ruleset_record {
  506. !     int    line;                /* line in rules file        */
  507.       struct  condition_rec  *condition;
  508.       int     action;                /* what action to take      */
  509.       char    argument2[SLEN];        /* argument for action      */
  510.  
  511. Index: hdrs/regexp.h
  512. *** /dev/null    Sat Nov 14 05:48:13 1992
  513. --- hdrs/regexp.h    Sat Nov 14 20:38:25 1992
  514. ***************
  515. *** 0 ****
  516. --- 1,45 ----
  517. + /* $Id: regexp.h,v 5.3 1992/11/15 01:38:23 syd Exp $ */
  518. + /*******************************************************************************
  519. +  *  The Elm Mail System  -  $Revision: 5.3 $   $State: Exp $
  520. +  *
  521. +  *             Copyright (c) 1992 USENET Community Trust
  522. +  *******************************************************************************
  523. +  * Bug reports, patches, comments, suggestions should be sent to:
  524. +  *
  525. +  *    Syd Weinstein, Elm Coordinator
  526. +  *    elm@DSI.COM            dsinc!elm
  527. +  *
  528. +  *******************************************************************************
  529. +  * $Log: regexp.h,v $
  530. +  * Revision 5.3  1992/11/15  01:38:23  syd
  531. +  * fix headers
  532. +  *
  533. +  * Revision 5.2  1992/11/15  01:37:57  syd
  534. +  * add proper headers
  535. +  *
  536. +  *
  537. +  ******************************************************************************/
  538. + /*
  539. +  * Definitions etc. for regexp(3) routines.
  540. +  *
  541. +  * Caveat:  this is V8 regexp(3) [actually, a reimplementation thereof],
  542. +  * not the System V one.
  543. +  */
  544. + #define NSUBEXP  10
  545. + typedef struct regexp {
  546. +     char *startp[NSUBEXP];
  547. +     char *endp[NSUBEXP];
  548. +     char regstart;        /* Internal use only. */
  549. +     char reganch;        /* Internal use only. */
  550. +     char *regmust;        /* Internal use only. */
  551. +     int regmlen;        /* Internal use only. */
  552. +     char program[1];    /* Unwarranted chumminess with compiler. */
  553. + } regexp;
  554. + extern regexp *regcomp();
  555. + extern int regexec();
  556. + extern void regsub();
  557. + extern void regerror();
  558.  
  559. Index: hdrs/s_elm.h
  560. *** ../elm2.4/hdrs/s_elm.h    Tue Nov 10 15:20:23 1992
  561. --- hdrs/s_elm.h    Sat Nov 14 16:48:43 1992
  562. ***************
  563. *** 1,4 ****
  564. ! /* s_elm.h created from s_elm.us by gencat on Sat Nov  7 14:37:14 EST 1992 */
  565.   
  566.   #define ElmSet    0x3
  567.   #define ElmYes    0x1
  568. --- 1,4 ----
  569. ! /* s_elm.h created from s_elm.us by gencat on Sat Nov 14 16:48:42 EST 1992 */
  570.   
  571.   #define ElmSet    0x3
  572.   #define ElmYes    0x1
  573. ***************
  574. *** 748,750 ****
  575. --- 748,751 ----
  576.   #define ElmPrintJobSpooled    0x333
  577.   #define ElmPrintFailCode    0x334
  578.   #define ElmPrintFailStatus    0x335
  579. + #define ElmCouldntSeekBytesIntoTempFile    0x336
  580.  
  581. Index: hdrs/s_filter.h
  582. *** ../elm2.4/hdrs/s_filter.h    Tue Oct 27 11:17:25 1992
  583. --- hdrs/s_filter.h    Sat Nov 14 20:42:26 1992
  584. ***************
  585. *** 1,4 ****
  586. ! /* s_filter.h created from s_filter.us by gencat on Sat Oct  3 18:34:14 EDT 1992 */
  587.   
  588.   #define FilterSet    0x10
  589.   #define FilterCantGetPasswdEntry    0x1
  590. --- 1,4 ----
  591. ! /* s_filter.h created from s_filter.us by gencat on Sat Nov 14 21:02:00 EST 1992 */
  592.   
  593.   #define FilterSet    0x10
  594.   #define FilterCantGetPasswdEntry    0x1
  595. ***************
  596. *** 33,39 ****
  597.   #define FilterCouldntMallocNew    0x1e
  598.   #define FilterErrorReadingRules2    0x1f
  599.   #define FilterErrorReadingRules3    0x20
  600. ! #define FilterCantAllocRules 0x21
  601.   #define FilterContainsNotImplemented    0x22
  602.   #define FilterSender    0x23
  603.   #define FilterReturnAddress    0x24
  604. --- 33,39 ----
  605.   #define FilterCouldntMallocNew    0x1e
  606.   #define FilterErrorReadingRules2    0x1f
  607.   #define FilterErrorReadingRules3    0x20
  608. ! #define FilterCantAllocRules    0x21
  609.   #define FilterContainsNotImplemented    0x22
  610.   #define FilterSender    0x23
  611.   #define FilterReturnAddress    0x24
  612. ***************
  613. *** 93,96 ****
  614.   #define FilterTheDefaultAction    0x5a
  615.   #define FilterForkSaveFailed    0x5b
  616.   #define FilterRuleNum    0x5c
  617. ! #define FilterOutOfMemory 0x5d
  618. --- 93,110 ----
  619.   #define FilterTheDefaultAction    0x5a
  620.   #define FilterForkSaveFailed    0x5b
  621.   #define FilterRuleNum    0x5c
  622. ! #define FilterOutOfMemory    0x5d
  623. ! #define FilterExecuteAndSave    0x5e
  624. ! #define FilterExecCMesg    0x5f
  625. ! #define FilterExecutedSMesg    0x60
  626. ! #define FilterCantCompileRegexp    0x61
  627. ! #define FilterWholeRegsub    0x62
  628. ! #define FilterRegsubOne    0x63
  629. ! #define FilterRegsubTwo    0x64
  630. ! #define FilterRegsubThree    0x65
  631. ! #define FilterRegsubFour    0x66
  632. ! #define FilterRegsubFive    0x67
  633. ! #define FilterRegsubSix    0x68
  634. ! #define FilterRegsubSeven    0x69
  635. ! #define FilterRegsubEight    0x6a
  636. ! #define FilterRegsubNine    0x6b
  637.  
  638. Index: lib/mk_aliases.c
  639. Prereq: 5.3
  640. *** ../elm2.4/lib/mk_aliases.c    Tue Nov 10 15:20:25 1992
  641. --- lib/mk_aliases.c    Sat Nov 14 20:15:28 1992
  642. ***************
  643. *** 1,8 ****
  644.   
  645. ! static char rcsid[] = "@(#)$Id: mk_aliases.c,v 5.3 1992/11/07 16:32:14 syd Exp $";
  646.   
  647.   /*******************************************************************************
  648. !  *  The Elm Mail System  -  $Revision: 5.3 $   $State: Exp $
  649.    *
  650.    *            Copyright (c) 1988-1992 USENET Community Trust
  651.    *            Copyright (c) 1986,1987 Dave Taylor
  652. --- 1,8 ----
  653.   
  654. ! static char rcsid[] = "@(#)$Id: mk_aliases.c,v 5.4 1992/11/15 01:15:28 syd Exp $";
  655.   
  656.   /*******************************************************************************
  657. !  *  The Elm Mail System  -  $Revision: 5.4 $   $State: Exp $
  658.    *
  659.    *            Copyright (c) 1988-1992 USENET Community Trust
  660.    *            Copyright (c) 1986,1987 Dave Taylor
  661. ***************
  662. *** 14,19 ****
  663. --- 14,34 ----
  664.    *
  665.    *******************************************************************************
  666.    * $Log: mk_aliases.c,v $
  667. +  * Revision 5.4  1992/11/15  01:15:28  syd
  668. +  * The alias message_count isn't set to zero if the last alias has
  669. +  * been deleted from the alias table. As no aliases are reread from
  670. +  * the aliases database the message_count is left as it was before.
  671. +  *
  672. +  * Fixed that the function do_newalias() sometimes returns without freeing
  673. +  * the buffer allocated before. The patch adds these free calls.
  674. +  *
  675. +  * When you erroneously type a number in your folder elm asks you for
  676. +  * a new current message number. But now if you erase this one number
  677. +  * and leave the string empty elm will set the new current message to
  678. +  * the second message on our sun4! The patch adds a check for an empty
  679. +  * string and returns the current number if no number was entered.
  680. +  * From: vogt@isa.de (Gerald Vogt)
  681. +  *
  682.    * Revision 5.3  1992/11/07  16:32:14  syd
  683.    * comments should be allowed anywhere in the alias file.
  684.    * From: "Robert L. Howard" <robert.howard@matd.gatech.edu>
  685. ***************
  686. *** 518,523 ****
  687. --- 533,539 ----
  688.                   "Couldn't open %s for input!"), inputname);
  689.               error(msg_buff);
  690.           }
  691. +         free(buffer);
  692.           return(-1);
  693.       }
  694.   
  695. ***************
  696. *** 527,532 ****
  697. --- 543,549 ----
  698.               "Couldn't open %s.pag or %s.dir for output!"),
  699.               dataname, dataname);
  700.           error(msg_buff);
  701. +         free(buffer);
  702.           return(-1);
  703.       }
  704.   
  705. ***************
  706. *** 535,540 ****
  707. --- 552,558 ----
  708.                   NewaliasSet, NewaliasNoOpenOut,
  709.                   "Couldn't open %s for output!"), dataname);
  710.           error(msg_buff);
  711. +         free(buffer);
  712.           return(-1);
  713.       }
  714.   
  715. ***************
  716. *** 550,555 ****
  717. --- 568,574 ----
  718.           if (fromelm) sleep(2);
  719.           error(catgets(elm_msg_cat, NewaliasSet, NewaliasNoSave,
  720.                   "** Not saving tables!  Please fix and re-run!"));
  721. +         free(buffer);
  722.           return(-1);
  723.       }
  724.       else {
  725.  
  726. Index: nls/C/C/C/s_aliases.m
  727. *** ../elm2.4/nls/C/C/C/s_aliases.m    Sat Oct  3 18:35:18 1992
  728. --- nls/C/C/C/s_aliases.m    Sat Nov 14 17:59:30 1992
  729. ***************
  730. *** 1,9 ****
  731.   $set 5 #Aliases
  732.   $quote "
  733.   $ #Delete
  734. ! 1    "Delete 1 alias? (%s/%s) "
  735.   $ #DeletePlural
  736. ! 2    "Delete %d aliases? (%s/%s) "
  737.   $ #KeepDelete
  738.   3    [Keeping 1 alias and deleting %d.]
  739.   $ #KeepDeletePlural
  740. --- 1,9 ----
  741.   $set 5 #Aliases
  742.   $quote "
  743.   $ #Delete
  744. ! 1    "Delete 1 alias? (%c/%c) "
  745.   $ #DeletePlural
  746. ! 2    "Delete %d aliases? (%c/%c) "
  747.   $ #KeepDelete
  748.   3    [Keeping 1 alias and deleting %d.]
  749.   $ #KeepDeletePlural
  750.  
  751. Index: nls/C/C/C/s_elm.m
  752. *** ../elm2.4/nls/C/C/C/s_elm.m    Tue Nov 10 15:20:25 1992
  753. --- nls/C/C/C/s_elm.m    Sat Nov 14 16:48:36 1992
  754. ***************
  755. *** 1588,1590 ****
  756. --- 1588,1592 ----
  757.   820    Printout failed with return code %d.
  758.   $ #PrintFailStatus
  759.   821    Printout failed with status 0x%04x.
  760. + $ #CouldntSeekBytesIntoTempFile
  761. + 822    \r\nCouldn't seek %ld bytes into temp file.\r\n
  762.  
  763. Index: nls/C/C/C/s_filter.m
  764. *** ../elm2.4/nls/C/C/C/s_filter.m    Tue Oct 27 11:17:27 1992
  765. --- nls/C/C/C/s_filter.m    Sat Nov 14 20:34:45 1992
  766. ***************
  767. *** 193,195 ****
  768. --- 193,223 ----
  769.   $quote 
  770.   $ #OutOfMemory
  771.   93    filter (%s): Out of memory [malloc failed]\n
  772. + $ #ExecuteAndSave
  773. + 94    Execute and Save
  774. + $ #ExecCMesg
  775. + 95    (left in mailbox and given to command "%s")
  776. + $ #ExecutedSMesg
  777. + 96    \tEXECUTED "%s" AND PUT in mailbox
  778. + $ #CantCompileRegexp
  779. + 97    filter (%s): Error: can't compile regexp: "%s"\n
  780. + $ #WholeRegsub
  781. + 98    <match>
  782. + $ #RegsubOne
  783. + 99    <submatch-1>
  784. + $ #RegsubTwo
  785. + 100    <submatch-2>
  786. + $ #RegsubThree
  787. + 101    <submatch-3>
  788. + $ #RegsubFour
  789. + 102    <submatch-4>
  790. + $ #RegsubFive
  791. + 103    <submatch-5>
  792. + $ #RegsubSix
  793. + 104    <submatch-6>
  794. + $ #RegsubSeven
  795. + 105    <submatch-7>
  796. + $ #RegsubEight
  797. + 106    <submatch-8>
  798. + $ #RegsubNine
  799. + 107    <submatch-9>
  800.  
  801. Index: nls/gencat/genlib.c
  802. *** ../elm2.4/nls/gencat/genlib.c    Sun Oct 20 09:59:51 1991
  803. --- nls/gencat/genlib.c    Sat Nov 14 20:05:11 1992
  804. ***************
  805. *** 709,714 ****
  806. --- 709,715 ----
  807.           newSet->next = set;
  808.           if (set->prev) set->prev->next = newSet;
  809.           else cat->first = newSet;
  810. +         set->prev = newSet;
  811.           set = newSet;
  812.           break;
  813.       }
  814. ***************
  815. *** 769,774 ****
  816. --- 770,776 ----
  817.           newMsg->next = msg;
  818.           if (msg->prev) msg->prev->next = newMsg;
  819.           else curSet->first = newMsg;
  820. +         msg->prev = newMsg;
  821.           msg = newMsg;
  822.           break;
  823.       }
  824.  
  825. Index: src/alias.c
  826. Prereq: 5.9
  827. *** ../elm2.4/src/alias.c    Tue Oct 27 11:17:27 1992
  828. --- src/alias.c    Sat Nov 14 20:24:35 1992
  829. ***************
  830. *** 1,8 ****
  831.   
  832. ! static char rcsid[] = "@(#)$Id: alias.c,v 5.9 1992/10/24 13:35:39 syd Exp $";
  833.   
  834.   /*******************************************************************************
  835. !  *  The Elm Mail System  -  $Revision: 5.9 $   $State: Exp $
  836.    *
  837.    *             Copyright (c) 1988-1992 USENET Community Trust
  838.    *             Copyright (c) 1986,1987 Dave Taylor
  839. --- 1,8 ----
  840.   
  841. ! static char rcsid[] = "@(#)$Id: alias.c,v 5.11 1992/11/15 01:24:34 syd Exp $";
  842.   
  843.   /*******************************************************************************
  844. !  *  The Elm Mail System  -  $Revision: 5.11 $   $State: Exp $
  845.    *
  846.    *             Copyright (c) 1988-1992 USENET Community Trust
  847.    *             Copyright (c) 1986,1987 Dave Taylor
  848. ***************
  849. *** 14,19 ****
  850. --- 14,44 ----
  851.    *
  852.    *******************************************************************************
  853.    * $Log: alias.c,v $
  854. +  * Revision 5.11  1992/11/15  01:24:34  syd
  855. +  * The situation is that the .elm/aliases file is missing, but
  856. +  * .elm/aliases.dir and .elm/aliases.pag exist (isn't serendipity
  857. +  * wonderful?).  The ndbz functions tolerate this and just put a NULL
  858. +  * pointer in the db structure for the data file FILE pointer.  However,
  859. +  * get_one_alias() in listalias and elm doesn't account for the db_open()
  860. +  * succeeding but the dbz_basef field being NULL, so it passes the NULL
  861. +  * pointer to fread().  Detect null and return 0
  862. +  * From: dwolfe@pffft.sps.mot.com (Dave Wolfe)
  863. +  *
  864. +  * Revision 5.10  1992/11/15  01:15:28  syd
  865. +  * The alias message_count isn't set to zero if the last alias has
  866. +  * been deleted from the alias table. As no aliases are reread from
  867. +  * the aliases database the message_count is left as it was before.
  868. +  *
  869. +  * Fixed that the function do_newalias() sometimes returns without freeing
  870. +  * the buffer allocated before. The patch adds these free calls.
  871. +  *
  872. +  * When you erroneously type a number in your folder elm asks you for
  873. +  * a new current message number. But now if you erase this one number
  874. +  * and leave the string empty elm will set the new current message to
  875. +  * the second message on our sun4! The patch adds a check for an empty
  876. +  * string and returns the current number if no number was entered.
  877. +  * From: vogt@isa.de (Gerald Vogt)
  878. +  *
  879.    * Revision 5.9  1992/10/24  13:35:39  syd
  880.    * changes found by using codecenter on Elm 2.4.3
  881.    * From: Graham Hudspith <gwh@inmos.co.uk>
  882. ***************
  883. *** 1043,1048 ****
  884. --- 1068,1074 ----
  885.        *  message that was put to the screen by the do_newalias()
  886.        *  call.
  887.        */
  888. +         message_count = 0;
  889.           sleep(2);
  890.       }
  891.   }
  892. ***************
  893. *** 1284,1289 ****
  894. --- 1310,1318 ----
  895.       register struct alias_rec    **new_aliases, *a;
  896.       struct alias_rec    ar;
  897.       FILE *data_file = db->dbz_basef;
  898. +     if (data_file == NULL)
  899. +         return(0);    /* no alias file, but hash exists, error condition */
  900.   
  901.       if (fread((char *) &ar, sizeof(ar), 1, data_file) <= 0)
  902.           return(0);
  903.  
  904. Index: src/edit.c
  905. Prereq: 5.1
  906. *** ../elm2.4/src/edit.c    Sat Oct  3 18:58:49 1992
  907. --- src/edit.c    Sat Nov 14 16:53:49 1992
  908. ***************
  909. *** 1,8 ****
  910.   
  911. ! static char rcsid[] = "@(#)$Id: edit.c,v 5.1 1992/10/03 22:58:40 syd Exp $";
  912.   
  913.   /*******************************************************************************
  914. !  *  The Elm Mail System  -  $Revision: 5.1 $   $State: Exp $
  915.    *
  916.    *             Copyright (c) 1988-1992 USENET Community Trust
  917.    *             Copyright (c) 1986,1987 Dave Taylor
  918. --- 1,8 ----
  919.   
  920. ! static char rcsid[] = "@(#)$Id: edit.c,v 5.2 1992/11/14 21:53:49 syd Exp $";
  921.   
  922.   /*******************************************************************************
  923. !  *  The Elm Mail System  -  $Revision: 5.2 $   $State: Exp $
  924.    *
  925.    *             Copyright (c) 1988-1992 USENET Community Trust
  926.    *             Copyright (c) 1986,1987 Dave Taylor
  927. ***************
  928. *** 14,19 ****
  929. --- 14,28 ----
  930.    *
  931.    *******************************************************************************
  932.    * $Log: edit.c,v $
  933. +  * Revision 5.2  1992/11/14  21:53:49  syd
  934. +  * When elm copies the temp mailbox back to the mail spool to resync or
  935. +  * quit, it changes to the mailgroup before attempting to diddle in the
  936. +  * mail spool, but when it copies the temp mailbox back to the mail spool
  937. +  * after editing, it forgets to change to mailgroup.  This patch appears
  938. +  * to work, but I haven't exhaustively checked for some path that leaves
  939. +  * the gid set
  940. +  * wrong.  From: dwolfe@pffft.sps.mot.com (Dave Wolfe)
  941. +  *
  942.    * Revision 5.1  1992/10/03  22:58:40  syd
  943.    * Initial checkin as of 2.4 Release at PL0
  944.    *
  945. ***************
  946. *** 21,27 ****
  947.    ******************************************************************************/
  948.   
  949.   /** This routine is for allowing the user to edit their current folder
  950. !     as they wish. 
  951.   
  952.   **/
  953.   
  954. --- 30,36 ----
  955.    ******************************************************************************/
  956.   
  957.   /** This routine is for allowing the user to edit their current folder
  958. !     as they wish.
  959.   
  960.   **/
  961.   
  962. ***************
  963. *** 45,51 ****
  964.           file.  The mailer will ALWAYS resync on the folder
  965.           even if nothing has changed since, not unreasonably, it's
  966.           hard to figure out what occurred in the edit session...
  967. !     
  968.           Also note that if the user wants to edit their incoming
  969.           mailbox they'll actually be editing the tempfile that is
  970.           an exact copy.  More on how we resync in that case later
  971. --- 54,60 ----
  972.           file.  The mailer will ALWAYS resync on the folder
  973.           even if nothing has changed since, not unreasonably, it's
  974.           hard to figure out what occurred in the edit session...
  975.           Also note that if the user wants to edit their incoming
  976.           mailbox they'll actually be editing the tempfile that is
  977.           an exact copy.  More on how we resync in that case later
  978. ***************
  979. *** 65,71 ****
  980.           return(0);
  981.         }
  982.       }
  983. !       
  984.       strcpy(edited_file,
  985.           (folder_type == NON_SPOOL ? cur_folder : cur_tempfolder));
  986.       if (edit_a_file(edited_file) == 0) {
  987. --- 74,80 ----
  988.           return(0);
  989.         }
  990.       }
  991.       strcpy(edited_file,
  992.           (folder_type == NON_SPOOL ? cur_folder : cur_tempfolder));
  993.       if (edit_a_file(edited_file) == 0) {
  994. ***************
  995. *** 85,103 ****
  996.            CleartoEOLN();
  997.   
  998.            if ((temp_folder = fopen(edited_file, "a")) == NULL) {
  999. !            dprint(1, (debugfile, 
  1000. !             "Attempt to open \"%s\" to append failed in %s\n", 
  1001.               edited_file, "edit_mailbox"));
  1002.              set_error(catgets(elm_msg_cat, ElmSet, ElmCouldntReopenTemp,
  1003.            "Couldn't reopen tempfile. Edit LOST!"));
  1004.              return(1);
  1005.            }
  1006. !          /** Now let's lock the folder up and stream the new stuff 
  1007.            into the temp file... **/
  1008.   
  1009. !          lock(OUTGOING);    
  1010.            if ((real_folder = fopen(cur_folder, "r")) == NULL) {
  1011. !            dprint(1, (debugfile, 
  1012.                  "Attempt to open \"%s\" for reading new mail failed in %s\n",
  1013.               cur_folder, "edit_mailbox"));
  1014.              sprintf(buffer, catgets(elm_msg_cat, ElmSet, ElmCouldntOpenFolder,
  1015. --- 94,112 ----
  1016.            CleartoEOLN();
  1017.   
  1018.            if ((temp_folder = fopen(edited_file, "a")) == NULL) {
  1019. !            dprint(1, (debugfile,
  1020. !             "Attempt to open \"%s\" to append failed in %s\n",
  1021.               edited_file, "edit_mailbox"));
  1022.              set_error(catgets(elm_msg_cat, ElmSet, ElmCouldntReopenTemp,
  1023.            "Couldn't reopen tempfile. Edit LOST!"));
  1024.              return(1);
  1025.            }
  1026. !          /** Now let's lock the folder up and stream the new stuff
  1027.            into the temp file... **/
  1028.   
  1029. !          lock(OUTGOING);
  1030.            if ((real_folder = fopen(cur_folder, "r")) == NULL) {
  1031. !            dprint(1, (debugfile,
  1032.                  "Attempt to open \"%s\" for reading new mail failed in %s\n",
  1033.               cur_folder, "edit_mailbox"));
  1034.              sprintf(buffer, catgets(elm_msg_cat, ElmSet, ElmCouldntOpenFolder,
  1035. ***************
  1036. *** 115,121 ****
  1037.              unlock();
  1038.              return(1);
  1039.            }
  1040. !     
  1041.            /** Now we can finally stream the new mail into the tempfile **/
  1042.   
  1043.            while ((len = mail_gets(buffer, SLEN, real_folder)) != 0)
  1044. --- 124,130 ----
  1045.              unlock();
  1046.              return(1);
  1047.            }
  1048.            /** Now we can finally stream the new mail into the tempfile **/
  1049.   
  1050.            while ((len = mail_gets(buffer, SLEN, real_folder)) != 0)
  1051. ***************
  1052. *** 140,145 ****
  1053. --- 149,158 ----
  1054.   
  1055.           } else lock(OUTGOING);
  1056.   
  1057. + #ifdef SAVE_GROUP_MAILBOX_ID
  1058. +              setgid(mailgroupid);
  1059. + #endif
  1060.          /* remove real mail_file and then
  1061.           * link or copy the edited mailfile to real mail_file */
  1062.   
  1063. ***************
  1064. *** 180,192 ****
  1065.            Raw(ON);
  1066.            sleep(2);
  1067.          }
  1068. !           
  1069.          unlock();
  1070.          unlink(edited_file);    /* remove the edited mailfile */
  1071.          error(catgets(elm_msg_cat, ElmSet, ElmChangesIncorporated,
  1072.            "Changes incorporated into new mail..."));
  1073.   
  1074. !     } else 
  1075.         error(catgets(elm_msg_cat, ElmSet, ElmResyncingNewVersion,
  1076.           "Resynchronizing with new version of folder..."));
  1077.   
  1078. --- 193,209 ----
  1079.            Raw(ON);
  1080.            sleep(2);
  1081.          }
  1082. ! #ifdef SAVE_GROUP_MAILBOX_ID
  1083. !        setgid(groupid);
  1084. ! #endif
  1085.          unlock();
  1086.          unlink(edited_file);    /* remove the edited mailfile */
  1087.          error(catgets(elm_msg_cat, ElmSet, ElmChangesIncorporated,
  1088.            "Changes incorporated into new mail..."));
  1089.   
  1090. !     } else
  1091.         error(catgets(elm_msg_cat, ElmSet, ElmResyncingNewVersion,
  1092.           "Resynchronizing with new version of folder..."));
  1093.   
  1094.  
  1095. Index: src/in_utils.c
  1096. Prereq: 5.1
  1097. *** ../elm2.4/src/in_utils.c    Sat Oct  3 18:58:58 1992
  1098. --- src/in_utils.c    Sat Nov 14 20:15:30 1992
  1099. ***************
  1100. *** 1,8 ****
  1101.   
  1102. ! static char rcsid[] = "@(#)$Id: in_utils.c,v 5.1 1992/10/03 22:58:40 syd Exp $";
  1103.   
  1104.   /*******************************************************************************
  1105. !  *  The Elm Mail System  -  $Revision: 5.1 $   $State: Exp $
  1106.    *
  1107.    *            Copyright (c) 1988-1992 USENET Community Trust
  1108.    *            Copyright (c) 1986,1987 Dave Taylor
  1109. --- 1,8 ----
  1110.   
  1111. ! static char rcsid[] = "@(#)$Id: in_utils.c,v 5.2 1992/11/15 01:15:28 syd Exp $";
  1112.   
  1113.   /*******************************************************************************
  1114. !  *  The Elm Mail System  -  $Revision: 5.2 $   $State: Exp $
  1115.    *
  1116.    *            Copyright (c) 1988-1992 USENET Community Trust
  1117.    *            Copyright (c) 1986,1987 Dave Taylor
  1118. ***************
  1119. *** 14,19 ****
  1120. --- 14,34 ----
  1121.    *
  1122.    *******************************************************************************
  1123.    * $Log: in_utils.c,v $
  1124. +  * Revision 5.2  1992/11/15  01:15:28  syd
  1125. +  * The alias message_count isn't set to zero if the last alias has
  1126. +  * been deleted from the alias table. As no aliases are reread from
  1127. +  * the aliases database the message_count is left as it was before.
  1128. +  *
  1129. +  * Fixed that the function do_newalias() sometimes returns without freeing
  1130. +  * the buffer allocated before. The patch adds these free calls.
  1131. +  *
  1132. +  * When you erroneously type a number in your folder elm asks you for
  1133. +  * a new current message number. But now if you erase this one number
  1134. +  * and leave the string empty elm will set the new current message to
  1135. +  * the second message on our sun4! The patch adds a check for an empty
  1136. +  * string and returns the current number if no number was entered.
  1137. +  * From: vogt@isa.de (Gerald Vogt)
  1138. +  *
  1139.    * Revision 5.1  1992/10/03  22:58:40  syd
  1140.    * Initial checkin as of 2.4 Release at PL0
  1141.    *
  1142. ***************
  1143. *** 95,100 ****
  1144. --- 110,118 ----
  1145.       PutLine1(LINES-3, COLUMNS-40,catgets(elm_msg_cat, ElmSet, ElmSetCurrentTo,
  1146.           "Set current %s to :"), item);
  1147.       if (optionally_enter(buff, LINES-3, COLUMNS-15, TRUE, FALSE) == -1)
  1148. +       return(current);
  1149. +     if (buff[0] == '\0')
  1150.         return(current);
  1151.   
  1152.       sscanf(buff,"%d", &num);
  1153.  
  1154. Index: src/newmbox.c
  1155. Prereq: 5.6
  1156. *** ../elm2.4/src/newmbox.c    Tue Nov 10 15:20:28 1992
  1157. --- src/newmbox.c    Sat Nov 14 16:49:43 1992
  1158. ***************
  1159. *** 1,8 ****
  1160.   
  1161. ! static char rcsid[] = "@(#)$Id: newmbox.c,v 5.6 1992/11/07 20:05:52 syd Exp $";
  1162.   
  1163.   /*******************************************************************************
  1164. !  *  The Elm Mail System  -  $Revision: 5.6 $   $State: Exp $
  1165.    *
  1166.    *            Copyright (c) 1988-1992 USENET Community Trust
  1167.    *            Copyright (c) 1986,1987 Dave Taylor
  1168. --- 1,8 ----
  1169.   
  1170. ! static char rcsid[] = "@(#)$Id: newmbox.c,v 5.7 1992/11/14 21:49:42 syd Exp $";
  1171.   
  1172.   /*******************************************************************************
  1173. !  *  The Elm Mail System  -  $Revision: 5.7 $   $State: Exp $
  1174.    *
  1175.    *            Copyright (c) 1988-1992 USENET Community Trust
  1176.    *            Copyright (c) 1986,1987 Dave Taylor
  1177. ***************
  1178. *** 14,19 ****
  1179. --- 14,25 ----
  1180.    *
  1181.    *******************************************************************************
  1182.    * $Log: newmbox.c,v $
  1183. +  * Revision 5.7  1992/11/14  21:49:42  syd
  1184. +  * I think that the code in 'newmbox.c' which handles bad 'Content-length'
  1185. +  * entries is incomplete. The file-ptr for the mail file is
  1186. +  * backed up, but the file-ptr of the temp file WAS LEFT UNMODIFIED !
  1187. +  * From langesw.ssw.de!root Wed Nov 11 14:28:57 1992
  1188. +  *
  1189.    * Revision 5.6  1992/11/07  20:05:52  syd
  1190.    * change to use header_cmp to allow for linear white space around the colon
  1191.    * From: Syd
  1192. ***************
  1193. *** 608,613 ****
  1194. --- 614,631 ----
  1195.              cur_folder, mailfile_size, error_description(err), "reset - read_headers"));
  1196.           emergency_exit();
  1197.             }
  1198. +           if (copyit)
  1199. +         if (fseek(temp, content_start, 0) == -1) {
  1200. +           err = errno;
  1201. +           Write_to_screen(catgets(elm_msg_cat, ElmSet, ElmCouldntSeekBytesIntoTempFile,
  1202. +              "\n\rCouldn't seek %ld bytes into temp file.\n\r"),
  1203. +              1, mailfile_size);
  1204. +           Write_to_screen("** %s. **\n\r", 1, error_description(err));
  1205. +           dprint(1, (debugfile,
  1206. +     "Error: Couldn't seek temp file %s: (offset %ld) Errno %s (%s)\n",
  1207. +              cur_tempfolder, mailfile_size, error_description(err), "reset - read_headers"));
  1208. +           emergency_exit();
  1209. +         }
  1210.             fbytes = content_start;
  1211.             line = lines_start;
  1212.             content_length_found = FALSE;
  1213.  
  1214. Index: src/showmsg.c
  1215. Prereq: 5.5
  1216. *** ../elm2.4/src/showmsg.c    Tue Nov 10 15:20:29 1992
  1217. --- src/showmsg.c    Sat Nov 14 20:29:37 1992
  1218. ***************
  1219. *** 1,8 ****
  1220.   
  1221. ! static char rcsid[] = "@(#)$Id: showmsg.c,v 5.5 1992/11/07 16:23:48 syd Exp $";
  1222.   
  1223.   /*******************************************************************************
  1224. !  *  The Elm Mail System  -  $Revision: 5.5 $   $State: Exp $
  1225.    *
  1226.    *             Copyright (c) 1988-1992 USENET Community Trust
  1227.    *             Copyright (c) 1986,1987 Dave Taylor
  1228. --- 1,8 ----
  1229.   
  1230. ! static char rcsid[] = "@(#)$Id: showmsg.c,v 5.6 1992/11/15 01:29:37 syd Exp $";
  1231.   
  1232.   /*******************************************************************************
  1233. !  *  The Elm Mail System  -  $Revision: 5.6 $   $State: Exp $
  1234.    *
  1235.    *             Copyright (c) 1988-1992 USENET Community Trust
  1236.    *             Copyright (c) 1986,1987 Dave Taylor
  1237. ***************
  1238. *** 14,19 ****
  1239. --- 14,23 ----
  1240.    *
  1241.    *******************************************************************************
  1242.    * $Log: showmsg.c,v $
  1243. +  * Revision 5.6  1992/11/15  01:29:37  syd
  1244. +  * Clear the screen before displaying MIME:
  1245. +  * From: marius@rhi.hi.is (Marius Olafsson)
  1246. +  *
  1247.    * Revision 5.5  1992/11/07  16:23:48  syd
  1248.    * fix null dereferences from patch 5
  1249.    * From: Jukka Ukkonen <ukkonen@csc.fi>
  1250. ***************
  1251. *** 148,153 ****
  1252. --- 152,158 ----
  1253.               copy_message("", fpout, FALSE, FALSE, FALSE, FALSE, FALSE);
  1254.               (void) fclose (fpout);
  1255.               sprintf(Cmd, "metamail -p -z -m Elm %s", fname);
  1256. +                   ClearScreen();
  1257.               Raw(OFF);
  1258.               code = system_call(Cmd, SY_ENAB_SIGINT);
  1259.               Raw(ON);
  1260.  
  1261. Index: utils/listalias.c
  1262. Prereq: 5.4
  1263. *** ../elm2.4/utils/listalias.c    Mon Nov  2 15:51:50 1992
  1264. --- utils/listalias.c    Sat Nov 14 20:24:36 1992
  1265. ***************
  1266. *** 1,8 ****
  1267.   
  1268. ! static char rcsid[] = "@(#)$Id: listalias.c,v 5.4 1992/11/02 20:49:19 syd Exp $";
  1269.   
  1270.   /*******************************************************************************
  1271. !  *  The Elm Mail System  -  $Revision: 5.4 $   $State: Exp $
  1272.    *
  1273.    *             Copyright (c) 1988-1992 USENET Community Trust
  1274.    *             Copyright (c) 1986,1987 Dave Taylor
  1275. --- 1,8 ----
  1276.   
  1277. ! static char rcsid[] = "@(#)$Id: listalias.c,v 5.5 1992/11/15 01:24:34 syd Exp $";
  1278.   
  1279.   /*******************************************************************************
  1280. !  *  The Elm Mail System  -  $Revision: 5.5 $   $State: Exp $
  1281.    *
  1282.    *             Copyright (c) 1988-1992 USENET Community Trust
  1283.    *             Copyright (c) 1986,1987 Dave Taylor
  1284. ***************
  1285. *** 14,19 ****
  1286. --- 14,29 ----
  1287.    *
  1288.    *******************************************************************************
  1289.    * $Log: listalias.c,v $
  1290. +  * Revision 5.5  1992/11/15  01:24:34  syd
  1291. +  * The situation is that the .elm/aliases file is missing, but
  1292. +  * .elm/aliases.dir and .elm/aliases.pag exist (isn't serendipity
  1293. +  * wonderful?).  The ndbz functions tolerate this and just put a NULL
  1294. +  * pointer in the db structure for the data file FILE pointer.  However,
  1295. +  * get_one_alias() in listalias and elm doesn't account for the db_open()
  1296. +  * succeeding but the dbz_basef field being NULL, so it passes the NULL
  1297. +  * pointer to fread().  Detect null and return 0
  1298. +  * From: dwolfe@pffft.sps.mot.com (Dave Wolfe)
  1299. +  *
  1300.    * Revision 5.4  1992/11/02  20:49:19  syd
  1301.    * Resolve a linking error in listalias when DEBUG is enabled.
  1302.    * From cs.utexas.edu!chinacat!chip Sun Nov  1 22:04:02 1992
  1303. ***************
  1304. *** 159,164 ****
  1305. --- 169,177 ----
  1306.    */
  1307.   
  1308.       FILE *data_file = db->dbz_basef;
  1309. +     if (data_file == NULL)
  1310. +         return(0);    /* no alias file, but hash exists, error condition */
  1311.   
  1312.       if (fread((char *) ar, sizeof(struct alias_rec), 1, data_file) <= 0)
  1313.           return(0);
  1314.  
  1315. Index: filter/Makefile.SH
  1316. Prereq: 5.1
  1317. *** ../elm2.4/filter/Makefile.SH    Sat Oct  3 18:18:26 1992
  1318. --- filter/Makefile.SH    Sat Nov 14 20:40:45 1992
  1319. ***************
  1320. *** 21,27 ****
  1321.   fi
  1322.   cat >Makefile <<!GROK!THIS!
  1323.   #
  1324. ! # @(#)$Id: Makefile.SH,v 5.1 1992/10/03 22:18:09 syd Exp $
  1325.   #  Makefile for the Elm system filter program
  1326.   #
  1327.   #         (C) Copyright 1986,1987, by Dave Taylor
  1328. --- 21,27 ----
  1329.   fi
  1330.   cat >Makefile <<!GROK!THIS!
  1331.   #
  1332. ! # @(#)$Id: Makefile.SH,v 5.2 1992/11/15 01:40:43 syd Exp $
  1333.   #  Makefile for the Elm system filter program
  1334.   #
  1335.   #         (C) Copyright 1986,1987, by Dave Taylor
  1336. ***************
  1337. *** 33,38 ****
  1338. --- 33,43 ----
  1339.   #            dsinc!elm
  1340.   #
  1341.   #  $Log: Makefile.SH,v $
  1342. + # Revision 5.2  1992/11/15  01:40:43  syd
  1343. + # Add regexp processing to filter.
  1344. + # Add execc operator
  1345. + # From: Jan Djarv <Jan.Djarv@sa.erisoft.se>
  1346. + #
  1347.   # Revision 5.1  1992/10/03  22:18:09  syd
  1348.   # Initial checkin as of 2.4 Release at PL0
  1349.   #
  1350. ***************
  1351. *** 80,85 ****
  1352. --- 85,91 ----
  1353.               filter.c    \
  1354.               lock.c        \
  1355.               parse.c        \
  1356. +             regexp.c    \
  1357.               rules.c        \
  1358.               summarize.c    \
  1359.               utils.c
  1360. ***************
  1361. *** 89,94 ****
  1362. --- 95,101 ----
  1363.               filter.o    \
  1364.               lock.o        \
  1365.               parse.o        \
  1366. +             regexp.o    \
  1367.               rules.o        \
  1368.               summarize.o    \
  1369.               utils.o        \
  1370. ***************
  1371. *** 148,153 ****
  1372. --- 155,161 ----
  1373.   filter.o:        $(INCLDIR)/defs.h $(INCLDIR)/filter.h $(INCLDIR)/s_filter.h
  1374.   lock.o:            $(INCLDIR)/defs.h $(INCLDIR)/filter.h $(INCLDIR)/s_filter.h
  1375.   parse.o:        $(INCLDIR)/defs.h $(INCLDIR)/filter.h $(INCLDIR)/s_filter.h
  1376. + regexp.o:        $(INCLDIR)/defs.h $(INCLDIR)/regexp.h
  1377.   rules.o:        $(INCLDIR)/defs.h $(INCLDIR)/filter.h $(INCLDIR)/s_filter.h
  1378.   summarize.o:        $(INCLDIR)/defs.h $(INCLDIR)/filter.h $(INCLDIR)/s_filter.h
  1379.   utils.o:        $(INCLDIR)/defs.h $(INCLDIR)/filter.h $(INCLDIR)/s_filter.h
  1380.  
  1381. Index: filter/filter.c
  1382. Prereq: 5.2
  1383. *** ../elm2.4/filter/filter.c    Tue Nov 10 15:20:22 1992
  1384. --- filter/filter.c    Sat Nov 14 20:40:44 1992
  1385. ***************
  1386. *** 1,8 ****
  1387.   
  1388. ! static char rcsid[] ="@(#)$Id: filter.c,v 5.2 1992/11/07 16:20:56 syd Exp $";
  1389.   
  1390.   /*******************************************************************************
  1391. !  *  The Elm Mail System  -  $Revision: 5.2 $   $State: Exp $
  1392.    *
  1393.    *             Copyright (c) 1988-1992 USENET Community Trust
  1394.    *             Copyright (c) 1986,1987 Dave Taylor
  1395. --- 1,8 ----
  1396.   
  1397. ! static char rcsid[] ="@(#)$Id: filter.c,v 5.3 1992/11/15 01:40:43 syd Exp $";
  1398.   
  1399.   /*******************************************************************************
  1400. !  *  The Elm Mail System  -  $Revision: 5.3 $   $State: Exp $
  1401.    *
  1402.    *             Copyright (c) 1988-1992 USENET Community Trust
  1403.    *             Copyright (c) 1986,1987 Dave Taylor
  1404. ***************
  1405. *** 14,19 ****
  1406. --- 14,24 ----
  1407.    *
  1408.    *******************************************************************************
  1409.    * $Log: filter.c,v $
  1410. +  * Revision 5.3  1992/11/15  01:40:43  syd
  1411. +  * Add regexp processing to filter.
  1412. +  * Add execc operator
  1413. +  * From: Jan Djarv <Jan.Djarv@sa.erisoft.se>
  1414. +  *
  1415.    * Revision 5.2  1992/11/07  16:20:56  syd
  1416.    * The first is that when doing a summary, macros are expanded when printing the
  1417.    * rule. IMHO they should be printed as with the -r option (i.e. %t is
  1418. ***************
  1419. *** 77,82 ****
  1420. --- 82,88 ----
  1421.       struct passwd  *getpwuid();        /* for /etc/passwd          */
  1422.   #endif
  1423.       char filename[SLEN],            /* name of the temp file    */
  1424. +          action_argument[SLEN],         /* action arg, per rule    */
  1425.            buffer[MAX_LINE_LEN];        /* input buffer space       */
  1426.       int  in_header = TRUE,            /* for header parsing       */
  1427.            in_to     = FALSE,            /* are we on 'n' line To: ? */
  1428. ***************
  1429. *** 260,267 ****
  1430.       if (get_filter_rules() == -1)
  1431.         mail_message(username);
  1432.       else {
  1433. !       switch (action_from_ruleset()) {
  1434.   
  1435.           case DELETE_MSG : if (verbose && outfd != NULL)
  1436.                   fprintf(outfd,
  1437.                       catgets(elm_msg_cat,FilterSet,
  1438. --- 266,282 ----
  1439.       if (get_filter_rules() == -1)
  1440.         mail_message(username);
  1441.       else {
  1442. !       int action = action_from_ruleset();
  1443. !       if (rule_choosen >= 0) {
  1444. !         expand_macros(rules[rule_choosen].argument2, action_argument,
  1445. !             rules[rule_choosen].line, printing_rules);
  1446. !         /* Got to do this because log_msg() uses argument2 in rules[] */
  1447. !         strcpy(rules[rule_choosen].argument2, action_argument);
  1448. !       }
  1449.   
  1450. +       switch (action) {
  1451.           case DELETE_MSG : if (verbose && outfd != NULL)
  1452.                   fprintf(outfd,
  1453.                       catgets(elm_msg_cat,FilterSet,
  1454. ***************
  1455. *** 291,296 ****
  1456. --- 306,316 ----
  1457.                         break;
  1458.           case FORWARD: mail_message(rules[rule_choosen].argument2);
  1459.                 log_msg(FORWARD);
  1460. +                       break;
  1461. +         case EXECC    : mail_message(username);
  1462. +                   execute(rules[rule_choosen].argument2);
  1463. +               log_msg(EXECC);
  1464.                         break;
  1465.   
  1466.           case EXEC   : execute(rules[rule_choosen].argument2);
  1467.  
  1468. Index: filter/parse.c
  1469. Prereq: 5.3
  1470. *** ../elm2.4/filter/parse.c    Mon Nov  2 15:51:41 1992
  1471. --- filter/parse.c    Sat Nov 14 20:40:46 1992
  1472. ***************
  1473. *** 1,8 ****
  1474.   
  1475. ! static char rcsid[] ="@(#)$Id: parse.c,v 5.3 1992/10/28 14:52:25 syd Exp $";
  1476.   
  1477.   /*******************************************************************************
  1478. !  *  The Elm Mail System  -  $Revision: 5.3 $   $State: Exp $
  1479.    *
  1480.    *             Copyright (c) 1988-1992 USENET Community Trust
  1481.    *             Copyright (c) 1986,1987 Dave Taylor
  1482. --- 1,8 ----
  1483.   
  1484. ! static char rcsid[] ="@(#)$Id: parse.c,v 5.4 1992/11/15 01:40:43 syd Exp $";
  1485.   
  1486.   /*******************************************************************************
  1487. !  *  The Elm Mail System  -  $Revision: 5.4 $   $State: Exp $
  1488.    *
  1489.    *             Copyright (c) 1988-1992 USENET Community Trust
  1490.    *             Copyright (c) 1986,1987 Dave Taylor
  1491. ***************
  1492. *** 14,19 ****
  1493. --- 14,24 ----
  1494.    *
  1495.    *******************************************************************************
  1496.    * $Log: parse.c,v $
  1497. +  * Revision 5.4  1992/11/15  01:40:43  syd
  1498. +  * Add regexp processing to filter.
  1499. +  * Add execc operator
  1500. +  * From: Jan Djarv <Jan.Djarv@sa.erisoft.se>
  1501. +  *
  1502.    * Revision 5.3  1992/10/28  14:52:25  syd
  1503.    * fix compiler warning
  1504.    * From: steve@nshore.org (Stephen J. Walick)
  1505. ***************
  1506. *** 234,242 ****
  1507.   
  1508.               if (relop == NONE) relop = EQ;    /* otherwise can't do -relop */
  1509.               cond->relation  = (not_condition? - (relop) : relop);
  1510.   
  1511. !         for (i=strlen(cond_argument); --i >= 0;)
  1512. !               if (cond_argument[i] == '_') cond_argument[i] = ' ';
  1513.   
  1514.           strcpy(cond->argument1, cond_argument);
  1515.               if ((newcond = (struct condition_rec *)
  1516. --- 239,249 ----
  1517.   
  1518.               if (relop == NONE) relop = EQ;    /* otherwise can't do -relop */
  1519.               cond->relation  = (not_condition? - (relop) : relop);
  1520. +         cond->regex = NULL;
  1521.   
  1522. !         if (relop != RE)
  1523. !           for (i=strlen(cond_argument); --i >= 0;)
  1524. !                 if (cond_argument[i] == '_') cond_argument[i] = ' ';
  1525.   
  1526.           strcpy(cond->argument1, cond_argument);
  1527.               if ((newcond = (struct condition_rec *)
  1528. ***************
  1529. *** 273,278 ****
  1530. --- 280,286 ----
  1531.   
  1532.           cond->matchwhat = lasttype;
  1533.               cond->relation  = (not_condition? - (relop) : relop);
  1534. +         cond->regex = NULL;
  1535.           strcpy(cond->argument1, cond_argument);
  1536.               if ((newcond = (struct condition_rec *)
  1537.                    malloc(sizeof(struct condition_rec))) == NULL) {
  1538. ***************
  1539. *** 318,323 ****
  1540. --- 326,333 ----
  1541.                else if (the_same(word, "<>")||
  1542.                     the_same(word, "!="))    relop = NE;
  1543.                else if (the_same(word, "<"))    relop = LT;
  1544. +              else if (the_same(word, "~")||
  1545. +               the_same(word, "matches")) relop = RE;
  1546.   
  1547.            /* maybe there isn't a relop at all!! */
  1548.   
  1549. ***************
  1550. *** 327,340 ****
  1551.           }
  1552.            
  1553.           if (state == READING_ARGUMENT) {
  1554. !           if (relop != NONE) {
  1555. !             if ((word = strtok(str, " ()[]'\"\t\n")) == NULL)
  1556. !               continue;
  1557. !           }
  1558. !           for (i=strlen(word); --i>=0;)
  1559. !             if (word[i] == '_') word[i] = ' ';
  1560.   
  1561. !           strcpy(cond_argument, word);
  1562.             state = NEXT_CONDITION;
  1563.           }
  1564.   
  1565. --- 337,367 ----
  1566.           }
  1567.            
  1568.           if (state == READING_ARGUMENT) {
  1569. !           if (relop == RE){
  1570. !         /* Special for regular expressions (enclosed between //) */
  1571. !         cond_argument[0] = '\0';
  1572. !         for (;;) {
  1573. !               if ((word = strtok(str, "/")) == NULL)
  1574. !                 break;
  1575. !           strcat(cond_argument, word);
  1576. !           if (word[strlen(word)-1] == '\\') /* If / was escaped ... */
  1577. !             strcat(cond_argument, "/");
  1578. !           else
  1579. !             break;
  1580. !         }
  1581. !         if (word == NULL)
  1582. !           continue;
  1583. !           } else {
  1584. !         if (relop != NONE) {
  1585. !               if ((word = strtok(str, " ()[]'\"\t\n")) == NULL)
  1586. !                 continue;
  1587. !             }
  1588. !             for (i=strlen(word); --i>=0;)
  1589. !               if (word[i] == '_') word[i] = ' ';
  1590.   
  1591. !             strcpy(cond_argument, word);
  1592. !           }
  1593.             state = NEXT_CONDITION;
  1594.           }
  1595.   
  1596. ***************
  1597. *** 348,353 ****
  1598. --- 375,381 ----
  1599.             else if (the_same(word, "save"))    action = SAVE;
  1600.             else if (the_same(word, "forwardc")) action = FORWARDC;
  1601.             else if (the_same(word, "forward")) action = FORWARD;
  1602. +           else if (the_same(word, "executec")) action = EXECC;
  1603.             else if (the_same(word, "exec"))    action = EXEC;
  1604.             else if (the_same(word, "leave"))   action = LEAVE;
  1605.             else {
  1606. ***************
  1607. *** 394,401 ****
  1608.             /** add this to the rules section and alloc next... **/
  1609.   
  1610.             rules[total_rules].action = action;
  1611. !           expand_macros(action_argument, rules[total_rules].argument2,line,
  1612. !                 printing_rules);
  1613.   
  1614.             if (++total_rules >= sizeof_rules)
  1615.               sizeof_rules = grow(&rules, sizeof_rules, RULESINC);
  1616. --- 422,437 ----
  1617.             /** add this to the rules section and alloc next... **/
  1618.   
  1619.             rules[total_rules].action = action;
  1620. !           rules[total_rules].line = line;
  1621. !           /** if we are not printing rules we can't expand macros
  1622. !           until after we applied the rule, due to the regexp macros
  1623. !           **/
  1624. !           if (printing_rules)
  1625. !             expand_macros(action_argument, rules[total_rules].argument2,
  1626. !                   line, printing_rules);
  1627. !           else
  1628. !         strcpy(rules[total_rules].argument2, action_argument);
  1629.   
  1630.             if (++total_rules >= sizeof_rules)
  1631.               sizeof_rules = grow(&rules, sizeof_rules, RULESINC);
  1632.  
  1633. Index: Patchlist
  1634. *** ../elm2.4/Patchlist    Tue Nov 10 15:20:31 1992
  1635. --- Patchlist    Sat Nov 14 21:34:54 1992
  1636. ***************
  1637. *** 1,4 ****
  1638. --- 1,64 ----
  1639.   =========================================================
  1640. + Patch Set - Patches 9 and 10 : Sat Nov 14 21:34:44 EST 1992
  1641. + Elm 2.4PL8 -> Elm 2.4PL10
  1642. + I think that the code in 'newmbox.c' which handles bad 'Content-length'
  1643. + entries is incomplete. The file-ptr for the mail file is
  1644. + backed up, but the file-ptr of the temp file WAS LEFT UNMODIFIED !
  1645. + From langesw.ssw.de!root Wed Nov 11 14:28:57 1992
  1646. + When elm copies the temp mailbox back to the mail spool to resync or
  1647. + quit, it changes to the mailgroup before attempting to diddle in the
  1648. + mail spool, but when it copies the temp mailbox back to the mail spool
  1649. + after editing, it forgets to change to mailgroup.  This patch appears
  1650. + to work, but I haven't exhaustively checked for some path that leaves
  1651. + the gid set
  1652. + wrong.  From: dwolfe@pffft.sps.mot.com (Dave Wolfe)
  1653. + There's an error in two messages in s_aliases.m which causes elm2.4
  1654. + to core dump when resyncronize aliases. (%s/%s) should be (%c/%c).
  1655. + This bug doesn't show up unless you use message cataloges, since the default
  1656. + message in a_quit.c is correct.
  1657. + From: Jan Djarv <Jan.Djarv@sa.erisoft.se>
  1658. + Fix how nls emulation lib gencat links prev pointers
  1659. + From: Jan Djarv <Jan.Djarv@sa.erisoft.se>
  1660. + The alias message_count isn't set to zero if the last alias has
  1661. + been deleted from the alias table. As no aliases are reread from
  1662. + the aliases database the message_count is left as it was before.
  1663. + Fixed that the function do_newalias() sometimes returns without freeing
  1664. + the buffer allocated before. The patch adds these free calls.
  1665. + When you erroneously type a number in your folder elm asks you for
  1666. + a new current message number. But now if you erase this one number
  1667. + and leave the string empty elm will set the new current message to
  1668. + the second message on our sun4! The patch adds a check for an empty
  1669. + string and returns the current number if no number was entered.
  1670. + From: vogt@isa.de (Gerald Vogt)
  1671. + The situation is that the .elm/aliases file is missing, but
  1672. + .elm/aliases.dir and .elm/aliases.pag exist (isn't serendipity
  1673. + wonderful?).  The ndbz functions tolerate this and just put a NULL
  1674. + pointer in the db structure for the data file FILE pointer.  However,
  1675. + get_one_alias() in listalias and elm doesn't account for the db_open()
  1676. + succeeding but the dbz_basef field being NULL, so it passes the NULL
  1677. + pointer to fread().  Detect null and return 0
  1678. + From: dwolfe@pffft.sps.mot.com (Dave Wolfe)
  1679. + Clear the screen before displaying MIME:
  1680. + From: marius@rhi.hi.is (Marius Olafsson)
  1681. + Add regexp processing to filter.
  1682. + Add execc operator
  1683. + From: Jan Djarv <Jan.Djarv@sa.erisoft.se>
  1684. + =========================================================
  1685.   Patch Set - Patches 7 and 8 : Sat Nov  7 15:54:44 EST 1992
  1686.   Elm 2.4PL6 -> Elm 2.4PL8
  1687.   
  1688.  
  1689. -- 
  1690. ========================================================================
  1691. Sydney S. Weinstein, CDP, CCP          Elm Coordinator - Current 2.4PL08
  1692. Datacomp Systems, Inc.                 Projected 3.0 Release: ??? ?,1994
  1693. syd@DSI.COM or dsinc!syd      Voice: (215) 947-9900, FAX: (215) 938-0235
  1694.