mh-6.8.4-linux-patch Version: 0.1 Diff taken by Tony Nugent on 30th Jan 1997 For instructions, see the `mh-6.8.4-linux-patch.README' file below % diffstat mh-6.8.4-linux-patch Patchlevel | 2 conf/MH | 43 ++- conf/Makefile | 4 conf/config/mts.c | 4 conf/config/mtstailor | 8 conf/doc/ADMIN.rf | 6 conf/doc/MH.rf | 78 +++++- conf/doc/bbc.rf | 4 conf/doc/bboards.rf | 10 conf/doc/mh-format.rf | 16 + conf/doc/mh-profile.rf | 7 conf/doc/mh-tailor.rf | 8 conf/doc/mhook.rf | 12 - conf/doc/repl.rf | 34 ++ conf/doc/scan.rf | 38 +-- conf/doc/show.rf | 6 conf/examples/bsd44.berkeley.edu | 20 + conf/examples/uci.sun | 19 - conf/makefiles/MH-Makefile | 2 conf/makefiles/mts/mmdf | 4 conf/makefiles/sbr | 2 conf/makefiles/support/general | 28 ++ conf/makefiles/support/pop | 10 conf/makefiles/uip | 116 ++++----- conf/mh-gen.8 | 25 +- conf/mhconfig.c | 5 h/mshsbr.h | 6 h/strings.h | 12 - mh-6.8.3-dir.patch | 9 mh-6.8.3-glibc.patch | 121 ++++++++++ mh-6.8.4-linux-patch.README | 408 +++++++++++++++++++++++++++++++++++ mh-6.8.4-linux-patch.lsm | 32 ++ miscellany/README | 5 miscellany/multi-media/misc/rt2raw.c | 2 mts/sendmail/smail.c | 13 - papers/changes/mh-changes.ms | 60 +++-- sbr/discard.c | 6 sbr/formatsbr.c | 57 ++-- sbr/help.c | 4 sbr/m_getfld.c | 58 ++++ sbr/m_gmsg.c | 2 sbr/m_readefs.c | 3 support/general/bootmhn.sh | 4 support/general/pgped.sh | 34 ++ support/general/pgped.tcl | 80 ++++++ support/general/pgpshow.sh | 51 ++++ support/pop/popd.c | 6 support/pop/popser.c | 13 - uip/dropsbr.c | 16 - uip/forw.c | 5 uip/inc.c | 26 +- uip/mark.c | 8 uip/mhlsbr.c | 9 uip/mhn.c | 102 ++++++-- uip/msgchk.c | 4 uip/msh.c | 7 uip/mshcmds.c | 203 ++++++++++++++++- uip/popi.c | 25 ++ uip/popsbr.c | 8 uip/post.c | 122 +++++++++- uip/prompter.c | 2 uip/pshsbr.c | 8 uip/rcvtty.c | 5 uip/repl.c | 44 ++- uip/replsbr.c | 14 - uip/sbboards.c | 5 uip/scan.c | 6 uip/scansbr.c | 22 + uip/send.c | 13 + uip/show.c | 4 uip/slocal.c | 6 uip/sortm.c | 4 uip/spop.c | 4 uip/trmsbr.c | 2 uip/vmh.c | 8 uip/whatnowsbr.c | 15 + zotnet/bboards/getbbent.c | 2 zotnet/mts/client.c | 7 zotnet/mts/lock.c | 2 79 files changed, 1847 insertions, 358 deletions diff -ruN mh-6.8.3/mh-6.8.4-linux-patch.lsm mh-6.8.4/mh-6.8.4-linux-patch.lsm --- mh-6.8.3/mh-6.8.4-linux-patch.lsm Thu Jan 1 10:00:00 1970 +++ mh-6.8.4/mh-6.8.4-linux-patch.lsm Thu Jan 30 11:20:34 1997 @@ -0,0 +1,32 @@ +Begin3 +Title: mh-6.8.4-linux-patch.gz +Version: 0.1 +Entered-date: January 30th 1997 +Description: See the file `mh-6.8.4-linux-patch.README' that can be found + at the top of the diff file. + This is a patch to bring the official mh-6.8.3 sources up to + version 6.8.4 for linux. It is based on the patches + distributed in the RedHat mh-6.8.3-13.rpm and the MH.6.8.4.Z + upgrade patch. + MH is a very powerful and highly flexible MIME-capable mail + management system which uses individual shell-level commands + to manage various aspects of mail maintenance. These commands + can be used as is or combined via shell scripts to allow + arbitrary mail manipulation. User interfaces such as xmh, + exmh and mh-e can easily be implemented on top of its commands. + The original mh-6.8.3 sources can be found at: + ftp://ftp.ics.uci.edu/pub/mh/tar/mh-6.8.3.tar.Z + ftp://sunsite.unc.edu/pub/Linux/system/Mail/readers/mh-6.8.3-src.tar.gz + It makes obselete and replaces the file: + ftp://sunsite.unc.edu/pub/Linux/system/Mail/readers/mh-6.8.3-diff.tgz +Keywords: mail mailreader MH UCI MIME +Author: Tony Nugent (this patch only) +Maintained-by: Tony Nugent (this patch only) +Primary-site: ftp://ftp.gw.com/pub/unix/mail/mh/patches/linux/ + mh-6.8.4-linux-patch.gz 39,451 bytes (137,220 uncompressed) + mh-6.8.4-linux-patch.lsm 1,628 bytes +Alternate-site: ftp://sunsite.unc.edu/pub/Linux/system/Mail/readers/ +Alternate-site: ftp://tsx-11.mit.edu/pub/linux/ +Platform: linux (elf, most architectures) +Copying-policy: As per the original mh source (or GNU GPL). +End diff -ruN mh-6.8.3/mh-6.8.4-linux-patch.README mh-6.8.4/mh-6.8.4-linux-patch.README --- mh-6.8.3/mh-6.8.4-linux-patch.README Thu Jan 1 10:00:00 1970 +++ mh-6.8.4/mh-6.8.4-linux-patch.README Thu Jan 30 11:20:35 1997 @@ -0,0 +1,408 @@ +mh-6.8.4-linux-patch.README +--------------------------- + +Tony Nugent +30th January 1997 + + + +In response to several requests and an obvious need, I have produced +a diff file to patch the standard mh-6.8.3 sources up to 6.8.4 to +compile and work under linux. + +This patch worked perfectly well for me, and should work on most +contemporary linux systems. I have a linux system with the following +installed: + +linux kernel 2.0.28 +gcc-2.7.2.1 +libc-5.4.17 +binutils-2.7.0.3 + + ...that is, the current standard production kernel and development tools. + + +MH is a very powerful and highly flexible MIME-capable mail management +system which uses individual shell-level commands to manage various +aspects of mail maintenance. These commands can be used as is or +combined via shell scripts to allow arbitrary mail manipulation. User +interfaces such as xmh, exmh and mh-e can easily be implemented on top +of its commands. + +The original mh-6.8.3 sources can be obtained from: + +ftp://ftp.ics.uci.edu/pub/mh/tar/mh-6.8.3.tar.Z + 1961283 bytes, 1 Dec 1993 +ftp://sunsite.unc.edu/pub/Linux/system/Mail/readers/mh-6.8.3-src.tar.gz + 1306309 bytes, 1 Dec 1995 + + +INSTALLATION +============ + +First off, be aware that mh is very large... you'll need 4.6Mb of disk +hard drive real estate just to unpack the sources, and at least around +three times that much to compile it. So you have been warned! + +To apply the patch, create a directory /usr/src/mh and put the +mh-6.8.3 sources and the mh-6.8.4-linux-patch into it. +Then do something like this: + + cd /usr/src/mh + tar zxvf mh-6.8.3-src.tar.gz + mv mh-6.8.3 mh-6.8.4 + cd mh-6.8.4 + patch -p1 < ../mh-6.8.4-linux-patch + +If you are using linux on any platform other than a sparc or i386 +architecture, then you will need to reverse-apply one patch: + + patch -p1 -R < mh-6.8.3-dir.patch + +Additionally, if you have an axp architecture, then also apply the +following patch: + + patch -p1 < mh-6.8.3-glibc.patch + +If you like, remove the *.orig files that result with the application +of the patch file... + + rm `find . -name \*.orig` +or + find . -name \*.orig | xargs rm + +At this stage, you are ready to build. However, while the defaults +should work just fine for most people, you might want to check the +following configuration files for your system and personal tastes: + +conf/MH +conf/config/mtstailor + +The latter file in particular will need to be edited if you don't use +sendmail as your MTA. + +Read conf/mh-gen.8, and also the file doc/ADMIN.doc or doc/ADMIN.me +once they are generated after you have done `mhconfig MH' (the *.me +files are nroff'ed files which need to be filtered through groff - +see the man page for more info). + +To build mh (beware - it may take some time!), do the following (as +per the RedHat .spec file): + + mkdir -p /usr/bin/mh + cd conf + make mhconfig + ./mhconfig MH + cd .. + make clean + make 2>&1 | cat + cd sbr + make inst-lib + rm -f /usr/lib/libmh.so + ln -sf libmh.so.3.2 /usr/lib/libmh.so + cd - + make + make install + strip /usr/bin/mh/ali /usr/bin/mh/anno /usr/bin/mh/burst /usr/bin/mh/comp + strip /usr/bin/mh/dist /usr/bin/mh/folder /usr/bin/mh/folders /usr/bin/mh/forw + strip /usr/bin/mh/inc /usr/bin/mh/mark /usr/bin/mh/mhmail /usr/bin/mh/mhn + strip /usr/bin/mh/mhparam /usr/bin/mh/mhpath /usr/bin/mh/msgchk /usr/bin/mh/msh + strip /usr/bin/mh/next /usr/bin/mh/packf /usr/bin/mh/pick /usr/bin/mh/prev + strip /usr/bin/mh/prompter /usr/bin/mh/refile /usr/bin/mh/repl /usr/bin/mh/rmf + strip /usr/bin/mh/rmm /usr/bin/mh/scan /usr/bin/mh/send /usr/bin/mh/show + strip /usr/bin/mh/sortm /usr/bin/mh/vmh /usr/bin/mh/whatnow /usr/bin/mh/whom + /sbin/ldconfig + chown root.mail /usr/bin/mh/inc + chmod 6755 /usr/bin/mh/inc + +(You could cut'n'paste this to make a shell script to make it easy to +do). + +The .spec file also states: + +# The following disables POP, but is necessary until we +# hack stuff to drop root privs when reading users mh profile. +#chmod -s /usr/bin/mh/inc /usr/bin/mh/msgchk + +If you want disable suid on `inc' and `msgchk' then that's your +choice. + +BTW, if you use POP to collect your email, then I would *highly* +recommend `fetchmail' (see below for the URL). I've never used mh as +a pop client, and it doesn't seem to understand POP3. + +At the end of this document there is a list of the files that should +have been installed. + +Finally, add the /usr/bin/mh/ directory to your shell's path; + +In /etc/profile or ~/.profile (for bash and - I assume - zsh)... + + export PATH=$PATH:/usr/bin/mh + +In /etc/csh.login or ~/.cshrc or ~/.tcshrc (for tcsh): + +set path=($path /usr/bin/mh) + +(If you do this for your current tcsh session, don't forget to do a +`rehash' command). + +All done - you should now be up and running with mh-6.8.4 on your +linux system! + + + +RESOURCES and CREDITS +===================== + +Mention of anything here gives automatic credit to those that produced it. + +Disclaimer: I didn't write any of this - I just _used_ it to put +this together. So if it doesn't work for you, then I'm afraid that +you are on your own and have to try to figure things out for yourself. + +The following resources were used to produce this patch: + +ftp://ftp.ics.uci.edu/pub/mh/updates/MH.6.8.4.Z + The (unofficial?) mh 6.8.3->6.8.4 patch file. + +mh-6.8.3-13.src.rpm 1968586 Fri Oct 18 00:37:00 1996 + The Linux RedHat (4.0) rpm distribution of mh-6.8.3 + The mh-6.8.3.spec file was used as a basis for producing the + diff and much of this documentation. + The following patches were used from the rpm: + mh-6.8.3-config.patch + mh-6.8.3-misc.patch + mh-6.8.3-dir.patch + mh-6.8.3-make-k.patch + mh-inetaddr.patch + mh-6.8.3-nocrypt.patch + mh-6.8.3-glibc.patch + +DIFFS.linux + This patch forms the backbone of the linux-specific patches, and comes + from the following package: + ftp://sunsite.unc.edu/pub/Linux/system/Mail/readers/mh-6.8.3-diffs.tgz + Note that no other files from this archive are needed or used. + +In the MH Patch Archive site, there is a directory for linux: + +http://www.gw.com/mail/mh/patches/linux/ +ftp://ftp.gw.com/pub/unix/mail/mh/patches/linux/ + +It contains the following files: + + 252 Wed Jul 3 00:24:00 1996 README + 22142 Tue Jun 25 11:19:00 1996 elf_1 + 22812 Mon Jun 10 01:15:00 1996 mh-6.8.3-diffs.tgz + 2082 Mon Jun 10 04:28:00 1996 mhparam_stdio + 2420 Tue Jun 25 10:15:00 1996 tsx-11 + +The README says: + +====8<---- +PATCHES FOR LINUX SYSTEMS + +elf_1 Patches for ELF support +mh-6.8.3-diffs.tgz Patches from sunsite.unc.edu (gzipped tar file) +mhparam_stdio Fix mhparam.c library headers: mh.h and h/strings.h +tsx-11 Listing of MH files and patches on tsx-11.mit.edu +====8<---- + +The file `tsx-11' lists some *.deb files (from a mid-1996 Linux Debian +distribution). The `mhparam_stdio' file is largely irrelevant, and I +haven't tested the `elf_1' patch or compared it with any of the other +patches I have used. + +This patch obseletes all those files (at least on ELF systems with +lib-5* and lib-6*), and I hope to get them all replaced with this +`mh-6.3.4-linux-patch' + +I'll also place this patch onto the sunsite.unc.edu and tsx-11.mit.edu +linux archives as an upgrade to the mh-6.8.3 distribution. I am also +considering uploading up a full `mh-6.8.4-linux.tar.gz' source +archive, but I'll look for permission before I do that. + + +MH DOCUMENTATION +================ + +The major sources of documentation for mh are the `-help' output of +each mh command, their man pages, and the source tree files doc/MH.me +and papers/beginners/beginners.tex. + +Once you've got mh up and running, check out Jerry Peek's amazingly +comprehensive html reference work on mh - it is *essential* reading... +what the man pages *don't* tell you! The online version is regularly +updated, with five mirrors around the globe to provide quick access +(the main server is, unfortunately, slow): + +Updated edition: + http://www.ics.uci.edu/~mh/book/ (western USA, Web) + http://www.tac.nyc.ny.us/mirrors/mh-book/ (eastern USA, Web) + http://www.fan.net.au/mirrors/freebooks/mh/ (Australia, Web) + http://www.huygens.org/~eijk/mh_book/ (the Netherlands, Web) + http://www.funet.fi/index/MH/book/ (Finland, Web) + ftp://ftp.ics.uci.edu/pub/mh/book/index.htm (western USA, FTP) + ftp://ftp.funet.fi/index/MH/book/index.htm (Finland, FTP) + +Original edition, no updates: + http://www.ora.com/freebooks/mh/ (northeastern USA, Web) + ftp://ftp.ora.com/pub/freebooks/mh/index.htm (northeastern USA, FTP) + +You can also download your own copy to put on your hard drive, but be +warned that it isn't as up-to-date as the online version: + +ftp://ftp.ics.uci.edu/pub/mh/book/download/unix.tar.gz + 1812511 bytes, 11 Aug 1996 + +While you are at ftp://ftp.isc.uci.edu/pub/mh, check out the goodies +in these directories... + +ftp://ftp.ics.uci.edu/pub/mh/doc/ +ftp://ftp.ics.uci.edu/pub/mh/contrib/ +ftp://ftp.ics.uci.edu/pub/mh/contrib/jpeek/ + +There's an old copy of the mh FAQ at: + +ftp://ftp.ics.uci.edu/pub/mh/contrib/mh-faq/contents +ftp://ftp.ics.uci.edu/pub/mh/contrib/mh-faq/part1 + +(You'll also find copies of this in the usenet archives on +ftp://rtfm.mit.edu/pub/usenet/comp.mail.mh/ + What_s_New_in_the_MH_FAQ + MH_Frequently_Asked_Questions_(FAQ)_with_Answers + Filtering_Mail_FAQ +and +ftp://rtfm.mit.edu/pub/usenet/news.answers/mail/mh-faq/ + contents + part1 + +A full html version of the latest FAQ (Nov'96) can be found at: + +http://www.landfield.com/faqs/mail/mh-faq/part1/preamble.html + +Of course, the plain text version of the FAQ is posted regularly to +the mh-users email list and comp.mail.mh newsgroup. + + +Finally, I would highly recommend the use of `fetchmail' as a pop +client if that is how you collect your email. As of this moment, the +current version of fetchmail is 3.2 (but there have been regular +updates to this recently): + +ftp://locke.ccil.org/pub/esr/fetchmail-3.2.tar.gz + 153736 bytes, Mon Jan 27 07:52:00 1997 + +Also see: http://www.ccil.org/~esr/ + +Cheers . +Tony _--_|\ + tony@trishul.sci.gu.edu.au / *\ T.Nugent@sct.gu.edu.au + ae.nugent@student.qut.edu.au\_.--._/ tnugent@cit.gu.edu.au + tony@sctnugen.ppp.gu.edu.au v Brisbane Qld Australia + -=*#*=-=*#*=-=*#*=-=*#*=-=*#*=-=*#*=-=*#*=-=*#*=-=*#*=-=*#*=- + + +Installed files +--------------- + +/usr/lib/libmh.so +/usr/lib/libmh.so.3.2 + +/usr/bin/mh/ali +/usr/bin/mh/anno +/usr/bin/mh/burst +/usr/bin/mh/comp +/usr/bin/mh/dist +/usr/bin/mh/folder +/usr/bin/mh/folders +/usr/bin/mh/forw +/usr/bin/mh/inc +/usr/bin/mh/mark +/usr/bin/mh/mhmail +/usr/bin/mh/mhn +/usr/bin/mh/mhpath +/usr/bin/mh/msgchk +/usr/bin/mh/msh +/usr/bin/mh/show +/usr/bin/mh/next +/usr/bin/mh/prev +/usr/bin/mh/packf +/usr/bin/mh/pick +/usr/bin/mh/prompter +/usr/bin/mh/refile +/usr/bin/mh/repl +/usr/bin/mh/rmf +/usr/bin/mh/rmm +/usr/bin/mh/scan +/usr/bin/mh/send +/usr/bin/mh/sortm +/usr/bin/mh/vmh +/usr/bin/mh/whatnow +/usr/bin/mh/whom +/usr/bin/mh/mhparam + +/usr/lib/mh/mtstailor +/usr/lib/mh/MailAliases +/usr/lib/mh/components +/usr/lib/mh/digestcomps +/usr/lib/mh/distcomps +/usr/lib/mh/forwcomps +/usr/lib/mh/rcvdistcomps +/usr/lib/mh/replcomps +/usr/lib/mh/mhl.digest +/usr/lib/mh/mhl.format +/usr/lib/mh/mhl.forward +/usr/lib/mh/mhl.body +/usr/lib/mh/mhl.headers +/usr/lib/mh/scan.mailx +/usr/lib/mh/scan.default +/usr/lib/mh/scan.size +/usr/lib/mh/scan.time +/usr/lib/mh/scan.timely +/usr/lib/mh/packmbox +/usr/lib/mh/mhn_defaults +/usr/lib/mh/viamail +/usr/lib/mh/ap +/usr/lib/mh/conflict +/usr/lib/mh/dp +/usr/lib/mh/install-mh +/usr/lib/mh/mhl +/usr/lib/mh/post +/usr/lib/mh/rcvdist +/usr/lib/mh/rcvpack +/usr/lib/mh/rcvstore +/usr/lib/mh/rcvtty +/usr/lib/mh/fmtdump +/usr/lib/mh/spost +/usr/lib/mh/slocal +/usr/lib/mh/tmac.h + +/usr/man/man1/ali.1 +/usr/man/man1/anno.1 +/usr/man/man1/burst.1 +/usr/man/man1/comp.1 +/usr/man/man1/dist.1 +/usr/man/man1/folder.1 +/usr/man/man1/forw.1 +/usr/man/man1/inc.1 +/usr/man/man1/mark.1 +/usr/man/man1/mh-chart.1 +/usr/man/man1/mh.1 +/usr/man/man1/mhl.1 +/usr/man/man1/mhook.1 +/usr/man/man1/mhmail.1 +/usr/man/man1/mhn.1 +/usr/man/man1/mhparam.1 +/usr/man/man1/mhpath.1 +/usr/man/man1/msgchk.1 +/usr/man/man1/msh.1 +/usr/man/man1/next.1 +/usr/man/man1/packf.1 +/usr/man/man1/pick.1 +/usr/man/man1/prev.1 +/usr/man/man1/prompter.1 +/usr/man/man1/rcvstore.1 +/usr/man/man1/refile.1 +/usr/man/man1/repl.1 +/usr/man/man1/rmf.1 +/usr/man/man1/rmm.1 +/usr/man/man1/scan.1 +/usr/man/man1/send.1 +/usr/man/man1/show.1 +/usr/man/man1/slocal.1 +/usr/man/man1/sortm.1 +/usr/man/man1/vmh.1 +/usr/man/man1/whatnow.1 +/usr/man/man1/whom.1 +/usr/man/man5/mh-alias.5 +/usr/man/man5/mh-format.5 +/usr/man/man5/mh-mail.5 +/usr/man/man5/mh-profile.5 +/usr/man/man5/mh-sequence.5 +/usr/man/man5/mh-tailor.5 +/usr/man/man8/ap.8 +/usr/man/man8/conflict.8 +/usr/man/man8/dp.8 +/usr/man/man8/install-mh.8 +/usr/man/man8/post.8 +/usr/man/man8/fmtdump.8 + +-- END mh-6.8.4-linux-patch.README -- diff -ruN mh-6.8.3/mh-6.8.3-dir.patch mh-6.8.4/mh-6.8.3-dir.patch --- mh-6.8.3/mh-6.8.3-dir.patch Thu Jan 1 10:00:00 1970 +++ mh-6.8.4/mh-6.8.3-dir.patch Sat Feb 24 00:00:00 1996 @@ -0,0 +1,11 @@ +--- mh-6.8.3/sbr/m_gmsg.c.marc Fri Feb 23 13:37:19 1996 ++++ mh-6.8.3/sbr/m_gmsg.c Fri Feb 23 13:37:46 1996 +@@ -50,7 +50,7 @@ + free (name); + return NULL; + } +- (void) fstat (dd -> dd_fd, &st); ++ (void) fstat (dirfd(dd), &st); + + mp = (struct msgs *) malloc (MHSIZE (mp, 0, 0)); + if (mp == NULL) diff -ruN mh-6.8.3/mh-6.8.3-glibc.patch mh-6.8.4/mh-6.8.3-glibc.patch --- mh-6.8.3/mh-6.8.3-glibc.patch Thu Jan 1 10:00:00 1970 +++ mh-6.8.4/mh-6.8.3-glibc.patch Sat Aug 31 02:25:00 1996 @@ -0,0 +1,151 @@ +--- mh-6.8.3/sbr/advertise.c.ewt Fri Aug 30 11:24:11 1996 ++++ mh-6.8.3/sbr/advertise.c Fri Aug 30 11:24:38 1996 +@@ -16,7 +16,7 @@ + */ + + extern int errno; +-#ifndef BSD44 /* in */ ++#if !defined(BSD44) && !defined(__GNU_LIBRARY__) /* in */ + extern int sys_nerr; + extern char *sys_errlist[]; + #endif +--- mh-6.8.3/sbr/discard.c.ewt Fri Aug 30 11:26:33 1996 ++++ mh-6.8.3/sbr/discard.c Fri Aug 30 11:26:44 1996 +@@ -13,6 +13,7 @@ + #else /* SYS5 */ + #include + #include ++#include + #ifndef NOIOCTLH + #ifndef __alpha__ + #include +--- mh-6.8.3/sbr/m_gmsg.c.ewt Fri Aug 30 11:29:34 1996 ++++ mh-6.8.3/sbr/m_gmsg.c Fri Aug 30 11:30:09 1996 +@@ -50,7 +50,7 @@ + free (name); + return NULL; + } +- (void) fstat (dd -> dd_fd, &st); ++ (void) stat(name, &st); + + mp = (struct msgs *) malloc (MHSIZE (mp, 0, 0)); + if (mp == NULL) +--- mh-6.8.3/support/pop/popd.c.ewt Fri Aug 30 11:25:15 1996 ++++ mh-6.8.3/support/pop/popd.c Fri Aug 30 11:25:29 1996 +@@ -58,7 +58,7 @@ + /* */ + + extern int errno; +-#ifndef BSD44 ++#if !defined(BSD44) && !defined(__GNU_LIBRARY__) + extern int sys_nerr; + extern char *sys_errlist[]; + #ifndef linux +--- mh-6.8.3/uip/trmsbr.c.ewt Fri Aug 30 12:16:44 1996 ++++ mh-6.8.3/uip/trmsbr.c Fri Aug 30 12:16:59 1996 +@@ -13,6 +13,7 @@ + #else /* SYS5 */ + #include + #include ++#include + #ifndef NOIOCTLH + #ifndef __alpha__ + #include +--- mh-6.8.3/uip/popsbr.c.ewt Fri Aug 30 12:17:14 1996 ++++ mh-6.8.3/uip/popsbr.c Fri Aug 30 12:17:35 1996 +@@ -28,7 +28,7 @@ + #define TRMLEN (sizeof TRM - 1) + + extern int errno; +-#ifndef BSD44 ++#if !defined(BSD44) && !defined(__GNU_LIBRARY__) + extern int sys_nerr; + extern char *sys_errlist[]; + #endif +--- mh-6.8.3/uip/mhn.c.ewt Fri Aug 30 12:17:56 1996 ++++ mh-6.8.3/uip/mhn.c Fri Aug 30 12:18:11 1996 +@@ -198,7 +198,7 @@ + + + extern int errno; +-#ifndef BSD44 ++#if !defined(BSD44) && !defined(__GNU_LIBRARY__) + extern int sys_nerr; + extern char *sys_errlist[]; + #endif +--- mh-6.8.3/uip/ftpsbr.c.ewt Fri Aug 30 12:19:06 1996 ++++ mh-6.8.3/uip/ftpsbr.c Fri Aug 30 12:19:39 1996 +@@ -67,7 +67,7 @@ + /* */ + + extern int errno; +-#ifndef BSD44 ++#if !defined(BSD44) && !defined(__GNU_LIBRARY__) + extern int sys_nerr; + extern char *sys_errlist[]; + #endif +--- mh-6.8.3/uip/vmhsbr.c.ewt Fri Aug 30 12:20:26 1996 ++++ mh-6.8.3/uip/vmhsbr.c Fri Aug 30 12:20:42 1996 +@@ -26,7 +26,7 @@ + + + extern int errno; +-#ifndef BSD44 ++#if !defined(BSD44) && !defined(__GNU_LIBRARY__) + extern int sys_nerr; + extern char *sys_errlist[]; + #endif +--- mh-6.8.3/uip/prompter.c.ewt Fri Aug 30 12:21:17 1996 ++++ mh-6.8.3/uip/prompter.c Fri Aug 30 12:21:25 1996 +@@ -11,6 +11,7 @@ + #else /* SYS5 */ + #include + #include ++#include + #ifndef NOIOCTLH + #ifndef __alpha__ + #include +--- mh-6.8.3/uip/vmh.c.ewt Fri Aug 30 12:22:00 1996 ++++ mh-6.8.3/uip/vmh.c Fri Aug 30 12:24:19 1996 +@@ -61,6 +61,10 @@ + #include + #define TCGETATTR /* tcgetattr() */ + #endif ++#ifdef __GNU_LIBRARY__ ++#include ++#include ++#endif + #ifdef BSD44 + #define USE_OLD_TTY + #define _maxx maxx /* curses.h */ +@@ -191,7 +195,7 @@ + + /* MISCELLANY */ + extern int errno; +-#ifndef BSD44 ++#if !defined(BSD44) && !defined(__GNU_LIBRARY__) + extern int sys_nerr; + extern char *sys_errlist[]; + #endif +--- mh-6.8.3/zotnet/mf/mf.c.ewt Fri Aug 30 12:15:08 1996 ++++ mh-6.8.3/zotnet/mf/mf.c Fri Aug 30 12:15:20 1996 +@@ -18,7 +18,7 @@ + { + register char *p; + +-if (!s) { _cleanup(); abort(); for(;;) pause();} ++if (!s) { /*_cleanup();*/ abort(); for(;;) pause();} + if ((p = malloc ((unsigned) (strlen (s) + 2))) != NULL) + (void) strcpy (p, s); + return p; +--- mh-6.8.3/zotnet/mts/client.c.ewt Fri Aug 30 11:31:35 1996 ++++ mh-6.8.3/zotnet/mts/client.c Fri Aug 30 11:31:52 1996 +@@ -53,7 +53,7 @@ + /* */ + + extern int errno; +-#ifndef BSD44 ++#if !defined(BSD44) && !defined(__GNU_LIBRARY__) + extern int sys_nerr; + extern char *sys_errlist[]; + #endif diff -ruN mh-6.8.3/Patchlevel mh-6.8.4/Patchlevel --- mh-6.8.3/Patchlevel Wed Dec 1 14:00:14 1993 +++ mh-6.8.4/Patchlevel Thu Jan 30 11:24:22 1997 @@ -1 +1 @@ -MH.6.8 patch.3 +MH.6.8 patch.4 diff -ruN mh-6.8.3/conf/MH mh-6.8.4/conf/MH --- mh-6.8.3/conf/MH Wed Dec 1 14:00:14 1993 +++ mh-6.8.4/conf/MH Thu Jan 30 11:24:22 1997 @@ -1,9 +1,34 @@ -# @(#)$Id: MH,v 1.7 1990/04/06 09:44:31 sources Exp $ -# a 4.2BSD VAX system running SendMail -bin /usr/local -bboards on -etc /usr/local/lib/mh -mail /usr/spool/mail -manuals local -mts sendmail -options BSD42 +# @(#)$Id: MH,v 1.7 90/04/06 09:44:31 sources Exp $ +# Linux i386 +bin /usr/bin/mh +bboards off +etc /usr/lib/mh +mail /var/spool/mail +mandir /usr/man +manuals standard +chown /bin/chown +cc cc +ccoptions -D_NFILE='getdtablesize()' -DSIGEMT=SIGUSR1 -O2 -I/usr/include/ncurses +ldoptions -s +ldoptlibs -ldb +lex flex +ranlib on +mts sendmail/smtp +bbdelivery off +bbhome /var/spool/bboards +pop on +popdir /usr/sbin +signal void +sprintf int +mailgroup mail +editor vi +sharedlib sys5 +slflags -fPIC +slibdir /usr/lib +# MH has never worked properly with terminfo, to my knowledge. It looks +# like vmh still tries to play the internals game, which is bound to fail. +curses -lncurses -ltermcap +# This is POSIX. Building Linux software for BSD is almost always a mistake. +options SYS5 MORE='"/usr/bin/less"' RENAME SYS5DIR UNISTD SVR4 MIME +options VSPRINTF MHE OVERHEAD RPATHS DUMB ATHENA BIND SOCKETS NTOHLSWAP +options DPOP POP2 RPOP MHRC TERMINFO diff -ruN mh-6.8.3/conf/Makefile mh-6.8.4/conf/Makefile --- mh-6.8.3/conf/Makefile Wed Dec 1 14:00:14 1993 +++ mh-6.8.4/conf/Makefile Thu Jan 30 11:24:22 1997 @@ -1,7 +1,7 @@ ###################################################################### # Instructions to Make, for compilation of MH modules ###################################################################### -# @(#)$Id: Makefile,v 2.3 1992/10/26 22:36:21 jromine Exp $ +# @(#)$Id: Makefile,v 2.4 1994/04/18 22:04:09 jromine Exp $ SHELL = /bin/sh @@ -42,4 +42,4 @@ clean: unclean -unclean:; rm -f *.o _* :* */_* */:* */*/_* */*/:* +unclean:; rm -f mhconfig *.o _* :* */_* */:* */*/_* */*/:* diff -ruN mh-6.8.3/conf/config/mts.c mh-6.8.4/conf/config/mts.c --- mh-6.8.3/conf/config/mts.c Wed Dec 1 14:00:15 1993 +++ mh-6.8.4/conf/config/mts.c Thu Jan 30 11:24:22 1997 @@ -1,6 +1,6 @@ /* mts.c - definitions for the mail transport system */ #ifndef lint -static char ident[] = "@(#)$Id: mts.c,v 2.19 1993/09/01 20:55:38 jromine Exp jromine $"; +static char ident[] = "@(#)$Id: mts.c,v 2.20 1994/03/23 23:35:23 jromine Exp $"; #endif /* lint */ /* LINTLIBRARY */ @@ -125,7 +125,7 @@ /* SMTP/POP stuff */ -char *clientname = ""; +char *clientname = (char *)0; char *servers = "localhost \01localnet"; char *pophost = ""; diff -ruN mh-6.8.3/conf/config/mtstailor mh-6.8.4/conf/config/mtstailor --- mh-6.8.3/conf/config/mtstailor Wed Dec 1 14:00:15 1993 +++ mh-6.8.4/conf/config/mtstailor Thu Jan 30 11:24:22 1997 @@ -1,4 +1,12 @@ mmdfldir: @(MHDROPATH) mmdflfil: @(MHDROPFIL) +uucpldir: /var/spool/mail +uucplfil: +mmdelim1: \001\001\001\001\n +mmdelim2: \001\001\001\001\n +mmailid: 0 +umincproc: +lockldir: + hostable: @(MHETCPATH)/hosts servers: localhost \01localnet diff -ruN mh-6.8.3/conf/doc/ADMIN.rf mh-6.8.4/conf/doc/ADMIN.rf --- mh-6.8.3/conf/doc/ADMIN.rf Wed Dec 1 14:00:15 1993 +++ mh-6.8.4/conf/doc/ADMIN.rf Thu Jan 30 11:24:23 1997 @@ -1,5 +1,5 @@ .\" @(MHWARNING) -.\" @(#)$Id: ADMIN.rf,v 2.16 1992/05/19 21:48:37 jromine Exp $ +.\" @(#)$Id: ADMIN.rf,v 2.17 1995/12/06 22:42:25 jromine Exp $ .po +.75i .de $c \" Major Heading printer .ce @@ -491,7 +491,7 @@ if [ \-f /etc/popd ]; then /etc/popd & echo \-n ' pop' >/dev/console fi -.in \-.5i +.in -.5i .fi .sp to the \fB/etc/rc.local\fR file is sufficient. @@ -516,7 +516,7 @@ .nf .in +.5i pop3 110/tcp -.in \-.5i +.in -.5i .fi .sp to the \fB/etc/services\fR file (if it's not already there). diff -ruN mh-6.8.3/conf/doc/MH.rf mh-6.8.4/conf/doc/MH.rf --- mh-6.8.3/conf/doc/MH.rf Wed Dec 1 14:00:15 1993 +++ mh-6.8.4/conf/doc/MH.rf Thu Jan 30 11:24:24 1997 @@ -1,5 +1,9 @@ .\" @(MHWARNING) -.\" @(#)$Id: MH.rf,v 1.26 1992/12/02 19:03:15 jromine Exp $ +.\" @(#)$Id: MH.rf,v 1.30 1995/12/06 01:27:51 jromine Exp $ +@BEGIN: BSD44 +.eh 'USD:8-%''The RAND Message Handling System: User Manual' +.oh 'The RAND Message Handling System: User Manual''USD:8-%' +@END: BSD44 .po +.75i .de $c \" Major Heading printer .ce @@ -31,6 +35,10 @@ \" throughout this document except as field \" delimiter & pad indicator! .he ''-%-'' +@BEGIN: BSD44 +.eh 'USD:8-%''The RAND Message Handling System: User Manual' +.oh 'The RAND Message Handling System: User Manual''USD:8-%' +@END: BSD44 .ll 32P \" 32 Picas or about 5+1/3 inch Line Length .if n .ll 72m \" Use 72 ems for nroff .nr ss 30p \" 30 point space before section titles @@ -947,6 +955,10 @@ .fo '@(MHLEFTFOOT)'@(MHCENTERFOOT)'UCI version' .de SC .he '\\$1(\\$2)'-%-'\\$1(\\$2)' +@BEGIN: BSD44 +.eh 'USD:8-%'The RAND Message Handling System: User Manual'\\$1(\\$2)' +.oh '\\$1(\\$2)'The RAND Message Handling System: User Manual'USD:8-%' +@END: BSD44 .bp .(x .ti .8i @@ -1106,8 +1118,16 @@ .so vmh.me .so whatnow.me .so whom.me +@BEGIN: BSD44 +.eh 'USD:8-%''The RAND Message Handling System: User Manual' +.oh 'The RAND Message Handling System: User Manual''USD:8-%' +@END: BSD44 .po +.50i .he ''-%-'' +@BEGIN: BSD44 +.eh 'USD:8-%''The RAND Message Handling System: User Manual' +.oh 'The RAND Message Handling System: User Manual''USD:8-%' +@END: BSD44 .fo '''' .br .if t \{ @@ -1138,8 +1158,16 @@ .so fmtdump.me .so install-mh.me .so post.me +@BEGIN: BSD44 +.eh 'USD:8-%''The RAND Message Handling System: User Manual' +.oh 'The RAND Message Handling System: User Manual''USD:8-%' +@END: BSD44 .po +.50i .he ''-%-'' +@BEGIN: BSD44 +.eh 'USD:8-%''The RAND Message Handling System: User Manual' +.oh 'The RAND Message Handling System: User Manual''USD:8-%' +@END: BSD44 .fo '''' .br .if t \{ @@ -1909,6 +1937,10 @@ \" .fo ''-%-'' .he '''' +@BEGIN: BSD44 +.eh 'USD:8-%''The RAND Message Handling System: User Manual' +.oh 'The RAND Message Handling System: User Manual''USD:8-%' +@END: BSD44 .(x .sp Appendix @@ -2039,6 +2071,10 @@ .bp 1 .fo '''' .he ''-%-'' +@BEGIN: BSD44 +.eh 'USD:8-%''The RAND Message Handling System: User Manual' +.oh 'The RAND Message Handling System: User Manual''USD:8-%' +@END: BSD44 .+c "READ THIS" .pp Although the \fIMH\fR system was originally developed by the RAND Corporation, @@ -2087,27 +2123,33 @@ discussion about how to use \fIMH\fP. \fBMH\-Users\fR is bi-directionally gatewayed into USENET as \fBcomp.mail.mh\fR. -.lp -.b "HOW TO GET MH" +.+c "OBTAINING MH" .pp Since you probably already have \fIMH\fP, you may not need to read this unless you suspect you have an old version. -There are two ways to get the latest release: -.pp -1. If you can FTP to the ARPA Internet, use anonymous FTP to -ics.uci.edu [128.195.1.1] and retrieve the file pub/mh/mh-6.8.tar.Z. +On the Internet, you may retrieve the lastest release from one of: + +.nf +.in +1i +ftp://ftp.ics.uci.edu/pub/mh/mh-6.8.tar.Z +ftp://ftp.uu.uunet/networking/mail/mh/mh-6.8.tar.Z +http://wuarchive.wustl.edu/packages/mail/mh/mh-6.8.tar.Z +.fi +.in -1i + +.lp This is a tar image after being run through the compress program -(approximately 1.8MB). There should also be a \fBREADME\fR file in -that directory which tells what the current release of \fIMH\fP +(approximately 2Mb). There is also an \fIMH\fP World Wide Web +Home Page at \*(lqhttp://www.ics.uci.edu/\~mh\*(rq +which tells what the current release of \fIMH\fP is, and how to get updates. .pp -This tar file is also available on louie.udel.edu -[128.175.1.3] in portal/mh-6.8.tar.Z. You may also find MH on +You may also find MH on various other hosts; to make sure you get the latest version and don't waste your time re-fixing bugs, it's best to get it from -either ics.uci.edu or louie.udel.edu. +either ftp.ics.uci.edu or a site which mirrors ftp.ics.uci.edu. .pp -2. You can send $75 US to the address below. +Alternatively, you can send $75 US to the address below. This covers the cost of a 6250 BPI 9-track magtape, handling, and shipping. In addition, you'll get a laser-printed hard-copy of the entire MH documentation set. Be @@ -2121,13 +2163,12 @@ .nf .in +1i -Computing Support Group Attn: MH distribution -Department of Information and Computer Science +Office of Academic Computing University of California, Irvine -Irvine, CA 92717 +Irvine, CA 92717-2225 -714/856-7554 ++1 714 824 5153 .fi .in -1i .pp @@ -2324,6 +2365,10 @@ It also allows users familiar with the shell to use \fIMH\fR with minimal effort. .he '''' +@BEGIN: BSD44 +.eh 'USD:8-%''The RAND Message Handling System: User Manual' +.oh 'The RAND Message Handling System: User Manual''USD:8-%' +@END: BSD44 .fo '''' .bp .ce diff -ruN mh-6.8.3/conf/doc/bbc.rf mh-6.8.4/conf/doc/bbc.rf --- mh-6.8.3/conf/doc/bbc.rf Wed Dec 1 14:00:16 1993 +++ mh-6.8.4/conf/doc/bbc.rf Thu Jan 30 11:24:24 1997 @@ -1,5 +1,5 @@ .\" @(MHWARNING) -.\" @(#)$Id: bbc.rf,v 2.5 1992/02/05 21:00:33 jromine Exp $ +.\" @(#)$Id: bbc.rf,v 2.6 1995/12/06 22:48:30 jromine Exp $ .SC BBC 1 .NA bbc \- check on BBoards @@ -139,7 +139,7 @@ (i.e., does not begin with a \fB/\fR\0), it will be presumed to start from the current working directory. If this switch is not given (or the `\-norcfile' switch is given), -then \fIbbc\fR consults the envariable \fB$MHBBRC\fR, +then \fIbbc\fR consults the envariable \fBMHBBRC\fR, and honors it similarly. .Fi ^$HOME/\&.mh\(ruprofile~^The user profile diff -ruN mh-6.8.3/conf/doc/bboards.rf mh-6.8.4/conf/doc/bboards.rf --- mh-6.8.3/conf/doc/bboards.rf Wed Dec 1 14:00:16 1993 +++ mh-6.8.4/conf/doc/bboards.rf Thu Jan 30 11:24:25 1997 @@ -1,5 +1,5 @@ .\" @(MHWARNING) -.\" @(#)$Id: bboards.rf,v 1.5 90/04/05 15:11:40 sources Exp $ +.\" @(#)$Id: bboards.rf,v 1.6 1994/04/15 23:10:56 jromine Exp $ .SC BBOARDS 1 .NA bboards \- the UCI BBoards facility @@ -12,6 +12,14 @@ .DE The home directory of \fIbboards\fR is where the BBoard system is kept. This documentation describes some of the nuances of the BBoard system. + +Note that if your system is configured to use the Network News +Transfer Protocol (\fBNNTP\fP) to read BBoards, +@BEGIN: NNTP +(your system does seem to be configured this way), +@END: NNTP +then there is no local bboards setup; instead, \fIbbc\fP +opens an \fBNNTP\fP connection to the local server. .in +.5i .ti -.5i diff -ruN mh-6.8.3/conf/doc/mh-format.rf mh-6.8.4/conf/doc/mh-format.rf --- mh-6.8.3/conf/doc/mh-format.rf Wed Dec 1 14:00:17 1993 +++ mh-6.8.4/conf/doc/mh-format.rf Thu Jan 30 11:24:25 1997 @@ -1,5 +1,5 @@ .\" @(MHWARNING) -.\" @(#)$Id: mh-format.rf,v 1.45 1993/08/19 20:26:17 jromine Exp $ +.\" @(#)$Id: mh-format.rf,v 1.47 1995/12/06 23:33:39 jromine Exp $ .SC MH-FORMAT 5 .NA mh-format \- format file for MH message system @@ -35,6 +35,8 @@ `\\b', `\\f', `\\n', `\\r', and `\\t'. Continuation lines in format files end with `\\' followed by the newline character. +To put a literal `%' or `\\' in a format string, use two of them: +`%%' and `\\\\'. .\" talk about syntax first, then semantics There are three types of \fIescape\fR sequences: header \fIcomponents\fR, built-in \fIfunctions\fR, and flow \fIcontrol\fR. @@ -57,6 +59,7 @@ .ne 12 .Uh "Control-flow escapes" A \fIcontrol\fR escape is one of: `%<', `%?', `%|', or `%>'. +.\" `%[', or `%]'. These are combined into the conditional execution construct: .sp .nf @@ -128,6 +131,15 @@ The `%|' control escape and its following format text is also optional, and may be included zero or one times. +.\" The '%[' and '%]' escapes form a loop construct. +.\" For format strings which are executed repeatedly +.\" (as with \fIscan\fP), these escapes delimit the main +.\" body of execution. Format text which occurs +.\" before the '%[' escape is executed once only, prior +.\" to processing the first message; format text occuring +.\" after the '%]' escape is ignored. +.\" (These escapes may not be nested). +.\" .Uh "Function escapes" .ne 10 Most functions expect an argument of a particular type: @@ -214,7 +226,7 @@ void expr Set \fIstr\fR or \fInum\fR comp comp string Set \fIstr\fR to component text compval comp integer \fInum\fR set to \*(lq\fBatoi\fR(\fIcomp\fR\^)\*(rq -.\" compflag comp integer Set \fInum\fR to component flags bits +.\" compflag comp integer Set \fInum\fR to component flags bits (internal) trim expr trim trailing white-space from \fIstr\fR putstr expr print \fIstr\fR putstrf expr print \fIstr\fR in a fixed width diff -ruN mh-6.8.3/conf/doc/mh-profile.rf mh-6.8.4/conf/doc/mh-profile.rf --- mh-6.8.3/conf/doc/mh-profile.rf Wed Dec 1 14:00:17 1993 +++ mh-6.8.4/conf/doc/mh-profile.rf Thu Jan 30 11:24:25 1997 @@ -1,5 +1,5 @@ .\" @(MHWARNING) -.\" @(#)$Id: mh-profile.rf,v 1.20 1993/08/19 23:43:36 jromine Exp $ +.\" @(#)$Id: mh-profile.rf,v 1.21 1996/02/08 18:06:13 jromine Exp $ .SC MH-PROFILE 5 .NA mh-profile \- user profile customization for MH message handler @@ -9,10 +9,13 @@ Each user of \fIMH\fR is expected to have a file named \fI\&.mh\(ruprofile\fR in his or her home directory. This file contains a set of user parameters used by some or all of the \fIMH\fR -family of programs. Each line of the file is of the format +family of programs. Each entry in the file is of the format \fIprofile\-component\fR: \fIvalue\fR +If the text of an entry extends across several +real lines, the continuation lines are indicated by leading +spaces or tabs. The possible profile components are exemplified below. Only `Path:' is mandatory. The others are optional; diff -ruN mh-6.8.3/conf/doc/mh-tailor.rf mh-6.8.4/conf/doc/mh-tailor.rf --- mh-6.8.3/conf/doc/mh-tailor.rf Wed Dec 1 14:00:18 1993 +++ mh-6.8.4/conf/doc/mh-tailor.rf Thu Jan 30 11:24:25 1997 @@ -1,5 +1,5 @@ .\" @(MHWARNING) -.\" @(#)$Id: mh-tailor.rf,v 2.20 1993/09/01 21:20:56 jromine Exp $ +.\" @(#)$Id: mh-tailor.rf,v 2.21 1994/03/23 23:32:50 jromine Exp $ .SC MH-TAILOR 5 .NA mh-tailor, mtstailor \- system customization for MH message handler @@ -45,7 +45,9 @@ .br The host name \fIMH\fP will give in the SMTP \fBHELO\fP (and \fBEHLO\fP) command, when posting mail. -If not set, no \fBHELO\fP command will be given. +If not set, the host name \fIMH\fR considers local is used +(see \*(lqlocalname\*(rq above). +If empty, no \fBHELO\fP command will be given. Although the \fBHELO\fP command is required by RFC 821, many SMTP servers do not require it. .sp @@ -53,7 +55,7 @@ given in the \fBHELO\fP command is the local host; later versions of SendMail will complain if you omit the \fBHELO\fP command. If you run SendMail, find out what -your system expects and set this field accordingly. +your system expects and set this field if needed. .ti -.5i systemname: diff -ruN mh-6.8.3/conf/doc/mhook.rf mh-6.8.4/conf/doc/mhook.rf --- mh-6.8.3/conf/doc/mhook.rf Wed Dec 1 14:00:18 1993 +++ mh-6.8.4/conf/doc/mhook.rf Thu Jan 30 11:24:25 1997 @@ -1,5 +1,5 @@ .\" @(MHWARNING) -.\" @(#)$Id: mhook.rf,v 1.15 1992/10/29 22:03:44 jromine Exp $ +.\" @(#)$Id: mhook.rf,v 1.16 1995/12/06 23:31:56 jromine Exp $ .SC MHOOK 1 .NA mhook, rcvdist, rcvpack, rcvtty \- MH receive-mail hooks @@ -46,6 +46,16 @@ The \fIrcvdist\fR program will resend a copy of the message to all of the addresses listed on its command line. It uses the format string facility described in \fImh\-format\fR\0(5). +In addition, \fIrcvdist\fP +also recognizes the following additional \fIcomponent\fR escape: +.sp 1 +.ne 5 +.nf +.ta \w'Dtimenow 'u +\w'Returns 'u +\fIEscape\fR \fIReturns\fR \fIDescription\fR +addresses string the addresses to distribute to +.re +.fi The \fIrcvpack\fR program will append a copy of the message to the file listed on its command line. diff -ruN mh-6.8.3/conf/doc/repl.rf mh-6.8.4/conf/doc/repl.rf --- mh-6.8.3/conf/doc/repl.rf Wed Dec 1 14:00:19 1993 +++ mh-6.8.4/conf/doc/repl.rf Thu Jan 30 11:24:25 1997 @@ -1,5 +1,5 @@ .\" @(MHWARNING) -.\" @(#)$Id: repl.rf,v 1.11 1992/11/18 01:18:54 jromine Exp $ +.\" @(#)$Id: repl.rf,v 1.13 1996/02/08 19:01:16 jromine Exp $ .SC REPL 1 .NA repl \- reply to a message @@ -15,6 +15,9 @@ \%[\-form\ formfile] .\" \%[\-format] \%[\-noformat] \%[\-inplace] \%[\-noinplace] +@BEGIN: MIME +\%[\-mime] \%[\-nomime] +@END: MIME \%[\-query] \%[\-noquery] \%[\-width\ columns] \%[\-whatnowproc\ program] \%[\-nowhatnowproc] @@ -132,6 +135,31 @@ and then outputs each line of the body prefaced with the \*(lq>\*(rq character. +@BEGIN: MIME +To use the MIME rules for encapsulation, +specify the `\-mime' switch. +This directs \fIreply\fR to generate an \fImhn\fR composition file. +Note that MH will not invoke \fImhn\fR automatically, +unless you add this line to your \&.mh\(ruprofile file: +.sp +.in +.5i +automhnproc: mhn +.in -.5i +.sp +Otherwise, +you must specifically give the command +.sp +.in +.5i +What now? edit mhn +.in -.5i +.sp +prior to sending the draft. + +If you don't want to use this feature, +the manual page for \fIforw\fR contains another idea on how you can +automate this somewhat. + +@END: MIME If the `\-annotate' switch is given, the message being replied\-to will be annotated with the lines @@ -217,6 +245,10 @@ `\-nodraftfolder' .Ds `\-noinplace' +@BEGIN: MIME +.Ds +`\-nomime' +@END: MIME .Ds `\-noquery' .Ds diff -ruN mh-6.8.3/conf/doc/scan.rf mh-6.8.4/conf/doc/scan.rf --- mh-6.8.3/conf/doc/scan.rf Wed Dec 1 14:00:19 1993 +++ mh-6.8.4/conf/doc/scan.rf Thu Jan 30 11:24:28 1997 @@ -1,5 +1,5 @@ .\" @(MHWARNING) -.\" @(#)$Id: scan.rf,v 1.12 1993/08/19 20:43:27 jromine Exp $ +.\" @(#)$Id: scan.rf,v 1.14 1995/12/06 23:22:17 jromine Exp $ .SC SCAN 1 .NA scan \- produce a one line per message scan listing @@ -24,19 +24,21 @@ .nf .in +.5i -.ta \w'15+- 'u +\w'7/\05 'u +\w'Dcrocker 'u -15+ 7/\05 Dcrocker nned\0\0\*(< $@ + -@chmod $(PGMPROT) $@ + -@ls -l $@ + -@echo "" + +$(BINDIR)/pgpshow: pgpshow.sh + -$(REMOVE) $@ zpgpshow.sh + cp pgpshow.sh $@ + -@chmod $(PGMPROT) $@ -@ls -l $@ -@echo "" diff -ruN mh-6.8.3/conf/makefiles/support/pop mh-6.8.4/conf/makefiles/support/pop --- mh-6.8.3/conf/makefiles/support/pop Wed Dec 1 14:00:23 1993 +++ mh-6.8.4/conf/makefiles/support/pop Thu Jan 30 11:24:29 1997 @@ -110,7 +110,7 @@ -@ls -l $@ -@echo "" -popd: xpopd +popd: xpopd; xpopd: popd.o popser.o syslog.o \ ../../uip/dropsbr.o \ @@ -146,7 +146,7 @@ -@ls -l $@ -@echo "" -popaka: xpopaka +popaka: xpopaka; xpopaka: popaka.o $(LIBES1) $(LD) $(LDFLAGS) -o $@ popaka.o $(LDLIBS1) @@ -169,7 +169,7 @@ -@ls -l $@ -@echo "" -popauth: xpopauth +popauth: xpopauth; xpopauth: popauth.o $(LIBES1) $(LD) $(LDFLAGS) -o $@ popauth.o $(LDLIBS2) @@ -193,7 +193,7 @@ -@ls -l $@ -@echo "" -popwrd: xpopwrd +popwrd: xpopwrd; xpopwrd: popwrd.o $(LIBES1) $(LD) $(LDFLAGS) -o $@ popwrd.o $(LDLIBS1) @@ -214,7 +214,7 @@ -@ls -l $@ -@echo "" -smtpd: xsmtpd +smtpd: xsmtpd; xsmtpd: smtpd.o syslog.o $(LD) $(LDFLAGS) -o $@ smtpd.o syslog.o diff -ruN mh-6.8.3/conf/makefiles/uip mh-6.8.4/conf/makefiles/uip --- mh-6.8.3/conf/makefiles/uip Wed Dec 1 14:00:23 1993 +++ mh-6.8.4/conf/makefiles/uip Thu Jan 30 11:24:30 1997 @@ -267,7 +267,7 @@ -@ls -l $@ -@echo "" -ali: xali +ali: xali; xali: ali.o aliasbr.o $(LIBES) $(LD) $(LDFLAGS) -o $@ ali.o aliasbr.o $(LDLIBS) @@ -284,7 +284,7 @@ -@ls -l $@ -@echo "" -anno: xanno +anno: xanno; xanno: anno.o annosbr.o $(LIBES) $(LD) $(LDFLAGS) -o $@ anno.o annosbr.o $(LDLIBS) @@ -301,7 +301,7 @@ -@ls -l $@ -@echo "" -ap: xap +ap: xap; xap: ap.o trmsbr.o $(LIBES) $(LD) $(LDFLAGS) -o $@ ap.o trmsbr.o $(LDLIBS) $(LDCURSES) @@ -325,7 +325,7 @@ -@ls -l $(BINDIR)/bbc -@echo "" -bbc: xbbc +bbc: xbbc; xbbc: bbc.o $(PSHLIB) $(LIBES) $(LD) $(LDFLAGS) -o $@ bbc.o $(PSHLIB) $(LDLIBS) @@ -352,7 +352,7 @@ -@ls -l $@ -@echo "" -bbl: xbbl +bbl: xbbl; xbbl: bbl.o $(LIBES) $(LD) $(LDFLAGS) -o $@ bbl.o $(LDLIBS) @@ -369,7 +369,7 @@ -@ls -l $@ -@echo "" -burst: xburst +burst: xburst; xburst: burst.o $(LIBES) $(LD) $(LDFLAGS) -o $@ burst.o $(LDLIBS) @@ -386,7 +386,7 @@ -@ls -l $@ -@echo "" -cipher: xcipher +cipher: xcipher; xcipher: cipher.o $(TMALIB) $(LIBES) $(LD) $(LDFLAGS) -o $@ cipher.o $(TMALIB) $(LDLIBS) @@ -403,7 +403,7 @@ -@ls -l $(BINDIR)/comp -@echo "" -comp: xcomp +comp: xcomp; xcomp: comp.o whatnowproc.o \ whatnowsbr.o sendsbr.o annosbr.o distsbr.o $(LIBES) @@ -423,7 +423,7 @@ -@ls -l $@ -@echo "" -conflict: xconflict +conflict: xconflict; xconflict: conflict.o aliasbr.o $(LIBES) $(LD) $(LDFLAGS) -o $@ conflict.o aliasbr.o $(LDLIBS) @@ -440,7 +440,7 @@ -@ls -l $@ -@echo "" -decipher: xdecipher +decipher: xdecipher; xdecipher: decipher.o $(TMALIB) $(LIBES) $(LD) $(LDFLAGS) -o $@ decipher.o $(TMALIB) $(LDLIBS) @@ -457,7 +457,7 @@ -@ls -l $@ -@echo "" -dist: xdist +dist: xdist; xdist: dist.o whatnowproc.o \ whatnowsbr.o sendsbr.o annosbr.o distsbr.o $(LIBES) @@ -477,7 +477,7 @@ -@ls -l $(ETCDIR)/dp -@echo "" -dp: xdp +dp: xdp; xdp: dp.o trmsbr.o $(LIBES) $(LD) $(LDFLAGS) -o $@ dp.o trmsbr.o $(LDLIBS) $(LDCURSES) @@ -494,7 +494,7 @@ -@ls -l $@ -@echo "" -fmtdump: xfmtdump +fmtdump: xfmtdump; xfmtdump: fmtdump.o trmsbr.o $(LIBES) $(LD) $(LDFLAGS) -o $@ fmtdump.o $(LDLIBS) @@ -514,8 +514,8 @@ -@ls -l $@ -@echo "" -folders: folder -folder: xfolder +folders: folder; +folder: xfolder; xfolder: folder.o $(LIBES) $(LD) $(LDFLAGS) -o $@ folder.o $(LDLIBS) @@ -532,7 +532,7 @@ -@ls -l $@ -@echo "" -forw: xforw +forw: xforw; xforw: forw.o whatnowproc.o \ whatnowsbr.o sendsbr.o annosbr.o distsbr.o $(LIBES) @@ -563,7 +563,7 @@ -@ls -l $@ -@echo "" -inc: xinc +inc: xinc; xinc: inc.o scansbr.o dropsbr.o trmsbr.o \ $(POPLIB) $(TMALIB) $(LIBES) @@ -584,7 +584,7 @@ -@ls -l $@ -@echo "" -install-mh: xinstall-mh +install-mh: xinstall-mh; xinstall-mh: install-mh.o $(LIBES) $(LD) $(LDFLAGS) -o $@ install-mh.o $(LDLIBS) @@ -601,7 +601,7 @@ -@ls -l $@ -@echo "" -kdsc: xkdsc +kdsc: xkdsc; xkdsc: kdsc.o $(KDSLIB) $(LIBES) $(LD) $(LDFLAGS) -o $@ kdsc.o $(KDSLIB) $(LDLIBS) @@ -618,7 +618,7 @@ -@ls -l $@ -@echo "" -mark: xmark +mark: xmark; xmark: mark.o $(LIBES) $(LD) $(LDFLAGS) -o $@ mark.o $(LDLIBS) @@ -635,7 +635,7 @@ -@ls -l $@ -@echo "" -mhl: xmhl +mhl: xmhl; xmhl: mhl.o \ mhlsbr.o trmsbr.o $(LIBES) @@ -655,7 +655,7 @@ -@ls -l $@ -@echo "" -mhmail: xmhmail +mhmail: xmhmail; xmhmail: mhmail.o $(LIBES) $(LD) $(LDFLAGS) -o $@ mhmail.o $(LDLIBS) @@ -672,7 +672,7 @@ -@ls -l $@ -@echo "" -mhn: xmhn +mhn: xmhn; xmhn: mhn.o ftpsbr.o trmsbr.o $(LIBES) $(LD) $(LDFLAGS) -o $@ mhn.o ftpsbr.o trmsbr.o \ @@ -690,7 +690,7 @@ -@ls -l $@ -@echo "" -mhparam: xmhparam +mhparam: xmhparam; xmhparam: mhparam.o trmsbr.o $(LIBES) $(LD) $(LDFLAGS) -o $@ mhparam.o $(LDLIBS) $(LDCURSES) @@ -707,7 +707,7 @@ -@ls -l $@ -@echo "" -mhpath: xmhpath +mhpath: xmhpath; xmhpath: mhpath.o $(LIBES) $(LD) $(LDFLAGS) -o $@ mhpath.o $(LDLIBS) @@ -731,7 +731,7 @@ -@ls -l $@ -@echo "" -msgchk: xmsgchk +msgchk: xmsgchk; xmsgchk: msgchk.o $(POPLIB) $(LIBES) $(LD) $(LDFLAGS) -o $@ msgchk.o $(POPLIB) \ @@ -749,7 +749,7 @@ -@ls -l $@ -@echo "" -msh: xmsh +msh: xmsh; xmsh: msh.o mshcmds.o vmhsbr.o \ picksbr.o scansbr.o dropsbr.o mhlsbr.o trmsbr.o \ @@ -772,7 +772,7 @@ -@ls -l $@ -@echo "" -packf: xpackf +packf: xpackf; xpackf: packf.o dropsbr.o $(LIBES) $(LD) $(LDFLAGS) -o $@ packf.o dropsbr.o $(LDLIBS) @@ -789,7 +789,7 @@ -@ls -l $@ -@echo "" -pick: xpick +pick: xpick; xpick: pick.o picksbr.o $(LIBES) $(LD) $(LDFLAGS) -o $@ pick.o picksbr.o $(LDLIBS) @@ -806,7 +806,7 @@ -@ls -l $@ -@echo "" -popi: xpopi +popi: xpopi; xpopi: popi.o $(POPLIB) trmsbr.o $(LIBES) $(LD) $(LDFLAGS) -o $@ popi.o $(POPLIB) trmsbr.o $(LDLIBS) \ @@ -831,7 +831,7 @@ -@ls -l $@ -@echo "" -post: xpost +post: xpost; xpost: post.o \ aliasbr.o $(MTSBRS) $(TMALIB) $(LIBES) @@ -851,7 +851,7 @@ -@ls -l $@ -@echo "" -prompter: xprompter +prompter: xprompter; xprompter: prompter.o $(LIBES) $(LD) $(LDFLAGS) -o $@ prompter.o $(LDLIBS) @@ -868,7 +868,7 @@ -@ls -l $@ -@echo "" -rcvdist: xrcvdist +rcvdist: xrcvdist; xrcvdist: rcvdist.o distsbr.o $(LIBES) $(LD) $(LDFLAGS) -o $@ rcvdist.o distsbr.o $(LDLIBS) @@ -885,7 +885,7 @@ -@ls -l $@ -@echo "" -rcvpack: xrcvpack +rcvpack: xrcvpack; xrcvpack: rcvpack.o dropsbr.o $(LIBES) $(LD) $(LDFLAGS) -o $@ rcvpack.o dropsbr.o $(LDLIBS) @@ -902,7 +902,7 @@ -@ls -l $@ -@echo "" -rcvstore: xrcvstore +rcvstore: xrcvstore; xrcvstore: rcvstore.o $(LIBES) $(LD) $(LDFLAGS) -o $@ rcvstore.o $(LDLIBS) @@ -923,7 +923,7 @@ -@ls -l $@ -@echo "" -rcvtty: xrcvtty +rcvtty: xrcvtty; xrcvtty: rcvtty.o scansbr.o trmsbr.o \ @BEGIN: TTYD @@ -952,7 +952,7 @@ -@ls -l $@ -@echo "" -refile: xrefile +refile: xrefile; xrefile: refile.o $(LIBES) $(LD) $(LDFLAGS) -o $@ refile.o $(LDLIBS) @@ -969,7 +969,7 @@ -@ls -l $@ -@echo "" -repl: xrepl +repl: xrepl; xrepl: repl.o replsbr.o whatnowproc.o \ whatnowsbr.o sendsbr.o annosbr.o distsbr.o $(LIBES) @@ -992,7 +992,7 @@ -@ls -l $@ -@echo "" -rmail: xrmail +rmail: xrmail; xrmail: rmail.o $(LIBES) $(LD) $(LDFLAGS) -o $@ rmail.o $(LDLIBS) @@ -1009,7 +1009,7 @@ -@ls -l $@ -@echo "" -rmf: xrmf +rmf: xrmf; xrmf: rmf.o $(LIBES) $(LD) $(LDFLAGS) -o $@ rmf.o $(LDLIBS) @@ -1026,7 +1026,7 @@ -@ls -l $@ -@echo "" -rmm: xrmm +rmm: xrmm; xrmm: rmm.o $(LIBES) $(LD) $(LDFLAGS) -o $@ rmm.o $(LDLIBS) @@ -1043,7 +1043,7 @@ -@ls -l $@ -@echo "" -scan: xscan +scan: xscan; xscan: scan.o \ scansbr.o trmsbr.o $(LIBES) @@ -1063,7 +1063,7 @@ -@ls -l $@ -@echo "" -send: xsend +send: xsend; xsend: send.o \ sendsbr.o annosbr.o distsbr.o $(LIBES) @@ -1089,9 +1089,9 @@ -@ls -l $@ -@echo "" -next: show -prev: show -show: xshow +next: show; +prev: show; +show: xshow; xshow: show.o \ mhlsbr.o trmsbr.o $(LIBES) @@ -1118,7 +1118,7 @@ -@ls -l $@ -@echo "" -sbboards: xsbboards +sbboards: xsbboards; xsbboards: sbboards.o dropsbr.o $(LIBES) $(LD) $(LDFLAGS) -o $@ sbboards.o dropsbr.o $(LDLIBS) @@ -1135,7 +1135,7 @@ -@ls -l $@ -@echo "" -slocal: xslocal +slocal: xslocal; xslocal: slocal.o aliasbr.o dropsbr.o $(LIBES) $(LD) $(LDFLAGS) -o $@ slocal.o aliasbr.o dropsbr.o $(LDLIBS) @@ -1152,7 +1152,7 @@ -@ls -l $@ -@echo "" -sortm: xsortm +sortm: xsortm; xsortm: sortm.o $(LIBES) $(LD) $(LDFLAGS) -o $@ sortm.o $(LDLIBS) @@ -1172,7 +1172,7 @@ -@ls -l $@ -@echo "" -spop: xspop +spop: xspop; xspop: spop.o dropsbr.o $(LIBES) $(LD) $(LDFLAGS) -o $@ spop.o dropsbr.o $(LDLIBS) @@ -1193,7 +1193,7 @@ -@ls -l $@ -@echo "" -spost: xspost +spost: xspost; xspost: spost.o aliasbr.o $(LIBES) $(LD) $(LDFLAGS) -o $@ spost.o aliasbr.o $(LDLIBS) @@ -1213,7 +1213,7 @@ -@echo "Don't forget to: ln -s /usr/lib/sendmail $@" -@echo "" -sendmail: xsendmail +sendmail: xsendmail; xsendmail: sendmail.o $(LIBES) $(LD) $(LDFLAGS) -o $@ sendmail.o $(LDLIBS) @@ -1230,7 +1230,7 @@ -@ls -l $@ -@echo "" -tma: xtma +tma: xtma; xtma: tma.o $(TMALIB) $(LIBES) $(LD) $(LDFLAGS) -o $@ tma.o $(TMALIB) $(LDLIBS) @@ -1247,7 +1247,7 @@ -@ls -l $@ -@echo "" -umhook: xumhook +umhook: xumhook; xumhook: umhook.o $(LIBES) $(LD) $(LDFLAGS) -o $@ umhook.o $(LDLIBS) $(LDCURSES) @@ -1264,7 +1264,7 @@ -@ls -l $@ -@echo "" -vmh: xvmh +vmh: xvmh; xvmh: vmh.o vmhsbr.o $(LIBES) $(LD) $(LDFLAGS) -o $@ vmh.o vmhsbr.o $(LDCURSES) $(LDLIBS) @@ -1285,7 +1285,7 @@ -@ls -l $@ -@echo "" -whatnow: xwhatnow +whatnow: xwhatnow; xwhatnow: whatnow.o \ whatnowsbr.o sendsbr.o annosbr.o distsbr.o $(LIBES) @@ -1305,7 +1305,7 @@ -@ls -l $@ -@echo "" -whom: xwhom +whom: xwhom; xwhom: whom.o distsbr.o $(LIBES) $(LD) $(LDFLAGS) -o $@ whom.o distsbr.o $(LDLIBS) @@ -1322,7 +1322,7 @@ -@ls -l $@ -@echo "" -wmh: xwmh +wmh: xwmh; xwmh: wmh.o vmhsbr.o $(LIBES) ${CC} $(LDFLAGS) -o $@ wmh.o vmhsbr.o $(LDLIBS) \ diff -ruN mh-6.8.3/conf/mh-gen.8 mh-6.8.4/conf/mh-gen.8 --- mh-6.8.3/conf/mh-gen.8 Wed Dec 1 14:00:24 1993 +++ mh-6.8.4/conf/mh-gen.8 Thu Jan 30 11:24:30 1997 @@ -1,7 +1,7 @@ -.\" @(#)$Id: mh-gen.8,v 2.115 1993/12/01 00:44:23 jromine Exp $ +.\" @(#)$Id: mh-gen.8,v 2.119 1996/02/08 19:20:25 jromine Exp $ .\" uneven inter-word spacing (nroff line adjusting) hampers readability .if n .na -.TH MH-GEN 8 MH.6.8.3 [mh.6] +.TH MH-GEN 8 MH.6.8.4 [mh.6] .SH NAME mh-gen \- generating the MH system .SH "READ THIS" @@ -48,9 +48,10 @@ improving) \fIMH\fR, bug reports and their associated fixes should be reported back to us so that we may include them in future releases. -The current computer mailbox for \fIMH\fR is \fBBug\-MH@ICS.UCI.EDU\fR -(in the ARPA Internet), -and \fB...!ucbvax!ucivax!bug\-mh\fR (UUCP). +The current computer mailbox for \fIMH\fR is \fBBug\-MH@ICS.UCI.EDU\fR. +Current information about MH can be obtained from +the \fBMH Home Page\fP on the World Wide Web at +\fBhttp://www.ics.uci.edu/~mh\fP. .PP Presently, there are two Internet discussion groups, \fBMH\-Users@ICS.UCI.EDU\fR @@ -65,17 +66,16 @@ There are two ways to get the latest release: .PP 1. If you can FTP to the ARPA Internet, use anonymous FTP to -ftp.ics.uci.edu [128.195.1.1] and retrieve the file pub/mh/mh-6.8.tar.Z. +ftp.ics.uci.edu and retrieve the file pub/mh/mh-6.8.tar.Z. This is a tar image after being run through the compress program (approximately 1.8MB). There should also be a \fBREADME\fR file in that directory which tells what the current release of \fIMH\fP is, and how to get updates. .PP -This tar file is also available on louie.udel.edu -[128.175.1.3] in portal/mh-6.8.tar.Z. You may also find MH on +You may also find MH on various other hosts; to make sure you get the latest version and don't waste your time re-fixing bugs, it's best to get it from -either ftp.ics.uci.edu or louie.udel.edu. +either ftp.ics.uci.edu or a site that mirrors ftp.ics.uci.edu. .PP 2. You can send $75 US to the address below. This covers the cost of a 6250 BPI 9-track magtape, @@ -91,12 +91,12 @@ .nf .RS 1i -Univeristy of California at Irvine +Attn: MH distribution Office of Academic Computing -360 Computer Science -Irvine, CA 92717 USA +Univeristy of California at Irvine +Irvine, CA 92717-2225 USA -+1 714 856 5153 ++1 714 824 5153 .fi .RE .PP diff -ruN mh-6.8.3/conf/mhconfig.c mh-6.8.4/conf/mhconfig.c --- mh-6.8.3/conf/mhconfig.c Wed Dec 1 14:00:24 1993 +++ mh-6.8.4/conf/mhconfig.c Thu Jan 30 11:24:30 1997 @@ -1,7 +1,7 @@ /* mhconfig.c - configure MH */ /* cc [-DSYS5] mhconfig.c -o mhconfig */ #ifndef lint -static char ident[] = "@(#)$Id: mhconfig.c,v 2.71 1993/11/30 22:01:04 jromine Exp $"; +static char ident[] = "@(#)$Id: mhconfig.c,v 2.73 1996/02/08 19:07:47 jromine Exp $"; #endif /* lint */ #include @@ -29,7 +29,7 @@ #define MAKE "../%s/Makefile" #define WARNING "This file is automatically generated. Do not edit!" -#define MHRELEASE "6.8.3" /* for version: "Maj.min.pat" */ +#define MHRELEASE "6.8.4" /* for version: "Maj.min.pat" */ #define MHCENTERFOOT "MH.6.8" /* for nroff page footers */ #define MHLEFTFOOT "[mh.6]" /* [mh.6] MH.6.6 page# */ #define MHSLIBVER "3.2" /* SunOS4 shared library version */ @@ -132,6 +132,7 @@ } copts[] = { "APOP", 0, /* authenticated pop */ "BSD43", 0, /* sgid ttys */ + "BSD44", 0, /* manual headings */ "KPOP", 0, /* KERBEROS pop */ "HESIOD", 0, "MIME", 0, /* multi-media extensions */ diff -ruN mh-6.8.3/h/mshsbr.h mh-6.8.4/h/mshsbr.h --- mh-6.8.3/h/mshsbr.h Wed Dec 1 14:00:26 1993 +++ mh-6.8.4/h/mshsbr.h Thu Jan 30 11:24:30 1997 @@ -1,5 +1,5 @@ /* mshsbr.h - definitions for msh */ -/* @(#)$Id: mshsbr.h,v 1.6 1993/08/25 17:16:28 jromine Exp $ */ +/* @(#)$Id: mshsbr.h,v 1.8 1995/12/07 21:34:13 jromine Exp $ */ struct Cmd { char line[BUFSIZ]; @@ -33,8 +33,8 @@ #define MHNCHK 0x0001 /* did nontext check */ #define MHNYES 0x0002 /* .. and known to be non-text */ - short m_stats; -#define CUR (1 << (FFATTRSLOT + NATTRS)) + int m_stats; /* ought to be unsigned (also in mh.h) */ +#define CUR ((unsigned)1 << (FFATTRSLOT + NATTRS)) #ifdef BPOP #define VIRTUAL SELECT_EMPTY #endif /* BPOP */ diff -ruN mh-6.8.3/h/strings.h mh-6.8.4/h/strings.h --- mh-6.8.3/h/strings.h Wed Dec 1 14:00:26 1993 +++ mh-6.8.4/h/strings.h Thu Jan 30 11:24:31 1997 @@ -1,5 +1,5 @@ /* strings.h - define standard string functions */ -/* @(#)$Id: strings.h,v 1.19 1993/02/26 21:54:00 jromine Exp $ */ +/* @(#)$Id: strings.h,v 1.20 1995/12/06 23:48:12 jromine Exp $ */ #ifndef _STRINGS /* once-only... */ #define _STRINGS @@ -56,16 +56,18 @@ char *calloc (), *malloc (), *realloc (); #endif /* SVR4 */ -#if defined(__HIGHC__) || __GNUC__ == 2 -#define bcopy(s,d,l) memcpy(d,s,l) -#endif - #ifdef SYS5 #include #define bcmp(b1,b2,length) memcmp(b1, b2, length) +#if __GNUC__ != 2 #define bcopy(b1,b2,length) (void) memcpy (b2, b1, length) +#endif #define bcpy(b1,b2,length) memcmp (b1, b2, length) #define bzero(b,length) (void) memset (b, 0, length) #endif /* SYS5 */ #endif /* _AIX */ #endif /* not _STRINGS */ + +#if !defined(bcopy) && (defined(__HIGHC__) || __GNUC__ == 2) +#define bcopy(s,d,l) memcpy(d,s,l) +#endif diff -ruN mh-6.8.3/miscellany/README mh-6.8.4/miscellany/README --- mh-6.8.3/miscellany/README Wed Dec 1 14:00:27 1993 +++ mh-6.8.4/miscellany/README Thu Jan 30 11:24:31 1997 @@ -1,4 +1,4 @@ -$Id: README,v 1.8 1992/11/20 17:05:30 jromine Exp $ +$Id: README,v 1.9 1995/12/11 18:09:27 jromine Exp $ The "miscellany/" directory contains some useful things for MH users and installers. @@ -15,7 +15,8 @@ convert Utilities for converting to/from other mailbox formats. libndir The new directory routines for sites that don't have them. mem A reminder system using an appointment folder. -mh-e GNU Emacs interface to MH (probably not the newest version) +mh-e GNU Emacs interface to MH (Contributed by Stephen Gildea. + Latest version available at ftp://ftp.x.org/misc/mh-e). mhe Brian Reid's MHE system mtrenv Some of Marshall T. Rose's MH environment multi-media Multi-media mail as specified by RFC 1341 (MIME) diff -ruN mh-6.8.3/miscellany/multi-media/misc/rt2raw.c mh-6.8.4/miscellany/multi-media/misc/rt2raw.c --- mh-6.8.3/miscellany/multi-media/misc/rt2raw.c Wed Dec 1 14:00:39 1993 +++ mh-6.8.4/miscellany/multi-media/misc/rt2raw.c Thu Jan 30 11:24:31 1997 @@ -48,7 +48,7 @@ } /* Ignore all other tokens */ } else if (c != '\n') { putc(c, stdout); - } + } else putc (' ', stdout); } putc('\n', stdout); /* for good measure */ exit(0); diff -ruN mh-6.8.3/mts/sendmail/smail.c mh-6.8.4/mts/sendmail/smail.c --- mh-6.8.3/mts/sendmail/smail.c Wed Dec 1 14:00:56 1993 +++ mh-6.8.4/mts/sendmail/smail.c Thu Jan 30 11:24:32 1997 @@ -1,6 +1,6 @@ /* smail.c - MH interface to SendMail/SMTP */ #ifndef lint -static char ident[] = "@(#)$Id: smail.c,v 1.27 1993/12/01 03:50:31 jromine Exp $"; +static char ident[] = "@(#)$Id: smail.c,v 1.29 1995/12/06 22:29:38 jromine Exp $"; #endif /* LINTLIBRARY */ @@ -305,15 +305,13 @@ goto send_options; if (client == NULL || *client == '\0') - client = clientname; + if (clientname) + client = clientname; + else + client = LocalName (); /* no clientname -> LocalName */ #ifdef ZMAILER if (client == NULL || *client == '\0') client = "localhost"; -#else -#if !defined(SENDMTS) || defined(MMDFII) || defined(SVR4) - if (client == NULL || *client == 0) - client = LocalName (); -#endif #endif /* not ZMAILER */ if ((sd1 = rclient (server, "tcp", "smtp")) == NOTOK) @@ -1055,6 +1053,7 @@ static int smtalk (time, fmt, a, b, c, d) register int time; register char *fmt; +register char *a, *b, *c, *d; { register int result; char buffer[BUFSIZ]; diff -ruN mh-6.8.3/papers/changes/mh-changes.ms mh-6.8.4/papers/changes/mh-changes.ms --- mh-6.8.3/papers/changes/mh-changes.ms Wed Dec 1 14:01:00 1993 +++ mh-6.8.4/papers/changes/mh-changes.ms Thu Jan 30 11:24:32 1997 @@ -1,10 +1,10 @@ -.\" @(#)$Id: mh-changes.ms,v 1.28 1993/11/30 23:57:26 jromine Exp $ +.\" @(#)$Id: mh-changes.ms,v 1.33 1996/02/08 19:15:52 jromine Exp $ .\" Standard -ms macros .\" with the following changes .ds lq \\*Q .ds rq \\*U .\" remember to update date in text below -.DA "December 1, 1993" +.DA "February 8, 1996" .if n \{\ .na .\} @@ -25,10 +25,11 @@ John L. Romine .AI Computing Support Group -Department of Information and Computer Science +Information and Computer Science University of California, Irvine Irvine, CA 92717\-3425 Bug-MH@ICS.UCI.EDU +http://www.ics.uci.edu/~mh .AB .PP This document describes the changes to the @@ -39,7 +40,10 @@ the standard MH User's manual and MH Administrator's manual. .PP Comments concerning this documentation should be addressed to the -mailbox \fBBug\-MH@ICS.UCI.EDU\fP, or \fBucbvax!ucivax!bug-mh\fP. +mailbox \fBBug\-MH@ICS.UCI.EDU\fP. +Current information about MH can be obtained from the +\fBMH Home Page\fP on the World Wide Web at +\fBhttp://www.ics.uci.edu/~mh\fP. .AE .SH ACKNOWLEDGEMENTS @@ -97,8 +101,42 @@ such as \fB/usr/uci\fP and \fB$SIGNATURE\fP, are presented in \fBbold font\fP. .KE +.ds LH Changes for MH 6.8.4 +.bp +.SH +CHANGES FOR MH 6.8.4 +.LP +The MH 6.8.4 release is a minor maintenance release, +and contains few user-visible changes. +The changes consist mostly of documentation improvements, +minor bug fixes, and some portability enhancements +for BSD 4.4 and Solaris 2.x +(contributed changes for HPUX and OSF1 have not yet +been integrated into this release). +This is the current version of MH as of February 8, 1996. +.SH +Runtime Tailoring +.LP +By default +\fIpost\fP will now give the SMTP \fBHELO\fP command with +the local hostname. +If you specify a hostname with the \fBclientname:\fP option +in the \fImtstailor\fP file, +\fIpost\fP will give the \fBHELO\fP command with that name instead. +If the argument to the \fBclientname:\fP option is empty, +no \fBHELO\fP command is given. +See \fImh-tailor\fP\|(5) for more details. +.SH +Multi-media Mail & Encryption +.LP +A few new PGP support programs can be found in +the \fBsupport/general\fP directory. +\fIrepl\fP supports the `\-[no]mime' option. See +\fIrepl\fP\|(1) for more details. +.PP .ds LH Changes for MH 6.8.3 .bp +.ds CF December 1, 1993 .SH CHANGES FOR MH 6.8.3 .LP @@ -111,18 +149,12 @@ Runtime Tailoring .LP When posting mail using the SMTP, -\fIpost\fP does not normally send the \fBHELO\fP command. -This is because \fISendMail\fP would fail +\fIpost\fP did not normally send the \fBHELO\fP command. +This was because \fISendMail\fP would fail if the host name given in the \fBHELO\fP command was the local host. Later versions of \fISendMail\fP will now complain if you omit the \fBHELO\fP command. -.PP -If you specify a hostname with the \fBclientname:\fP option -in the \fImtstailor\fP file, -\fIpost\fP will give the \fBHELO\fP command with that name, -otherwise no \fBHELO\fP command is given. -See \fImh-tailor\fP\|(5) for more details. .SH User Interface Programs .IP folder \w'msgchk'u+2n @@ -175,7 +207,7 @@ Many minor documentation corrections were made. There are also a few program changes: .IP mhn \w'post'u+2n -The `\-cache\0policy', `\-\[no\]check', and `\-\[no\]pause' +The `\-cache\0policy', `\-[no]check', and `\-[no]pause' switches have been added. Some other minor changes have been made to comply with the new MIME standard. See \fImhn\fP\|(1) for complete details. @@ -669,7 +701,7 @@ is not explicitly documented, it can still be useful when debugging \fIMH\fP format files. .IP "refile" -Now takes a `\-\[no\]rmmproc' switch. This makes it +Now takes a `\-[no]rmmproc' switch. This makes it easier to avoid loops when your \*(lqrmmproc\*(rq calls \fIrefile\fP. .IP "slocal" A problem with the UUCP-style mailboxes, diff -ruN mh-6.8.3/sbr/discard.c mh-6.8.4/sbr/discard.c --- mh-6.8.3/sbr/discard.c Wed Dec 1 14:01:22 1993 +++ mh-6.8.4/sbr/discard.c Thu Jan 30 11:24:32 1997 @@ -14,7 +14,9 @@ #include #include #ifndef NOIOCTLH +#ifndef __alpha__ #include +#endif #endif /* NOIOCTLH */ #endif /* SYS5 */ #endif /* POSIX */ @@ -49,7 +51,11 @@ #ifdef _FSTDIO fpurge (io); #else +#ifdef _STDIO_USES_IOSTREAM + io -> _IO_write_ptr = io -> _IO_write_base; +#else if (io -> _ptr = io -> _base) io -> _cnt = 0; #endif +#endif /* _STDIO_USES_IOSTREAM */ } diff -ruN mh-6.8.3/sbr/formatsbr.c mh-6.8.4/sbr/formatsbr.c --- mh-6.8.3/sbr/formatsbr.c Wed Dec 1 14:01:22 1993 +++ mh-6.8.4/sbr/formatsbr.c Thu Jan 30 11:24:33 1997 @@ -1,6 +1,6 @@ /* formatsbr.c - format string interpretation */ #ifndef lint -static char ident[] = "@(#)$Id: formatsbr.c,v 1.24 1993/08/20 15:48:14 jromine Exp $"; +static char ident[] = "@(#)$Id: formatsbr.c,v 1.25 1995/12/06 20:59:41 jromine Exp $"; #endif /* lint */ #include "../h/mh.h" @@ -706,43 +706,44 @@ } if (fmt -> f_type == FT_LS_ADDR) goto unfriendly; - if ((str = mn -> m_pers) == NULL) - if ((str = mn -> m_note)) { - (void) strcpy (buffer, str); - str = buffer; - if (*str == '(') - str++; - sp = str + strlen(str) - 1; - if (*sp == ')') { - *sp-- = '\0'; - while (sp >= str) - if (*sp == ' ') - *sp-- = '\0'; - else - break; - } - } else if (!(str = get_x400_friendly (mn -> m_mbox, buffer))) { - unfriendly: ; - switch (mn -> m_type) { + if (!(str = mn -> m_pers) + && (!(str = get_x400_friendly (mn -> m_mbox, buffer)))) { + if (str = mn -> m_note) { + (void) strcpy (buffer, str); + str = buffer; + if (*str == '(') + str++; + sp = str + strlen (str) - 1; + if (*sp == ')') { + *sp-- = '\0'; + while (sp >= str) + if (*sp == ' ') + *sp-- = '\0'; + else + break; + } + if (*str) + break; + } + +unfriendly: ; + switch (mn -> m_type) { case LOCALHOST: - str = mn -> m_mbox; + str = mn -> m_mbox; break; case UUCPHOST: - (void) sprintf (buffer, "%s!%s", + (void) sprintf (str = buffer, "%s!%s", mn -> m_host, mn -> m_mbox); - str = buffer; break; default: - if (mn -> m_mbox) { - (void) sprintf (buffer, "%s@%s", - mn -> m_mbox, mn -> m_host); - str= buffer; - } + if (mn -> m_mbox) + (void) sprintf (str= buffer, "%s@%s", mn -> m_mbox, + mn -> m_host); else str = mn -> m_text; break; - } } + } #endif /* BERK */ break; diff -ruN mh-6.8.3/sbr/help.c mh-6.8.4/sbr/help.c --- mh-6.8.3/sbr/help.c Wed Dec 1 14:01:23 1993 +++ mh-6.8.4/sbr/help.c Thu Jan 30 11:24:33 1997 @@ -1,6 +1,6 @@ /* help.c - print the usage line */ #ifndef lint -static char ident[] = "@(#)$Id: help.c,v 1.3 1992/12/15 00:20:22 jromine Exp $"; +static char ident[] = "@(#)$Id: help.c,v 1.4 1994/04/21 19:56:24 jromine Exp $"; #endif /* lint */ #include "../h/mh.h" @@ -24,6 +24,8 @@ printf ("syntax: %s\n", str); printf (" switches are:\n"); printsw (ALL, swp, "-"); + if ((cp = m_find (invo_name)) != NULL) + printf ("profile: %s\n", cp); if (ssequal ("@(#)", cp = version)) cp += 4; diff -ruN mh-6.8.3/sbr/m_getfld.c mh-6.8.4/sbr/m_getfld.c --- mh-6.8.3/sbr/m_getfld.c Wed Dec 1 14:01:24 1993 +++ mh-6.8.4/sbr/m_getfld.c Thu Jan 30 11:24:33 1997 @@ -244,22 +244,40 @@ */ cp = name; i = NAMESZ - 1; for (;;) { +#ifdef _STDIO_USES_IOSTREAM + bp = sp = (unsigned char *) iob->_IO_read_ptr - 1; + j = (cnt = ((long) iob->_IO_read_end - (long) iob->_IO_read_ptr) + 1) < i? + cnt: i; +#else bp = sp = (unsigned char *) iob->_ptr - 1; j = (cnt = iob->_cnt+1) < i ? cnt : i; +#endif while ((c = *bp++) != ':' && c != '\n' && --j >= 0) *cp++ = c; j = bp - sp; if ((cnt -= j) <= 0) { +#ifdef _STDIO_USES_IOSTREAM + iob->_IO_read_ptr = iob->_IO_read_end; + if (__underflow(iob) == EOF) { +#else if (_filbuf(iob) == EOF) { +#endif *cp = *buf = 0; advise (NULLCP, "eof encountered in field \"%s\"", name); return FMTERR; } +#ifdef _STDIO_USES_IOSTREAM + iob->_IO_read_ptr++; /* NOT automatic in __underflow()! */ +#endif } else { +#ifdef _STDIO_USES_IOSTREAM + iob->_IO_read_ptr = bp + 1; +#else iob->_ptr = bp + 1; iob->_cnt = cnt - 1; +#endif } if (c == ':') break; @@ -298,16 +316,27 @@ */ cp = buf; i = bufsz-1; for (;;) { +#ifdef _STDIO_USES_IOSTREAM + cnt = (long) iob->_IO_read_end - (long) iob->_IO_read_ptr; + bp = (unsigned char *) --iob->_IO_read_ptr; +#else cnt = iob->_cnt++; bp = (unsigned char *) --iob->_ptr; +#endif c = cnt < i ? cnt : i; while (ep = locc( c, bp, '\n' )) { /* * if we hit the end of this field, return. */ if ((j = *++ep) != ' ' && j != '\t') { +#ifdef _STDIO_USES_IOSTREAM + j = ep - (unsigned char *) iob->_IO_read_ptr; + (void) bcopy( iob->_IO_read_ptr, cp, j); + iob->_IO_read_ptr = ep; +#else j = ep - (unsigned char *) iob->_ptr; (void) bcopy( iob->_ptr, cp, j); iob->_ptr = ep; iob->_cnt -= j; +#endif cp += j; state = FLD; goto finish; @@ -317,12 +346,21 @@ /* * end of input or dest buffer - copy what we've found. */ +#ifdef _STDIO_USES_IOSTREAM + c += bp - (unsigned char *) iob->_IO_read_ptr; + (void) bcopy( iob->_IO_read_ptr, cp, c); +#else c += bp - (unsigned char *) iob->_ptr; (void) bcopy( iob->_ptr, cp, c); +#endif i -= c; cp += c; if (i <= 0) { /* the dest buffer is full */ +#ifdef _STDIO_USES_IOSTREAM + iob->_IO_read_ptr += c; +#else iob->_cnt -= c; iob->_ptr += c; +#endif state = FLDPLUS; break; } @@ -333,11 +371,22 @@ * this is the end of the field. Otherwise loop. */ --i; +#ifdef _STDIO_USES_IOSTREAM + *cp++ = j = *(iob->_IO_read_ptr + c); + iob->_IO_read_ptr = iob->_IO_read_end; + c = __underflow(iob); + iob->_IO_read_ptr++; /* NOT automatic! */ +#else *cp++ = j = *(iob->_ptr + c); c = _filbuf(iob); +#endif if ((j == '\0' || j == '\n') && c != ' ' && c != '\t') { if (c != EOF) +#ifdef _STDIO_USES_IOSTREAM + --iob->_IO_read_ptr; +#else --iob->_ptr, ++iob->_cnt; +#endif state = FLD; break; } @@ -353,7 +402,12 @@ * the output buffer and we don't add an eos. */ i = (bufsz < 0) ? -bufsz : bufsz-1; +#ifdef _STDIO_USES_IOSTREAM + bp = (unsigned char *) --iob->_IO_read_ptr; + cnt = (long) iob->_IO_read_end - (long) iob->_IO_read_ptr; +#else bp = (unsigned char *) --iob->_ptr; cnt = ++iob->_cnt; +#endif c = (cnt < i ? cnt : i); if (msg_style != MS_DEFAULT && c > 1) { /* @@ -410,8 +464,12 @@ } } (void) bcopy( bp, buf, c ); +#ifdef _STDIO_USES_IOSTREAM + iob->_IO_read_ptr += c; +#else iob->_cnt -= c; iob->_ptr += c; +#endif if (bufsz < 0) { msg_count = c; return (state); diff -ruN mh-6.8.3/sbr/m_gmsg.c mh-6.8.4/sbr/m_gmsg.c --- mh-6.8.3/sbr/m_gmsg.c Wed Dec 1 14:01:24 1993 +++ mh-6.8.4/sbr/m_gmsg.c Thu Jan 30 11:24:33 1997 @@ -50,7 +50,7 @@ free (name); return NULL; } - (void) fstat (dd -> dd_fd, &st); + (void) fstat (dirfd(dd), &st); mp = (struct msgs *) malloc (MHSIZE (mp, 0, 0)); if (mp == NULL) diff -ruN mh-6.8.3/sbr/m_readefs.c mh-6.8.4/sbr/m_readefs.c --- mh-6.8.3/sbr/m_readefs.c Wed Dec 1 14:01:24 1993 +++ mh-6.8.4/sbr/m_readefs.c Thu Jan 30 11:24:33 1997 @@ -1,4 +1,7 @@ /* m_readefs.c - read a profile/context file */ +#ifndef lint +static char ident[] = "@(#)$Id: m_readefs.c,v 1.2 1994/04/29 04:58:00 jromine Exp $"; +#endif #include "../h/mh.h" #include diff -ruN mh-6.8.3/support/general/bootmhn.sh mh-6.8.4/support/general/bootmhn.sh --- mh-6.8.3/support/general/bootmhn.sh Wed Dec 1 14:01:31 1993 +++ mh-6.8.4/support/general/bootmhn.sh Thu Jan 30 11:24:33 1997 @@ -19,6 +19,10 @@ echo "mhn-store-text/richtext: %m%P.rt" >> $TMP echo "mhn-store-video/mpeg: %m%P.mpg" >> $TMP echo "mhn-store-application/PostScript: %m%P.ps" >> $TMP +echo "mhn-show-application/pgp: %ppgpshow -show '%F' %a" >> $TMP +echo "mhn-store-application/pgp: | pgpshow -store %m%P.pgp %a" >> $TMP +echo "mhn-show-text/pgp: %ppgpshow -show '%F' %a" >> $TMP +echo "mhn-store-text/pgp: | pgpshow -store %m%P.txt %a" >> $TMP PGM="`./bootmhn.findit xwud $LIB`" if [ ! -z "$PGM" ]; then diff -ruN mh-6.8.3/support/general/pgped.sh mh-6.8.4/support/general/pgped.sh --- mh-6.8.3/support/general/pgped.sh Thu Jan 1 10:00:00 1970 +++ mh-6.8.4/support/general/pgped.sh Thu Jan 30 11:24:33 1997 @@ -0,0 +1,34 @@ +: run this script through /bin/sh + +if [ "$1" = -sign ]; then + FLAGS=sat + TEXT=T + shift +else + FLAGS=esat + TEXT=F +fi + +if [ "$#" != 1 ]; then + echo "usage: What now? ed pgped" 1>&2 + exit 1 +fi +DRAFT=$1 + +trap "rm -f $DRAFT.1 $DRAFT.2 $DRAFT.2.asc" 0 1 2 3 13 15 + +USERS="`stclsh -nointerface -messaging -messagebody $DRAFT -file @LIB/pgped.tcl $DRAFT.1 $DRAFT.2 $TEXT`" + +if [ ! -s $DRAFT.1 -o ! -s $DRAFT.2 ]; then + exit 1 +fi + +if pgp -$FLAGS $DRAFT.2 $USERS; then + mv $DRAFT `dirname $DRAFT`/,`basename $DRAFT` + + cat $DRAFT.1 $DRAFT.2.asc > $DRAFT + + exit 0 +fi + +exit 1 diff -ruN mh-6.8.3/support/general/pgped.tcl mh-6.8.4/support/general/pgped.tcl --- mh-6.8.3/support/general/pgped.tcl Thu Jan 1 10:00:00 1970 +++ mh-6.8.4/support/general/pgped.tcl Thu Jan 30 11:24:33 1997 @@ -0,0 +1,80 @@ +if {$argc != 3} { + puts stderr "usage: ... headers-file body-file text-flag" + exit 1 +} + +set textflag [lindex $argv 2] + +set hdrsfile [open [lindex $argv 0] w] + +set mime "" +foreach header [SafeTcl_getheaders] { + if {[set name [string tolower [set field [lindex $header 0]]]] \ + == "mime-version"} { + continue + } + if {[string first content- $name] == 0} { + append mime "$field: [lindex $header 1]\n" + continue + } + + puts $hdrsfile "$field: [lindex $header 1]" +} +puts $hdrsfile "MIME-Version: 1.0" +if {$mime != ""} { + puts $hdrsfile "Content-Type: application/pgp; format=mime\n" +} elseif {$textflag == "T"} { + puts $hdrsfile "Content-Type: text/pgp\n" +} else { + puts $hdrsfile "Content-Type: application/pgp\n" +} + +close $hdrsfile + + +set bodyfile [open [lindex $argv 1] w] + +if {$mime != ""} { + puts $bodyfile "$mime" +} +puts -nonewline $bodyfile [SafeTcl_getbodyprop 1 value] + +close $bodyfile + + +if {[SafeTcl_getheader Resent-To] != ""} { + set prefix Resent- +} else { + set prefix "" +} + +set addrs "" +foreach header [list Reply-To From Sender To cc Bcc Dcc From] { + foreach addr [SafeTcl_getaddrs [ SafeTcl_getheader $prefix$header]] { + catch { if {[string first @ $addr] < 0} { + set addr [exec ali $addr] + } + set addr [SafeTcl_getaddrprop $addr address] + if {[lsearch -exact $addrs $addr] < 0} { + lappend addrs $addr + } + } + } +} + +if {[set from [SafeTcl_getheader From]] == ""} { + set addr [id effective user] +} else { + set addr [lindex [SafeTcl_getaddrs $from] 0] +} +catch { + if {[string first @ $addr] < 0} { + set addr [exec ali $addr] + } + set addr [SafeTcl_getaddrprop $addr address] +} +if {[lsearch -exact $addrs $addr] < 0} { + lappend addrs $addr +} + +puts stdout "$addrs -u $addr" diff -ruN mh-6.8.3/support/general/pgpshow.sh mh-6.8.4/support/general/pgpshow.sh --- mh-6.8.3/support/general/pgpshow.sh Thu Jan 1 10:00:00 1970 +++ mh-6.8.4/support/general/pgpshow.sh Thu Jan 30 11:24:33 1997 @@ -0,0 +1,51 @@ +: run this script through /bin/sh + +CMD=$1 SHOW=more REFILE=N + +X=$2.tmp Y=$2.out Z=$2 +trap "rm -f $X $Y" 0 1 2 3 13 15 + +shift; shift +for A in $*; do + A="`echo $A | tr A-Z a-z`" + case "$A" in + format=*) + if [ "$A" = "format=mime" ]; then + SHOW="show -file" + REFILE=T + fi + ;; + + x-*) + ;; + + *) echo "usage: pgpshow -store/-show file" + exit 1 + ;; + esac +done + +case "$CMD" in + -show) rm -f $X $Y + if pgp $Z -o $X | tee $Y; then + PGP_SIGNATURE=`grep "^Good signature from user " $Y | sed -e 's%^Good signature from user "\(.*\)".$%\1%'` + export PGP_SIGNATURE + $SHOW $X + else + exit 1 + fi + ;; + + -store) cat > $X + pgp $X -o $Z + if [ "$REFILE" = "T" ]; then + refile -file $Z +inbox + fi + ;; + + *) echo "usage: pgpshow -store/-show file" + exit 1 + ;; +esac + +exit 0 diff -ruN mh-6.8.3/support/pop/popd.c mh-6.8.4/support/pop/popd.c --- mh-6.8.3/support/pop/popd.c Wed Dec 1 14:01:34 1993 +++ mh-6.8.4/support/pop/popd.c Thu Jan 30 11:24:34 1997 @@ -61,8 +61,10 @@ #ifndef BSD44 extern int sys_nerr; extern char *sys_errlist[]; +#ifndef linux extern char *sys_siglist[]; #endif +#endif int debug = 0; @@ -193,6 +195,10 @@ #ifdef SIGCHLD (void) signal (SIGCHLD, chldser); #endif /* SIGCHLD */ +#ifdef linux +/* No limit on the number of connections? this seems wrong... */ +#define SOMAXCONN 5 +#endif (void) listen (sd, SOMAXCONN); #endif /* KPOP */ #ifdef FAST diff -ruN mh-6.8.3/support/pop/popser.c mh-6.8.4/support/pop/popser.c --- mh-6.8.3/support/pop/popser.c Wed Dec 1 14:01:34 1993 +++ mh-6.8.4/support/pop/popser.c Thu Jan 30 11:24:34 1997 @@ -1,6 +1,6 @@ /* popser.c - the POP service */ #ifndef lint -static char ident[]="@(#)$Id: popser.c,v 1.31 1993/08/25 17:23:14 jromine Exp $"; +static char ident[]="@(#)$Id: popser.c,v 1.34 1995/12/07 18:54:35 jromine Exp $"; #endif #include "../h/mh.h" @@ -21,6 +21,9 @@ #include "syslog.h" #include #include +#ifdef UNISTD +#include +#endif #ifdef KPOP #include #endif /* KPOP */ @@ -1085,8 +1088,8 @@ (void) fseek (dp, Msgs[i].m_start, 0); - switch (scan (dp, i, 0, nfs, 0, 0, NULLCP, - (long) Msgs[i].m_size, 0)) { + switch (scan (dp, i, 0, nfs, 0, 0, 0, + 0, NULLCP, (long) Msgs[i].m_size, 0)) { case SCNMSG: case SCNENC: case SCNERR: @@ -1123,8 +1126,8 @@ (void) fseek (dp, Msgs[i].m_start, 0); - switch (scan (dp, i, 0, nfs, 0, 0, NULLCP, - (long) Msgs[i].m_size, 0)) { + switch (scan (dp, i, 0, nfs, 0, 0, 0, + 0, NULLCP, (long) Msgs[i].m_size, 0)) { case SCNMSG: case SCNENC: case SCNERR: diff -ruN mh-6.8.3/uip/dropsbr.c mh-6.8.4/uip/dropsbr.c --- mh-6.8.3/uip/dropsbr.c Wed Dec 1 14:01:35 1993 +++ mh-6.8.4/uip/dropsbr.c Thu Jan 30 11:24:35 1997 @@ -1,6 +1,6 @@ /* dropsbr.c - write to a mailbox */ #ifndef lint -static char ident[] = "@(#)$Id: dropsbr.c,v 1.17 1993/08/27 23:00:00 jromine Exp $"; +static char ident[] = "@(#)$Id: dropsbr.c,v 1.19 1995/12/07 18:59:08 jromine Exp $"; #endif /* lint */ #include @@ -474,17 +474,13 @@ char *map_name (file) register char *file; { - register char *cp, - *dp; + register char *cp; static char buffer[BUFSIZ]; - if ((dp = index (cp = r1bindex (file, '/'), '.')) == NULL) - dp = cp + strlen (cp); - if (cp == file) - (void) sprintf (buffer, ".%.*s%s", dp - cp, cp, ".map"); + if ((cp = r1bindex (file, '/')) == file) + (void) sprintf (buffer, ".%s.map", cp); else - (void) sprintf (buffer, "%.*s.%.*s%s", cp - file, file, dp - cp, - cp, ".map"); + (void) sprintf (buffer, "%.*s.%s.map", cp - file, file, cp); return buffer; } @@ -589,7 +585,7 @@ return NOTOK; } - switch (i = mbx_read (fp, (off_t)0, &rp, noisy)) { + switch (i = mbx_read (fp, 0L, &rp, noisy)) { case NOTOK: (void) fclose (fp); (void) mbx_close (file, fd); diff -ruN mh-6.8.3/uip/forw.c mh-6.8.4/uip/forw.c --- mh-6.8.3/uip/forw.c Wed Dec 1 14:01:36 1993 +++ mh-6.8.4/uip/forw.c Thu Jan 30 11:24:35 1997 @@ -1,6 +1,6 @@ /* forw.c - forward messages */ #ifndef lint -static char ident[] = "@(#)$Id: forw.c,v 1.14 1993/08/25 17:25:18 jromine Exp $"; +static char ident[] = "@(#)$Id: forw.c,v 1.15 1995/12/06 21:07:03 jromine Exp $"; #endif /* lint */ #include "../h/mh.h" @@ -572,7 +572,8 @@ #ifdef MIME if (mime) { - (void) sprintf (buffer, "#forw [] +%s", mp -> foldpath); + (void) sprintf (buffer, "#forw [forwarded message%s] +%s", + mp -> numsel == 1 ? "" : "s", mp -> foldpath); (void) write (out, buffer, strlen (buffer)); for (msgnum = mp -> lowsel; msgnum <= mp -> hghsel; msgnum++) if (mp -> msgstats[msgnum] & SELECTED) { diff -ruN mh-6.8.3/uip/inc.c mh-6.8.4/uip/inc.c --- mh-6.8.3/uip/inc.c Wed Dec 1 14:01:36 1993 +++ mh-6.8.4/uip/inc.c Thu Jan 30 11:24:35 1997 @@ -1,6 +1,6 @@ /* inc.c - incorporate messages from a maildrop into a folder */ #ifndef lint -static char ident[] = "@(#)$Id: inc.c,v 1.22 1993/09/01 21:41:48 jromine Exp $"; +static char ident[] = "@(#)$Id: inc.c,v 1.24 1994/04/21 18:22:06 jromine Exp $"; #endif /* lint */ #ifdef MAILGROUP @@ -384,17 +384,23 @@ /* */ -#ifdef MAILGROUP - return_gid = getegid(); /* Save effective gid, assuming we'll use it */ - setgid(getgid()); /* Turn off extraordinary privileges */ -#endif /* MAILGROUP */ - #ifdef POP if (host && !*host) host = NULL; if (from || !host || rpop <= 0) (void) setuid (getuid ()); #endif /* POP */ + +/* + * 93/12/17 bsa@kf8nh.wariat.org relocated: with MAILGROUP and POP both defined + * the setgid() call ran as root, and saved gid would be lost. If the setuid() + * call above then ran, inc would be unable to reestablish its setgid state. + */ +#ifdef MAILGROUP + return_gid = getegid(); /* Save effective gid, assuming we'll use it */ + setgid(getgid()); /* Turn off extraordinary privileges */ +#endif /* MAILGROUP */ + if (from) { newmail = from; #ifdef POP @@ -601,7 +607,7 @@ switch (p = scan (pf, msgnum, 0, nfs, width, file ? 0 : msgnum == mp -> hghmsg + 1 && chgflag, 1, /* check UNSEEN? */ - 0, stop - start, noisy)) { + 0, 0, stop - start, noisy)) { case SCNEOF: printf ("%*d empty\n", DMAXFOLDER, msgnum); break; @@ -695,9 +701,7 @@ switch (i = scan (in, msgnum + 1, msgnum + 1, nfs, width, msgnum == hghnum && chgflag, 1, /* check UNSEEN? */ - 0, - 0L, - noisy)) { + 0, 0, 0L, noisy)) { case SCNFAT: case SCNEOF: break; @@ -856,7 +860,7 @@ switch (scan (in, msgnum, 0, nfs, width, msgnum == mp -> curmsg, 1, /* check UNSEEN? */ - 0, + 0, 0, fstat (fileno (in), &st) != NOTOK ? (long) st.st_size : 0L, noisy)) { diff -ruN mh-6.8.3/uip/mark.c mh-6.8.4/uip/mark.c --- mh-6.8.3/uip/mark.c Wed Dec 1 14:01:36 1993 +++ mh-6.8.4/uip/mark.c Thu Jan 30 11:24:35 1997 @@ -1,6 +1,6 @@ /* mark.c - mark messages */ #ifndef lint -static char ident[] = "@(#)$Id: mark.c,v 1.4 1992/12/15 00:20:22 jromine Exp $"; +static char ident[] = "@(#)$Id: mark.c,v 1.5 1995/12/06 23:44:31 jromine Exp $"; #endif /* lint */ #include "../h/mh.h" @@ -236,15 +236,17 @@ if (listsw) { int bits = FFATTRSLOT; +#define empty(s) ((s) ? (s) : "") if (seqp == 0) for (i = 0; mp -> msgattrs[i]; i++) printf ("%s%s: %s\n", mp -> msgattrs[i], mp -> attrstats & (1 << (bits + i)) ? " (private)" : "", - m_seq (mp, mp -> msgattrs[i])); + empty(m_seq (mp, mp -> msgattrs[i]))); else for (seqp = 0; seqs[seqp]; seqp++) - printf ("%s: %s\n", seqs[seqp], m_seq (mp, seqs[seqp])); + printf ("%s: %s\n", seqs[seqp], empty(m_seq (mp, seqs[seqp]))); +#undef empty if (debugsw) for (msgnum = mp -> lowsel; msgnum <= mp -> hghsel; msgnum++) diff -ruN mh-6.8.3/uip/mhlsbr.c mh-6.8.4/uip/mhlsbr.c --- mh-6.8.3/uip/mhlsbr.c Wed Dec 1 14:01:36 1993 +++ mh-6.8.4/uip/mhlsbr.c Thu Jan 30 11:24:35 1997 @@ -1,6 +1,6 @@ /* mhlsbr.c - implement the "nifty" message lister */ #ifndef lint -static char ident[] = "@(#)$Id: mhlsbr.c,v 1.29 1993/08/20 15:50:44 jromine Exp $"; +static char ident[] = "@(#)$Id: mhlsbr.c,v 1.30 1995/12/08 17:57:16 jromine Exp $"; #endif /* lint */ #include "../h/mh.h" @@ -1055,8 +1055,13 @@ *cp = 0; (void) fmtscan (c1 -> c_fmt, buffer, sizeof buffer - 1, dat); - /* Don't need to append a newline, dctime() already did */ c2 -> c_text = getcpy (buffer); +#ifndef JLR + /* Don't need to append a newline, dctime() already did */ +#else + if (!(c1 -> c_flags & NONEWLINE)) + c2 -> c_text = add ("\n", c2 -> c_text); +#endif free (ap); return; diff -ruN mh-6.8.3/uip/mhn.c mh-6.8.4/uip/mhn.c --- mh-6.8.3/uip/mhn.c Wed Dec 1 14:01:36 1993 +++ mh-6.8.4/uip/mhn.c Thu Jan 30 11:24:38 1997 @@ -1,6 +1,6 @@ /* mhn.c - multi-media MH */ #ifndef lint -static char ident[] = "@(#)$Id: mhn.c,v 2.35 1993/10/26 22:17:44 jromine Exp $"; +static char ident[] = "@(#)$Id: mhn.c,v 2.42 1995/12/06 22:32:29 jromine Exp $"; #endif /* lint */ #include "../h/mh.h" @@ -1016,7 +1016,7 @@ struct str2init { char *si_key; - int si_value; + int si_val; int (*si_init) (); }; @@ -1090,12 +1090,17 @@ } if (ct -> c_vrsn) { +/* advise (NULLCP, "message %s has multiple %s: fields (%s)", ct -> c_file, VRSN_FIELD, dp = trimcpy (cp)); free (dp); + */ free (cp); +/* goto out; + */ + goto got_header; } ct -> c_vrsn = cp; @@ -1154,7 +1159,7 @@ break; if (!s2i -> si_key && !uprf (ci -> ci_type, "X-")) s2i++; - ct -> c_type = s2i -> si_value; + ct -> c_type = s2i -> si_val; ct -> c_ctinitfnx = s2i -> si_init; goto got_header; } @@ -1193,7 +1198,7 @@ if (!s2i -> si_key && !uprf (cp, "X-")) s2i++; *dp = c; - ct -> c_encoding = s2i -> si_value; + ct -> c_encoding = s2i -> si_val; if (s2i -> si_init && (*s2i -> si_init) (ct) == NOTOK) goto out; goto got_header; @@ -1288,6 +1293,7 @@ case BODY: case BODYEOF: + ct -> c_begin = ftell (in) - strlen (buf); break; case FILEEOF: @@ -2126,7 +2132,7 @@ (void) read (fileno (stdout), prompt, sizeof prompt); } (void) signal (SIGINT, istat); - if (intr != OK) { + if (intr != OK || prompt[0] == 'q') { (void) (*ct -> c_ceclosefnx) (ct); return (alternate ? DONE : NOTOK); } @@ -2605,14 +2611,18 @@ if (ci -> ci_type) free (ci -> ci_type); + ci -> ci_type = NULL; if (ci -> ci_subtype) free (ci -> ci_subtype); + ci -> ci_subtype = NULL; for (ap = ci -> ci_attrs; *ap; ap++) - free (*ap); + free (*ap), *ap = NULL; if (ci -> ci_comment) free (ci -> ci_comment); + ci -> ci_comment = NULL; if (ci -> ci_magic) free (ci -> ci_magic); + ci -> ci_magic = NULL; } @@ -2624,45 +2634,59 @@ if (ct -> c_partno) free (ct -> c_partno); + ct -> c_partno = NULL; if (ct -> c_vrsn) free (ct -> c_vrsn); + ct -> c_vrsn = NULL; if (ct -> c_ctline) free (ct -> c_ctline); + ct -> c_ctline = NULL; free_ctinfo (ct); if (ct -> c_ctfreefnx) (void) (*ct -> c_ctfreefnx) (ct); + ct -> c_ctfreefnx = NULL; if (ct -> c_showproc) free (ct -> c_showproc); + ct -> c_showproc = NULL; if (ct -> c_termproc) free (ct -> c_termproc); + ct -> c_termproc = NULL; if (ct -> c_storeproc) free (ct -> c_storeproc); + ct -> c_storeproc = NULL; if (ct -> c_celine) free (ct -> c_celine); + ct -> c_celine = NULL; if (ct -> c_cefreefnx) (void) (*ct -> c_cefreefnx) (ct, 1); + ct -> c_cefreefnx = NULL; if (ct -> c_id) free (ct -> c_id); + ct -> c_id = NULL; if (ct -> c_descr) free (ct -> c_descr); + ct -> c_descr = NULL; if (ct -> c_file) { if (ct -> c_unlink) (void) unlink (ct -> c_file); free (ct -> c_file); + ct -> c_file = NULL; } if (ct -> c_fp) (void) fclose (ct -> c_fp); + ct -> c_fp = NULL; if (ct -> c_storage) (void) free (ct -> c_storage); + ct -> c_storage = NULL; free ((char *) ct); } @@ -2724,7 +2748,7 @@ register CI ci = &ct -> c_ctinfo; for (ap = ci -> ci_attrs, ep = ci -> ci_values; *ap; ap++, ep++) - if (autosw && !ct -> c_storeproc && uleq (*ap, "x-name")) { + if (autosw && !ct -> c_storeproc && uleq (*ap, "name")) { register char *cp; if (*(cp = *ep) != '/' @@ -2823,7 +2847,7 @@ ct -> c_termproc = getcpy (cp); } else - if (autosw && !ct -> c_storeproc && uleq (*ap, "x-name")) { + if (autosw && !ct -> c_storeproc && uleq (*ap, "name")) { register char *cp; if (*(cp = *ep) != '/' @@ -3361,7 +3385,9 @@ } last_part: ; - if (ct -> c_subtype == MULTI_ALTERNATE && m -> mp_parts -> mp_next) { + if (ct -> c_subtype == MULTI_ALTERNATE + && m -> mp_parts + && m -> mp_parts -> mp_next) { register int i; register struct part **base, **bmp; @@ -3645,7 +3671,7 @@ continue; } e -> eb_access = s2i -> si_key; - e -> eb_flags = s2i -> si_value; + e -> eb_flags = s2i -> si_val; p -> c_encoding = CE_EXTERNAL; if (init_encoding (p, s2i -> si_init) == NOTOK) return NOTOK; @@ -4042,7 +4068,7 @@ break; for (ap = ci -> ci_attrs, ep = ci -> ci_values; *ap; ap++, ep++) - if (autosw && !ct -> c_storeproc && uleq (*ap, "x-name")) { + if (autosw && !ct -> c_storeproc && uleq (*ap, "name")) { register char *cp; if (*(cp = *ep) != '/' @@ -4424,8 +4450,11 @@ mm_charset = getenv ("MM_CHARSET"); - if ((cp = getenv ("MM_NOASK")) && strcmp (cp, "1") == 0) - nolist = 1, listsw = pausesw = 0; + if ((cp = getenv ("MM_NOASK")) && strcmp (cp, "1") == 0) { + nolist = 1, pausesw = 0; + if (showsw) + listsw = 0; + } } /* QUOTED */ @@ -5049,7 +5078,7 @@ else if (ftp_get (e -> eb_site, user, pass, e -> eb_dir, e -> eb_name, ce -> ce_file, - e -> eb_mode && uleq (e -> eb_mode, "ascii"), 0) + !e -> eb_mode || uleq (e -> eb_mode, "ascii"), 0) == NOTOK) goto losing_ftp; #endif @@ -5857,7 +5886,7 @@ break; if (!s2i -> si_key && !uprf (ci -> ci_type, "X-")) s2i++; - switch (ct -> c_type = s2i -> si_value) { + switch (ct -> c_type = s2i -> si_val) { case CT_MESSAGE: if (uleq (ci -> ci_subtype, "rfc822")) { ct -> c_encoding = CE_7BIT; /* XXX */ @@ -5893,7 +5922,7 @@ if (!ci -> ci_subtype) adios (NULLCP, "missing subtype in \"#%s\"", ci -> ci_type); - switch (ct -> c_type = s2i -> si_value) { + switch (ct -> c_type = s2i -> si_val) { case CT_MULTIPART: adios (NULLCP, "use \"#begin ... #end\" instead of \"#%s/%s\"", ci -> ci_type, ci -> ci_subtype); @@ -6373,9 +6402,7 @@ if (stat (ct -> c_file, &st) != NOTOK) ct -> c_end = (long) st.st_size; } - if (ct -> c_type != CT_TEXT - && !(ct -> c_type == CT_APPLICATION - && ct -> c_subtype == APPLICATION_POSTSCRIPT)) + if (ct -> c_type != CT_TEXT && ct -> c_type != CT_APPLICATION) break; /* else fall... */ @@ -6429,10 +6456,16 @@ if (result == NOTOK) continue; - if (linelen == -1 - && (cp = buffer + strlen (buffer) - 2) > buffer - && isspace (*cp)) - linelen = 1; + if (linelen == -1) { + if ((cp = buffer + strlen (buffer) - 2) > buffer + && isspace (*cp)) + linelen = 1; + else + if ((*(cp = buffer) == '.') + || (strncmp (cp, "From ", + sizeof "From " -1) == 0)) + linelen = 1; + } if (buffer[0] == '-' && buffer[1] == '-') { for (cp = buffer + strlen (buffer) - 1; @@ -6452,7 +6485,10 @@ if (ct -> c_type == CT_APPLICATION && !ct -> c_encoding) ct -> c_encoding = linelen == -1 && charset != CHARSET_UNKNOWN - ? CE_7BIT : CE_QUOTED; + ? CE_7BIT + : ct -> c_subtype + != APPLICATION_POSTSCRIPT + ? CE_BASE64 : CE_QUOTED; if (ct -> c_type == CT_TEXT && !ct -> c_ctparams) { register char **ap, **ep; @@ -6593,10 +6629,6 @@ register CT p = part -> mp_part; fprintf (out, "\n--%s\n", ci -> ci_values[0]); - if (p -> c_type == CT_MESSAGE - && p -> c_subtype != MESSAGE_EXTERNAL - && !p -> c_rfc934) - fprintf (out, "%s: %s\n", VRSN_FIELD, VRSN_VALUE); (void) output_content (p, out); } @@ -6700,10 +6732,15 @@ break; case CT_APPLICATION: - if (ct -> c_subtype == APPLICATION_POSTSCRIPT) { - if (ct -> c_encoding == CE_7BIT) + switch (ct -> c_encoding) { + case CE_7BIT: goto seven_bit; - goto quoted_printable; + + case CE_QUOTED: + goto quoted_printable; + + default: + break; } /* else fall... */ @@ -6765,7 +6802,8 @@ if ((c = *cp) == '\n') *cp = '\0'; - if (strncmp (cp = buffer, "From ", sizeof "From " - 1) == 0) { + if ((*(cp = buffer) == '.') + || (strncmp (cp, "From ", sizeof "From " - 1) == 0)) { (void) fprintf (out, "=%02X", *cp++ & 0xff); n = 3; } diff -ruN mh-6.8.3/uip/msgchk.c mh-6.8.4/uip/msgchk.c --- mh-6.8.3/uip/msgchk.c Wed Dec 1 14:01:36 1993 +++ mh-6.8.4/uip/msgchk.c Thu Jan 30 11:24:38 1997 @@ -1,6 +1,6 @@ /* msgchk.c - check for mail */ #ifndef lint -static char ident[] = "@(#)$Id: msgchk.c,v 1.13 1993/09/01 21:44:19 jromine Exp $"; +static char ident[] = "@(#)$Id: msgchk.c,v 1.14 1995/12/06 23:51:28 jromine Exp $"; #endif /* lint */ #include "../h/mh.h" @@ -389,7 +389,7 @@ int nmsgs, nbytes, status; - char *pass; + char *pass = NULL; if (user == NULL) user = getusr (); diff -ruN mh-6.8.3/uip/msh.c mh-6.8.4/uip/msh.c --- mh-6.8.3/uip/msh.c Wed Dec 1 14:01:36 1993 +++ mh-6.8.4/uip/msh.c Thu Jan 30 11:24:38 1997 @@ -1,6 +1,6 @@ /* msh.c - The MH shell (sigh) */ #ifndef lint -static char ident[] = "@(#)$Id: msh.c,v 2.13 1992/12/15 00:20:22 jromine Exp $"; +static char ident[] = "@(#)$Id: msh.c,v 2.14 1995/12/06 21:04:11 jromine Exp $"; #endif /* lint */ /* TODO: @@ -22,7 +22,9 @@ #else /* SYS5 */ #include #ifndef NOIOCTLH +#ifndef __alpha__ #include +#endif #endif /* NOIOCTLH */ #endif /* SYS5 */ #include @@ -1094,9 +1096,6 @@ if ((msgp = read_file (Msgs[mp -> hghmsg].m_stop, mp -> hghmsg + 1)) < 1) padios (NULLCP, "no messages in %s", mp -> foldpath); /* XXX */ - if (msgp >= MAXFOLDER) - padios (NULLCP, "more than %d messages in %s", MAXFOLDER, - mp -> foldpath); if (msgp <= mp -> hghmsg) return 0; /* XXX */ diff -ruN mh-6.8.3/uip/mshcmds.c mh-6.8.4/uip/mshcmds.c --- mh-6.8.3/uip/mshcmds.c Wed Dec 1 14:01:37 1993 +++ mh-6.8.4/uip/mshcmds.c Thu Jan 30 11:24:39 1997 @@ -1,6 +1,6 @@ /* mshcmds.c - command handlers in msh */ #ifndef lint -static char ident[] = "@(#)$Id: mshcmds.c,v 1.28 1993/12/01 03:50:31 jromine Exp $"; +static char ident[] = "@(#)$Id: mshcmds.c,v 1.32 1995/12/11 18:19:26 jromine Exp $"; #endif /* lint */ #include "../h/mh.h" @@ -23,6 +23,9 @@ #include #include #include "../h/mshsbr.h" +#ifdef MIME +#include "../h/mhn.h" +#endif /* MIME */ /* */ @@ -908,6 +911,7 @@ { int msgp = 0, vecp = 1, + mime = 0, msgnum; char *cp, *filter = NULL, @@ -938,8 +942,16 @@ case FONANSW: case FOINSW: case FONINSW: - case FOMISW: - case FONMISW: + continue; + + case FOMISW: +#ifdef MIME + mime = 1; + filter = NULL; +#endif /* MIME */ + continue; + case FONMISW: + mime = 0; continue; case FONDFSW: @@ -965,6 +977,7 @@ advise (NULLCP, "missing argument to %s", args[-2]); return; } + mime = 0; continue; case FOFTSW: if (access (filter = myfilter, 04) == NOTOK) { @@ -1006,7 +1019,7 @@ return; } } - forw (cmd_name, filter, vecp, vec); + forw (cmd_name, filter, vecp, vec, mime); m_setcur (mp, mp -> hghsel); if (filter) free (filter); @@ -1014,8 +1027,9 @@ /* */ -static forw (proc, filter, vecp, vec) -int vecp; +static forw (proc, filter, vecp, vec, mime) +int vecp, + mime; char *proc, *filter, **vec; @@ -1027,6 +1041,10 @@ char tmpfil[80], *args[MAXARGS]; FILE *out; +#ifdef MIME + int nedit = 0; + char *ed = NULL; +#endif /* MIME */ (void) strcpy (tmpfil, m_tmpfil (invo_name)); interrupted = 0; @@ -1061,6 +1079,145 @@ interrupted++; break; } +#ifdef MIME + else if (mime) { + int isdf = 0, + len, + nwhat = 0; +#define INITIAL_PREFIX "----- =_aaaaaaaaaa" + char *cp, + *form = NULL, + buffer[BUFSIZ], + prefix[sizeof INITIAL_PREFIX]; + FILE *zp; + + proc = whatnowproc; + for (vecp = 1; cp = vec[vecp++]; ) + if (*cp == '-') + switch (smatch (++cp, forwswit)) { + case FOEDTSW: + ed = vec[vecp++]; + nedit = 0; + continue; + case FONEDSW: + nedit++; + continue; + + case FOFRMSW: + form = vec[vecp++]; + continue; + + case FOWHTSW: + proc = vec[vecp++]; + nwhat = 0; + continue; + case FONWTSW: + nwhat++; + continue; + +/* ignore -draftfolder / -draftmessage / -nodraftfolder */ + case FODFSW: + case FODMSW: + vecp++; + case FONDFSW: + continue; + } + (void) strcpy (tmpfil, m_draft (NULLCP, NULLCP, NOUSE, &isdf)); + if (!ed && !(ed = m_find ("editor"))) + ed = sysed; + + (void) strcpy (prefix, INITIAL_PREFIX); + cp = index (prefix, 'a'); + len = strlen (prefix); + + for (;;) { + int hit = 0; + long pos; + + for (msgnum = mp -> lowsel; + msgnum <= mp -> hghsel && !interrupted && !hit; + msgnum++) + if (mp -> msgstats[msgnum] & SELECTED) { + zp = msh_ready (msgnum, 1); + if (!fmsh) + pos = ftell (zp); + while (fgets (buffer, sizeof buffer, zp) != NULL + && !fmsh + && pos < Msgs[msgnum].m_stop) { + register char *pp; + + if (buffer[0] != '-' || buffer[1] != '-') + continue; + + for (pp = buffer + strlen (buffer) - 1; + pp >= buffer; + pp--) + if (!isspace (*pp)) + break; + *pp++ = '\0'; + + if (strncmp (buffer + 2, prefix, len)) + continue; + + hit = 1; + break; + } + } + + if (!hit) + break; + + if (*cp < 'z') + (*cp)++; + else + if (*++cp == 0) { + advise (NULLCP, + "unable to determine unique delimiter string?!?"); + return; + } + else + (*cp)++; + } + + if ((out = fopen (tmpfil, "w")) == NULL) { + advise (tmpfil, "unable to create temporary file"); + return; + } + (void) chmod (tmpfil, m_gmprot ()); + + fprintf (out, "%s: %s\n", VRSN_FIELD, VRSN_VALUE); + fprintf (out, "%s: multipart/digest; boundary=\"%s\"\n", TYPE_FIELD, + prefix); + + if (!(zp = fopen (libpath (form ? form : forwcomps), "r"))) { + if (form) + advise (form, "unable to open form file"); + else + advise (forwcomps, "unable to open default components file"); + (void) fclose (out); + (void) unlink (tmpfil); + return; + } + while (fgets (buffer, sizeof buffer, zp)) + (void) fputs (buffer, out); + (void) fclose (zp); + + for (msgnum = mp -> lowsel; + msgnum <= mp -> hghsel && !interrupted; + msgnum++) + if (mp -> msgstats[msgnum] & SELECTED) { + fprintf (out, "\n--%s\n%s: message/rfc822\n\n", prefix, + TYPE_FIELD); + + copy_message (msgnum, out); + } + fprintf (out, "\n--%s--\n", prefix); + + (void) fclose (out); + if (nwhat) + return; + } +#endif /* MIME */ else { if ((out = fopen (tmpfil, "w")) == NULL) { advise (tmpfil, "unable to create temporary file"); @@ -1100,6 +1257,26 @@ (void) signal (SIGINT, istat); (void) signal (SIGQUIT, qstat); +#ifdef MIME + if (mime) { + vecp = 0; + vec[vecp++] = r1bindex (proc, '/'); + (void) m_putenv ("mhdraft", tmpfil); + (void) unputenv ("mhfolder"); + (void) unputenv ("mhaltmsg"); + (void) m_putenv ("mhdist", "0"); + if (nedit) + (void) unputenv ("mheditor"); + else + (void) m_putenv ("mheditor", ed); + (void) m_putenv ("mhuse", "0"); + (void) unputenv ("mhmessages"); + (void) unputenv ("mhannotate"); + (void) unputenv ("mhinplace"); + } + else +#endif /* MIME */ + vec[vecp++] = tmpfil; vec[vecp] = NULL; @@ -1113,6 +1290,9 @@ break; } +#ifdef MIME + if (!mime) +#endif /* MIME */ (void) unlink (tmpfil); } @@ -1337,15 +1517,18 @@ if (listsw) { int bits = FFATTRSLOT; +#define empty(s) ((s) ? (s) : "") if (seqp == 0) for (i = 0; mp -> msgattrs[i]; i++) printf ("%s%s: %s\n", mp -> msgattrs[i], mp -> attrstats & (1 << (bits + i)) ? " (private)" : "", - m_seq (mp, mp -> msgattrs[i])); + empty(m_seq (mp, mp -> msgattrs[i]))); else for (seqp = 0; seqs[seqp]; seqp++) - printf ("%s%s: %s\n", seqs[seqp], m_seq (mp, seqs[seqp])); + printf ("%s%s: %s\n", seqs[seqp], + empty(m_seq (mp, seqs[seqp]))); +#undef empty interrupted = 0; if (debugsw) @@ -2384,7 +2567,7 @@ switch (state = scan (zp, msgnum, 0, nfs, width, msgnum == mp -> curmsg, mp -> msgstats[msgnum] & UNSEEN, /* ?? */ - headersw ? (fmsh ? fmsh : mp -> foldpath) : (char *)0, + headersw, fmsh ? fmsh : mp -> foldpath, fmsh ? 0L : (long) (Msgs[msgnum].m_stop - Msgs[msgnum].m_start), 1)) { case SCNMSG: @@ -2788,7 +2971,7 @@ for (dp++; isspace (*dp); dp++) continue; if (result = !uprf (dp, "charset")) - goto out; + goto invalid; dp += sizeof "charset" - 1; while (isspace (*dp)) dp++; diff -ruN mh-6.8.3/uip/popi.c mh-6.8.4/uip/popi.c --- mh-6.8.3/uip/popi.c Wed Dec 1 14:01:37 1993 +++ mh-6.8.4/uip/popi.c Thu Jan 30 11:24:39 1997 @@ -558,7 +558,11 @@ static int dselect (d) +#ifdef SYS5DIR +register struct dirent *d; +#else register struct direct *d; +#endif { int i; @@ -571,8 +575,13 @@ static int dcompar (d1, d2) +#ifdef SYS5DIR +struct dirent **d1, + **d2; +#else struct direct **d1, **d2; +#endif { struct stat s1, s2; @@ -592,7 +601,11 @@ int n, retval, sm; +#ifdef SYS5DIR + struct dirent **namelist; +#else struct direct **namelist; +#endif if (chdir (bulksw) == NOTOK) adios (bulksw, "unable to change directory to"); @@ -602,7 +615,11 @@ sm = NOTOK; for (i = 0; i < n; i++) { +#ifdef SYS5DIR + register struct dirent *d = namelist[i]; +#else register struct direct *d = namelist[i]; +#endif if (sm == NOTOK) { if (rp_isbad (retval = sm_init (NULLCP, host, 1, 1, snoop))) @@ -630,13 +647,21 @@ register int j; int l, m; +#ifdef SYS5DIR + struct dirent **newlist; +#else struct direct **newlist; +#endif while ((l = scandir (".", &newlist, dselect, dcompar)) > OK) { m = 0; for (j = 0; j < l; j++) { +#ifdef SYS5DIR + register struct dirent *d = newlist[j]; +#else register struct direct *d = newlist[j]; +#endif for (i = 0; i < n; i++) if (strcmp (d -> d_name, namelist[i] -> d_name) == 0) diff -ruN mh-6.8.3/uip/popsbr.c mh-6.8.4/uip/popsbr.c --- mh-6.8.3/uip/popsbr.c Wed Dec 1 14:01:37 1993 +++ mh-6.8.4/uip/popsbr.c Thu Jan 30 11:24:39 1997 @@ -1,6 +1,6 @@ /* popsbr.c - POP client subroutines */ #ifndef lint -static char ident[] = "@(#)$Id: popsbr.c,v 2.6 1993/08/26 18:25:52 jromine Exp $"; +static char ident[] = "@(#)$Id: popsbr.c,v 2.7 1994/04/19 20:12:14 jromine Exp $"; #endif lint #if defined(NNTP) && !defined(PSHSBR) @@ -200,9 +200,13 @@ #else /* NNTP */ if (*response < CHAR_ERR) { (void) command ("MODE READER"); +#ifdef NEWSAUTH + if (getenv("NEWSAUTH")) /* special for IDENT protocol */ + command("MODE IDENTIFY"); +#endif return OK; } -#endif +#endif /* NNTP */ (void) strcpy (buffer, response); (void) command ("QUIT"); (void) strcpy (response, buffer); diff -ruN mh-6.8.3/uip/post.c mh-6.8.4/uip/post.c --- mh-6.8.3/uip/post.c Wed Dec 1 14:01:37 1993 +++ mh-6.8.4/uip/post.c Thu Jan 30 11:24:40 1997 @@ -1,6 +1,6 @@ /* post.c - enter messages into the transport system */ #ifndef lint -static char ident[] = "@(#)$Id: post.c,v 2.23 1993/08/25 17:26:51 jromine Exp $"; +static char ident[] = "@(#)$Id: post.c,v 2.25 1995/12/06 19:20:22 jromine Exp $"; #endif /* lint */ #include "../h/mh.h" @@ -152,6 +152,11 @@ #define QUEUESW 35 "queued", -6, +#define RECORSW 36 + "record program", -6, +#define NRECOSW 37 + "norecord", -8, + NULL, 0 }; @@ -180,6 +185,7 @@ #define MRFM 0x0004 /* we've seen a Resent-From: */ #define MVIS 0x0008 /* we've seen sighted addrs */ #define MINV 0x0010 /* we've seen blind addrs */ +#define MRPY 0x0020 /* we've seen a Reply-to: */ }; /* */ @@ -187,7 +193,7 @@ static struct headers NHeaders[] = { "Return-Path", HBAD, 0, "Received", HBAD, 0, - "Reply-To", HADR | HNGR, 0, + "Reply-To", HADR | HNGR, MRPY, "From", HADR | HNGR, MFRM, "Sender", HADR | HBAD, 0, "Date", HBAD, 0, @@ -203,7 +209,7 @@ }; static struct headers RHeaders[] = { - "Resent-Reply-To", HADR | HNGR, 0, + "Resent-Reply-To", HADR | HNGR, MRPY, "Resent-From", HADR | HNGR, MRFM, "Resent-Sender", HADR | HBAD, 0, "Resent-Date", HBAD, 0, @@ -213,7 +219,7 @@ "Resent-Bcc", HADR | HTRY | HBCC, MINV, "Resent-Message-ID", HBAD, 0, "Resent-Fcc", HFCC, 0, - "Reply-To", HADR, 0, + "Reply-To", HADR, MRPY, "From", HADR | HNGR, MFRM, #ifdef MMDFI "Sender", HADR | HMNG | HNGR, 0, @@ -269,6 +275,7 @@ static char from[BUFSIZ]; /* my network address */ static char signature[BUFSIZ]; /* my signature */ static char *filter = NULL; /* the filter for BCC'ing */ +static char *msgfrom = NULL; /* the From: field for Bcc'ing */ static char *subject = NULL; /* the subject field for BCC'ing */ static char *fccfold[FCCS]; /* foldernames for FCC'ing */ @@ -332,13 +339,15 @@ static int queued = 0; +static char *record = NULLCP; + off_t lseek (); long time (); static putfmt(), start_headers(), finish_headers(), putgrp(), pl(); static anno(), make_bcc_file(), verify_all_addresses(); static chkadr(), do_addresses(), do_text(), do_an_address(), sigon(); -static sigoff(), p_refile(), fcc(), die(), insert_fcc(); +static sigoff(), p_refile(), fcc(), die(), insert_fcc(), p_record (); static int get_header(), putadr(), insert(), annoaux(); #ifdef TMA static postplain(); @@ -575,6 +584,14 @@ case QUEUESW: queued++; continue; + + case RECORSW: + if (!(record = *argp++) || *record == '-') + adios (NULLCP, "missing argument to %s", argp[-2]); + continue; + case NRECOSW: + record = NULLCP; + continue; } if (msg) adios (NULLCP, "only one message at a time!"); @@ -744,6 +761,8 @@ p_refile (tmpfil); + p_record (); + #ifdef MHMTS if (!deliver) #endif /* MHMTS */ @@ -806,6 +825,8 @@ } msgflags |= (hdr -> set & ~(MVIS | MINV)); + if (hdr -> set & MFRM) + msgfrom = msgfrom ? add (str, add (",", msgfrom)) : getcpy (str); if (hdr -> flags & HSUB) subject = subject ? add (str, add ("\t", subject)) : getcpy (str); if (hdr -> flags & HFCC) { @@ -847,8 +868,10 @@ badmsg++; if (count < 1) { - if (hdr -> flags & HNIL) - fprintf (out, "%s: %s", name, str); + if (hdr -> flags & HNIL) { + if (!(hdr -> flags & HBCC)) + fprintf (out, "%s: %s", name, str); + } else { #ifdef notdef advise (NULLCP, "%s: field requires at least one address", name); @@ -1259,9 +1282,14 @@ fprintf (out, "Date: %s\n", dtime (&tclock)); if (msgid) - fprintf (out, "Message-ID: <%d.%ld@%s>\n", + fprintf (out, "Message-ID: <%d.%ld.1@%s>\n", getpid (), tclock, LocalName ()); - fprintf (out, "From: %s\n", signature); + if (msgflags & MFRM) { + fprintf (out, "From: %s", msgfrom); + fprintf (out, "Sender: %s\n", from); + } + else + fprintf (out, "From: %s\n", signature); if (subject) fprintf (out, "Subject: %s", subject); fprintf (out, "BCC:\n"); @@ -1283,7 +1311,10 @@ fprintf (out, "%s: %s\n%s: multipart/digest; boundary=\"", VRSN_FIELD, VRSN_VALUE, TYPE_FIELD); - fprintf (out, "%s\"\n\n--%s\n\n", prefix, prefix); + fprintf (out, "%s\"\n%s: %s\n\n--%s\n%s: %s\n%s: %s\n\n", prefix, + DESCR_FIELD, "Blind Carbon Copy", prefix, + TYPE_FIELD, "message/rfc822", + DESCR_FIELD, "Original Message"); } else #endif /* MIME */ @@ -2349,6 +2380,77 @@ } (void) fflush (stdout); +} + +/* RECORD RECIPIENTS */ + +static p_record () +{ + int i, + child_id, + status; + char recfile[BUFSIZ]; + register struct mailname *ap, + **app; + struct mailname *addrs[3]; + register FILE *out; + + if (!record || (msgflags & (MFRM | MRFM | MRPY))) + return; + + addrs[0] = &localaddrs; + addrs[1] = &netaddrs; + addrs[2] = NULL; + if (verbose) { + printf ("recording recipients... "); + fflush (stdout); + } + + (void) strcpy (recfile, m_tmpfil ("record")); + if ((out = fopen (recfile, "w")) == NULL) { + fprintf (verbose ? stdout : stderr, "unable to create temporary file"); + if (!verbose) + fprintf (stderr, ", so can't record recipients"); + fprintf (verbose ? stdout : stderr, "\n"); + return; + } + (void) chmod (recfile, 0600); + + for (app = addrs; ap = *app; app++) { + register struct mailname *mp; + + for (mp = ap -> m_next; mp; mp = mp -> m_next) + fprintf (out, "%s\n", adrformat (mp)); + } + + (void) fclose (out); + + for (i = 0; (child_id = fork ()) == NOTOK && i < 5; i++) + sleep (5); + switch (child_id) { + case NOTOK: + fprintf (verbose ? stdout : stderr, "unable to fork"); + if (!verbose) + fprintf (stderr, ", so can't record recipients"); + fprintf (verbose ? stdout : stderr, "\n"); + break; + + case OK: + execlp (record, r1bindex (record, '/'), recfile, NULLCP); + _exit (-1); + + default: + if (status = pidwait (child_id, OK)) { + if (!verbose) + fprintf (stderr, "problem with %s: ", recfile); + (void) pidstatus (status, verbose ? stdout : stderr, NULLCP); + } + else + if (verbose) + printf ("done\n"); + } + + (void) unlink (recfile); } /* TERMINATION */ diff -ruN mh-6.8.3/uip/prompter.c mh-6.8.4/uip/prompter.c --- mh-6.8.3/uip/prompter.c Wed Dec 1 14:01:37 1993 +++ mh-6.8.4/uip/prompter.c Thu Jan 30 11:24:40 1997 @@ -12,7 +12,9 @@ #include #include #ifndef NOIOCTLH +#ifndef __alpha__ #include +#endif #endif /* NOIOCTLH */ #endif /* SYS5 */ #ifdef BSD42 diff -ruN mh-6.8.3/uip/pshsbr.c mh-6.8.4/uip/pshsbr.c --- mh-6.8.3/uip/pshsbr.c Wed Dec 1 14:01:37 1993 +++ mh-6.8.4/uip/pshsbr.c Thu Jan 30 11:24:41 1997 @@ -1,6 +1,6 @@ /* popsbr.c - POP client subroutines */ #ifndef lint -static char ident[] = "@(#)$Id: popsbr.c,v 2.6 1993/08/26 18:25:52 jromine Exp $"; +static char ident[] = "@(#)$Id: popsbr.c,v 2.7 1994/04/19 20:12:14 jromine Exp $"; #endif lint #if defined(NNTP) && !defined(PSHSBR) @@ -200,9 +200,13 @@ #else /* NNTP */ if (*response < CHAR_ERR) { (void) command ("MODE READER"); +#ifdef NEWSAUTH + if (getenv("NEWSAUTH")) /* special for IDENT protocol */ + command("MODE IDENTIFY"); +#endif return OK; } -#endif +#endif /* NNTP */ (void) strcpy (buffer, response); (void) command ("QUIT"); (void) strcpy (response, buffer); diff -ruN mh-6.8.3/uip/rcvtty.c mh-6.8.4/uip/rcvtty.c --- mh-6.8.3/uip/rcvtty.c Wed Dec 1 14:01:37 1993 +++ mh-6.8.4/uip/rcvtty.c Thu Jan 30 11:24:41 1997 @@ -1,6 +1,6 @@ /* rcvtty.c - a rcvmail program (a lot like rcvalert) handling IPC ttys */ #ifndef lint -static char ident[] = "@(#)$Id: rcvtty.c,v 1.12 1993/08/25 17:27:27 jromine Exp $"; +static char ident[] = "@(#)$Id: rcvtty.c,v 1.13 1994/04/21 18:20:50 jromine Exp $"; #endif /* lint */ #ifndef BSD42 @@ -267,7 +267,8 @@ (void) unlink (tmpfil); rewind (stdin); - (void) scan (stdin, 0, 0, new_fs (form, format, SCANFMT), 0, 0, 0, 0, 0L, 0); + (void) scan (stdin, 0, 0, new_fs (form, format, SCANFMT), 0, 0, 0, + 0, 0, 0L, 0); if ( newline ) (void) write (fd, "\n\r", 2); (void) write (fd, scanl, strlen (scanl)); diff -ruN mh-6.8.3/uip/repl.c mh-6.8.4/uip/repl.c --- mh-6.8.3/uip/repl.c Wed Dec 1 14:01:38 1993 +++ mh-6.8.4/uip/repl.c Thu Jan 30 11:24:41 1997 @@ -1,6 +1,6 @@ /* repl.c - reply to a message */ #ifndef lint -static char ident[] = "@(#)$Id: repl.c,v 1.8 1992/12/15 00:20:22 jromine Exp $"; +static char ident[] = "@(#)$Id: repl.c,v 1.9 1995/12/06 21:07:03 jromine Exp $"; #endif /* lint */ #include "../h/mh.h" @@ -11,6 +11,12 @@ #include #endif +#ifndef MIME +#define MIMEminc(a) (a) +#else /* MIME */ +#define MIMEminc(a) 0 +#endif /* MIME */ + /* */ static struct swit switches[] = { @@ -54,27 +60,32 @@ #define NINPLSW 15 "noinplace", 0, -#define QURYSW 16 +#define MIMESW 16 + "mime", MIMEminc(-4), +#define NMIMESW 17 + "nomime", MIMEminc(-6), + +#define QURYSW 18 "query", 0, -#define NQURYSW 17 +#define NQURYSW 19 "noquery", 0, -#define WHATSW 18 +#define WHATSW 20 "whatnowproc program", 0, -#define NWHATSW 19 +#define NWHATSW 21 "nowhatnowproc", 0, -#define WIDTHSW 20 +#define WIDTHSW 22 "width columns", 0, -#define HELPSW 21 +#define HELPSW 23 "help", 4, -#define FILESW 22 +#define FILESW 24 "file file", -4, /* interface from msh */ #ifdef MHE -#define BILDSW 23 +#define BILDSW 25 "build", -5, /* interface from mhe */ #endif /* MHE */ @@ -137,6 +148,8 @@ short outputlinelen = OUTPUTLINELEN; short querysw = 0; +extern int mime; + char *fcc = NULL; /* global for replsbr */ char *filter = NULL; char *form = NULL; @@ -270,6 +283,7 @@ if (!(cp = *argp++) || *cp == '-') adios (NULLCP, "missing argument to %s", argp[-2]); filter = getcpy (libpath (cp)); + mime = 0; continue; case FORMSW: if (!(form = *argp++) || *form == '-') @@ -290,6 +304,16 @@ inplace = 0; continue; + case MIMESW: +#ifdef MIME + mime++; + filter = NULL; +#endif + continue; + case NMIMESW: + mime = 0; + continue; + case QURYSW: querysw++; continue; @@ -419,7 +443,7 @@ if ((in = fopen (msg, "r")) == NULL) adios (msg, "unable to open"); - replout (in, msg, drft); + replout (in, msg, drft, mp); (void) fclose (in); if (nwhat) diff -ruN mh-6.8.3/uip/replsbr.c mh-6.8.4/uip/replsbr.c --- mh-6.8.3/uip/replsbr.c Wed Dec 1 14:01:38 1993 +++ mh-6.8.4/uip/replsbr.c Thu Jan 30 11:24:41 1997 @@ -1,6 +1,6 @@ /* replsbr.c - routines to help repl along... */ #ifndef lint -static char ident[] = "@(#)$Id: replsbr.c,v 1.17 1993/09/04 19:31:32 jromine Exp $"; +static char ident[] = "@(#)$Id: replsbr.c,v 1.19 1995/12/06 23:47:26 jromine Exp $"; #endif /* lint */ #include "../h/mh.h" @@ -18,6 +18,7 @@ format, outputlinelen, querysw; +extern int mime; extern char *fcc, *filter, *form; @@ -69,10 +70,11 @@ /* ARGSUSED */ -replout (inb, msg, drft) +replout (inb, msg, drft, mp) register FILE *inb; char *msg; char *drft; + struct msgs *mp; { register int state; register int i; @@ -234,6 +236,12 @@ } if (filter) replfilter (inb, out); +#ifdef MIME + else + if (mp && mime) + (void) fprintf (out, "#forw [original message] +%s %s\n", + mp -> foldpath, m_name (mp -> lowsel)); +#endif /* MIME */ if (ferror (out)) adios (drft, "error writing"); @@ -263,7 +271,7 @@ /* check if there's enough room in buf for str. add more mem if needed */ #define CHECKMEM(str) \ - if ((len = strlen (str)) >= bufend - dst) {\ + if ((len = strlen (str) + 1) >= bufend - dst) {\ int i = dst - buf;\ int n = last_dst - buf;\ bufsiz += ((dst + len - bufend) / BUFINCR + 1) * BUFINCR;\ diff -ruN mh-6.8.3/uip/sbboards.c mh-6.8.4/uip/sbboards.c --- mh-6.8.3/uip/sbboards.c Wed Dec 1 14:01:38 1993 +++ mh-6.8.4/uip/sbboards.c Thu Jan 30 11:24:41 1997 @@ -66,7 +66,10 @@ #ifdef LOCALE #include #endif - +#ifdef linux +/* FIXME - who should be doing this? With what option? */ +#include +#endif #define NBB 100 diff -ruN mh-6.8.3/uip/scan.c mh-6.8.4/uip/scan.c --- mh-6.8.3/uip/scan.c Wed Dec 1 14:01:38 1993 +++ mh-6.8.4/uip/scan.c Thu Jan 30 11:24:41 1997 @@ -1,6 +1,6 @@ /* scan.c - display a one-line "scan" listing */ #ifndef lint -static char ident[] = "@(#)$Id: scan.c,v 1.16 1992/12/15 00:20:22 jromine Exp $"; +static char ident[] = "@(#)$Id: scan.c,v 1.17 1994/04/21 18:20:50 jromine Exp $"; #endif /* lint */ #include "../h/mh.h" @@ -206,7 +206,7 @@ m_unknown (in); for (msgnum = 1; ; ++msgnum) { state = scan (in, msgnum, -1, nfs, width, 0, 0, - hdrflag ? file : (char *)0, 0L, 1); + hdrflag, file, 0L, 1); if (state != SCNMSG && state != SCNENC) break; } @@ -282,7 +282,7 @@ switch (state = scan (in, msgnum, 0, nfs, width, msgnum == mp -> curmsg, mp -> msgstats[msgnum] & bits, - hdrflag ? folder : (char *)0, 0L, 1)) { + hdrflag, folder, 0L, 1)) { case SCNMSG: case SCNENC: case SCNERR: diff -ruN mh-6.8.3/uip/scansbr.c mh-6.8.4/uip/scansbr.c --- mh-6.8.3/uip/scansbr.c Wed Dec 1 14:01:38 1993 +++ mh-6.8.4/uip/scansbr.c Thu Jan 30 11:24:41 1997 @@ -1,6 +1,6 @@ /* scansbr.c - routines to help scan along... */ #ifndef lint -static char ident[] = "@(#)$Id: scansbr.c,v 1.15 1993/08/20 15:54:08 jromine Exp $"; +static char ident[] = "@(#)$Id: scansbr.c,v 1.16 1994/04/21 18:20:50 jromine Exp $"; #endif /* lint */ #include "../h/mh.h" @@ -60,8 +60,8 @@ /* ARGSUSED */ -int scan (inb, innum, outnum, nfs, width, curflg, - unseen, folder, size, noisy) +int scan (inb, innum, outnum, nfs, width, curflg, unseen, + hdrflg, folder, size, noisy) char *nfs, *folder; int innum, @@ -69,6 +69,7 @@ width, curflg, unseen, + hdrflg, noisy; long size; register FILE *inb; @@ -111,8 +112,10 @@ FINDCOMP(bodycomp, "body"); FINDCOMP(datecomp, "date"); FINDCOMP(cptr, "folder"); - if (cptr && folder) + if (cptr && folder) { cptr->c_text = folder; + cptr->c_flags = hdrflg; + } FINDCOMP(cptr, "encrypted"); if (!cptr) if (cptr = (struct comp *) calloc (1, sizeof *cptr)) { @@ -238,14 +241,25 @@ */ body: ; while (state == BODY) { +#ifdef _STDIO_USES_IOSTREAM + if (scnout->_IO_write_ptr == scnout->_IO_write_end) { +#else if (scnout->_cnt <= 0) { +#endif if (fflush(scnout) == EOF) adios (scnmsg, "write error on"); } +#ifdef _STDIO_USES_IOSTREAM + state = m_getfld(state, name, scnout->_IO_write_ptr, + (long)scnout->_IO_write_ptr-(long)scnout->_IO_write_end, + inb); + scnout->_IO_write_ptr += msg_count; +#else state = m_getfld( state, name, scnout->_ptr, -(scnout->_cnt), inb ); scnout->_cnt -= msg_count; scnout->_ptr += msg_count; +#endif } goto finished; diff -ruN mh-6.8.3/uip/send.c mh-6.8.4/uip/send.c --- mh-6.8.3/uip/send.c Wed Dec 1 14:01:38 1993 +++ mh-6.8.4/uip/send.c Thu Jan 30 11:24:42 1997 @@ -1,6 +1,6 @@ /* send.c - send a composed message */ #ifndef lint -static char ident[] = "@(#)$Id: send.c,v 1.12 1992/12/15 00:20:22 jromine Exp $"; +static char ident[] = "@(#)$Id: send.c,v 1.14 1995/12/06 21:04:47 jromine Exp $"; #endif /* lint */ #include "../h/mh.h" @@ -119,6 +119,14 @@ #define SNOOPSW 35 "snoop", -5, +#define QUEUESW 36 + "queued", -6, + +#define RECORSW 37 + "record program", -6, +#define NRECOSW 38 + "norecord", -8, + NULL, 0 }; @@ -297,6 +305,8 @@ case ENCRSW: case NENCRSW: case SNOOPSW: + case QUEUESW: + case NRECOSW: vec[vecp++] = --cp; continue; @@ -305,6 +315,7 @@ case WIDTHSW: case CLIESW: case SERVSW: + case RECORSW: vec[vecp++] = --cp; if (!(cp = *argp++) || *cp == '-') adios (NULLCP, "missing argument to %s", argp[-2]); diff -ruN mh-6.8.3/uip/show.c mh-6.8.4/uip/show.c --- mh-6.8.3/uip/show.c Wed Dec 1 14:01:38 1993 +++ mh-6.8.4/uip/show.c Thu Jan 30 11:24:42 1997 @@ -1,6 +1,6 @@ /* show.c - list messages */ #ifndef lint -static char ident[] = "@(#)$Id: show.c,v 1.14 1993/10/26 20:09:21 jromine Exp $"; +static char ident[] = "@(#)$Id: show.c,v 1.15 1995/12/06 21:07:46 jromine Exp $"; #endif /* lint */ #include "../h/mh.h" @@ -413,7 +413,7 @@ for (dp++; isspace (*dp); dp++) continue; if (result = !uprf (dp, "charset")) - goto out; + goto invalid; dp += sizeof "charset" - 1; while (isspace (*dp)) dp++; diff -ruN mh-6.8.3/uip/slocal.c mh-6.8.4/uip/slocal.c --- mh-6.8.3/uip/slocal.c Wed Dec 1 14:01:38 1993 +++ mh-6.8.4/uip/slocal.c Thu Jan 30 11:24:42 1997 @@ -1,6 +1,6 @@ /* slocal.c - MH style mailer to write to a local user's mailbox */ #ifndef lint -static char ident[] = "@(#)$Id: slocal.c,v 1.24 1993/08/25 17:28:16 jromine Exp $"; +static char ident[] = "@(#)$Id: slocal.c,v 1.25 1995/12/07 00:01:25 jromine Exp $"; #endif /* lint */ /* This program implements mail delivery in the MH/MMDF style. @@ -715,10 +715,12 @@ fprintf (stderr, "vars[%d]: name=\"%s\" value=\"%s\"\n", p - vars, p -> p_name, p -> p_value); } +#define empty(s) ((s) ? (s) : "") if (debug) for (p = hdrs; p -> p_name; p++) fprintf (stderr, "hdrs[%d]: name=\"%s\" value=\"%s\"\n", - p - hdrs, p -> p_name, p -> p_value); + p - hdrs, p -> p_name, empty(p -> p_value)); +#undef empty return OK; } diff -ruN mh-6.8.3/uip/sortm.c mh-6.8.4/uip/sortm.c --- mh-6.8.3/uip/sortm.c Wed Dec 1 14:01:38 1993 +++ mh-6.8.4/uip/sortm.c Thu Jan 30 11:24:42 1997 @@ -1,7 +1,7 @@ /* sortm.c - sort messages in a folder by date/time */ /* 21Apr90 do subject sorts too - from V. Jacobson */ #ifndef lint -static char ident[] = "@(#)$Id: sortm.c,v 1.19 1992/12/15 00:20:22 jromine Exp $"; +static char ident[] = "@(#)$Id: sortm.c,v 1.20 1995/12/06 23:46:23 jromine Exp $"; #endif /* lint */ #include "../h/mh.h" @@ -551,7 +551,7 @@ j, old, new; - short stats; + int stats; char f1[BUFSIZ], tmpfil[BUFSIZ]; register struct smsg *sp; diff -ruN mh-6.8.3/uip/spop.c mh-6.8.4/uip/spop.c --- mh-6.8.3/uip/spop.c Wed Dec 1 14:01:38 1993 +++ mh-6.8.4/uip/spop.c Thu Jan 30 11:24:42 1997 @@ -66,6 +66,10 @@ #ifdef LOCALE #include #endif +#ifdef linux +/* FIXME - who should be doing this? With what option? */ +#include +#endif #define NBB 100 diff -ruN mh-6.8.3/uip/trmsbr.c mh-6.8.4/uip/trmsbr.c --- mh-6.8.3/uip/trmsbr.c Wed Dec 1 14:01:39 1993 +++ mh-6.8.4/uip/trmsbr.c Thu Jan 30 11:24:42 1997 @@ -14,7 +14,9 @@ #include #include #ifndef NOIOCTLH +#ifndef __alpha__ #include +#endif #endif /* NOIOCTLH */ #undef TIOCGWINSZ #endif /* SYS5 */ diff -ruN mh-6.8.3/uip/vmh.c mh-6.8.4/uip/vmh.c --- mh-6.8.3/uip/vmh.c Wed Dec 1 14:01:39 1993 +++ mh-6.8.4/uip/vmh.c Thu Jan 30 11:24:43 1997 @@ -11,8 +11,10 @@ * means "AT&T line discipline" (termio, not sgttyb), whereas terminfo * is quite a separate issue. */ +#ifndef linux #define TERMINFO 1 #endif +#endif /* TODO: Pass signals to client during execution @@ -23,7 +25,7 @@ If curses ever gets fixed, then XYZ code can be removed */ -#include +#include #ifdef ncr #define _SYS_REG_H /* NCR redefines "ERR" in */ #endif @@ -1136,7 +1138,11 @@ lp -> l_no = (ltail ? ltail -> l_no : 0) + 1; #ifndef BSD44 +#ifdef linux + lp -> l_buf = getcpy (w -> _line[w -> _cury].text); +#else lp -> l_buf = getcpy (w -> _y[w -> _cury]); +#endif #else lp -> l_buf = getcpy (w -> lines[w -> _cury]->line); #endif diff -ruN mh-6.8.3/uip/whatnowsbr.c mh-6.8.4/uip/whatnowsbr.c --- mh-6.8.3/uip/whatnowsbr.c Wed Dec 1 14:01:39 1993 +++ mh-6.8.4/uip/whatnowsbr.c Thu Jan 30 11:24:43 1997 @@ -1,6 +1,6 @@ /* whatnowsbr.c - the WhatNow shell */ #ifndef lint -static char ident[] = "@(#)$Id: whatnowsbr.c,v 1.21 1992/12/15 00:20:22 jromine Exp $"; +static char ident[] = "@(#)$Id: whatnowsbr.c,v 1.24 1995/12/06 21:04:47 jromine Exp $"; #endif /* lint */ #include "../h/mh.h" @@ -523,7 +523,7 @@ case FLD: case FLDPLUS: case FLDEOF: - if (uprf (name, XXX_FIELD_PRF)) { + if (uleq (name, VRSN_FIELD) || uprf (name, XXX_FIELD_PRF)) { (void) fclose (fp); return 0; } @@ -653,6 +653,14 @@ #define SNDRFSW 34 "nodraftfolder", -3, +#define QUEUESW 35 + "queued", -6, + +#define RECORSW 36 + "record program", -6, +#define NRECOSW 37 + "norecord", -8, + NULL, 0 }; @@ -780,6 +788,8 @@ case ENCRSW: case NENCRSW: case SNOOPSW: + case QUEUESW: + case NRECOSW: vec[vecp++] = --cp; continue; @@ -788,6 +798,7 @@ case WIDTHSW: case CLIESW: case SERVSW: + case RECORSW: vec[vecp++] = --cp; if (!(cp = *argp++) || *cp == '-') { advise (NULLCP, "missing argument to %s", argp[-2]); diff -ruN mh-6.8.3/zotnet/bboards/getbbent.c mh-6.8.4/zotnet/bboards/getbbent.c --- mh-6.8.3/zotnet/bboards/getbbent.c Wed Dec 1 14:01:40 1993 +++ mh-6.8.4/zotnet/bboards/getbbent.c Thu Jan 30 11:24:43 1997 @@ -80,7 +80,7 @@ static char *bbskip (), *getcpy (); -#if defined(__STDC__) && defined(SVR4) +#if defined(__STDC__) && defined(SVR4) && !defined(__linux__) #include #endif #if defined(UNISTD) || defined(_AIX) diff -ruN mh-6.8.3/zotnet/mts/client.c mh-6.8.4/zotnet/mts/client.c --- mh-6.8.3/zotnet/mts/client.c Wed Dec 1 14:01:42 1993 +++ mh-6.8.4/zotnet/mts/client.c Thu Jan 30 11:24:43 1997 @@ -1,6 +1,6 @@ /* client.c - connect to a server */ #ifndef lint -static char ident[] = "@(#)$Id: client.c,v 1.21 1993/08/25 17:32:58 jromine Exp $"; +static char ident[] = "@(#)$Id: client.c,v 1.22 1995/12/06 22:15:26 jromine Exp $"; #endif /* lint */ #if defined(SYS5) && defined(AUX) @@ -359,12 +359,13 @@ /* taken from ISODE's compat/internet.c */ +#ifndef OSF1 #ifndef DG u_long inet_addr (); #else struct in_addr inet_addr (); #endif - +#endif static char *empty = NULL; #ifdef h_addr @@ -384,7 +385,7 @@ iaddr = inet_addr (s); #ifndef DG - if (iaddr == NOTOK && strcmp (s, "255.255.255.255")) + if ((int)iaddr == NOTOK && strcmp (s, "255.255.255.255")) #else if (iaddr.s_addr == NOTOK && strcmp (s, "255.255.255.255")) #endif diff -ruN mh-6.8.3/zotnet/mts/lock.c mh-6.8.4/zotnet/mts/lock.c --- mh-6.8.3/zotnet/mts/lock.c Wed Dec 1 14:01:30 1993 +++ mh-6.8.4/zotnet/mts/lock.c Thu Jan 30 11:24:43 1997 @@ -29,7 +29,9 @@ #include #include #ifdef SVR4 +#ifndef linux #define LOCKF +#endif #include #endif #ifdef LOCKF