Ralph Corderoy [Wed, 22 Mar 2017 14:47:18 +0000 (14:47 +0000)]
Fix free(3) of unmalloc()'d string in whatnow's refile.
`ref +foo' at comp(1)'s whatnow prompt was trying to free "+foo".
Take a copy of the string so the later free works.
Tom Rodman reported the problem to nmh-workers.
Bug introduced in 3b6be5607a251a3a793e97382e251ce66ea2bca0.
Ken Hornstein [Sun, 19 Feb 2017 22:05:12 +0000 (17:05 -0500)]
Change "servers" mts.conf entry to only support a single SMTP server.
As part of this change, fix SMTP code so the chosen SMTP server is
configured correctly for the netsec code.
Ralph Corderoy [Tue, 17 Jan 2017 12:54:02 +0000 (12:54 +0000)]
mhfixmsg: Use folder name to open second message of a sequence.
`mhfixmsg foo' where foo was sequence of more than one message would
sucessfully process the lowest numbered message of the sequence, but
fail to open(2) the second one as the folder was missing from the path.
For example, /home/ralph/mail/inbox/1 was used to open the first, but
/home/ralph/mail/2 was attempted for the second. I guess this was
because a static array was being trampled during the first's processing,
though didn't try too hard to find where. Making a copy of it fixed the
problem.
Larry Hynes [Sat, 31 Dec 2016 17:57:13 +0000 (17:57 +0000)]
Changes to install-mh.man
Some more simple wordsmithing...
Change instances of 'Install-mh' to 'install-mh', in line with
other pages, switch to single `' around 'Mail', in line with
other pages, option -> switch, clean up a little.
Larry Hynes [Sat, 31 Dec 2016 15:57:42 +0000 (15:57 +0000)]
A cleanup, and possibly some controversy: I've replaced
Rather than standard message skeleton
with
User message skeleton
My thinking here is that a) we can do away with the kinda weird
'Rather than', b) I find the distinction between 'default' and
'standard' to be vague and c) it only appears in a few pages
and is easily remedied. It turns up in comp(1) as "An alternative
to the standard skeleton.", where 'standard' is used in the same
way as 'default' is used in rcvdist(1), so I think it's worth
settling on something 'better' and applying it consistently.
My proposal is 'Default foo', for the foo in %nmhetcdir% and
'User foo' for the foo in the user's <mh-dir>.
Larry Hynes [Sat, 31 Dec 2016 15:54:55 +0000 (15:54 +0000)]
Fix skeletons in comp(1), forw(1) and dist(1)
While I was here, I removed two 'empty' paragraphs (.PP) in forw(1).
They may have been intended as line breaks, but I think they are
unnecessary; feel free to overrule me!
Aside: I would not be unhappy if, some day, 'skeleton' was replaced by
something utilitarian like 'template'.
Larry Hynes [Mon, 19 Dec 2016 01:17:10 +0000 (01:17 +0000)]
Changes to mh-format.man
This is a beast, and we may not tame it at the first attempt.
Mostly language simplification, some grammar and formatting, trailing
whitespace, that sort of thing. There are one or two instances where
I've taken (small) liberties with language, in favour of 'comprehension
at first glance'.
There are some commented lines hanging around in this. I've left
them in, but I think they should go at the first opportunity.
Larry Hynes [Fri, 16 Dec 2016 22:55:39 +0000 (22:55 +0000)]
Changes to comp.man
Remove the slightly legalistic 'in truth of fact', and bring the
mention of man whatnow into the preceding sentence.
The line 'If the draft already exists, comp will ask you as to the
disposition of the draft.' makes no sense to me, and I'm struggling
to make it make sense. If we put to one side the fact that I think
it's a broken sentence, I still haven't managed to get comp to
accept - or prompt me for - a 'replace' option when 'the draft
already exists', so I'm afraid I have to admit defeat here and seek
the wisdom of the elders.
David Levine [Thu, 15 Dec 2016 22:44:56 +0000 (17:44 -0500)]
Added clarifications to abbreviations.
1) N must be a positive number.
2) The + can be omitted.
3) As many of the N messages that exist.
4) Can also use - (or +) with first, prev, next, and last.
Larry Hynes [Thu, 15 Dec 2016 18:33:15 +0000 (18:33 +0000)]
Changes to nmh.man
This adds a reference to the 'COMMANDS' section, corrects - and
hopefully simplifies - a couple of things, and tries to untangle
the line beginning 'show displays...' in the seventh paragraph.
The line 'The first, previous, next or last messages, if they exist.'
doesn't seem to accurately cover the accompanying 'foo:N' listing
in the following, or am I missing something?
first:N
prev:N
next:N
last:N The first, previous, next or last messages, if they exist.
Ralph Corderoy [Sat, 10 Dec 2016 14:19:43 +0000 (14:19 +0000)]
Document that adios() does not return. abort() ensures it won't.
Discussion with David confirmed that adios()'s de facto contract with
the caller is that it won't return. Document that, and add an abort(3)
to ensure it won't occur. Better that than return and blunder on until
a SEGV or corruption later.
Ralph Corderoy [Sat, 10 Dec 2016 14:11:13 +0000 (14:11 +0000)]
mhlsbr.c: Don't hide mhladios and mhldone behind macros.
Locally defined mhladios() and mhldone() were called as adios() and
done() thanks to #defines that hid the widely-used functions with those
names. Don't bother as it confuses the reader. Just call the local
variations directly to make clear it's not the standard implementation.
David Levine [Thu, 8 Dec 2016 21:27:40 +0000 (16:27 -0500)]
Replaced !iscntrl() with isprint().
To address Ralph's FIXME comment. One example where a byte would
have been printed with !iscntrl() is 0x24 is ISO 646 BASIC (Inv),
which is undefined. Also, added test cases to cover most of
get_param_value(). Also, replaced a couple of other FIXME's with
code comments.
David Levine [Sun, 20 Nov 2016 19:25:11 +0000 (14:25 -0500)]
Open infile before fixing each message.
Though the input file won't need to be opened if everything goes
well, do it early just in case there's a failure, and that failure
is running out of file descriptors.
It was several lines repeated each time, and it saves having to check
they're all identical. The original test pressed on if the MIME
parameter's value was an empty string; preserve that as it's spotted
later on.
David Levine [Sun, 13 Nov 2016 19:50:08 +0000 (14:50 -0500)]
Replaced docs/COMPLETION-BASH with etc/bash_completions_nmh.
It's generated from man/mh-chart.man, which in turn is generated.
Automake doesn't like generated files in docs, hence the move to
etc. And the new filename better fits usage, I think.
Did not provide support for completing message numbers. It can
be fooled by programs that take multiple switches with +
arguments.
COMPLETION-BASH was broken with current bash, anyway.
Ralph Corderoy [Sat, 12 Nov 2016 18:40:46 +0000 (18:40 +0000)]
m_getfld: Shuffle `delim' assignments slightly.
Document end state of the four pointers to parts of the delimiter.
fdelimlen can be, wrongly, one less without causing problems because a
second check uses edelimlen. The only side effect is an extra iteration
through m_getfld().