home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / unix / volume24 / elm2.3patches / part01 next >
Text File  |  1991-03-05  |  29KB  |  949 lines

  1. Subject:  v24i025:  Elm mail system, release 2.3, patches, Part01/11
  2. Newsgroups: comp.sources.unix
  3. Approved: rsalz@uunet.UU.NET
  4. X-Checksum-Snefru: c9c545f7 3724c740 68cc405e 8f9f84ac
  5.  
  6. Submitted-by: Syd Weinstein <syd@DSI.COM>
  7. Posting-number: Volume 24, Issue 25
  8. Archive-name: elm2.3patches/part01
  9.  
  10. Subject: elm 2.3 Patch #1
  11. Summary: This is an official patch for elm 2.3 system.  Please apply it.
  12. Priority: HIGH
  13.  
  14. Fix:    From rn, say "| patch -p -N -d DIR", where DIR is your elm source
  15.     directory.  Outside of rn, say "cd DIR; patch -p -N <thisarticle".
  16.     If you don't have the patch program, apply the following by hand,
  17.     or get patch (version 2.0, latest patchlevel).
  18.  
  19.     After patching:
  20.         Configure -d    (only if you had htons or signal problems)
  21.         make
  22.         make install
  23.  
  24.     If patch indicates that patchlevel is the wrong version, you may need
  25.     to apply one or more previous patches, or the patch may already
  26.     have been applied.  See the patchlevel.h file to find out what has or
  27.     has not been applied.  In any event, don't continue with the patch.
  28.  
  29.     If you are missing previous patches they can be obtained from our:
  30.     archive server.
  31.  
  32.     Syd Weinstein
  33.     elm@DSI.COM
  34.  
  35.     The patches are available from the dsinc archive server
  36.     Send the following message to archive-server@DSI.COM for
  37.     a list of available patches:
  38.  
  39.     Subject: patch list
  40.     send index elm
  41.  
  42. Fixed Metaconfig prototype for voidsig, the test was backwards
  43. (had a -z where a -n should have been)
  44. From: Syd
  45.  
  46. The open system call in actions.c for EMERGENCY_MAILBOX and EMER_MBOX
  47. were tested with the inequality >= 0 exactly backwards.
  48. If the user's system mail box (/usr/spool/mail/user_id) is
  49. removed the attempt of filter to flock it fails.  If it does not exist then
  50. it should create it and then lock it.
  51. From: john@hopf.math.nwu.edu (John Franks)
  52.  
  53. Allow nesting on () in comment in address
  54. From: Chip Rosenthal <chip@chinacat.Unicom.COM>
  55.  
  56. Fix boundary condition in add_name_to_list() where it fails to
  57. print error message.
  58. From: Chip Rosenthal <chip@chinacat.Unicom.COM>
  59.  
  60. Fixes the 'g' Group Reply command to send to the cc list also.
  61. A bad variable name caused it to be ignored.
  62. From: chip@chinacat.Unicom.COM (Chip Rosenthal)
  63.  
  64. Fixes when ALLOW_SUBSHELL #define'd and you are in the
  65. Message Header Edit Screen and the mail you just composed
  66. is not a reply THEN the subshell command is executed.
  67. From: zvr@natasha.cs.wisc.EDU (Alexios Zavras)
  68.  
  69. Fixes where src/curses.c attempts to set the screen size via the ioctl
  70. TIOCGWINSIZ if it exsists. It should only use the row or col size as
  71. returned from the ioctl if they are not 0.
  72. From: muller%sdcc10@ucsd.edu (Keith Muller)
  73.  
  74. alias command in ELM2.3 fails because of the wrong sized aliases.hash
  75. newalias did not truncate existing file (aliases.hash)
  76. From: Toshinori Maeno <tmaeno@cc.titech.ac.jp>
  77.  
  78. Fix htonl() double define problems
  79. From: Syd
  80.  
  81. Fix aliases.hash.tmp being over 14 chars and causing rename problems
  82. on a 14 character limit system.
  83. From: Syd
  84.  
  85. Fix now spurious error message for alias recursive expansion
  86. when alias lookup is on a string over 20 chars long.  If that
  87. long, its just not an alias, so just return.
  88. From: Syd
  89.  
  90. Index: hdrs/patchlevel.h
  91. Prereq: 0
  92. *** ../elm2.3/hdrs/patchlevel.h    Sat Apr 28 22:29:41 1990
  93. --- hdrs/patchlevel.h    Tue Jun  5 21:26:16 1990
  94. ***************
  95. *** 1 ****
  96. ! #define PATCHLEVEL 0
  97. --- 1 ----
  98. ! #define PATCHLEVEL 1
  99.  
  100. Index: Configure
  101. Prereq: 4.1
  102. *** ../elm2.3/Configure    Sat Apr 28 22:40:52 1990
  103. --- Configure    Thu May 31 20:47:07 1990
  104. ***************
  105. *** 8,14 ****
  106.   # and edit it to reflect your system.  Some packages may include samples
  107.   # of config.h for certain machines, so you might look for one of those.)
  108.   #
  109. ! # $Header: /files/home/users/syd/elm.dev/RCS/Configure,v 4.1 90/04/28 22:40:46 syd Exp $
  110.   #
  111.   # Yes, you may rip this off to use in other distribution packages.
  112.   # (Note: this Configure script was generated automatically.  Rather than
  113. --- 8,14 ----
  114.   # and edit it to reflect your system.  Some packages may include samples
  115.   # of config.h for certain machines, so you might look for one of those.)
  116.   #
  117. ! # $Header: /files/home/users/syd/elm.rel/RCS/Configure,v 4.1.1.1 90/05/31 20:46:41 syd Exp $
  118.   #
  119.   # Yes, you may rip this off to use in other distribution packages.
  120.   # (Note: this Configure script was generated automatically.  Rather than
  121. ***************
  122. *** 2701,2725 ****
  123.   set rename d_rename
  124.   eval $inlibc
  125.   
  126. - : ask about setgid running of Elm
  127. - case "$d_setgid" in
  128. - "$define")    dflt=y;;
  129. - "$undef")    dflt=n;;
  130. - *)        dflt=y;;
  131. - esac
  132. - echo " "
  133. - rp="Am I going to be running as a setgid program? [$dflt]"
  134. - $echo $n "$rp $c"
  135. - . myread
  136. - case "$ans" in
  137. - y*) d_setgid="$define";;
  138. - *)  d_setgid="$undef";;
  139. - esac
  140. - case "$d_setgid" in
  141. - "$define")    mailermode=2755;;
  142. - *)        mailermode=755;;
  143. - esac
  144.   : see if sigvector exists -- since sigvec will match the substring
  145.   echo " "
  146.   if $contains sigvector libc.list >/dev/null 2>&1; then
  147. --- 2701,2706 ----
  148. ***************
  149. *** 3163,3169 ****
  150.   elif $contains 'void.*signal' $$.tmp >/dev/null 2>&1 ; then
  151.       echo "You have void (*signal())() instead of int."
  152.       d_voidsig="$define"
  153. ! elif $test -z "$d_voidsig"; then
  154.       echo $n "As you already told me, signal handlers return "
  155.       if $test "$d_voidsig" = "$define"; then
  156.       echo void
  157. --- 3144,3150 ----
  158.   elif $contains 'void.*signal' $$.tmp >/dev/null 2>&1 ; then
  159.       echo "You have void (*signal())() instead of int."
  160.       d_voidsig="$define"
  161. ! elif $test -n "$d_voidsig"; then
  162.       echo $n "As you already told me, signal handlers return "
  163.       if $test "$d_voidsig" = "$define"; then
  164.       echo void
  165. ***************
  166. *** 3443,3448 ****
  167. --- 3424,3448 ----
  168.       esac
  169.       fi
  170.   done
  171. + : ask about setgid running of Elm
  172. + case "$d_setgid" in
  173. + "$define")    dflt=y;;
  174. + "$undef")    dflt=n;;
  175. + *)        dflt=y;;
  176. + esac
  177. + echo " "
  178. + rp="Am I going to be running as a setgid program? [$dflt]"
  179. + $echo $n "$rp $c"
  180. + . myread
  181. + case "$ans" in
  182. + y*) d_setgid="$define";;
  183. + *)  d_setgid="$undef";;
  184. + esac
  185. + case "$d_setgid" in
  186. + "$define")    mailermode=2755;;
  187. + *)        mailermode=755;;
  188. + esac
  189.   
  190.   : determine the group of the mail directory- what group elm should use
  191.   mailgrp=`$ls -lgd $maildir`
  192.  
  193. Index: filter/actions.c
  194. Prereq: 4.1
  195. *** ../elm2.3/filter/actions.c    Sat Apr 28 22:41:54 1990
  196. --- filter/actions.c    Tue Jun  5 20:28:52 1990
  197. ***************
  198. *** 1,8 ****
  199.   
  200. ! static char rcsid[] ="@(#)$Id: actions.c,v 4.1 90/04/28 22:41:53 syd Exp $";
  201.   
  202.   /*******************************************************************************
  203. !  *  The Elm Mail System  -  $Revision: 4.1 $   $State: Exp $
  204.    *
  205.    *             Copyright (c) 1986, 1987 Dave Taylor
  206.    *             Copyright (c) 1988, 1989, 1990 USENET Community Trust
  207. --- 1,8 ----
  208.   
  209. ! static char rcsid[] ="@(#)$Id: actions.c,v 4.1.1.1 90/06/05 20:28:51 syd Exp $";
  210.   
  211.   /*******************************************************************************
  212. !  *  The Elm Mail System  -  $Revision: 4.1.1.1 $   $State: Exp $
  213.    *
  214.    *             Copyright (c) 1986, 1987 Dave Taylor
  215.    *             Copyright (c) 1988, 1989, 1990 USENET Community Trust
  216. ***************
  217. *** 14,19 ****
  218. --- 14,27 ----
  219.    *
  220.    *******************************************************************************
  221.    * $Log:    actions.c,v $
  222. +  * Revision 4.1.1.1  90/06/05  20:28:51  syd
  223. +  * The open system call in actions.c for EMERGENCY_MAILBOX and EMER_MBOX
  224. +  * were tested with the inequality >= 0 exactly backwards.
  225. +  * If the user's system mail box (/usr/spool/mail/user_id) is
  226. +  * removed the attempt of filter to flock it fails.  If it does not exist then
  227. +  * it should create it and then lock it.
  228. +  * From: john@hopf.math.nwu.edu (John Franks)
  229. +  * 
  230.    * Revision 4.1  90/04/28  22:41:53  syd
  231.    * checkin of Elm 2.3 as of Release PL0
  232.    * 
  233. ***************
  234. *** 225,231 ****
  235.   
  236.       sprintf(mailbox, "%s/%s", home, EMERGENCY_MAILBOX);
  237.   
  238. !     if ((mailunit = open(mailbox, O_APPEND | O_WRONLY | O_CREAT, 0600)) >= 0) {
  239.         if (outfd != NULL)
  240.           fprintf(outfd, "filter (%s): Can't open %s either!!\n",
  241.               username, mailbox);
  242. --- 233,239 ----
  243.   
  244.       sprintf(mailbox, "%s/%s", home, EMERGENCY_MAILBOX);
  245.   
  246. !     if ((mailunit = open(mailbox, O_APPEND | O_WRONLY | O_CREAT, 0600)) < 0) {
  247.         if (outfd != NULL)
  248.           fprintf(outfd, "filter (%s): Can't open %s either!!\n",
  249.               username, mailbox);
  250. ***************
  251. *** 232,238 ****
  252.   
  253.         sprintf(mailbox,"%s/%s", home, EMERG_MBOX); 
  254.   
  255. !       if ((mailunit = open(mailbox, O_APPEND | O_WRONLY | O_CREAT, 0600)) >= 0) {
  256.   
  257.           if (outfd != NULL) {
  258.             fprintf(outfd,"filter (%s): Can't open %s either!!!!\n",
  259. --- 240,246 ----
  260.   
  261.         sprintf(mailbox,"%s/%s", home, EMERG_MBOX); 
  262.   
  263. !       if ((mailunit = open(mailbox, O_APPEND | O_WRONLY | O_CREAT, 0600)) < 0) {
  264.   
  265.           if (outfd != NULL) {
  266.             fprintf(outfd,"filter (%s): Can't open %s either!!!!\n",
  267.  
  268. Index: filter/lock.c
  269. Prereq: 4.1
  270. *** ../elm2.3/filter/lock.c    Sat Apr 28 22:41:58 1990
  271. --- filter/lock.c    Tue Jun  5 20:28:54 1990
  272. ***************
  273. *** 1,8 ****
  274.   
  275. ! static char rcsid[] ="@(#)$Id: lock.c,v 4.1 90/04/28 22:41:57 syd Exp $";
  276.   
  277.   /*******************************************************************************
  278. !  *  The Elm Mail System  -  $Revision: 4.1 $   $State: Exp $
  279.    *
  280.    *             Copyright (c) 1986, 1987 Dave Taylor
  281.    *             Copyright (c) 1988, 1989, 1990 USENET Community Trust
  282. --- 1,8 ----
  283.   
  284. ! static char rcsid[] ="@(#)$Id: lock.c,v 4.1.1.1 90/06/05 20:28:53 syd Exp $";
  285.   
  286.   /*******************************************************************************
  287. !  *  The Elm Mail System  -  $Revision: 4.1.1.1 $   $State: Exp $
  288.    *
  289.    *             Copyright (c) 1986, 1987 Dave Taylor
  290.    *             Copyright (c) 1988, 1989, 1990 USENET Community Trust
  291. ***************
  292. *** 14,19 ****
  293. --- 14,27 ----
  294.    *
  295.    *******************************************************************************
  296.    * $Log:    lock.c,v $
  297. +  * Revision 4.1.1.1  90/06/05  20:28:53  syd
  298. +  * The open system call in actions.c for EMERGENCY_MAILBOX and EMER_MBOX
  299. +  * were tested with the inequality >= 0 exactly backwards.
  300. +  * If the user's system mail box (/usr/spool/mail/user_id) is
  301. +  * removed the attempt of filter to flock it fails.  If it does not exist then
  302. +  * it should create it and then lock it.
  303. +  * From: john@hopf.math.nwu.edu (John Franks)
  304. +  * 
  305.    * Revision 4.1  90/04/28  22:41:57  syd
  306.    * checkin of Elm 2.3 as of Release PL0
  307.    * 
  308. ***************
  309. *** 94,100 ****
  310.   #endif                    /* } !LOCK_FLOCK_ONLY    */
  311.   #ifdef    LOCK_BY_FLOCK            /* { LOCK_BY_FLOCK    */
  312.       (void)sprintf(flock_name,"%s%s",mailhome,username);
  313. !     flock_fd = open(flock_name,O_RDONLY);
  314.       if ( flock_fd >= 0 )
  315.         for (attempts = 0; attempts < 10; attempts++) {
  316.           if ( (ret = flock(flock_fd,LOCK_NB|LOCK_EX)) != -1 )
  317. --- 102,108 ----
  318.   #endif                    /* } !LOCK_FLOCK_ONLY    */
  319.   #ifdef    LOCK_BY_FLOCK            /* { LOCK_BY_FLOCK    */
  320.       (void)sprintf(flock_name,"%s%s",mailhome,username);
  321. !     flock_fd = open(flock_name, O_RDONLY | O_CREAT, 0600);
  322.       if ( flock_fd >= 0 )
  323.         for (attempts = 0; attempts < 10; attempts++) {
  324.           if ( (ret = flock(flock_fd,LOCK_NB|LOCK_EX)) != -1 )
  325.  
  326. Index: hdrs/defs.h
  327. Prereq: 4.1
  328. *** ../elm2.3/hdrs/defs.h    Sat Apr 28 22:42:07 1990
  329. --- hdrs/defs.h    Tue Jun  5 21:23:28 1990
  330. ***************
  331. *** 1,8 ****
  332.   
  333. ! /* $Id: defs.h,v 4.1 90/04/28 22:42:06 syd Exp $ */
  334.   
  335.   /*******************************************************************************
  336. !  *  The Elm Mail System  -  $Revision: 4.1 $   $State: Exp $
  337.    *
  338.    *             Copyright (c) 1986, 1987 Dave Taylor
  339.    *             Copyright (c) 1988, 1989, 1990 USENET Community Trust
  340. --- 1,8 ----
  341.   
  342. ! /* $Id: defs.h,v 4.1.1.2 90/06/05 21:23:19 syd Exp $ */
  343.   
  344.   /*******************************************************************************
  345. !  *  The Elm Mail System  -  $Revision: 4.1.1.2 $   $State: Exp $
  346.    *
  347.    *             Copyright (c) 1986, 1987 Dave Taylor
  348.    *             Copyright (c) 1988, 1989, 1990 USENET Community Trust
  349. ***************
  350. *** 14,19 ****
  351. --- 14,29 ----
  352.    *
  353.    *******************************************************************************
  354.    * $Log:    defs.h,v $
  355. +  * Revision 4.1.1.2  90/06/05  21:23:19  syd
  356. +  * Fix other side of same problem
  357. +  * From: Syd
  358. +  * 
  359. +  * Revision 4.1.1.1  90/06/05  21:16:42  syd
  360. +  * Try and avoid double definitions for the null
  361. +  * macro for htonl when the system includes aready
  362. +  * have it
  363. +  * From: Syd
  364. +  * 
  365.    * Revision 4.1  90/04/28  22:42:06  syd
  366.    * checkin of Elm 2.3 as of Release PL0
  367.    * 
  368. ***************
  369. *** 327,341 ****
  370.   
  371.   /*
  372.    * Macros for network/external number representation conversion.
  373.    */
  374.   #ifdef NETWORK_ORDER
  375.   unsigned short    ntohs(), htons();
  376.   unsigned long    ntohl(), htonl();
  377.   #else
  378. ! #define    ntohl(x)    (x)
  379. ! #define    ntohs(x)    (x)
  380. ! #define    htonl(x)    (x)
  381. ! #define    htons(x)    (x)
  382.   #endif
  383.   
  384.   char *argv_zero();
  385. --- 337,357 ----
  386.   
  387.   /*
  388.    * Macros for network/external number representation conversion.
  389. +  *    Note, some system include files already have htonl defined
  390. +  *    as this same macro, the ifndef should prevent conflicts.
  391.    */
  392.   #ifdef NETWORK_ORDER
  393. + #  ifndef ntohl
  394.   unsigned short    ntohs(), htons();
  395.   unsigned long    ntohl(), htonl();
  396. + #  endif
  397.   #else
  398. ! #  ifndef ntohl
  399. ! #     define    ntohl(x)    (x)
  400. ! #     define    ntohs(x)    (x)
  401. ! #     define    htonl(x)    (x)
  402. ! #     define    htons(x)    (x)
  403. ! #  endif
  404.   #endif
  405.   
  406.   char *argv_zero();
  407.  
  408. Index: src/alias.c
  409. Prereq: 4.1
  410. *** ../elm2.3/src/alias.c    Sat Apr 28 22:42:27 1990
  411. --- src/alias.c    Tue Jun  5 21:20:46 1990
  412. ***************
  413. *** 1,8 ****
  414.   
  415. ! static char rcsid[] = "@(#)$Id: alias.c,v 4.1 90/04/28 22:42:25 syd Exp $";
  416.   
  417.   /*******************************************************************************
  418. !  *  The Elm Mail System  -  $Revision: 4.1 $   $State: Exp $
  419.    *
  420.    *             Copyright (c) 1986, 1987 Dave Taylor
  421.    *             Copyright (c) 1988, 1989, 1990 USENET Community Trust
  422. --- 1,8 ----
  423.   
  424. ! static char rcsid[] = "@(#)$Id: alias.c,v 4.1.1.1 90/06/05 21:20:26 syd Exp $";
  425.   
  426.   /*******************************************************************************
  427. !  *  The Elm Mail System  -  $Revision: 4.1.1.1 $   $State: Exp $
  428.    *
  429.    *             Copyright (c) 1986, 1987 Dave Taylor
  430.    *             Copyright (c) 1988, 1989, 1990 USENET Community Trust
  431. ***************
  432. *** 14,19 ****
  433. --- 14,24 ----
  434.    *
  435.    *******************************************************************************
  436.    * $Log:    alias.c,v $
  437. +  * Revision 4.1.1.1  90/06/05  21:20:26  syd
  438. +  * Make temp file name less than 14 chars to allow deleting
  439. +  * aliases on a 14 char limit file system
  440. +  * From: Syd
  441. +  * 
  442.    * Revision 4.1  90/04/28  22:42:25  syd
  443.    * checkin of Elm 2.3 as of Release PL0
  444.    * 
  445. ***************
  446. *** 437,443 ****
  447.       strcat(name_with_equals, " ="); 
  448.   
  449.       sprintf(fname,"%s/%s", home, ALIAS_TEXT);
  450. !     sprintf(tmpfname,"%s/%s.tmp", home, ALIAS_TEXT);
  451.       
  452.       save_file_stats(fname);
  453.   
  454. --- 442,448 ----
  455.       strcat(name_with_equals, " ="); 
  456.   
  457.       sprintf(fname,"%s/%s", home, ALIAS_TEXT);
  458. !     sprintf(tmpfname,"%s/%s.t", home, ALIAS_TEXT);
  459.       
  460.       save_file_stats(fname);
  461.   
  462.  
  463. Index: src/aliaslib.c
  464. Prereq: 4.1
  465. *** ../elm2.3/src/aliaslib.c    Sat Apr 28 22:42:30 1990
  466. --- src/aliaslib.c    Tue Jun  5 21:32:08 1990
  467. ***************
  468. *** 1,8 ****
  469.   
  470. ! static char rcsid[] = "@(#)$Id: aliaslib.c,v 4.1 90/04/28 22:42:29 syd Exp $";
  471.   
  472.   /*******************************************************************************
  473. !  *  The Elm Mail System  -  $Revision: 4.1 $   $State: Exp $
  474.    *
  475.    *             Copyright (c) 1986, 1987 Dave Taylor
  476.    *             Copyright (c) 1988, 1989, 1990 USENET Community Trust
  477. --- 1,8 ----
  478.   
  479. ! static char rcsid[] = "@(#)$Id: aliaslib.c,v 4.1.1.2 90/06/05 21:31:34 syd Exp $";
  480.   
  481.   /*******************************************************************************
  482. !  *  The Elm Mail System  -  $Revision: 4.1.1.2 $   $State: Exp $
  483.    *
  484.    *             Copyright (c) 1986, 1987 Dave Taylor
  485.    *             Copyright (c) 1988, 1989, 1990 USENET Community Trust
  486. ***************
  487. *** 14,19 ****
  488. --- 14,30 ----
  489.    *
  490.    *******************************************************************************
  491.    * $Log:    aliaslib.c,v $
  492. +  * Revision 4.1.1.2  90/06/05  21:31:34  syd
  493. +  * Fix now spurious error message for alias recursive expansion
  494. +  * when alias lookup is on a string over 20 chars long.  If that
  495. +  * long, its just not an alias, so just return.
  496. +  * From: Syd
  497. +  * 
  498. +  * Revision 4.1.1.1  90/06/05  20:41:25  syd
  499. +  * Fix boundary condition in add_name_to_list() where it fails to
  500. +  * print error message.
  501. +  * From: Chip Rosenthal <chip@chinacat.Unicom.COM>
  502. +  * 
  503.    * Revision 4.1  90/04/28  22:42:29  syd
  504.    * checkin of Elm 2.3 as of Release PL0
  505.    * 
  506. ***************
  507. *** 214,246 ****
  508.    */
  509.   int add_name_to_list(name,bufptr,bufsizep)
  510.   register char *name;    /* name to append to buffer            */
  511. ! char **bufptr;        /* pointer to pointer to end of buffer        */
  512. ! int *bufsizep;        /* pointer to space remaining in buffer        */
  513.   {
  514. !     register char *dest = *bufptr;
  515. !     register int bufsize = *bufsizep;
  516.   
  517. !     if ( bufsize < 2 )
  518. !       return FALSE;
  519. !     *dest++ = ','; --bufsize;
  520. !     *dest++ = ' '; --bufsize;
  521. !     while ( *name != '\0' && --bufsize > 0 )
  522. !       *dest++ = *name++ ;
  523. !     *dest = '\0';
  524. !     *bufptr = dest;
  525. !     *bufsizep = bufsize;
  526. !     if ( bufsize <= 0 ) {
  527. !       error("Alias expansion is too long.");
  528. !       return FALSE;
  529.       }
  530.   
  531.       return TRUE;
  532.   }
  533.   
  534.   
  535.   #ifndef DONT_TOUCH_ADDRESSES
  536.   char *expand_system(buffer, show_errors)
  537.   char *buffer;
  538. --- 225,253 ----
  539.    */
  540.   int add_name_to_list(name,bufptr,bufsizep)
  541.   register char *name;    /* name to append to buffer            */
  542. ! register char **bufptr;    /* pointer to pointer to end of buffer        */
  543. ! register int *bufsizep;    /* pointer to space remaining in buffer        */
  544.   {
  545. !     if ( *bufsizep < 0 )
  546. !         return FALSE;
  547.   
  548. !     *bufsizep -= strlen(name)+2;
  549. !     if ( *bufsizep <= 0 ) {
  550. !         *bufsizep = -1;
  551. !         error("Alias expansion is too long.");
  552. !         return FALSE;
  553.       }
  554.   
  555. +     *(*bufptr)++ = ',';
  556. +     *(*bufptr)++ = ' ';
  557. +     while ( *name != '\0' )
  558. +       *(*bufptr)++ = *name++ ;
  559. +     **bufptr = '\0';
  560.       return TRUE;
  561.   }
  562.   
  563.   
  564.   #ifndef DONT_TOUCH_ADDRESSES
  565.   char *expand_system(buffer, show_errors)
  566.   char *buffer;
  567. ***************
  568. *** 269,279 ****
  569.       /** find word and return loc, or -1 **/
  570.       register int loc;
  571.   
  572. !     if (strlen(word) > 20) {
  573. !       dprint(3, (debugfile, "Overly long alias name entered: %s\n", word));
  574. !       error1("Bad alias name: %s.  Too long.\n", word);
  575.         return(-1);
  576. -     }
  577.   
  578.       loc = hash_it(word, size);
  579.   
  580. --- 276,284 ----
  581.       /** find word and return loc, or -1 **/
  582.       register int loc;
  583.   
  584. !     /** cannot be an alias if its longer than 20 chars **/
  585. !     if (strlen(word) > 20)
  586.         return(-1);
  587.   
  588.       loc = hash_it(word, size);
  589.   
  590.  
  591. Index: src/curses.c
  592. Prereq: 4.1
  593. *** ../elm2.3/src/curses.c    Sat Apr 28 22:42:40 1990
  594. --- src/curses.c    Tue Jun  5 21:05:24 1990
  595. ***************
  596. *** 1,8 ****
  597.   
  598. ! static char rcsid[] = "@(#)$Id: curses.c,v 4.1 90/04/28 22:42:39 syd Exp $";
  599.   
  600.   /*******************************************************************************
  601. !  *  The Elm Mail System  -  $Revision: 4.1 $   $State: Exp $
  602.    *
  603.    *             Copyright (c) 1986, 1987 Dave Taylor
  604.    *             Copyright (c) 1988, 1989, 1990 USENET Community Trust
  605. --- 1,8 ----
  606.   
  607. ! static char rcsid[] = "@(#)$Id: curses.c,v 4.1.1.1 90/06/05 21:05:22 syd Exp $";
  608.   
  609.   /*******************************************************************************
  610. !  *  The Elm Mail System  -  $Revision: 4.1.1.1 $   $State: Exp $
  611.    *
  612.    *             Copyright (c) 1986, 1987 Dave Taylor
  613.    *             Copyright (c) 1988, 1989, 1990 USENET Community Trust
  614. ***************
  615. *** 14,19 ****
  616. --- 14,25 ----
  617.    *
  618.    *******************************************************************************
  619.    * $Log:    curses.c,v $
  620. +  * Revision 4.1.1.1  90/06/05  21:05:22  syd
  621. +  * Fixes where src/curses.c attempts to set the screen size via the ioctl
  622. +  * TIOCGWINSIZ if it exsists. It should only use the row or col size as
  623. +  * returned from the ioctl if they are not 0.
  624. +  * From: muller%sdcc10@ucsd.edu (Keith Muller)
  625. +  * 
  626.    * Revision 4.1  90/04/28  22:42:39  syd
  627.    * checkin of Elm 2.3 as of Release PL0
  628.    * 
  629. ***************
  630. *** 258,265 ****
  631.       struct winsize w;
  632.   
  633.       if (ioctl(1,TIOCGWINSZ,&w) != -1) {
  634. !         _lines = w.ws_row;
  635. !         _columns = w.ws_col;
  636.       }
  637.   #endif
  638.   
  639. --- 264,273 ----
  640.       struct winsize w;
  641.   
  642.       if (ioctl(1,TIOCGWINSZ,&w) != -1) {
  643. !         if (w.ws_row > 0)
  644. !             _lines = w.ws_row;
  645. !         if (w.ws_col > 0)
  646. !             _columns = w.ws_col;
  647.       }
  648.   #endif
  649.   
  650.  
  651. Index: src/hdrconfg.c
  652. Prereq: 4.1
  653. *** ../elm2.3/src/hdrconfg.c    Sat Apr 28 22:43:11 1990
  654. --- src/hdrconfg.c    Tue Jun  5 20:59:33 1990
  655. ***************
  656. *** 1,8 ****
  657.   
  658. ! static char rcsid[] = "@(#)$Id: hdrconfg.c,v 4.1 90/04/28 22:43:10 syd Exp $";
  659.   
  660.   /*******************************************************************************
  661. !  *  The Elm Mail System  -  $Revision: 4.1 $   $State: Exp $
  662.    *
  663.    *             Copyright (c) 1986, 1987 Dave Taylor
  664.    *             Copyright (c) 1988, 1989, 1990 USENET Community Trust
  665. --- 1,8 ----
  666.   
  667. ! static char rcsid[] = "@(#)$Id: hdrconfg.c,v 4.1.1.2 90/06/05 20:59:30 syd Exp $";
  668.   
  669.   /*******************************************************************************
  670. !  *  The Elm Mail System  -  $Revision: 4.1.1.2 $   $State: Exp $
  671.    *
  672.    *             Copyright (c) 1986, 1987 Dave Taylor
  673.    *             Copyright (c) 1988, 1989, 1990 USENET Community Trust
  674. ***************
  675. *** 14,19 ****
  676. --- 14,28 ----
  677.    *
  678.    *******************************************************************************
  679.    * $Log:    hdrconfg.c,v $
  680. +  * Revision 4.1.1.2  90/06/05  20:59:30  syd
  681. +  * Fix log
  682. +  * 
  683. +  * Revision 4.1.1.1  90/06/05  20:58:23  syd
  684. +  * Fixes when ALLOW_SUBSHELL #define'd and you are in the
  685. +  * Message Header Edit Screen and the mail you just composed
  686. +  * is not a reply THEN the subshell command is executed.
  687. +  * From: zvr@natasha.cs.wisc.EDU (Alexios Zavras)
  688. +  * 
  689.    * Revision 4.1  90/04/28  22:43:10  syd
  690.    * checkin of Elm 2.3 as of Release PL0
  691.    * 
  692. ***************
  693. *** 192,211 ****
  694.               ClearLine(EXTRA_PROMPT_LINE);
  695.               break;
  696.   
  697. -         case 'i' : if (strlen(in_reply_to) > 0) {
  698. -              PutLine0(INPUT_LINE, 0, "In-Reply-To: "); CleartoEOLN();
  699. -                      if (optionally_enter(in_reply_to,
  700. -                  INPUT_LINE, 13, FALSE, FALSE) == -1)
  701. -                return(0);
  702. -              put_inreplyto();
  703. -              break;        
  704. -                }
  705.   #ifdef ALLOW_SUBSHELL
  706. !         case '!':  if (subshell())
  707. !              display_headers();
  708. !                continue;
  709.   #endif
  710.   
  711.           default  : Centerline(ERROR_LINE, "No such header!");
  712.                  displayed_error = YES;
  713. --- 201,220 ----
  714.               ClearLine(EXTRA_PROMPT_LINE);
  715.               break;
  716.   
  717.   #ifdef ALLOW_SUBSHELL
  718. !         case '!':   if (subshell())
  719. !               display_headers();
  720. !                 break;
  721.   #endif
  722. +         case 'i' :  if (strlen(in_reply_to) > 0) {
  723. +               PutLine0(INPUT_LINE, 0, "In-Reply-To: "); CleartoEOLN();
  724. +                       if (optionally_enter(in_reply_to,
  725. +                   INPUT_LINE, 13, FALSE, FALSE) == -1)
  726. +                 return(0);
  727. +               put_inreplyto();
  728. +               break;        
  729. +                }
  730.   
  731.           default  : Centerline(ERROR_LINE, "No such header!");
  732.                  displayed_error = YES;
  733.  
  734. Index: src/mailmsg1.c
  735. Prereq: 4.1
  736. *** ../elm2.3/src/mailmsg1.c    Sat Apr 28 22:43:27 1990
  737. --- src/mailmsg1.c    Tue Jun  5 20:52:22 1990
  738. ***************
  739. *** 1,8 ****
  740.   
  741. ! static char rcsid[] = "@(#)$Id: mailmsg1.c,v 4.1 90/04/28 22:43:26 syd Exp $";
  742.   
  743.   /*******************************************************************************
  744. !  *  The Elm Mail System  -  $Revision: 4.1 $   $State: Exp $
  745.    *
  746.    *             Copyright (c) 1986, 1987 Dave Taylor
  747.    *             Copyright (c) 1988, 1989, 1990 USENET Community Trust
  748. --- 1,8 ----
  749.   
  750. ! static char rcsid[] = "@(#)$Id: mailmsg1.c,v 4.1.1.1 90/06/05 20:52:21 syd Exp $";
  751.   
  752.   /*******************************************************************************
  753. !  *  The Elm Mail System  -  $Revision: 4.1.1.1 $   $State: Exp $
  754.    *
  755.    *             Copyright (c) 1986, 1987 Dave Taylor
  756.    *             Copyright (c) 1988, 1989, 1990 USENET Community Trust
  757. ***************
  758. *** 14,19 ****
  759. --- 14,24 ----
  760.    *
  761.    *******************************************************************************
  762.    * $Log:    mailmsg1.c,v $
  763. +  * Revision 4.1.1.1  90/06/05  20:52:21  syd
  764. +  * Fixes the 'g' Group Reply command to send to the cc list also.
  765. +  * A bad variable name caused it to be ignored.
  766. +  * From: chip@chinacat.Unicom.COM (Chip Rosenthal)
  767. +  * 
  768.    * Revision 4.1  90/04/28  22:43:26  syd
  769.    * checkin of Elm 2.3 as of Release PL0
  770.    * 
  771. ***************
  772. *** 69,74 ****
  773. --- 74,81 ----
  774.   
  775.       if (get_to(to, expanded_to) == 0)   /* get the To: address and expand */
  776.         return(0);
  777. +     if ( cc[0] != '\0' )            /* expand out CC addresses */
  778. +       build_address(strip_commas(cc), expanded_cc);
  779.   
  780.       /** if we're batchmailing, let's send it and GET OUTTA HERE! **/
  781.   
  782.  
  783. Index: src/strings.c
  784. Prereq: 4.1
  785. *** ../elm2.3/src/strings.c    Sat Apr 28 22:44:17 1990
  786. --- src/strings.c    Tue Jun  5 20:38:59 1990
  787. ***************
  788. *** 1,8 ****
  789.   
  790. ! static char rcsid[] = "@(#)$Id: strings.c,v 4.1 90/04/28 22:44:16 syd Exp $";
  791.   
  792.   /*******************************************************************************
  793. !  *  The Elm Mail System  -  $Revision: 4.1 $   $State: Exp $
  794.    *
  795.    *             Copyright (c) 1986, 1987 Dave Taylor
  796.    *             Copyright (c) 1988, 1989, 1990 USENET Community Trust
  797. --- 1,8 ----
  798.   
  799. ! static char rcsid[] = "@(#)$Id: strings.c,v 4.1.1.1 90/06/05 20:38:58 syd Exp $";
  800.   
  801.   /*******************************************************************************
  802. !  *  The Elm Mail System  -  $Revision: 4.1.1.1 $   $State: Exp $
  803.    *
  804.    *             Copyright (c) 1986, 1987 Dave Taylor
  805.    *             Copyright (c) 1988, 1989, 1990 USENET Community Trust
  806. ***************
  807. *** 14,19 ****
  808. --- 14,23 ----
  809.    *
  810.    *******************************************************************************
  811.    * $Log:    strings.c,v $
  812. +  * Revision 4.1.1.1  90/06/05  20:38:58  syd
  813. +  * Allow nesting on () in comment in address
  814. +  * From: Chip Rosenthal <chip@chinacat.Unicom.COM>
  815. +  * 
  816.    * Revision 4.1  90/04/28  22:44:16  syd
  817.    * checkin of Elm 2.3 as of Release PL0
  818.    * 
  819. ***************
  820. *** 273,295 ****
  821.   char *strip_parens(string)
  822.   char *string;
  823.   {
  824. !     /** Return string with all parenthesized information removed.
  825. !         This is a non-destructive algorithm... **/
  826.       static char  buffer[VERY_LONG_STRING];
  827. !     register int depth = 0, buffer_index = 0;
  828.   
  829. !     for (; *string; string++) {
  830. !       if (*string == '(')
  831. !         depth++;
  832. !       else if (*string == ')') 
  833. !         depth--;
  834. !       else if (depth == 0)
  835. !         buffer[buffer_index++] = *string;
  836.       }
  837. !     
  838. !     buffer[buffer_index] = '\0';
  839.       return( (char *) buffer);
  840.   }
  841.   
  842. --- 277,315 ----
  843.   char *strip_parens(string)
  844.   char *string;
  845.   {
  846. !     /**
  847. !         Remove parenthesized information from a string.  More specifically,
  848. !         comments as defined in RFC822 are removed.  This procedure is
  849. !         non-destructive - a pointer to static data is returned.
  850. !     **/
  851.       static char  buffer[VERY_LONG_STRING];
  852. !     register char *bufp;
  853. !     register int depth;
  854.   
  855. !     for ( bufp = buffer, depth = 0 ; *string != '\0' ; ++string ) {
  856. !       switch ( *string ) {
  857. !       case '(':            /* begin comment on '('        */
  858. !         ++depth;
  859. !         break;
  860. !       case ')':            /* decr nesting level on ')'    */
  861. !         --depth;
  862. !         break;
  863. !       case '\\':            /* treat next char literally    */
  864. !         if ( *++string == '\0' ) {        /* gracefully handle    */
  865. !           *bufp++ = '\\';            /* '\' at end of string    */
  866. !           --string;                /* even tho it's wrong    */
  867. !         } else if ( depth == 0 ) {
  868. !           *bufp++ = '\\';
  869. !           *bufp++ = *string;
  870. !         }
  871. !         break;
  872. !       default:            /* a regular char        */
  873. !         if ( depth == 0 )
  874. !           *bufp++ = *string;
  875. !         break;
  876. !       }
  877.       }
  878. !     *bufp = '\0';
  879.       return( (char *) buffer);
  880.   }
  881.   
  882.  
  883. Index: utils/newalias.c
  884. Prereq: 4.1
  885. *** ../elm2.3/utils/newalias.c    Sat Apr 28 22:44:48 1990
  886. --- utils/newalias.c    Tue Jun  5 21:11:22 1990
  887. ***************
  888. *** 1,8 ****
  889.   
  890. ! static char rcsid[] = "@(#)$Id: newalias.c,v 4.1 90/04/28 22:44:46 syd Exp $";
  891.   
  892.   /*******************************************************************************
  893. !  *  The Elm Mail System  -  $Revision: 4.1 $   $State: Exp $
  894.    *
  895.    *             Copyright (c) 1986, 1987 Dave Taylor
  896.    *             Copyright (c) 1988, 1989, 1990 USENET Community Trust
  897. --- 1,8 ----
  898.   
  899. ! static char rcsid[] = "@(#)$Id: newalias.c,v 4.1.1.1 90/06/05 21:11:20 syd Exp $";
  900.   
  901.   /*******************************************************************************
  902. !  *  The Elm Mail System  -  $Revision: 4.1.1.1 $   $State: Exp $
  903.    *
  904.    *             Copyright (c) 1986, 1987 Dave Taylor
  905.    *             Copyright (c) 1988, 1989, 1990 USENET Community Trust
  906. ***************
  907. *** 14,19 ****
  908. --- 14,24 ----
  909.    *
  910.    *******************************************************************************
  911.    * $Log:    newalias.c,v $
  912. +  * Revision 4.1.1.1  90/06/05  21:11:20  syd
  913. +  * alias command in ELM2.3 fails because of the wrong sized aliases.hash
  914. +  * newalias did not truncate existing file (aliases.hash)
  915. +  * From: Toshinori Maeno <tmaeno@cc.titech.ac.jp>
  916. +  * 
  917.    * Revision 4.1  90/04/28  22:44:46  syd
  918.    * checkin of Elm 2.3 as of Release PL0
  919.    * 
  920. ***************
  921. *** 126,132 ****
  922.         }
  923.       }
  924.   
  925. !     if ((hash = open(hashname, O_WRONLY | O_CREAT, 0644)) == -1) {
  926.         printf("Couldn't open %s for output!\n", hashname);
  927.         exit(1);
  928.       }
  929. --- 131,137 ----
  930.         }
  931.       }
  932.   
  933. !     if ((hash = open(hashname, O_WRONLY | O_TRUNC | O_CREAT, 0644)) == -1) {
  934.         printf("Couldn't open %s for output!\n", hashname);
  935.         exit(1);
  936.       }
  937.  
  938. exit 0 # Just in case...
  939.