]> diplodocus.org Git - nmh/log
nmh
6 years agoAdd basic support for the STLS command in POP
Ken Hornstein [Mon, 22 Apr 2019 23:46:17 +0000 (19:46 -0400)]
Add basic support for the STLS command in POP

Add support for the STLS command in POP (sometimes called STARTTLS).
Functionality not yet complete.

7 years agoAdded -checkbase switch to mhfixmsg(1).
David Levine [Sun, 7 Apr 2019 17:17:23 +0000 (13:17 -0400)]
Added -checkbase switch to mhfixmsg(1).

7 years agoRenamed build_multipart_alt() to build_multipart().
David Levine [Sun, 7 Apr 2019 17:14:59 +0000 (13:14 -0400)]
Renamed build_multipart_alt() to build_multipart().

And some other minor code cleanup.

7 years agoAdd support for %(trimr) format function
Ken Hornstein [Fri, 22 Mar 2019 15:59:04 +0000 (11:59 -0400)]
Add support for %(trimr) format function

Add support for a %(trimr) format function, which behaves exactly
like %(trim) but also returns a string.  Turns out this is literally
a one-line change that does not require a new format instruction.

7 years agoReplaced use of hard-coded sizes with sizeof the char arrays.
David Levine [Tue, 13 Nov 2018 21:53:20 +0000 (16:53 -0500)]
Replaced use of hard-coded sizes with sizeof the char arrays.

Fix to commit 23024ffad75d997bf2a85b3a65fbfdfd35f8150c.

7 years agoAdded CONTEXT section to fmttest man page.
David Levine [Sat, 10 Nov 2018 17:38:01 +0000 (12:38 -0500)]
Added CONTEXT section to fmttest man page.

7 years agoAdded -attendee switch to mhical(1).
David Levine [Sat, 10 Nov 2018 17:35:31 +0000 (12:35 -0500)]
Added -attendee switch to mhical(1).

This allows the user to select which of their attendee addresses they are
responding about, when they have more than one in the invitation.
Added corresponding -a switch to calaccept, etc., functions in replaliases.
Updated mhical to retain DESCRIPTION lines.  Gmail puts a link to the event
DESCRIPTION line along with a message to no edit that section, though it
seems to accept responses if the DESCRIPTION line was removed.
Incremented mhical version number to 0.5.

7 years agoReduced quantities of data that could be written to a few buffers.
David Levine [Sat, 3 Nov 2018 19:03:17 +0000 (15:03 -0400)]
Reduced quantities of data that could be written to a few buffers.

gcc 8 noticed that snprintfs could have overrun the buffers.

7 years agoIncreased sizes of a couple of buffers.
David Levine [Thu, 1 Nov 2018 23:44:32 +0000 (19:44 -0400)]
Increased sizes of a couple of buffers.

gcc 8 noticed that snprintf could have overrun them.  It might be
better to reduce the sizes of buffers used for display names, etc.
Or ever better, use dynamically sized buffers.

7 years agoResized buffer, and moved it to the only block where it's used.
David Levine [Wed, 31 Oct 2018 23:09:33 +0000 (19:09 -0400)]
Resized buffer, and moved it to the only block where it's used.

gcc 8 noticed that snprintf could have overrun it.

7 years agoResized buffer and provided timezone its own buffer.
David Levine [Wed, 31 Oct 2018 22:51:23 +0000 (18:51 -0400)]
Resized buffer and provided timezone its own buffer.

gcc 8 noticed that snprintfs could have overrun them.

7 years agoAdded full output test to test-scan.
David Levine [Wed, 31 Oct 2018 02:01:05 +0000 (22:01 -0400)]
Added full output test to test-scan.

From commit f54674f1b5d07148d9655fc3b337ad5f725272a7.  The test
fails now, so added to XFAIL_TESTS.

7 years agoRevert "scan(1) now checks for full output device [Bug #50925]."
David Levine [Tue, 30 Oct 2018 01:54:08 +0000 (21:54 -0400)]
Revert "scan(1) now checks for full output device [Bug #50925]."

This reverts commit f54674f1b5d07148d9655fc3b337ad5f725272a7.

