jw@pan.UUCP (05/09/87)
To: Path: pan!jw From: jw@pan.UUCP (Jamie Watson) Newsgroups: comp.mail.elm Subject: Bug fixes and port to SysV.3 Message-ID: <259@pan.UUCP> Date: 8 May 87 19:03:02 GMT Reply-To: jw@pan.UUCP (Jamie Watson) Distribution: world Organization: Pansystem Informatik AG, Zuerich, Switzerland Lines: 291 I have installed Elm on my Opus systems. In the process, I had to port to System V release 3.0, and fix some minor bugs. The following diffs implement those changes. The major points are: - The return type of signal(2) is a void pointer instead of an int pointer. I changed the declarations related to this to use a define instead of a literal int *, then changed Configure.sh to check the return type and adjust the definition accordingly. Files affected: Configure.sh, hdrs/sysdefs.master, src/file_utils.c, src/syscall.c, src/showmsg.c, src/editmsg.c. - Standard System V.[23] does not have libtermcap.a or libtermlib.a. The termcap compatibility routines are in libcurses.a. I changed Configure.sh to allow for this. However, many suppliers of SysV systems now include libtermcap as well; in such a case, it is not clear which library should be used. Files affected: Configure.sh - When executing 'make clean', bin/filter was not getting removed. I added a command to remove it. Files affected: filter/Makefile.mstr - There was an include of <string.h>; on Berklix systems this should be <strings.h>. Files affected: hdrs/defs.h - Quite a few files contained '#ifdef BSD4.1'. Newer cpp's complain about 'extra tokens after directive'. I changed this to BSD4_1. I searched all the sources for references to BSD4.1, and found that it is only used, never defined, which brings up the question of whether it is a symbol that is automatically defined on 4.1 (in which case I just broke the programs), or if it is a relic that should be removed from the sources because it is no longer needed. Since I've never worked with 4.1 I don't know the answer to this. Files affected: src/validname.c, src/savecopy.c, src/mailtime.c, src/file.c, src/date.c, src/newmbox.c, src/curses.c, utils/fastmail.c - A couple of files contain extra junk after '#endif' statements. I just changed these to comments. Files affected: src/return_addr.c, src/curses.c - The last patches from Dave Taylor omitted a paren, and contained a bogus structure declaration. Files affected: src/date.c, src/leavembox.c To apply all these changes, just feed this file to patch. By the way, the following are all normal diffs. System V diff does not have a context diff capability. Sigh. Jamie Watson ...!seismo!mcvax!cernvax!paninfo!jw Pansystem Informatics, Ltd. or Bahnhofstrasse 50 jw%paninfo@cernvax.bitnet 8305 Dietlikon, Switzerland Index: Configure.sh 108,110c108,111 < if [ "$os_name" = "" ] < then < cat << THE_END --- > case $os_name in > hp|hp-ux|vax|vaxen|bsd|uts|sun|pyramid|osx*|amdahl|sys_v) ;; > sv_*|svii_*|v5|v7|eunice|convergent|berkeley|ultrix|xenix) ;; > *) cat << THE_END 111a113 > 113a116,121 > running on. I understand the following names: > > hp hp-ux vax vaxen bsd berkeley uts amdahl sun pyramid osx* > sys_v v5 sv_* v7 svii_* eunice convergent ultrix > > 116c124 < echo $nflag "running on. I'll check the name in a minute : " $cflag --- > echo $nflag "I'll check the name in a minute : " $cflag 120,121c128,129 < os_name=`echo $junk | tr '[A-Z]' '[a-z]'` < fi --- > os_name=`echo $junk | tr '[A-Z]' '[a-z]'`;; > esac 137a146 > sys_v) NAME="System V"; OS_FLAG=""; ;; 504a514,537 > # what is the return type of signal()? > > cat <<EOF > .test.c > #include <signal.h> > main () { > void (*r)(); > r = signal(SIGINT,SIG_DFL); > } > EOF > > cat <<EOF > .signal_return > cc .test.c > EOF > > sh .signal_return > .log 2>&1 > > if [ "`cat .log | wc -l`" -eq "0" ] > then > echo "Your signal() system call returns type void (*r)()..." > echo "s/#define SG_TYPE int/#define SG_TYPE void/" >> $SED1 > fi > > $rm -f a.out .test.c .signal_return .log .test.o > 641a675,676 > if [ ! -f /usr/lib/libcurses.a -a ! -f /lib/libcurses.a ] > then 643a679,680 > else termlib=curses > fi Index: filter/Makefile.mstr 53c53 < ${RM} ${BINARIES} --- > ${RM} ${BINARIES} ../bin/filter Index: hdrs/defs.h 255a256,258 > #ifdef BSD > #include <strings.h> > #else 256a260 > #endif Index: hdrs/sysdefs.master 163a164,166 > /** What is the return type of signal() **/ > #define SG_TYPE int > Index: src/validname.c 18c18 < # ifdef BSD4.1 --- > # ifdef BSD4_1 Index: src/savecopy.c 10c10 < # ifdef BSD4.1 --- > # ifdef BSD4_1 Index: src/file_utils.c 71c71 < register int (*istat)(), (*qstat)(); --- > register SG_TYPE (*istat)(), (*qstat)(); 124c124 < register int (*istat)(), (*qstat)(); --- > register SG_TYPE (*istat)(), (*qstat)(); Index: src/mailtime.c 14c14 < # ifndef BSD4.1 --- > # ifndef BSD4_1 112c112 < # ifdef BSD4.1 --- > # ifdef BSD4_1 124c124 < # ifdef BSD4.1 --- > # ifdef BSD4_1 Index: src/syscall.c 69c69 < register int (*istat)(), (*qstat)(); --- > register SG_TYPE (*istat)(), (*qstat)(); Index: src/file.c 109c109 < #ifdef BSD4.1 --- > #ifdef BSD4_1 Index: src/return_addr.c 211c211 < #endif not DONT_OPTIMIZE_RETURN --- > #endif /* not DONT_OPTIMIZE_RETURN */ Index: src/date.c 11c11 < # ifndef BSD4.1 --- > # ifndef BSD4_1 74c74 < # ifdef BSD4.1 --- > # ifdef BSD4_1 102c102 < # ifdef BSD4.1 --- > # ifdef BSD4_1 105c105 < timezone(time_zone.tz_minuteswest, time_zone.tz_dsttime); --- > timezone(time_zone.tz_minuteswest, time_zone.tz_dsttime)); Index: src/showmsg.c 430c430 < register int (*istat)(), (*qstat)(); --- > register SG_TYPE (*istat)(), (*qstat)(); Index: src/editmsg.c 96c96,97 < int edit_interrupt(), (*oldint)(), (*oldquit)(); --- > int edit_interrupt(); > SG_TYPE (*oldint)(), (*oldquit)(); Index: src/leavembox.c 36c36,39 < struct utimbuf utime_buffer; /* utime command */ --- > struct { > time_t actime; > time_t modtime; > } utime_buffer; /* utime command */ Index: src/newmbox.c 18c18 < # ifndef BSD4.1 --- > # ifndef BSD4_1 Index: src/curses.c 30c30 < # ifndef BSD4.1 --- > # ifndef BSD4_1 547c547 < #endif ndef ELM --- > #endif /* ndef ELM */ Index: utils/fastmail.c 32c32 < # ifdef BSD4.1 --- > # ifdef BSD4_1 203c203 < # ifdef BSD4.1 --- > # ifdef BSD4_1 212c212 < # ifdef BSD4.1 --- > # ifdef BSD4_1 233c233 < # ifdef BSD4.1 --- > # ifdef BSD4_1
jw@pan.UUCP (05/13/87)
To: Path: pan!jw From: jw@pan.UUCP (Jamie Watson) Newsgroups: comp.mail.elm Subject: Problem with mailer on System V.3 Message-ID: <260@pan.UUCP> Date: 10 May 87 21:18:57 GMT Reply-To: jw@pan.UUCP (Jamie Watson) Distribution: world Organization: Pansystem Informatik AG, Zuerich, Switzerland Lines: 106 ---___---___--- In the standard configuration, elm tries to use sendmail to deliver its messages; if this is not present, it tries /bin/rmail. On System V.3, and most other USG systems, /bin/rmail is simply a link to /bin/mail, so it behaves pretty much the same way. The V.3 version of /bin/mail has been changed, so that it adds a blank line to the beginning of the message it is given (between the first line of the message and the 'From_' line it adds), in order to avoid confusion of the body and header of the message. This is a problem with messages generated from elm, because it causes the header that elm produces to be considered a part of the body of the message. There are two solutions, according to the V.3 User's Reference Manual. The flag "-s" on the command line will suppress the addition of the blank line, or if the first line of the message is 'Subject: ...' the addition of the blank line is suppressed, even without the command line switch (sounds like a pretty shady hack to me...). Changing the command line would cause extra work all around, because it would then require adjustment in Configure.sh based on whether a particular system required this flag or not. So it seems we are stuck with rearranging the header. The only potential problem I see with this is that it might break some other inteligent mail reader, although I don't think this is the case. This file can (hopefully) be fed to patch. The changes are: *** mailmsg2.c.B --- mailmsg2.c *************** *** 85,91 Raw(OFF); if (isatty(fileno(stdin))) { fclose(reply); /* let edit-the-message open it! */ ! printf("To: %s\nSubject: %s\n", expanded_to, subject); strcpy(editor, "none"); /* force inline editor */ if (no_editor_edit_the_message(filename)) { return(0); /* confused? edit_the_msg returns 1 if bad */ --- 85,91 ----- Raw(OFF); if (isatty(fileno(stdin))) { fclose(reply); /* let edit-the-message open it! */ ! printf("Subject: %s\nTo: %s\n", subject, expanded_to); strcpy(editor, "none"); /* force inline editor */ if (no_editor_edit_the_message(filename)) { return(0); /* confused? edit_the_msg returns 1 if bad */ *************** *** 533,538 return(NULL); /* couldn't open it!! */ } #ifdef SITE_HIDING if ((is_hidden_user = is_a_hidden_user(username))) { /** this is the interesting part of this trick... **/ --- 533,540 ----- return(NULL); /* couldn't open it!! */ } + fprintf(filedesc, "Subject: %s\n", subject); + #ifdef SITE_HIDING if ((is_hidden_user = is_a_hidden_user(username))) { /** this is the interesting part of this trick... **/ *************** *** 568,575 hostname, username); # endif #endif - - fprintf(filedesc, "Subject: %s\n", subject); if (cc[0] != '\0') fprintf(filedesc, "Cc: %s\n", format_long(long_cc, strlen("Cc: "))); --- 570,575 ----- hostname, username); # endif #endif if (cc[0] != '\0') fprintf(filedesc, "Cc: %s\n", format_long(long_cc, strlen("Cc: "))); *** savecopy.c.B --- savecopy.c *************** *** 125,132 fprintf(save, "Date: %s\n", get_arpa_date()); ! fprintf(save,"To: %s\nSubject: %s\n", ! format_long(to,strlen("To: ")), subject); if (strlen(cc) > 0) fprintf(save,"Cc: %s\n", --- 125,132 ----- fprintf(save, "Date: %s\n", get_arpa_date()); ! fprintf(save,"Subject: %s\nTo: %s\n", ! subject, format_long(to,strlen("To: "))); if (strlen(cc) > 0) fprintf(save,"Cc: %s\n",
news@decwrl.DEC.COM (News) (05/18/87)
well among the graduate students. Again, I don't know why, but I can guess: Path: decwrl!hplabs!hpcea!hpccc!okamoto From: okamoto@hpccc.HP.COM (Jeff Okamoto) Newsgroups: comp.mail.elm Subject: Elm 1.5b savecopy bug Message-ID: <7820001@hpccc.HP.COM> Date: 15 May 87 18:07:28 GMT Organization: Corporate Computing Center Lines: 45 Description: There is a bug in savecopy.c that does not allow a copy of outgoing mail to be saved to a non-existent file. This is due to a mismatch in passed argument types to can_open(). Repeat-By: In $HOME/.elmrc, set copy to ON and savecopy to a non-existent file. elm to anybody. You will get an error message "permission to append to <savecopy file name> denied! Fix: Pass the correct argument. *** savecopy.old Fri May 15 10:53:40 1987 --- savecopy.c Fri May 15 10:56:15 1987 *************** *** 79,85 strcpy(savename, savefile); } ! if ((errno = can_open(savename, WRITE_ACCESS))) { dprint(2, (debugfile, "Error: attempt to autosave to a file that can't be appended to!\n")); dprint(2, (debugfile, "\tfilename = \"%s\"\n", savename)); --- 79,85 ----- strcpy(savename, savefile); } ! if ((errno = can_open(savename, "a"))) { dprint(2, (debugfile, "Error: attempt to autosave to a file that can't be appended to!\n")); dprint(2, (debugfile, "\tfilename = \"%s\"\n", savename)); ----- The New Number Who, hpccc!okamoto@hplabs.hp.com Jeff Okamoto ..!hplabs!hpccc!okamoto Hewlett-Packard Corporate Computing Center P.S. Steve, please inform the net of the correct mail address to send any future patches to. P.P.S. Thank God for diffc! SysV is brain damaged!
netnews@hp-sdd.UUCP (Usenet News System) (06/06/87)
--- src/elm.c Wed Jun 3 09:17:26 1987 *************** *** 305,310 } else nufoot++; break; case 'm' : PutLine0 Path: hp-sdd!hplabs!hpcea!hpccc!okamoto From: okamoto@hpccc.HP.COM (Jeff Okamoto) Newsgroups: comp.mail.elm Subject: More elm fixes Message-ID: <7820003@hpccc.HP.COM> Date: 5 Jun 87 20:06:27 GMT Organization: Corporate Computing Center Lines: 69 Two bugs that have been found and fixed: 1. If you have both keypad and softkeys turned off, elm will still try to turn the softkeys on. This was traced to a bug in src/initialize.c. 2. If you limit your mailbox to any category (say, from X), and then turn off the limit, the header line is redrawn, but not the message headers themselves. This was traced to a bug in src/elm.c. I have enclosed patches at the end of this message for these two bugs. Two bugs that I have found, but not been able to track down or fix. 1. If you have more than 10 messages in the mailbox, and have movepage turned off, goto message 11, hit -, then hit k. Surprise! Message 11 has now overwritten message 1 on the menu. 2. If you use the builtin pager, and have a message that has exactly one more line when you get the "hit space to continue" prompt, then the "Press any key to return to Elm" line will overwrite the last line of the message (16 lines for 24-line screens should exhibit this error). *** src/initialize.c.o Wed Jun 3 09:27:37 1987 --- src/initialize.c Mon Jun 1 14:43:49 1987 *************** *** 207,213 cursor_control = FALSE; ! if ((cp = return_value_of("ku")) != NULL) if (strlen(cp) == 2) { strcpy(up, cp); if ((cp = return_value_of("kd")) == NULL) --- 207,213 ----- cursor_control = FALSE; ! if (hp_terminal && ((cp = return_value_of("ku")) != NULL)) if (strlen(cp) == 2) { strcpy(up, cp); if ((cp = return_value_of("kd")) == NULL) *** src/elm.c.orig Wed Jun 3 08:37:28 1987 --- src/elm.c Wed Jun 3 09:17:26 1987 *************** *** 305,310 } else nufoot++; break; case 'm' : PutLine0(LINES-3, strlen("Command: "), "Mail"); --- 305,311 ----- } else nufoot++; + redraw++; break; case 'm' : PutLine0(LINES-3, strlen("Command: "), "Mail"); ------ The New Number Who, hpccc!okamoto@hplabs.hp.com Jeff Okamoto ..!hplabs!hpccc!okamoto
daemon@hplabsc.UUCP (06/07/87)
--- src/elm.c Wed Jun 3 09:17:26 1987 *************** *** 305,310 } else nufoot++; break; case 'm' : PutLine0 Path: decwrl!hplabs!hpcea!hpccc!okamoto From: okamoto@hpccc.HP.COM (Jeff Okamoto) Newsgroups: comp.mail.elm Subject: More elm fixes Message-ID: <7820003@hpccc.HP.COM> Date: 5 Jun 87 20:06:27 GMT Organization: Corporate Computing Center Lines: 69 Two bugs that have been found and fixed: 1. If you have both keypad and softkeys turned off, elm will still try to turn the softkeys on. This was traced to a bug in src/initialize.c. 2. If you limit your mailbox to any category (say, from X), and then turn off the limit, the header line is redrawn, but not the message headers themselves. This was traced to a bug in src/elm.c. I have enclosed patches at the end of this message for these two bugs. Two bugs that I have found, but not been able to track down or fix. 1. If you have more than 10 messages in the mailbox, and have movepage turned off, goto message 11, hit -, then hit k. Surprise! Message 11 has now overwritten message 1 on the menu. 2. If you use the builtin pager, and have a message that has exactly one more line when you get the "hit space to continue" prompt, then the "Press any key to return to Elm" line will overwrite the last line of the message (16 lines for 24-line screens should exhibit this error). *** src/initialize.c.o Wed Jun 3 09:27:37 1987 --- src/initialize.c Mon Jun 1 14:43:49 1987 *************** *** 207,213 cursor_control = FALSE; ! if ((cp = return_value_of("ku")) != NULL) if (strlen(cp) == 2) { strcpy(up, cp); if ((cp = return_value_of("kd")) == NULL) --- 207,213 ----- cursor_control = FALSE; ! if (hp_terminal && ((cp = return_value_of("ku")) != NULL)) if (strlen(cp) == 2) { strcpy(up, cp); if ((cp = return_value_of("kd")) == NULL) *** src/elm.c.orig Wed Jun 3 08:37:28 1987 --- src/elm.c Wed Jun 3 09:17:26 1987 *************** *** 305,310 } else nufoot++; break; case 'm' : PutLine0(LINES-3, strlen("Command: "), "Mail"); --- 305,311 ----- } else nufoot++; + redraw++; break; case 'm' : PutLine0(LINES-3, strlen("Command: "), "Mail"); ------ The New Number Who, hpccc!okamoto@hplabs.hp.com Jeff Okamoto ..!hplabs!hpccc!okamoto
eho@italy.mpr.ca (Ed Ho) (05/01/91)
Greetings: I have used ELM before and liked it a lot. However, in my current company, ELM is not on the system. People around here use xmail. In order to have ELM put on the system, I need to convince a few people. Since I have not subscribed to this news group before, is there a standard short list of advantages of ELM over xmail? If there is, I would appreciate it if someone sends me a copy. Also, does ELM have Xwindow interface? Thanks-in-advance. Ed.Ho