David Levine [Wed, 25 Apr 2012 02:04:54 +0000 (21:04 -0500)]
Fixed test suite to work with Solaris Bourne shell:
1) Removed ! (negation) of statuses.
2) Removed initializations from export statements.
3) Replaced $() with ``.
4) Replaced $(()) (and expr) with new function arith_eval ().
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.