Paul Fox [Wed, 4 Jun 2014 16:18:12 +0000 (12:18 -0400)]
mhlist: don't truncate anything when -verbose
without this change to the -verbose output, there's no easy way to use
mhlist to get an unmodified content-type or content-description. (the
non-verbose output isn't changed.)
David Levine [Fri, 30 May 2014 02:05:36 +0000 (21:05 -0500)]
Undid commit 475fef2edee9db3c63fc089df76f8e93e3d598cd, it didn't
seem popular. We'd be better off with a proper method, or using
formail(1), to extract the addresses from a message.
David Levine [Mon, 26 May 2014 14:17:34 +0000 (09:17 -0500)]
Added context_find_by_type(), helper function to search first, if
subtype is non-NULL, for invoname-string-type/subtype and then
invoname-string-type. Also gets rid of some fixed-size temp buffers.
David Levine [Fri, 23 May 2014 01:39:45 +0000 (20:39 -0500)]
Fixed to commit 378589b17424bd78acbfc57d505383ffb8c256cb:
when a -file switch will be used, insert -[no]concat before
the filename (and therefore, the -file switch itself).
Ken Hornstein [Fri, 16 May 2014 17:02:43 +0000 (13:02 -0400)]
Handle unknown message types in the generic content handler rather
than in the RFC822 handler; this will cause them to be displayed using
an output marker rather than throw an error.
Ken Hornstein [Fri, 16 May 2014 04:04:24 +0000 (00:04 -0400)]
Move the prototype for show_content_aux() to a common header file; it
got an extra argument recently but none of the other users of it
noticed.
When fixing this I discovered that the usage of show_content_aux()
by mhstoresbr.c was wrong; the prototype had an extra argument in
the middle of it. Apparently this has been broken for 15 years!
David Levine [Thu, 15 May 2014 15:28:03 +0000 (10:28 -0500)]
Added support for mhbuild-disposition-<type>[/<subtype>] profile
entries when mhbuild expands Attach: headers. Default to
'attachment', but override with 'inline' entries for text/calendar
and message/rfc822 in mhn.defaults.
Paul Fox [Thu, 15 May 2014 12:55:45 +0000 (08:55 -0400)]
change mhlist to use decimal math when abbreviating sizes
the K/M/G/T units imply factors of 1000, so make the code
match. (the alternative would be to change the units to
Ki/Mi/Gi/Ti.) mhlist output might someday be configurable
using mh-format, in which case the user will be able to choose.
Paul Fox [Tue, 13 May 2014 14:10:09 +0000 (10:10 -0400)]
add $(kibi) function, as complement to %(kilo)
%(kibi) will convert a number to IEC prefix units, i.e. Ki, Mi, Gi,
Ti, representing factors of 1024. (by comparison, %(kilo) represents
factors of 1000.)
Paul Fox [Wed, 7 May 2014 23:36:56 +0000 (19:36 -0400)]
make scan_content() work correctly with content containing NULs
switched from fgets to getline for unambiguous reads in the face of
NUL bytes. added a checkfornuls flag, and use it to cause the correct
encoding when content-types of application or text contain NULs.
David Levine [Mon, 5 May 2014 02:51:52 +0000 (21:51 -0500)]
Replaced use of norm_charmap() in mhshow and mhfixmsg with
case-insensitive string comparison against the charset name.
norm_charmap() is intended for use with result of nl_langinfo(),
and didn't add much value here.
David Levine [Sun, 4 May 2014 14:03:33 +0000 (09:03 -0500)]
In mhshow, copy result of call to norm_charmap() and get_charset()
because they return a static buffer. Thanks to Alexander Zangerl
for tracking this down, when using an ISO-8859-1 locale.
Paul Fox [Thu, 24 Apr 2014 01:44:54 +0000 (21:44 -0400)]
mhshow: apply marker form to all part separators
the mhshow "-markform" format is now used for all part separators, not
just those being left out. the format now overloads the %(unseen)
function to indicate that the content of the part being marked has
been suppressed. the built-in default and example formats both make
use of this function.
if this is displayed using "mshow -part 2", in the presence of an
MHSHOW variable which _only_ describes a rule for displaying images,
then we don't want to get an error about how nothing in part 1 was
displayable.
Ken Hornstein [Sun, 20 Apr 2014 22:08:47 +0000 (18:08 -0400)]
Move clsfolds() before the call to context_save(); that is required
when using private sequences, since seq_save() only moves the sequence
information into the context structure; a subsequent call to context_save()
is required to actually write out the context file.
David Levine [Wed, 16 Apr 2014 02:57:30 +0000 (21:57 -0500)]
Fixed popsbr.c to look like its nmh 1.5 version, except it now
uses nmh_get_credentials() instead of ruserpass() directly. Also,
added checks of return values of nmh_get_credentials() to smtp.c.
David Levine [Wed, 16 Apr 2014 01:58:32 +0000 (20:58 -0500)]
Reworked retrieval of username and password with SMTP and sasl so
that if getusername() and no password are accepted by the mechanism,
then the user need not provide them.
Paul Fox [Wed, 16 Apr 2014 01:39:38 +0000 (21:39 -0400)]
docs/contrib/ml: add a runtime check for known bash-ism
i'm leaving the #! line as /bin/bash, because that's how i wrote
and tested. but with this change i think the script will still
function correctly on a wide variety of shells.
Ken Hornstein [Tue, 15 Apr 2014 01:32:41 +0000 (21:32 -0400)]
It turns out that due to the changes to m_getfld() to support file
position tracking, this broke the scan output from inc(1) when POPing
more than one message at a time. Since a new filehandle was being
passed to each call to scan(), it made the most sense to simply
discard the m_getfld() state for each call to scan() when doing POP.
David Levine [Fri, 11 Apr 2014 02:21:28 +0000 (21:21 -0500)]
If -[no]concat is given to show(1), have it use showmimeproc instead
of showproc and pass those switches along. This way, show won't pass
them to mhl, which doesn't accept them.
Ken Hornstein [Fri, 11 Apr 2014 01:45:14 +0000 (21:45 -0400)]
Use a dynamically-allocated buffer for character set conversion, and
resize it if we get E2BIG. Also create a test that exercises this
particular problem.