7 years agoscan(1) now checks for full output device [Bug #50925].
David Levine [Sun, 28 Oct 2018 18:27:39 +0000 (14:27 -0400)]
scan(1) now checks for full output device [Bug #50925].

Added fflush(3) after every output line:  may slow down scan on
output with large number of lines.

7 years agoAdded PROFILE COMPONENTS section and corrected CONTEXT.
David Levine [Sun, 28 Oct 2018 14:47:40 +0000 (10:47 -0400)]
Added PROFILE COMPONENTS section and corrected CONTEXT.

7 years agoCorrected comment: whom(1) does not use context_foil().
David Levine [Sun, 28 Oct 2018 14:45:08 +0000 (10:45 -0400)]
Corrected comment: whom(1) does not use context_foil().

7 years agoIncreased sizes of a couple of buffers.
David Levine [Sat, 22 Sep 2018 13:50:44 +0000 (09:50 -0400)]
Increased sizes of a couple of buffers.

gcc 8 noticed that snprintfs could have overrun them.

7 years agoCheck for /etc/centos-release, on CentOS.
David Levine [Sat, 22 Sep 2018 13:12:51 +0000 (09:12 -0400)]
Check for /etc/centos-release, on CentOS.

7 years agoruserpass.c: Return the password typed by the user.
Ralph Corderoy [Sun, 1 Jul 2018 08:49:28 +0000 (09:49 +0100)]
ruserpass.c: Return the password typed by the user.

Darren Provine reported that entering the password didn't work.  This
was due to ruserpass() failing to set the password.  Fixes 1d4977af.

7 years agomhlsbr.c: Use variable for strncpy(3)'s size, not sizeof.
Ralph Corderoy [Sun, 1 Jul 2018 08:43:05 +0000 (09:43 +0100)]
mhlsbr.c: Use variable for strncpy(3)'s size, not sizeof.

Silences gcc 8.1.1's warning that the size of the source was being used,
not the destination.  The destination has just been allocated to be the
size of the source so no overflow can occur.  Move existing variable
that later holds the buffer size to before the allocation and strncpy so
it can be used for those too.

7 years agopost.c: Remove `pure' attribute from void-returning chkadr().
Ralph Corderoy [Sun, 1 Jul 2018 08:36:25 +0000 (09:36 +0100)]
post.c: Remove `pure' attribute from void-returning chkadr().

Spoted by gcc 8.1.1.  Fixes 93a18dd7.

7 years agorcvtty.c: Use struct utmpx's ut_line[], not a copy.
Ralph Corderoy [Sun, 1 Jul 2018 08:32:28 +0000 (09:32 +0100)]
rcvtty.c: Use struct utmpx's ut_line[], not a copy.

Silences gcc 8.1.1's warning that strncpy(3)'s length is the sizeof of
the source, not the destination, by removing the strncpy and passing the
source to alert() where it's only read, not written.

7 years agoman: Use `.B' instead of `.BR' when only one argument.
Ralph Corderoy [Thu, 31 May 2018 12:35:19 +0000 (13:35 +0100)]
man: Use `.B' instead of `.BR' when only one argument.

7 years agoThe sendmail config component/switch can be used with sendmail/smtp mts.
David Levine [Thu, 31 May 2018 01:20:22 +0000 (21:20 -0400)]
The sendmail config component/switch can be used with sendmail/smtp mts.

As well as with sendmail/pipe.

8 years agoChange the default editor from 'vi' to 'prompter'.
Ken Hornstein [Sun, 18 Mar 2018 02:34:14 +0000 (22:34 -0400)]
Change the default editor from 'vi' to 'prompter'.

Absent any profile environment variable setting, the default editor
for commands like 'comp', 'forw', and others is now the nmh program
'prompter'.

8 years agoFixed mhshow/test-charset to work on all tested platforms.
David Levine [Tue, 20 Feb 2018 02:30:17 +0000 (21:30 -0500)]
Fixed mhshow/test-charset to work on all tested platforms.

Restores the functionality of commit f81046da6.  Also, skips the
last two tests if iconv isn't enabled.  And removes the test
files if the last test, without iconv_elides_question_marks, behaves
as expected.  Finally, some comments have been updated.

8 years agoAvoid free() in format engine for now.
Ken Hornstein [Mon, 12 Feb 2018 21:01:08 +0000 (16:01 -0500)]
Avoid free() in format engine for now.

This free() call messes up the buffer handling in scansbr.c:scan();
for now we're going to live with the leak and fix this properly when
we normalize the format engine's memory handling.

8 years agocpstripped(): Replace malloc()s with statics based on MB_LEN_MAX.
Ralph Corderoy [Sun, 11 Feb 2018 13:02:24 +0000 (13:02 +0000)]
cpstripped(): Replace malloc()s with statics based on MB_LEN_MAX.

MB_CUR_MAX from stdlib.h isn't a compile-time constant so can't be used
for the size of a couple of static char arrays so malloc() was used at
run time, with the tiny claims never being freed.  valgrind(1) noticed
and David suggested MB_LEN_MAX from limits.h instead;  that header's
contents are suitable for #if expressions and thus compile-time
constants.

8 years agoRemove extra semicolons at end of C statements.
Ralph Corderoy [Fri, 9 Feb 2018 18:51:59 +0000 (18:51 +0000)]
Remove extra semicolons at end of C statements.

8 years agotrunccpy(): Fix typo in comment describing function.
Ralph Corderoy [Wed, 7 Feb 2018 23:24:11 +0000 (23:24 +0000)]
trunccpy(): Fix typo in comment describing function.

8 years agomhshowsbr.c: Delete single-use global int `nolist'.
Ralph Corderoy [Tue, 23 Jan 2018 18:20:16 +0000 (18:20 +0000)]
mhshowsbr.c: Delete single-use global int `nolist'.

Was only used in one place for its value that was always zero.

8 years agoAdd a few more MacOS X valgrind suppressions
Ken Hornstein [Sat, 10 Feb 2018 06:29:46 +0000 (01:29 -0500)]
Add a few more MacOS X valgrind suppressions

8 years agoClean up memory leaks by callers of scan().
Ken Hornstein [Sat, 10 Feb 2018 04:15:32 +0000 (23:15 -0500)]
Clean up memory leaks by callers of scan().

Make sure we reuse the "scanl" argument to the scan() function, as that's
the signal to have scan() reuse it's buffers.  Otherwise repeated calls
to scan will leak a TON of memory.  Reported by Ralph Corderoy.

8 years agoCompile the header format for each message.
David Levine [Fri, 9 Feb 2018 00:43:56 +0000 (19:43 -0500)]
Compile the header format for each message.

Per Ken's suggestion, compile_header() and compile_marker() are now
called for each message.  That's done with reset_comptable disabled.
So, per Ralph's suggestion, fmt_free(NULL, 1) is called after all
messages are shown to free up memory held by the component table.

8 years agoGeneralized gdbm 1.13 Memcheck:Param suppression a bit.
David Levine [Fri, 9 Feb 2018 00:21:55 +0000 (19:21 -0500)]
Generalized gdbm 1.13 Memcheck:Param suppression a bit.

gdbm 1.13-3 (Fedora 27) doesn't show the __write_nocancel call.

8 years agoFixed mhshow part markers when displaying multiple messages.
David Levine [Thu, 8 Feb 2018 01:43:59 +0000 (20:43 -0500)]
Fixed mhshow part markers when displaying multiple messages.

Added test/mhshow/test-markers, it reveals the problem.

8 years agoSuppress unused parameter warning in builds without Cyrus SASL support.
David Levine [Sat, 3 Feb 2018 18:49:24 +0000 (13:49 -0500)]
Suppress unused parameter warning in builds without Cyrus SASL support.

8 years agoSupport building without Cyrus SASL or TLS.
David Levine [Sat, 3 Feb 2018 18:48:10 +0000 (13:48 -0500)]
Support building without Cyrus SASL or TLS.

If the user doesn't specify -y, and specifies n for either Cyrus
SASL or TLS when asked.

8 years agoRemoved unused hf_encoding from struct hfield.
David Levine [Sat, 3 Feb 2018 13:03:24 +0000 (08:03 -0500)]
Removed unused hf_encoding from struct hfield.

I could not find any evidence of it ever being used.

8 years agoRemoved comment about testing noiconv portion of get_param_value().
David Levine [Sat, 3 Feb 2018 13:00:36 +0000 (08:00 -0500)]
Removed comment about testing noiconv portion of get_param_value().

I'm not sure if it ever did, but it doesn't seem to now.

8 years agotest-charset: Fix test when HAVE_ICONV is false.
Ralph Corderoy [Sat, 3 Feb 2018 10:49:40 +0000 (10:49 +0000)]
test-charset: Fix test when HAVE_ICONV is false.

When the Content-Type's charset parameter's encoding is `invalid', it
makes no difference whether HAVE_ICONV is defined or not as the
parameter's value can't be decoded.

8 years agodecode_rfc2047(): Stop unused-variable warning if HAVE_ICONV false.
Ralph Corderoy [Sat, 3 Feb 2018 10:46:23 +0000 (10:46 +0000)]
decode_rfc2047(): Stop unused-variable warning if HAVE_ICONV false.

8 years agoseq_nameok(): Distinguish three identical error messages.
Ralph Corderoy [Thu, 25 Jan 2018 00:28:45 +0000 (00:28 +0000)]
seq_nameok(): Distinguish three identical error messages.

Otherwise `illegal sequence name' doesn't say what's wrong.

8 years agotest-charset: Divulge mhshow output if iconv_open(3) doesn't gripe.
Ralph Corderoy [Thu, 25 Jan 2018 00:16:15 +0000 (00:16 +0000)]
test-charset: Divulge mhshow output if iconv_open(3) doesn't gripe.

Andy Bradford was finding the grep failed, but was left with no
explanation that's what happened, or what the file that didn't match
contained.

8 years ago%(divide): Avoid SIGFPE on integer divide of INT_MIN by -1.
Ralph Corderoy [Wed, 24 Jan 2018 00:27:01 +0000 (00:27 +0000)]
%(divide): Avoid SIGFPE on integer divide of INT_MIN by -1.

Dividing by zero isn't the only cause of SIGFPE.
    fmttest -raw -format '%(num -2147483648) %(divide -1)' foo
Also, add FIXME comment suggesting the user should be told of overflow
rather than silently using zero as the result.

8 years agoUse trim_suffix_c() to remove optional trailing character.
Ralph Corderoy [Wed, 24 Jan 2018 00:12:59 +0000 (00:12 +0000)]
Use trim_suffix_c() to remove optional trailing character.

I'm unsure if one of the cases can know the string's length is long
enough to read the char before the NUL.  Using trim_suffix_c()
simplifies and removes the possibility.

8 years agomhfixmsg.man: Replace UTF-8 `§' with `\(sc' troff escape.
Ralph Corderoy [Wed, 24 Jan 2018 13:49:06 +0000 (13:49 +0000)]
mhfixmsg.man: Replace UTF-8 `§' with `\(sc' troff escape.

man page source is ASCII.  GNU groff's troff's source is ISO 8859-1.
The `§' in UTF-8 looks like `§' in ISO 8859-1.  If those two bytes make
it to a UTF-8 terminal then it appears as `§', but target something
else, e.g. PDF, and the flaw shows.

Also adjust test-manpages to grep for bytes other than HT, and SPACE to
tilde, in the built man pages.  A test of the source could be also be
done for the Makefile's `all' target, but this one should remain to spot
the build process breaking things, e.g. non-ASCII in $prefix.

8 years agoFixed RFC reference in mhfixmsg man page.
David Levine [Wed, 24 Jan 2018 01:10:27 +0000 (20:10 -0500)]
Fixed RFC reference in mhfixmsg man page.

RFC 5322 has line length limits.

8 years agofmt_scan(): Avoid undefined behaviour from overlapping strncpy(3).
Ralph Corderoy [Tue, 23 Jan 2018 16:37:01 +0000 (16:37 +0000)]
fmt_scan(): Avoid undefined behaviour from overlapping strncpy(3).

M. Levinson pointed out in private email that pcc(1) tickles a bug that
causes undefined behaviour due to part of `buffer[]', accessed by `str',
being strncpy(3) back to its start.  Fix by using memmove(3) to slide
`str' back to `buffer's beginning whenever it may have wandered off.

Fixes e8635a8a that added `%(unquote)', but using `%(trim)' twice was
also faulty in the same way and pre-dates git.

8 years agomhshow: Avoid SEGV when user's command has two or fewer words.
Ralph Corderoy [Tue, 23 Jan 2018 09:18:34 +0000 (09:18 +0000)]
mhshow: Avoid SEGV when user's command has two or fewer words.

After argsplit() returned a NULL-terminated vector, the existing NULL
was overwritten with another and the vector index then incremented.
This made the test for whether vec[2] was available out by one resulting
in NULL being used and printed.

This plucking of the third word is a faulty assumption as argsplit()
doesn't always return ["sh", "-c", ...], but add a new test script for
it to avoid regression and so that the script can be expanded with more
related tests.

Fixes 7559e1ebf.

8 years agotest-whom: Send whom's stderr down pipe; don't discard.
Ralph Corderoy [Sat, 20 Jan 2018 11:48:30 +0000 (11:48 +0000)]
test-whom: Send whom's stderr down pipe; don't discard.

Fixes 2a02eef3.

8 years agotest-msgchk: Send msgchk's stderr down pipe; don't discard.
Ralph Corderoy [Sat, 20 Jan 2018 11:45:32 +0000 (11:45 +0000)]
test-msgchk: Send msgchk's stderr down pipe; don't discard.

Present since original 26ac907a.

8 years agotest: Send command's stderr down pipe; don't discard.
Ralph Corderoy [Sat, 20 Jan 2018 11:38:24 +0000 (11:38 +0000)]
test: Send command's stderr down pipe; don't discard.

Fixes 880ff2a4 that turned `foo >$actual 2>&1' into
`foo | sed ... >$actual 2>&1'.

8 years agotest/common.sh.in: Unset libcurl(3)'s proxy environment variables.
Ralph Corderoy [Sat, 20 Jan 2018 08:57:40 +0000 (08:57 +0000)]
test/common.sh.in: Unset libcurl(3)'s proxy environment variables.

Debian's packager, Alexander Zanger, reported test/oauth/test-* problems
due to environment variables for the system's network proxies.  David
Levine suggested the unsetting of them.  The tests only make HTTP
connections so just the variables affecting those are unset.

8 years agotest-subpart: Send mhshow's stderr down pipe; don't discard.
Ralph Corderoy [Sat, 20 Jan 2018 07:33:36 +0000 (07:33 +0000)]
test-subpart: Send mhshow's stderr down pipe; don't discard.

Fixes 2f1e191a.

8 years agotest-textcharset: Send mhshow's stderr down pipe; don't discard.
Ralph Corderoy [Sat, 20 Jan 2018 07:28:29 +0000 (07:28 +0000)]
test-textcharset: Send mhshow's stderr down pipe; don't discard.

Fixes 67bb0fc0.

8 years agoRemoved quotes around "%{charset}" in mhbuild-convert-text.
David Levine [Fri, 19 Jan 2018 02:46:13 +0000 (21:46 -0500)]
Removed quotes around "%{charset}" in mhbuild-convert-text.

They broke test/repl/test-convert on Cygwin.  It looks like parameter
quoting differs between mhbuild and mhshow.

Fix to commit 47629e9e87a324531be881cebfca38dd38f8afaa.

8 years agoRemoved quotes from charset argument to iconv.
David Levine [Fri, 19 Jan 2018 01:21:40 +0000 (20:21 -0500)]
Removed quotes from charset argument to iconv.

Fix to commit 47629e9e87a324531be881cebfca38dd38f8afaa.  Ken
noticed that it broke test/repl/test-convert on MacOS X.

8 years agoFilter test output to remove added whitespace.
David Levine [Fri, 19 Jan 2018 00:03:52 +0000 (19:03 -0500)]
Filter test output to remove added whitespace.

Ralph noticed that lynx added whitespace to the (empty) converted
html document, breaking the test.

Fix to commit 47629e9e87a324531be881cebfca38dd38f8afaa.

8 years agoWrapped uses of %{charset} in mhn.defaults with double quotes.
David Levine [Thu, 18 Jan 2018 00:36:12 +0000 (19:36 -0500)]
Wrapped uses of %{charset} in mhn.defaults with double quotes.

8 years agoAdd test-fmttest for cpstripped(), cptrimmed(), and cpnumber().
Ralph Corderoy [Mon, 15 Jan 2018 16:25:35 +0000 (16:25 +0000)]
Add test-fmttest for cpstripped(), cptrimmed(), and cpnumber().

Many more tests could be done, and some, like those below, would produce
known erroneous results, but this is a start and helps spot regressions.

 create mode 100755 test/format/test-fmttest

8 years agofmttest: Allow `-outsize 0' to mean no output, not default size.
Ralph Corderoy [Sat, 13 Jan 2018 13:54:15 +0000 (13:54 +0000)]
fmttest: Allow `-outsize 0' to mean no output, not default size.

`0' might be arrived at by a script tracking remaining space.

8 years agoAdd Arch Linux to the often-built-and-tested distro list.
Ralph Corderoy [Wed, 29 Nov 2017 17:28:50 +0000 (17:28 +0000)]
Add Arch Linux to the often-built-and-tested distro list.

And correct a `Mac OS' to have an `X', and `HPUX' to be `HP-UX'.

8 years agoAlso trap ambiguous post switch.
David Levine [Mon, 15 Jan 2018 22:30:49 +0000 (17:30 -0500)]
Also trap ambiguous post switch.

Fix to commit d321a6ee82fce5d187f4342199c090909a72e9b8.

8 years agoFixed rcvdist to pass switch arguments to post(1).
David Levine [Mon, 15 Jan 2018 19:01:09 +0000 (14:01 -0500)]
Fixed rcvdist to pass switch arguments to post(1).

Looks like this has always been broken.  Found by Steven Winikoff
when he tried to pass a -port switch, to override the default
submission port.

This is intended to be a temporary fix.  The post switches should
be factored out into one place.

8 years agoRemoved escape before newline.
David Levine [Sun, 14 Jan 2018 20:04:53 +0000 (15:04 -0500)]
Removed escape before newline.

It was causing a *roff font selection code to appear in the
formatted man page.

Fix to commit 95e0df2af.  That commit removed a space after the
escape, which used to cause a double space in the formatted output.

8 years agoAdded mhfixmsg -[no]decodeheaderfieldbodies switches.
David Levine [Sun, 14 Jan 2018 18:54:19 +0000 (13:54 -0500)]
Added mhfixmsg -[no]decodeheaderfieldbodies switches.

8 years agoNote that mhshow-suffix/mhshow- matching is case-insenstive.
David Levine [Sun, 14 Jan 2018 13:37:33 +0000 (08:37 -0500)]
Note that mhshow-suffix/mhshow- matching is case-insenstive.

8 years agoimplement the long-neglected 'folder -noprint'
Paul Fox [Sun, 7 Jan 2018 18:12:02 +0000 (13:12 -0500)]
implement the long-neglected 'folder -noprint'

8 years agoRemoved sysconfdir overrides from SPECS examples.
David Levine [Mon, 18 Dec 2017 01:41:34 +0000 (20:41 -0500)]
Removed sysconfdir overrides from SPECS examples.

8 years agoAdd support for setting nmh directories.
Ken Hornstein [Sun, 10 Dec 2017 05:36:21 +0000 (00:36 -0500)]
Add support for setting nmh directories.

Add new precious variables (nmhlibexecdir and nmhetcdir) that will
permit the user to specify these directories exactly.  They default to
$(libexecdir)/nmh and $(sysconfdir)/nmh, respectively.

8 years agoRemoved version number from OpenBSD, it's in the "recent" section.
David Levine [Sat, 2 Dec 2017 20:43:16 +0000 (15:43 -0500)]
Removed version number from OpenBSD, it's in the "recent" section.

8 years agoMoved OpenBSD back to "routinely built and tested" category.
David Levine [Sat, 2 Dec 2017 14:44:19 +0000 (09:44 -0500)]
Moved OpenBSD back to "routinely built and tested" category.

8 years agoUpdated platform lists in MACHINES.
David Levine [Tue, 28 Nov 2017 01:56:30 +0000 (20:56 -0500)]
Updated platform lists in MACHINES.

8 years agoRemoved sbr/dtimep.c from CLEANFILES.
David Levine [Tue, 28 Nov 2017 01:11:30 +0000 (20:11 -0500)]
Removed sbr/dtimep.c from CLEANFILES.

automake puts it in maintainer-clean-generic, which is where it belongs.
Reversal of commit 1353a95720e4049e5f8357cd009b76c0450ec39f.

8 years agoAdded note to commit checklist to start message with one-line synopsis.
David Levine [Tue, 28 Nov 2017 00:38:37 +0000 (19:38 -0500)]
Added note to commit checklist to start message with one-line synopsis.

Also, removed obsolete reference to Lyndon's buildbot.

8 years agotest-mhfixmsg: pwd(1)'s `-P' needed to avoid failure with symlinks.
Ralph Corderoy [Mon, 27 Nov 2017 15:20:44 +0000 (15:20 +0000)]
test-mhfixmsg: pwd(1)'s `-P' needed to avoid failure with symlinks.

Steven Winikoff reported to nmh-workers that one of this file's tests
failed in 1.7.  It attempts to manipulate the output of mhpath(1)
assuming it starts with the result of `pwd', but symlinks in the latter
may cause this to fail.  Use POSIX's `-P' option to ensure no symlinks,
as done in some other tests.

8 years agoUse ISO-2022-KR instead of EBCDIC-US in test-charset, because
David Levine [Sun, 26 Nov 2017 22:27:48 +0000 (17:27 -0500)]
Use ISO-2022-KR instead of EBCDIC-US in test-charset, because
Robert Elz reported that it is installed on his NetBSD host.
Also, don't run that check without iconv.

8 years agoFix tests that assume the backup prefix is a comma.
Ralph Corderoy [Sun, 26 Nov 2017 12:09:22 +0000 (12:09 +0000)]
Fix tests that assume the backup prefix is a comma.

Steven Winikoff reported to nmh-workers that some tests failed in 1.7
configured with --with-hash-backup because they assume the backup prefix
is comma rather than hash.  Alter those tests to use `mhparam sbackup',
as other tests already do.  PATH is already set to use the mhparam being
tested.

test-mhfixmsg used find(1) to check for leftover files that globbed
`mhfix*' or `,mhfix*'.  Changed to just `*mhfix*' as I think any file
containing that would be unwanted, and it will also spot mhfixmsg
hard-coding the comma prefix.

8 years agoNEWS: Encourage nmh-announce subscription. Capitalise `Gmail'.
Ralph Corderoy [Fri, 17 Nov 2017 12:04:01 +0000 (12:04 +0000)]
NEWS: Encourage nmh-announce subscription.  Capitalise `Gmail'.

Cherry-picked to 1.7-RC3-6-g3d2c68e3.

8 years agomhshow/test-charset: Protect question mark from shell globbing.
Ralph Corderoy [Sat, 25 Nov 2017 15:42:09 +0000 (15:42 +0000)]
mhshow/test-charset: Protect question mark from shell globbing.

8 years agoReworked parameter value tests to reflect Ralph's (re-?) discovery
David Levine [Fri, 24 Nov 2017 23:41:23 +0000 (18:41 -0500)]
Reworked parameter value tests to reflect Ralph's (re-?) discovery
that GNU iconv elides the ? from charset names.  nmh uses it as a
replacement character when decoding fails.

8 years agoMakefile.am: Remove `-I./sbr' from sbr_libmh_a_CPPFLAGS.
Ralph Corderoy [Thu, 23 Nov 2017 23:11:58 +0000 (23:11 +0000)]
Makefile.am: Remove `-I./sbr' from sbr_libmh_a_CPPFLAGS.

Doesn't seem to be useful.  Present since the switch to automake, so
possibly a leftover from experimentation.

8 years agofmttest.c: Clear output buffer after each write.
Ralph Corderoy [Wed, 22 Nov 2017 15:12:11 +0000 (15:12 +0000)]
fmttest.c: Clear output buffer after each write.

Otherwise each write outputs the whole buffer again, including what's
already appeared.  Instead of the three lines 1, 2, 3, one sees 1, 1, 2,
1, 2, 3.

8 years agoRewrite cpnumber() to fix `%2(msg)' with 123 overflowing to `?23'.
Ralph Corderoy [Wed, 22 Nov 2017 13:44:01 +0000 (13:44 +0000)]
Rewrite cpnumber() to fix `%2(msg)' with 123 overflowing to `?23'.

Reported in 1.7 by Ken on nmh-workers yesterday.
`It seems this was introduced in commit 92128dacf'.
We now use the C library to format the number, and then manipulate the
result.  A temporary charstring_t is no longer used.
Also adds left justification using negative width.

8 years agoNormalize some #include paths.
Ken Hornstein [Mon, 20 Nov 2017 00:08:48 +0000 (19:08 -0500)]
Normalize some #include paths.

Include the subdirectory so these files will compile from an object build.

8 years agoMove etc/rmmproc.messageid to fix its install permissions.
David Levine [Sat, 18 Nov 2017 15:35:19 +0000 (10:35 -0500)]
Move etc/rmmproc.messageid to fix its install permissions.

And removed duplicate docs/contrib/replaliases to fix its install permissions.

8 years agofmt_new.c: Move interface to own file.
Ralph Corderoy [Thu, 16 Nov 2017 00:14:35 +0000 (00:14 +0000)]
fmt_new.c: Move interface to own file.

8 years agofmt_addr.c: Move interface to own file.
Ralph Corderoy [Thu, 16 Nov 2017 00:02:00 +0000 (00:02 +0000)]
fmt_addr.c: Move interface to own file.

8 years agodatetime.c: Make rrule_clock() static; no external callers.
Ralph Corderoy [Wed, 15 Nov 2017 23:52:08 +0000 (23:52 +0000)]
datetime.c: Make rrule_clock() static;  no external callers.

8 years agodatetime.c: Move interface to own file.
Ralph Corderoy [Wed, 15 Nov 2017 23:36:42 +0000 (23:36 +0000)]
datetime.c: Move interface to own file.

8 years agocrawl_folders.h: Base header on implementation.
Ralph Corderoy [Wed, 15 Nov 2017 23:29:04 +0000 (23:29 +0000)]
crawl_folders.h: Base header on implementation.

Normally done as part of extracting the new header file from a larger
one, but this file already existed so it had to be moved as one commit
and altered in the next, otherwise git would break its history.

8 years agocrawl_folders.h: Rename to be alongside implementation.
Ralph Corderoy [Wed, 15 Nov 2017 23:25:29 +0000 (23:25 +0000)]
crawl_folders.h: Rename to be alongside implementation.

8 years agooauth.c: Alter permissions from 0755 to 0644.
Ralph Corderoy [Wed, 15 Nov 2017 23:16:13 +0000 (23:16 +0000)]
oauth.c: Alter permissions from 0755 to 0644.

Possibly introduced by 380046d2.

8 years agoh/rcvmail.h: Delete. Contained just a couple of pointless macros.
Ralph Corderoy [Tue, 14 Nov 2017 23:56:16 +0000 (23:56 +0000)]
h/rcvmail.h: Delete.  Contained just a couple of pointless macros.

RCV_MOK was 0, RCV_MBX was 1.  They were used for exit(3) and done().
`exit(0)' is clearer than another layer of abstraction, and the commands
that used them didn't seem to document the exit statuses anyway.  The
included by other means, at least on one platform.

8 years agopopsbr.h: Base header on implementation.
Ralph Corderoy [Tue, 14 Nov 2017 23:41:18 +0000 (23:41 +0000)]
popsbr.h: Base header on implementation.

Normally done as part of extracting the new header file from a larger
one, but this file already existed so it had to be moved as one commit
and altered in the next, otherwise git would break its history.

8 years agopopsbr.h: Rename to be alongside implementation.
Ralph Corderoy [Tue, 14 Nov 2017 23:38:41 +0000 (23:38 +0000)]
popsbr.h: Rename to be alongside implementation.

8 years agopopsbr.h: Remove pop_fd() and pop_set() prototypes.
Ralph Corderoy [Mon, 13 Nov 2017 00:06:30 +0000 (00:06 +0000)]
popsbr.h: Remove pop_fd() and pop_set() prototypes.

Function definitions removed in 4ea2f92f.

8 years agopopsbr.c: Add `static' to function definitions to match prototypes.
Ralph Corderoy [Sun, 12 Nov 2017 23:58:29 +0000 (23:58 +0000)]
popsbr.c: Add `static' to function definitions to match prototypes.

parse_proxy(), command(), and multiline() all have prototypes claiming
they're static in popsbr.c, but their later definitions lack that
qualifier.

8 years agopicksbr.h: Rename to be alongside implementation.
Ralph Corderoy [Sun, 12 Nov 2017 18:50:32 +0000 (18:50 +0000)]
picksbr.h: Rename to be alongside implementation.