From wugate!wupost!uunet!seismo!sundc!pitstop!texsun!sun-barr!ames!pacbell!dsinc!syd Tue May 9 08:46:09 CDT 1989 Article 714 of comp.mail.elm: Path: wubios!wugate!wupost!uunet!seismo!sundc!pitstop!texsun!sun-barr!ames!pacbell!dsinc!syd >From: syd@dsinc.DSI.COM (Syd Weinstein) Newsgroups: comp.sources.bugs,comp.mail.elm Subject: elm 2.2 Patch # 7 Keywords: elm patch Message-ID: <130@dsinc.DSI.COM> Date: 9 May 89 02:11:12 GMT Followup-To: comp.mail.elm Organization: Datacomp Systems, Inc., Huntingdon Valley, PA Lines: 689 Xref: wubios comp.sources.bugs:26 comp.mail.elm:714 Summary: This is an official patch for elm 2.2 system. Please apply it. Priority: MEDIUM Add Xenix 286 shell instructions to README Change cast on init signal code. >From: root@cheviot.newcastle.ac.uk (Andy Linton) Fixed default function return for one_liner_for. >From: karl@archer.MorningStar.COM (Karl Fox) Change command prompt on last page of message not to use GetPrompt() which does timeouts. >From: Samuel Lam The while loop for input of multi-line fields did not have curly braces around the body, causing only the first statement to get executed. This caused the user to get stuck until ^D was typed, and no data for that field was written to the file. I also fixed the input routines a bit so forms work a little more like the document says they do, though they're still not quite the same. >From: td2cad!mipos3!batie mail_form() called mail() with a "NO" argument to tell it not to add the Contains line; this caused the recipient of a Form to not get it displayed in the nice readable format it's supposed to be displayed in. >From: td2cad!mipos3!batie Fix tab expansion near end of line in curses.c >From: Karl and Rob 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 I had the same problems as everyone else is reporting on Microports *nix under + > SCO XENIX 2.2.1. + > + > The solution is simple, up the stack size for /bin/sh. I used + > + > # mv /bin/sh /bin/sh.old + > # cp /bin/sh.old /bin/sh + > # fixhdr -F 8000 /bin/sh + > + > This may seem a bit over the top, but I put it back after! + > + > # mv /bin/sh /bin/sh.rm + > # mv /bin/sh.old /bin/sh + > + > Then wait till nobody is using /bin/sh.rm then + > + > # rm /bin/sh.rm + > + > That way you preserve your old shell, ( ie you don't break it ), but you + > get to use Configure without bus errors etc. + > + > I hope that of use + > + > Keith + > -- + > UUCP ..!uunet!mcvax!ukc!slxsys!g4lzv!keith | Keith Brazington + > Smart mail keith@g4lzv.co.uk | 5b Northgate Rochester Kent UK + > Ampanet [44.131.8.1] and [44.131.8.3] | +44 634 811594 Voice + > Packet G4LZV @ GB7UWS -- G4LZV USENET BB --| +44 634 401210 Data v22,v22bis Also on Microport SysV/AT Machines, the C compiler produces improper code for one of the arithmetic calls. To fix this problem it is necessary to Index: doc/Alias.guide Prereq: 2.8 *** ../elm2.2/doc/Alias.guide Sat Mar 25 21:44:48 1989 --- doc/Alias.guide Thu May 4 14:49:10 1989 *************** *** 1,4 **** ! \" @(#)$Id: Alias.guide,v 2.8 89/03/25 21:44:47 syd Exp $ \" \" A guide to the ELM alias system and so on. \" format with: --- 1,4 ---- ! \" @(#)$Id: Alias.guide,v 2.9 89/05/04 14:48:47 syd Exp $ \" \" A guide to the ELM alias system and so on. \" format with: *************** *** 11,16 **** --- 11,20 ---- \" Syd Weinstein elm@dsinc.UUCP (dsinc!elm) \" \" $Log: Alias.guide,v $ + \" Revision 2.9 89/05/04 14:48:47 syd + \" Make pathalias sorting requirement more forceful. Add extra %'s on pathalias + \" data lines in examples. + \" \" Revision 2.8 89/03/25 21:44:47 syd \" Initial 2.2 Release checkin \" *************** *** 315,321 **** \f2hostname\f1 \f2address\f1 ! which is then sorted alphabetically and stored in the file pointed to by \f2pathfile\f1 for \f3Elm\f1 (and other programs) to use. .pg --- 319,325 ---- \f2hostname\f1 \f2address\f1 ! which then must be sorted alphabetically and stored in the file pointed to by \f2pathfile\f1 for \f3Elm\f1 (and other programs) to use. .pg *************** *** 329,335 **** machine-address MUST contain the sequence `%s' (and consequently any other percent signs that appear in the address must be paired) so that the call in the program ``sprintf(buffer, machine-address, username)'' ! will generate a valid return address. .pg By way of example, here are a few entries from my own file; --- 333,340 ---- machine-address MUST contain the sequence `%s' (and consequently any other percent signs that appear in the address must be paired) so that the call in the program ``sprintf(buffer, machine-address, username)'' ! will generate a valid return address. This file must be sorted alphabetically ! for Elm to use it properly. .pg By way of example, here are a few entries from my own file; *************** *** 338,346 **** .TS l l. HPL %s@hplabs ! PARC %s%Xerox.PA.COM@hplabs ! amc-hq %s%AMC-HQ.ARPA@hplabs ! imsss %s%%IMSSS%AI.STANFORD.EDU@hplabs infopro hplabs!infopro!%s interleaf sun!interleaf!%s .TE --- 343,351 ---- .TS l l. HPL %s@hplabs ! PARC %s%%Xerox.PA.COM@hplabs ! amc-hq %s%%AMC-HQ.ARPA@hplabs ! imsss %s%%IMSSS%%AI.STANFORD.EDU@hplabs infopro hplabs!infopro!%s interleaf sun!interleaf!%s .TE Index: src/curses.c Prereq: 2.18 *** ../elm2.2/src/curses.c Wed Apr 26 12:12:03 1989 --- src/curses.c Mon May 8 20:39:11 1989 *************** *** 1,8 **** ! static char rcsid[] = "@(#)$Id: curses.c,v 2.18 89/04/26 11:43:03 syd Exp $"; /******************************************************************************* ! * The Elm Mail System - $Revision: 2.18 $ $State: Exp $ * * Copyright (c) 1986, 1987 Dave Taylor * Copyright (c) 1988, 1989 USENET Community Trust --- 1,8 ---- ! static char rcsid[] = "@(#)$Id: curses.c,v 2.19 89/05/08 20:38:57 syd Exp $"; /******************************************************************************* ! * The Elm Mail System - $Revision: 2.19 $ $State: Exp $ * * Copyright (c) 1986, 1987 Dave Taylor * Copyright (c) 1988, 1989 USENET Community Trust *************** *** 14,19 **** --- 14,23 ---- * ******************************************************************************* * $Log: curses.c,v $ + * Revision 2.19 89/05/08 20:38:57 syd + * Fix tab placement near eol + * From: Karl and Rob + * * Revision 2.18 89/04/26 11:43:03 syd * This patch corrects some duplicate, unnecessary and conflicting declarations * of some curses functions, which show up when compiling with gcc. *************** *** 658,666 **** } else if (ch == '\t') { putchar(ch); if((nt=next_tab(_col+1)) > prev_tab(COLUMNS)) - _col = nt-1; - else _col = COLUMNS-1; } else { --- 662,670 ---- } else if (ch == '\t') { putchar(ch); if((nt=next_tab(_col+1)) > prev_tab(COLUMNS)) _col = COLUMNS-1; + else + _col = nt-1; } else { Index: src/forms.c Prereq: 2.7 *** ../elm2.2/src/forms.c Thu Mar 30 10:35:59 1989 --- src/forms.c Mon May 8 17:05:56 1989 *************** *** 1,8 **** ! static char rcsid[] = "@(#)$Id: forms.c,v 2.7 89/03/25 21:46:23 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: forms.c,v 2.8 89/05/08 17:05:53 syd Exp $"; /******************************************************************************* ! * The Elm Mail System - $Revision: 2.8 $ $State: Exp $ * * Copyright (c) 1986, 1987 Dave Taylor * Copyright (c) 1988, 1989 USENET Community Trust *************** *** 14,19 **** --- 14,28 ---- * ******************************************************************************* * $Log: forms.c,v $ + * Revision 2.8 89/05/08 17:05:53 syd + * The while loop for input of multi-line fields did not have curly braces around + * the body, causing only the first statement to get executed. This caused the + * user to get stuck until ^D was typed, and no data for that field was written + * to the file. I also fixed the input routines a bit so forms work a little more + * like the document says they do, though they're still not quite the same. + * From: td2cad!mipos3!batie + * + * * Revision 2.7 89/03/25 21:46:23 syd * Initial 2.2 Release checkin * *************** *** 247,265 **** fprintf(fd, "%s", buffer); break; case 1 : if (buffer[0] == COLON) { ! printf( "(Enter as many lines as needed, ending with a '.' by itself on a line)\n"); ! while (fgets(buffer, SLEN, stdin) != NULL) ! no_ret(buffer); ! if (strcmp(buffer, ".") == 0) ! break; ! else ! fprintf(fd,"%s\n", buffer); } else ! prompt_for_entry(buffer, fd); break; ! default: prompt_for_multiple_entries(buffer, fd, count); } } --- 256,275 ---- fprintf(fd, "%s", buffer); break; case 1 : if (buffer[0] == COLON) { ! printf( "(Enter as many lines as needed, ending with a '.' by itself on a line)\n"); ! while (fgets(buffer, SLEN, stdin) != NULL) { ! no_ret(buffer); ! if (strcmp(buffer, ".") == 0) ! break; ! else ! fprintf(fd,"%s\n", buffer); ! } } else ! prompt_for_entries(buffer, fd, count); break; ! default: prompt_for_entries(buffer, fd, count); } } *************** *** 273,309 **** return(1); } ! prompt_for_entry(buffer, fd) char *buffer; FILE *fd; - { - /** This is called with an entry of the form "prompt:" and will - display the prompt and save the prompt and the user reply - in the file "fd" - **/ - - char mybuffer[SLEN]; - - no_ret(buffer); - - dprint(7, (debugfile, "prompt-for-entry \"%s\"\n", buffer)); - - printf("%s ", buffer); fflush(stdout); - - fgets(mybuffer, SLEN, stdin); - - fprintf(fd, "%s: %s", buffer, mybuffer); - } - - prompt_for_multiple_entries(buffer, fd, entries) - char *buffer; - FILE *fd; int entries; { ! /** Almost the same as the above routine, this one deals with lines ! that have multiple colons on them. It must first figure out how ! many spaces to allocate for each field then prompts the user, ! line by line, for the entries... **/ char mybuffer[SLEN], prompt[SLEN], spaces[SLEN]; --- 283,296 ---- return(1); } ! prompt_for_entries(buffer, fd, entries) char *buffer; FILE *fd; int entries; { ! /** deals with lines that have multiple colons on them. It must first ! figure out how many spaces to allocate for each field then prompts ! the user, line by line, for the entries... **/ char mybuffer[SLEN], prompt[SLEN], spaces[SLEN]; *************** *** 339,345 **** offset += i; if (field_size == 0) /* probably last prompt in line... */ ! field_size = 80 - (offset + extra_tabs); prompt_for_sized_entry(prompt, mybuffer, field_size); --- 326,332 ---- offset += i; if (field_size == 0) /* probably last prompt in line... */ ! field_size = 78 - (offset + extra_tabs); prompt_for_sized_entry(prompt, mybuffer, field_size); *************** *** 346,352 **** spaces[0] = ' '; /* always at least ONE trailing space... */ spaces[1] = '\0'; ! for (j = strlen(mybuffer); j < field_size; j++) strcat(spaces, " "); fprintf(fd, "%s: %s%s", prompt, mybuffer, spaces); --- 333,340 ---- spaces[0] = ' '; /* always at least ONE trailing space... */ spaces[1] = '\0'; ! /* field_size-1 for the space spaces[] starts with */ ! for (j = strlen(mybuffer); j < field_size-1; j++) strcat(spaces, " "); fprintf(fd, "%s: %s%s", prompt, mybuffer, spaces); *************** *** 367,373 **** dprint(7, (debugfile, "prompt-for-sized-entry \"%s\" %d chars\n", prompt, field_size)); ! printf("%s : ", prompt); for (i=0;i + * * Revision 2.20 89/03/25 21:47:21 syd * Initial 2.2 Release checkin * *************** *** 280,286 **** } *msg_line = '\0'; /* null last generated message */ ! command = GetPrompt(); /* get next command from user */ } } --- 285,291 ---- } *msg_line = '\0'; /* null last generated message */ ! command = ReadCh(); /* get next command from user */ } } -- ===================================================================== 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