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.
Clang's static analyzer reports a potential NULL pointer deref.
This is a "shouldn't happen" case, so I have added an assert
to quell the warning, and catch the failure in the off chance
we do get here with last == NULL.
David Levine [Wed, 9 Apr 2014 02:34:20 +0000 (21:34 -0500)]
lkopen_dot() would block forever if another process held a lock
forever. Changed it to only retry for 60 seconds, like the other
lkopen's. And have it indicate that it failed to acquire the lock.