mhn: compatibility fixes in show mode.
* mh/mhn.c (OPT_PAUSE): Remove define. (pause_option): New variable. (opt_handler): -pause/-nopause sets pause_option. If stdin is not a tty, set pause_option to 0. (check_type): New function. (mhn_show_command): If mhn-show-<type>[/<subtype>] is not set, use %pmoreproc '%F' for text/plain and message/rfc822 parts. If content type is application/octet-stream and type=tar, use tar to list the archive. Otherwise, complain and return NULL. (MHN_CONFIRM): Rename to MHN_PAUSE. (mhn_pause): New function. (show_handler): The value of pause_option controls the %p escape. Rewrite the MHN_PAUSE handling to avoid the use of the fixed-size buffer. Implement C-c handling, as in other mhns. If mhn_show_command returns NULL, do not attempt to show the content. Remove dubious usage of mu_transport_t. (mhn_store_command): handle application/octet-stream with type=tar. * mh/tests/mhn.at: Add a test for show mode.
Showing
3 changed files
with
230 additions
and
95 deletions
-
Please register or sign in to post a comment