Path: utzoo!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!mit-eddie!bbn.com!papaya.bbn.com!rsalz From: rsalz@uunet.uu.net (Rich Salz) Newsgroups: comp.sources.unix Subject: v24i033: Elm mail system, release 2.3, patches, Part09/11 Message-ID: <3340@litchi.bbn.com> Date: 5 Mar 91 22:07:56 GMT Lines: 797 Approved: rsalz@uunet.UU.NET X-Checksum-Snefru: 02792314 6ea6f81f 6b04b6b7 8b121359 Submitted-by: Syd Weinstein Posting-number: Volume 24, Issue 33 Archive-name: elm2.3patches/part09 Subject: elm 2.3 Patch #9 Summary: This is an official patch for elm 2.3 system. Please apply it. Priority: Medium Add yp search to /etc/yp as well as /usr/etc/yp From: Lee Ziegenhals Remove start_highlight and end_highlight, no longer used From: W. David Higgins Add uninstall target to doc Makefile.SH From: Rusty Haddock Init time zone header to avoid garbage strings From: Norman J. Meluch Added FAILED_SAVE log case to filter utils. Fixed out of order lines. From: Steve Campbell Remove opterr from newmail, unused and some getopts dont define it. From: Syd via Peter King Fix arepdaem lock file creation flags, wrong modes left over from open call From: Syd via Terry Furman Fix header end on reply due to white space continuation allowing it to go too far. From: Syd via report from Tom Davis 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 + + + Elm 2.3 Patch 8 - Important fix to Patch 7 + Oct 10 13:02 EDT 1990 (Creation date, not posting date) + Please FOLKS, follow the 'After Patching Instructions', it'll save + us all alot of e-mail..... + + This is the quickie patch to fix up a few things that PL7 didn't + do as cleanly as it should have. + + Make the symbol submitflagss look less like a type, it is real. + From: Syd + + Fix calling sequence to copy_message for new MMDF argument + From: Syd + + Allow Priority: normal is upper or lower N (quickie fix) + From: Syd + Elm 2.3 Patch 7 - Misc bug fixes Sun Oct 7 21:33:58 EDT 1990 (Creation date, not posting date) Fixes when newmail detects that the mail folder has grown in size it prints a newline, even Index: doc/Makefile.SH Prereq: 4.1 *** ../elm2.3/doc/Makefile.SH Sat Apr 28 22:41:08 1990 --- doc/Makefile.SH Wed Oct 24 15:42:58 1990 *************** *** 16,22 **** echo "Extracting doc/Makefile (with variable substitutions)" cat >Makefile <Makefile <"); ! end_highlight[0] = '\0'; ! ! if (!arrow_cursor) { /* try to use inverse bar instead */ ! if ((cp = return_value_of("so")) != NULL) { ! strcpy(start_highlight, cp); ! if ((cp = return_value_of("se")) == NULL) ! strcpy(start_highlight, "->"); ! else { ! strcpy(end_highlight, cp); has_highlighting = TRUE; - } - } - } } /** clear the screen **/ --- 377,385 ---- } } } ! if (!arrow_cursor) /* try to use inverse bar instead */ ! if (return_value_of("so") != NULL && return_value_of("se") != NULL) has_highlighting = TRUE; } /** clear the screen **/ Index: src/newmbox.c Prereq: 4.1.1.4 *** ../elm2.3/src/newmbox.c Wed Oct 10 13:11:14 1990 --- src/newmbox.c Wed Dec 5 15:08:51 1990 *************** *** 1,8 **** ! static char rcsid[] = "@(#)$Id: newmbox.c,v 4.1.1.4 90/10/10 12:53:42 syd Exp $"; /******************************************************************************* ! * The Elm Mail System - $Revision: 4.1.1.4 $ $State: Exp $ * * Copyright (c) 1988, USENET Community Trust * Copyright (c) 1988, 1989, 1990 USENET Community Trust --- 1,8 ---- ! static char rcsid[] = "@(#)$Id: newmbox.c,v 4.1.1.5 90/10/24 15:46:47 syd Exp $"; /******************************************************************************* ! * The Elm Mail System - $Revision: 4.1.1.5 $ $State: Exp $ * * Copyright (c) 1988, USENET Community Trust * Copyright (c) 1988, 1989, 1990 USENET Community Trust *************** *** 14,19 **** --- 14,23 ---- * ******************************************************************************* * $Log: newmbox.c,v $ + * Revision 4.1.1.5 90/10/24 15:46:47 syd + * Init time zone variable to avoid garbage strings + * From: Norman J. Meluch + * * Revision 4.1.1.4 90/10/10 12:53:42 syd * allow words in either case * quickie fix *************** *** 480,485 **** --- 484,490 ---- strcpy(current_header->subject, ""); /* clear subj */ strcpy(current_header->to, ""); /* clear to */ strcpy(current_header->mailx_status, ""); /* clear status flags */ + strcpy(current_header->time_zone, ""); /* clear time zone name */ strcpy(current_header->messageid, ""); /* set no id into message id */ current_header->encrypted = 0; /* clear encrypted */ current_header->exit_disposition = UNSET; Index: src/returnadd.c Prereq: 4.1 *** ../elm2.3/src/returnadd.c Sat Apr 28 22:43:55 1990 --- src/returnadd.c Wed Dec 5 22:34:13 1990 *************** *** 1,8 **** ! static char rcsid[] = "@(#)$Id: returnadd.c,v 4.1 90/04/28 22:43:54 syd Exp $"; /******************************************************************************* ! * The Elm Mail System - $Revision: 4.1 $ $State: Exp $ * * Copyright (c) 1986, 1987 Dave Taylor * Copyright (c) 1988, 1989, 1990 USENET Community Trust --- 1,8 ---- ! static char rcsid[] = "@(#)$Id: returnadd.c,v 4.1.1.2 90/12/05 22:33:58 syd Exp $"; /******************************************************************************* ! * The Elm Mail System - $Revision: 4.1.1.2 $ $State: Exp $ * * Copyright (c) 1986, 1987 Dave Taylor * Copyright (c) 1988, 1989, 1990 USENET Community Trust *************** *** 14,19 **** --- 14,28 ---- * ******************************************************************************* * $Log: returnadd.c,v $ + * Revision 4.1.1.2 90/12/05 22:33:58 syd + * Fix missing close brace due to indention error + * From: Syd + * + * Revision 4.1.1.1 90/12/05 21:59:41 syd + * Fix where header could be going past end on return due to line + * combination on header continuation. + * From: Syd via report from Tom Davis + * * Revision 4.1 90/04/28 22:43:54 syd * checkin of Elm 2.3 as of Release PL0 * *************** *** 231,237 **** char buf[SLEN], name1[SLEN], name2[SLEN], lastname[SLEN]; char hold_return[SLEN], alt_name2[SLEN], buf2[SLEN]; ! int ok = 1, lines; int using_to = FALSE; /* now initialize all the char buffers [thanks Keith!] */ --- 240,246 ---- char buf[SLEN], name1[SLEN], name2[SLEN], lastname[SLEN]; char hold_return[SLEN], alt_name2[SLEN], buf2[SLEN]; ! int ok = 1, lines, len_buf, len_buf2; int using_to = FALSE; /* now initialize all the char buffers [thanks Keith!] */ *************** *** 266,288 **** buffer[0] = '\0'; ok = (int) (fgets(buf2, SLEN, mailfile) != NULL); ! if (ok) ! if(buf2[strlen(buf2)-1] == '\n') lines--; /* got a full line */ while (ok && lines) { buf[0] = '\0'; strncat(buf, buf2, SLEN); ok = (int) (fgets(buf2, SLEN, mailfile) != NULL); ! if (ok) ! if(buf2[strlen(buf2)-1] == '\n') lines--; /* got a full line */ ! while (ok && lines && whitespace(buf2[0])) { ! if (buf[strlen(buf)-1] == '\n') ! buf[strlen(buf)-1] = '\0'; ! strncat(buf, buf2, (SLEN-strlen(buf)-1)); ok = (int) (fgets(buf2, SLEN, mailfile) != NULL); ! if (ok) ! if(buf2[strlen(buf2)-1] == '\n') lines--; /* got a full line */ } /* At this point, "buf" contains the unfolded header line, while "buf2" contains the next single line of text from the mail file */ --- 275,306 ---- buffer[0] = '\0'; ok = (int) (fgets(buf2, SLEN, mailfile) != NULL); ! if (ok) { ! len_buf2 = strlen(buf2); ! if(buf2[len_buf2-1] == '\n') lines--; /* got a full line */ ! } while (ok && lines) { buf[0] = '\0'; strncat(buf, buf2, SLEN); + len_buf = strlen(buf); ok = (int) (fgets(buf2, SLEN, mailfile) != NULL); ! if (ok) { ! len_buf2 = strlen(buf2); ! if(buf2[len_buf2-1] == '\n') lines--; /* got a full line */ ! } ! while (ok && lines && whitespace(buf2[0]) && len_buf >= 2) { ! if (buf[len_buf-1] == '\n') { ! len_buf--; ! buf[len_buf] = '\0'; ! } ! strncat(buf, buf2, (SLEN-len_buf-1)); ok = (int) (fgets(buf2, SLEN, mailfile) != NULL); ! if (ok) { ! len_buf2 = strlen(buf2); ! if(buf2[len_buf2-1] == '\n') lines--; /* got a full line */ } + } /* At this point, "buf" contains the unfolded header line, while "buf2" contains the next single line of text from the mail file */ *************** *** 312,318 **** #endif ! else if (strlen(buf) < 2) /* done with header */ lines = 0; /* let's get outta here! We're done!!! */ } --- 330,336 ---- #endif ! else if (len_buf < 2) /* done with header */ lines = 0; /* let's get outta here! We're done!!! */ } Index: utils/arepdaem.c Prereq: 4.1.1.3 *** ../elm2.3/utils/arepdaem.c Sun Oct 7 21:55:00 1990 --- utils/arepdaem.c Wed Dec 5 15:13:06 1990 *************** *** 1,8 **** ! static char rcsid[] = "@(#)$Id: arepdaem.c,v 4.1.1.3 90/10/07 20:39:31 syd Exp $"; /******************************************************************************* ! * The Elm Mail System - $Revision: 4.1.1.3 $ $State: Exp $ * * Copyright (c) 1986, 1987 Dave Taylor * Copyright (c) 1988, 1989, 1990 USENET Community Trust --- 1,8 ---- ! static char rcsid[] = "@(#)$Id: arepdaem.c,v 4.1.1.4 90/12/05 15:12:52 syd Exp $"; /******************************************************************************* ! * The Elm Mail System - $Revision: 4.1.1.4 $ $State: Exp $ * * Copyright (c) 1986, 1987 Dave Taylor * Copyright (c) 1988, 1989, 1990 USENET Community Trust *************** *** 14,19 **** --- 14,23 ---- * ******************************************************************************* * $Log: arepdaem.c,v $ + * Revision 4.1.1.4 90/12/05 15:12:52 syd + * Fix lock file flags, wrong mode flag used + * From: Syd via Terry Furman + * * Revision 4.1.1.3 90/10/07 20:39:31 syd * Added missing parens to an imbedded assignment. * From: Phil Hochstetler *************** *** 636,642 **** return(0); /* file already exists */ #endif ! if ((create_fd=creat(lock_name, O_RDONLY)) == -1) return(0); /* can't create file!! */ sprintf(pid_buffer,"%d\n", getpid() ); /* write the current pid to the file */ --- 640,646 ---- return(0); /* file already exists */ #endif ! if ((create_fd=creat(lock_name, 0444)) == -1) return(0); /* can't create file!! */ sprintf(pid_buffer,"%d\n", getpid() ); /* write the current pid to the file */ Index: utils/newmail.c Prereq: 4.1.1.2 *** ../elm2.3/utils/newmail.c Sun Oct 7 21:55:01 1990 --- utils/newmail.c Wed Dec 5 15:05:57 1990 *************** *** 1,8 **** ! static char rcsid[] = "@(#)$Id: newmail.c,v 4.1.1.2 90/10/07 21:10:35 syd Exp $"; /******************************************************************************* ! * The Elm Mail System - $Revision: 4.1.1.2 $ $State: Exp $ * * Copyright (c) 1986, 1987 Dave Taylor * Copyright (c) 1988, 1989, 1990 USENET Community Trust --- 1,8 ---- ! static char rcsid[] = "@(#)$Id: newmail.c,v 4.1.1.3 90/12/05 15:05:39 syd Exp $"; /******************************************************************************* ! * The Elm Mail System - $Revision: 4.1.1.3 $ $State: Exp $ * * Copyright (c) 1986, 1987 Dave Taylor * Copyright (c) 1988, 1989, 1990 USENET Community Trust *************** *** 14,19 **** --- 14,23 ---- * ******************************************************************************* * $Log: newmail.c,v $ + * Revision 4.1.1.3 90/12/05 15:05:39 syd + * Remove unused opterr variable, some getopts dont define it + * From: Syd via Peter King + * * Revision 4.1.1.2 90/10/07 21:10:35 syd * newmail did not correctly present sender name if the source * of the mail is local from the system. *************** *** 128,134 **** char *argv[]; { extern char *optarg; ! extern int optind, opterr; char *ptr; int c, i, done; long lastsize, --- 132,138 ---- char *argv[]; { extern char *optarg; ! extern int optind; char *ptr; int c, i, done; long lastsize, *************** *** 147,153 **** #endif /* PIDCHECK */ /* Then exit the program if PIDCHECK */ interval_time = DEFAULT_INTERVAL; - opterr = 0; /** let's see if the first character of the basename of the command invoked is a 'w' (e.g. have we been called as --- 151,156 ---- exit 0 # Just in case... -- Please send comp.sources.unix-related mail to rsalz@uunet.uu.net. Use a domain-based address or give alternate paths, or you may lose out.