Ken Hornstein [Sat, 24 Mar 2012 06:08:03 +0000 (02:08 -0400)]
Sigh. Turns out last change broke a few tests, because it trimmed the
newline on the "body" component. Ignore that and the text component as
well for trimming. Also create some tests for the repl changes.
The component parser needs to save the newlines so it can combine
multiple headers properly. So for us, strip out any trailing newlines
when we call fmt_scan().
Ken Hornstein [Fri, 23 Mar 2012 03:34:08 +0000 (23:34 -0400)]
If the number of messages in a folder is zero, then don't try to
clear out the sequence list; this can cause you to run off the
beginning of the malloc'd buffer. This can happen when you use
"comp" with a draft folder, the draft folder is empty, and you have
a previous sequence set in your .mh_profile. As far as I can tell
this has been a problem for nearly forever, but I only ran into it
recently when adding the readline support. Go figure.
David Levine [Fri, 23 Mar 2012 02:06:47 +0000 (21:06 -0500)]
Added function escape_display_name() to double quote, if not already,
a fullname that contains any of the special characters listed in RFC
5322, and escape unescaped, embedded double quotes.
With this change, nmh should work with no special configuration on
Cygwin, even if the user's fullname is of the form server\name.
David Levine [Thu, 22 Mar 2012 01:01:06 +0000 (20:01 -0500)]
If a pager isn't specified with configure --with-pager, look in order
for more, less, and most. Fall back to cat, to avoid catastrophic
failure of mhshow, et al., if pagerpath is set to "no".
Ken Hornstein [Wed, 21 Mar 2012 16:22:16 +0000 (12:22 -0400)]
Revert previous change to get rid of MULTIBYTE_SUPPORT ifdef. It turns out
this breaks the Plan 9 build. But include a check for the multibyte functions
so we get MULTIBYTE_SUPPORT on systems that have it.
Ken Hornstein [Wed, 21 Mar 2012 01:36:37 +0000 (21:36 -0400)]
It turns out that as part of POSIXification we got rid of checks for
wcwidth and mbtowc (because they're part of POSIX) but we didn't turn on
MULTIBYTE_SUPPORT because configure was testing to see if those functions
were supported ... and because the tests never ran, it always came back
as not being supported. Time to bite the bullet and turn MULTIBYTE_SUPPORT
on by default.
Ken Hornstein [Mon, 19 Mar 2012 01:29:39 +0000 (21:29 -0400)]
Fix a bug where a message header ending right on the stdio boundary
would cause the body output in scan to be truncated.
Also include a test for the aforementioned bug.
David Levine [Sat, 17 Mar 2012 19:33:43 +0000 (14:33 -0500)]
In gcov target, added warning if configured with --enable-debug.
While gcov will work with it, it won't reflect optimizations that
are disabled with that option.
David Levine [Wed, 14 Mar 2012 03:28:03 +0000 (22:28 -0500)]
Disabled the optimization to stop stat'ing directory entries in
BuildFolderListRecurse() of flist.c under conditions where st_nlink is
set to 1. That happens on Cygwin, for example:
http://cygwin.com/ml/cygwin-apps/2008-08/msg00264.html
David Levine [Wed, 14 Mar 2012 03:01:52 +0000 (22:01 -0500)]
Changed output_md5() to output just the checksum. If the filename
needs to appear on the same line, the caller needs to add it. This
avoids differences due to a leading '*' binary file indicator, even
for text files, on Cygwin.
David Levine [Wed, 14 Mar 2012 02:20:47 +0000 (21:20 -0500)]
Added test/getfqnd.c, a replacement for "hostname" that always
tries to provide the fully qualified domainname of the host, even
on Cygwin. It uses the code that LocalName in sbr/mts.c uses.
Ken Hornstein [Tue, 13 Mar 2012 02:52:21 +0000 (22:52 -0400)]
New changes: Sender: cannot be blank, Sender: always overrides From:
for SMTP envelope, and Envelope-From: will cause a Sender: header to be
output if multiple From: addresses are used.
Ken Hornstein [Mon, 12 Mar 2012 01:47:04 +0000 (21:47 -0400)]
Require From: header in all outgoing messages.
Allow Sender: header (require if multiple addresses are in From:).
Support new Envelope-From: header for overriding post's choice of
SMTP envelope-from address.
Ken Hornstein [Sun, 11 Mar 2012 03:55:16 +0000 (22:55 -0500)]
Clean up a bunch of unused code and options. Specifically:
- Remove support for SMTP SEND, SAML, and SOML commands
- Remove -deliver, -fill-in and -fill-up switch for post (and related code)
- Document -server and -port switches better in post man page.
David Levine [Sun, 11 Mar 2012 02:33:24 +0000 (20:33 -0600)]
There were two fd leaks in mhparse.c:
1) In openQuoted(), the decoded contents file was opened twice in
succession. The second open was added by a patch in March 2000.
2) openBase64(), openQuoted(), and open7Bit() could open the contents
file, but it never would be closed. Added code to each to close the
file if the function opened it.
[Bug #24004: (debbug 344182)]
David Levine [Fri, 9 Mar 2012 02:19:53 +0000 (20:19 -0600)]
1) Removed -noverbose from defaults of mhshow man page. While it
accepts -verbose/-noverbose, it ignores them.
2) Added -verbose/-noverbose to mhlist synopsis.
David Levine [Wed, 7 Mar 2012 01:08:21 +0000 (19:08 -0600)]
Some of the man pages had mentioned that arguments should be
double-quoted to protect them from the shell. Removed "double-"
because single quoting is fine, too.
David Levine [Sat, 3 Mar 2012 18:21:00 +0000 (12:21 -0600)]
mhbuild -check would always fail because it tried to build the
digest for the decoded contents file (cefile), which can be null.
If it is, use the contents file itself.
David Levine [Thu, 1 Mar 2012 18:29:33 +0000 (12:29 -0600)]
Under docs/historical/mh-6.8.5, mh.rf and mh.me were renamed to
mh-intro.rf and mh-intro.me, respectively, to avoid name clashes with
other files on case-insensitive file systems.
David Levine [Thu, 1 Mar 2012 18:13:14 +0000 (12:13 -0600)]
Removed entire docs/historical/mh-6.8.5/local/ tree. It had a pair of
files, Distfile and distfile, with clashing case-insensitive names.
The rest of it was specific to UCI and LBL.