Xref: utzoo comp.mail.elm:2041 comp.sources.bugs:1986 Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uwm.edu!gem.mps.ohio-state.edu!brutus.cs.uiuc.edu!apple!amdahl!pacbell!dsinc!syd From: syd@DSI.COM (Syd Weinstein) Newsgroups: comp.mail.elm,comp.sources.bugs Subject: elm 2.2 Patch #12 Keywords: elm patch Message-ID: <1989Oct23.184301.6609@DSI.COM> Date: 23 Oct 89 18:43:01 GMT Reply-To: syd@dsinc.DSI.COM (Syd Weinstein) Followup-To: comp.mail.elm Organization: Datacomp Systems, Inc., Huntingdon Valley, PA 19006 Lines: 863 Summary: This is an official patch for elm 2.2 system. Please apply it. Priority: MEDIUM Fix typo in define of signal routines From: Syd Fixes when define the environment variable CHRCLASS, fastmail uses some part of _ctype as from_string and generates an invalide From: line. From: incom.de!win (Winfried Koenig) Fix missing return variable from readmsg/expand From: Gerald Vogt Remove temporary file if bounce is cancelled From: David Newall Fixes a typo in the filter(1) manual page. From: sequent!phil (Phil Hochstetler) Add SVR3.2 PID to lock file, but do not check the lock file for a valid PID. This allows SVR3.2 to be locked with a minimal change to Elm. From: Syd Fix: From rn, say "| patch -p -N -d DIR", where DIR is your elm source directory. Outside of rn, say "cd DIR; patch -p -N bsd echo exit 1 >usg echo exit 1 >v7 + elif $contains SIGTSTP /usr/include/sys/signal.h >/dev/null 2>&1 ; then + echo "Looks kind of like a BSD system, but we'll see..." + echo exit 0 >bsd + echo exit 1 >usg + echo exit 1 >v7 elif $contains '^fcntl$' libc.list >/dev/null 2>&1 ; then echo "Looks kind of like a USG system, but we'll see..." echo exit 1 >bsd *************** *** 1859,1864 **** --- 1866,1891 ---- d_sigvec="$undef" fi + : see if strspn exists + echo " " + if $contains strspn libc.list >/dev/null 2>&1; then + echo 'strspn() found.' + d_strspn="$define" + else + echo 'strspn() not found--will use our strspn instead.' + d_strspn="$undef" + fi + + : see if strcspn exists + echo " " + if $contains strcspn libc.list >/dev/null 2>&1; then + echo 'strcspn() found.' + d_strcspn="$define" + else + echo 'strcspn() not found--will use our strcspn instead.' + d_strcspn="$undef" + fi + : see if tempnam exists echo " " if $contains tempnam libc.list >/dev/null 2>&1; then *************** *** 2559,2565 **** from the range 50-1000. EOM odflt=$dflt ! dflt=n rp="Should I use your answer of $maxuseralias user aliases anyway? [$dflt]" $echo $n "$rp $c" . myread --- 2586,2596 ---- from the range 50-1000. EOM odflt=$dflt ! if $test "$fastread" = yes; then ! dflt=y ! else ! dflt=n ! fi rp="Should I use your answer of $maxuseralias user aliases anyway? [$dflt]" $echo $n "$rp $c" . myread *************** *** 2594,2600 **** from the range 50-1000. EOM odflt=$dflt ! dflt=n rp="Should I use your answer of $maxsysalias system aliases anyway? [$dflt]" $echo $n "$rp $c" . myread --- 2625,2635 ---- from the range 50-1000. EOM odflt=$dflt ! if $test "$fastread" = yes; then ! dflt=y ! else ! dflt=n ! fi rp="Should I use your answer of $maxsysalias system aliases anyway? [$dflt]" $echo $n "$rp $c" . myread *************** *** 3022,3030 **** if $test -f "$ans"; then cont='' else ! roff=`loc "$ans" "" . $pth` ! if $test -f "$roff"; then cont='' else if $test "$fastread" = yes; then dflt=y --- 3057,3066 ---- if $test -f "$ans"; then cont='' else ! lookup=`loc "$ans" "" . $pth` ! if $test -f "$lookup"; then cont='' + roff=$lookup else if $test "$fastread" = yes; then dflt=y *************** *** 3181,3188 **** # config.sh # This file was produced by running the Configure script. - d_eunice='$d_eunice' - eunicefix='$eunicefix' Log='$Log' Header='$Header' contains='$contains' --- 3217,3222 ---- *************** *** 3202,3207 **** --- 3236,3243 ---- shsharp='$shsharp' sharpbang='$sharpbang' startsh='$startsh' + d_eunice='$d_eunice' + eunicefix='$eunicefix' define='$define' loclist='$loclist' expr='$expr' *************** *** 3284,3289 **** --- 3320,3327 ---- d_setgid='$d_setgid' mailermode='$mailermode' d_sigvec='$d_sigvec' + d_strcspn='$d_strcspn' + d_strspn='$d_strspn' d_strings='$d_strings' d_pwdinsys='$d_pwdinsys' includepath='$includepath' Index: config.h.SH *** ../elm2.2/config.h.SH Wed May 24 21:15:45 1989 --- config.h.SH Fri Oct 6 15:38:40 1989 *************** *** 23,42 **** */ - /* EUNICE: - * This symbol, if defined, indicates that the program is being compiled - * under the EUNICE package under VMS. The program will need to handle - * things like files that don't go away the first time you unlink them, - * due to version numbering. It will also need to compensate for lack - * of a respectable link() command. - */ - /* VMS: - * This symbol, if defined, indicates that the program is running under - * VMS. It is currently only set in conjunction with the EUNICE symbol. - */ - #$d_eunice EUNICE /**/ - #$d_eunice VMS /**/ - /* CPPSTDIN: * This symbol contains the first part of the string which will invoke * the C preprocessor on the standard input and produce to standard --- 23,28 ---- *************** *** 103,108 **** --- 89,108 ---- */ #$d_whoami WHOAMI /**/ + /* EUNICE: + * This symbol, if defined, indicates that the program is being compiled + * under the EUNICE package under VMS. The program will need to handle + * things like files that don't go away the first time you unlink them, + * due to version numbering. It will also need to compensate for lack + * of a respectable link() command. + */ + /* VMS: + * This symbol, if defined, indicates that the program is running under + * VMS. It is currently only set in conjunction with the EUNICE symbol. + */ + #$d_eunice EUNICE /**/ + #$d_eunice VMS /**/ + /* ENABLE_CALENDAR: * This symbol, if defined, indicates that the calendar feature * should be supported. *************** *** 248,253 **** --- 248,260 ---- * This symbol, if defined, indicates that the sigvec() routine exists. */ #$d_sigvec SIGVEC /**/ + + /* STRCSPN: + * This symbol, if defined, indicates that the strcspn() routine exists. + */ + #$d_strspn STRSPN /**/ + + #$d_strcspn STRCSPN /**/ /* STRINGS: * This symbol, if defined, indicates that the file strings.h Index: doc/filter.1 *** ../elm2.2/doc/filter.1 Sun Feb 26 16:38:06 1989 --- doc/filter.1 Tue Oct 17 16:43:14 1989 *************** *** 21,27 **** .I Filter is a sophisticated program that allows incoming mail to be filtered against a wide set of criteria. The format for the ! rules, located in $HOME/.filter_rules, is; .nf \fIrule\fR ::= \fBif (\fIexpression\fP) then \fIaction\fR --- 21,27 ---- .I Filter is a sophisticated program that allows incoming mail to be filtered against a wide set of criteria. The format for the ! rules, located in $HOME/.filter-rules, is; .nf \fIrule\fR ::= \fBif (\fIexpression\fP) then \fIaction\fR Index: src/init.c Prereq: 2.30 *** ../elm2.2/src/init.c Mon Jun 12 10:21:47 1989 --- src/init.c Wed Sep 20 14:42:19 1989 *************** *** 1,8 **** ! static char rcsid[] = "@(#)$Id: init.c,v 2.30 89/05/31 14:14:50 syd Exp $"; /******************************************************************************* ! * The Elm Mail System - $Revision: 2.30 $ $State: Exp $ * * Copyright (c) 1986, 1987 Dave Taylor * Copyright (c) 1988, 1989 USENET Community Trust --- 1,8 ---- ! static char rcsid[] = "@(#)$Id: init.c,v 2.30.1.1 89/09/20 14:42:10 syd Exp $"; /******************************************************************************* ! * The Elm Mail System - $Revision: 2.30.1.1 $ $State: Exp $ * * Copyright (c) 1986, 1987 Dave Taylor * Copyright (c) 1988, 1989 USENET Community Trust *************** *** 14,19 **** --- 14,22 ---- * ******************************************************************************* * $Log: init.c,v $ + * Revision 2.30.1.1 89/09/20 14:42:10 syd + * Fix typo in define of signal routines + * * Revision 2.30 89/05/31 14:14:50 syd * Fix sigvec usage to only be used where SV_INTERRUPT and SIGVEC are defined * signal is better unless the sigvec provides interrupt capability as in SV. *************** *** 112,118 **** #endif #ifdef SIGTSTP #ifdef VOIDSIG ! int sig_user_stop(), sig_return_from_user_stop(); #else int sig_user_stop(), sig_return_from_user_stop(); #endif --- 115,121 ---- #endif #ifdef SIGTSTP #ifdef VOIDSIG ! void sig_user_stop(), sig_return_from_user_stop(); #else int sig_user_stop(), sig_return_from_user_stop(); #endif Index: src/leavembox.c Prereq: 2.27 *** ../elm2.2/src/leavembox.c Mon Jun 12 10:21:48 1989 --- src/leavembox.c Wed Oct 18 20:16:17 1989 *************** *** 1,8 **** ! static char rcsid[] = "@(#)$Id: leavembox.c,v 2.27 89/05/25 17:11:05 syd Exp $"; /******************************************************************************* ! * The Elm Mail System - $Revision: 2.27 $ $State: Exp $ * * Copyright (c) 1986, 1987 Dave Taylor * Copyright (c) 1988, 1989 USENET Community Trust --- 1,8 ---- ! static char rcsid[] = "@(#)$Id: leavembox.c,v 2.27.1.2 89/10/18 20:16:08 syd Exp $"; /******************************************************************************* ! * The Elm Mail System - $Revision: 2.27.1.2 $ $State: Exp $ * * Copyright (c) 1986, 1987 Dave Taylor * Copyright (c) 1988, 1989 USENET Community Trust *************** *** 14,19 **** --- 14,28 ---- * ******************************************************************************* * $Log: leavembox.c,v $ + * Revision 2.27.1.2 89/10/18 20:16:08 syd + * fix typo + * From: Syd + * + * Revision 2.27.1.1 89/10/17 16:55:04 syd + * Add permissive lock code for SVR3.2, in that it creates the pid in the file + * but it does not check the pid to see if a process is still running + * From: Syd + * * Revision 2.27 89/05/25 17:11:05 syd * Finally, the patch everyone has asked for. The 'q' command prompts just like * the 'c' and '$' commands. That is, the "ask" option is honored on the 'q' *************** *** 628,633 **** --- 637,643 ---- register int create_iteration = 0, flock_iteration = 0; + char pid_buffer[SHORT]; /* formulate lock file name */ mk_lockname(cur_folder); *************** *** 743,748 **** --- 753,762 ---- dprint(5, (debugfile, "Lock %s %s for file %s on.\n", lock_name, (direction == INCOMING ? "incoming" : "outgoing"), cur_folder)); + + /* Place the pid of Elm into the lock file for SVR3.2 and its ilk */ + sprintf(pid_buffer, "%d", getpid()); + write(create_fd, pid_buffer, strlen(pid_buffer)); (void)close(create_fd); Index: src/opt_utils.c Prereq: 2.19 *** ../elm2.2/src/opt_utils.c Mon Apr 24 20:57:35 1989 --- src/opt_utils.c Tue Sep 26 17:09:36 1989 *************** *** 1,8 **** ! static char rcsid[] = "@(#)$Id: opt_utils.c,v 2.19 89/04/24 20:46:35 syd Exp $"; /******************************************************************************* ! * The Elm Mail System - $Revision: 2.19 $ $State: Exp $ * * Copyright (c) 1986, 1987 Dave Taylor * Copyright (c) 1988, 1989 USENET Community Trust --- 1,8 ---- ! static char rcsid[] = "@(#)$Id: opt_utils.c,v 2.19.1.1 89/09/26 17:09:19 syd Exp $"; /******************************************************************************* ! * The Elm Mail System - $Revision: 2.19.1.1 $ $State: Exp $ * * Copyright (c) 1986, 1987 Dave Taylor * Copyright (c) 1988, 1989 USENET Community Trust *************** *** 14,19 **** --- 14,23 ---- * ******************************************************************************* * $Log: opt_utils.c,v $ + * Revision 2.19.1.1 89/09/26 17:09:19 syd + * Add new symbols for strspn/strcspn + * From: Syd + * * Revision 2.19 89/04/24 20:46:35 syd * Change includes for consistency * From: Jim Brown *************** *** 219,269 **** return ( islower(ch) ? ch - 'a' + 'A' : ch ); } - strspn(source, keys) - char *source, *keys; - { - /** This function returns the length of the substring of - 'source' (starting at zero) that consists ENTIRELY of - characters from 'keys'. This is used to skip over a - defined set of characters with parsing, usually. - **/ - - register int loc = 0, key_index = 0; - - while (source[loc] != '\0') { - key_index = 0; - while (keys[key_index] != source[loc]) - if (keys[key_index++] == '\0') - return(loc); - loc++; - } - - return(loc); - } - - strcspn(source, keys) - char *source, *keys; - { - /** This function returns the length of the substring of - 'source' (starting at zero) that consists entirely of - characters NOT from 'keys'. This is used to skip to a - defined set of characters with parsing, usually. - NOTE that this is the opposite of strspn() above - **/ - - register int loc = 0, key_index = 0; - - while (source[loc] != '\0') { - key_index = 0; - while (keys[key_index] != '\0') - if (keys[key_index++] == source[loc]) - return(loc); - loc++; - } - - return(loc); - } - char *strtok(source, keys) char *source, *keys; { --- 223,228 ---- *************** *** 365,370 **** --- 324,382 ---- } return ( (char *) address); + } + + #endif + + #ifndef STRSPN + + strspn(source, keys) + char *source, *keys; + { + /** This function returns the length of the substring of + 'source' (starting at zero) that consists ENTIRELY of + characters from 'keys'. This is used to skip over a + defined set of characters with parsing, usually. + **/ + + register int loc = 0, key_index = 0; + + while (source[loc] != '\0') { + key_index = 0; + while (keys[key_index] != source[loc]) + if (keys[key_index++] == '\0') + return(loc); + loc++; + } + + return(loc); + } + + #endif + + #ifndef STRCSPN + + strcspn(source, keys) + char *source, *keys; + { + /** This function returns the length of the substring of + 'source' (starting at zero) that consists entirely of + characters NOT from 'keys'. This is used to skip to a + defined set of characters with parsing, usually. + NOTE that this is the opposite of strspn() above + **/ + + register int loc = 0, key_index = 0; + + while (source[loc] != '\0') { + key_index = 0; + while (keys[key_index] != '\0') + if (keys[key_index++] == source[loc]) + return(loc); + loc++; + } + + return(loc); } #endif Index: src/remail.c Prereq: 2.8 *** ../elm2.2/src/remail.c Thu Mar 30 10:37:04 1989 --- src/remail.c Tue Oct 17 16:38:35 1989 *************** *** 1,8 **** ! static char rcsid[] = "@(#)$Id: remail.c,v 2.8 89/03/25 21:47:04 syd Exp $"; /******************************************************************************* ! * The Elm Mail System - $Revision: 2.8 $ $State: Exp $ * * Copyright (c) 1986, 1987 Dave Taylor * Copyright (c) 1988, 1989 USENET Community Trust --- 1,8 ---- ! static char rcsid[] = "@(#)$Id: remail.c,v 2.8.1.1 89/10/17 16:38:00 syd Exp $"; /******************************************************************************* ! * The Elm Mail System - $Revision: 2.8.1.1 $ $State: Exp $ * * Copyright (c) 1986, 1987 Dave Taylor * Copyright (c) 1988, 1989 USENET Community Trust *************** *** 14,19 **** --- 14,23 ---- * ******************************************************************************* * $Log: remail.c,v $ + * Revision 2.8.1.1 89/10/17 16:38:00 syd + * Remove temporary file if bounce is cancelled + * From: David Newall + * * Revision 2.8 89/03/25 21:47:04 syd * Initial 2.2 Release checkin * *************** *** 93,99 **** if (tolower(ch) == 'n') { /* another day, another No... */ Write_to_screen("No.", 0); set_error("Bounce of message cancelled."); ! return(1); } Write_to_screen("Yes.", 0); --- 97,104 ---- if (tolower(ch) == 'n') { /* another day, another No... */ Write_to_screen("No.", 0); set_error("Bounce of message cancelled."); ! (void) unlink(filename); ! return(1); } Write_to_screen("Yes.", 0); Index: utils/expand.c Prereq: 2.3 *** ../elm2.2/utils/expand.c Thu Mar 30 10:38:06 1989 --- utils/expand.c Tue Oct 17 16:34:21 1989 *************** *** 1,8 **** ! static char rcsid[] = "@(#)$Id: expand.c,v 2.3 89/03/25 21:47:43 syd Exp $"; /******************************************************************************* ! * The Elm Mail System - $Revision: 2.3 $ $State: Exp $ * * Copyright (c) 1986, 1987 Dave Taylor * Copyright (c) 1988, 1989 USENET Community Trust --- 1,8 ---- ! static char rcsid[] = "@(#)$Id: expand.c,v 2.3.1.2 89/10/17 16:34:17 syd Exp $"; /******************************************************************************* ! * The Elm Mail System - $Revision: 2.3.1.2 $ $State: Exp $ * * Copyright (c) 1986, 1987 Dave Taylor * Copyright (c) 1988, 1989 USENET Community Trust *************** *** 14,19 **** --- 14,27 ---- * ******************************************************************************* * $Log: expand.c,v $ + * Revision 2.3.1.2 89/10/17 16:34:17 syd + * Fix return direction + * From: Syd + * + * Revision 2.3.1.1 89/10/17 16:26:11 syd + * fix expand not returning a value + * From: Andreas Luik + * * Revision 2.3 89/03/25 21:47:43 syd * Initial 2.2 Release checkin * *************** *** 101,106 **** --- 109,115 ---- filename[0] == '/') ? "" : "/", (char *) filename+1); strcpy(filename, buffer); + return(YES); } char *expand_define(maildir) Index: utils/fastmail.c Prereq: 2.7 *** ../elm2.2/utils/fastmail.c Mon Apr 24 20:04:10 1989 --- utils/fastmail.c Tue Sep 26 16:24:29 1989 *************** *** 1,8 **** ! static char rcsid[] = "@(#)$Id: fastmail.c,v 2.7 89/04/24 19:14:54 syd Exp $"; /******************************************************************************* ! * The Elm Mail System - $Revision: 2.7 $ $State: Exp $ * * Copyright (c) 1986, 1987 Dave Taylor * Copyright (c) 1988, 1989 USENET Community Trust --- 1,8 ---- ! static char rcsid[] = "@(#)$Id: fastmail.c,v 2.7.1.1 89/09/26 16:24:27 syd Exp $"; /******************************************************************************* ! * The Elm Mail System - $Revision: 2.7.1.1 $ $State: Exp $ * * Copyright (c) 1986, 1987 Dave Taylor * Copyright (c) 1988, 1989 USENET Community Trust *************** *** 14,19 **** --- 14,24 ---- * ******************************************************************************* * $Log: fastmail.c,v $ + * Revision 2.7.1.1 89/09/26 16:24:27 syd + * Fixes when define the environment variable CHRCLASS, fastmail uses some part + * of _ctype as from_string and generates an invalide From: line. + * From: incom.de!win (Winfried Koenig) + * * Revision 2.7 89/04/24 19:14:54 syd * Add gould timezone patches From Andy Linton @ newcastle * *************** *** 102,111 **** --- 107,118 ---- char from_addr[SLEN]; int c, sendmail_available, debug = 0; + from_string[0] = '\0'; subject[0] = '\0'; replyto[0] = '\0'; cc_list[0] = '\0'; bcc_list[0] = '\0'; + to_list[0] = '\0'; from_addr[0] = '\0'; while ((c = getopt(argc, argv, "b:c:df:F:r:s:")) != EOF) { Index: utils/readmsg.c Prereq: 2.8 *** ../elm2.2/utils/readmsg.c Mon Apr 24 20:04:12 1989 --- utils/readmsg.c Tue Oct 17 16:34:16 1989 *************** *** 1,8 **** ! static char rcsid[] = "@(#)$Id: readmsg.c,v 2.8 89/04/24 19:31:54 syd Exp $"; /******************************************************************************* ! * The Elm Mail System - $Revision: 2.8 $ $State: Exp $ * * Copyright (c) 1986, 1987 Dave Taylor * Copyright (c) 1988, 1989 USENET Community Trust --- 1,8 ---- ! static char rcsid[] = "@(#)$Id: readmsg.c,v 2.8.1.2 89/10/17 16:34:08 syd Exp $"; /******************************************************************************* ! * The Elm Mail System - $Revision: 2.8.1.2 $ $State: Exp $ * * Copyright (c) 1986, 1987 Dave Taylor * Copyright (c) 1988, 1989 USENET Community Trust *************** *** 14,19 **** --- 14,27 ---- * ******************************************************************************* * $Log: readmsg.c,v $ + * Revision 2.8.1.2 89/10/17 16:34:08 syd + * Fix return direction + * From: Syd + * + * Revision 2.8.1.1 89/10/17 16:26:50 syd + * fix expand not returning a value + * From: Andreas Luik + * * Revision 2.8 89/04/24 19:31:54 syd * Add BSD USER in addition to LOGNAME * *************** *** 456,461 **** --- 464,470 ---- infile[0] == '/') ? "" : "/", (char *) infile+1); strcpy(infile, buffer); + return(YES); } char *expand_define(maildir) Index: Patchlist *** ../elm2.2/Patchlist Fri Sep 15 16:49:26 1989 --- Patchlist Wed Oct 18 20:59:05 1989 *************** *** 1,3 **** --- 1,27 ---- + Subject: elm 2.2 Patch #12 + Date: Wed Oct 18 20:58:47 EDT 1989 (Creation, not message date) + Priority: MEDIUM + + Fix typo in define of signal routines + From: Syd + + Fixes when define the environment variable CHRCLASS, fastmail uses some part + of _ctype as from_string and generates an invalide From: line. + From: incom.de!win (Winfried Koenig) + + Fix missing return variable from readmsg/expand + From: Gerald Vogt + + Remove temporary file if bounce is cancelled + From: David Newall + + Fixes a typo in the filter(1) manual page. + From: sequent!phil (Phil Hochstetler) + + Add SVR3.2 PID to lock file, but do not check the lock file for a valid + PID. This allows SVR3.2 to be locked with a minimal change to Elm. + From: Syd + Subject: elm 2.2 Patch #11 Date: Fri Sep 15 16:45:43 EDT 1989 (Creation, not message date) Priority: MEDIUM -- ===================================================================== Sydney S. Weinstein, CDP, CCP Elm Coordinator Datacomp Systems, Inc. Voice: (215) 947-9900 syd@DSI.COM or {bpa,vu-vlsi}!dsinc!syd FAX: (215) 938-0235