.RB [ \-type
.IR content ]
\&...
-.RB [ \-pause " | " \-nopause ]
.RB [ \-form
.IR formfile ]
.RB [ \-rcache
%a Insert parameters from Content-Type field
%{parameter} Insert the parameter value from the Content-Type field
%f Insert filename containing content
-%F %e, %f, and stdin is terminal not content
+%F %f, and stdin is terminal not content
%l display listing prior to displaying content
-%p %l, and ask for confirmation
%s Insert content subtype
%d Insert content description
%% Insert the character %
.fi
.RE
.PP
-For those display strings containing the e- or F-escape,
-.B mhshow
+.B Mhshow
will
-execute at most one of these at any given time. Although the F-escape
-expands to be the filename containing the content, the e-escape has no
-expansion as far as the shell is concerned.
-.PP
-When the p-escape prompts for confirmation, typing INTR (usually
-control-C) will tell
-.B mhshow
-not to display that content.
-The p-escape can be disabled by specifying the switch
-.BR \-nopause .
-Further, when
-.B mhshow
-is display a content, typing QUIT (usually
-control-\\) will tell
-.B mhshow
-to wrap things up immediately.
+execute at most one display string at any given time, and wait for the
+current display string to finish execution before executing the next
+display string.
.PP
The {parameter} escape is typically used in a command line argument
that should only be present if it has a non-null value. Its value
.PP
.RS 5
.nf
-mhshow-show-text/plain: %pmoreproc %F
-mhshow-show-message/rfc822: %pshow -file %F
+mhshow-show-text/plain: %lmoreproc %F
+mhshow-show-message/rfc822: %lshow -file %F
.fi
.RE
.PP
.RB ` msgs "' defaults to cur"
.RB ` \-nocheck '
.RB ` \-form\ mhl.headers '
-.RB ` \-pause '
.RB ` \-rcache\ ask '
.RB ` \-wcache\ ask '
.fi
4 รท 2 = 2
EOF
-run_prog mhshow -nopause last >"$actual" 2>&1
+run_prog mhshow last >"$actual" 2>&1
check "$expected" "$actual"
cat >>"$MH" <<'EOF'
UTF-8
EOF
-run_prog mhshow -nopause last >"$actual" 2>&1
+run_prog mhshow last >"$actual" 2>&1
check "$expected" "$actual"
EOF
-run_prog mhshow -nopause last >"$actual" 2>&1
+run_prog mhshow last >"$actual" 2>&1
check "$expected" "$actual"
-I UTF-8
EOF
-run_prog mhshow -nopause prev >"$actual" 2>&1
+run_prog mhshow prev >"$actual" 2>&1
check "$expected" "$actual"
EOF
-run_prog mhshow -nopause last >"$actual" 2>&1
+run_prog mhshow last >"$actual" 2>&1
check "$expected" "$actual"
-I UTF-8 file
EOF
-run_prog mhshow -nopause prev >"$actual" 2>&1
+run_prog mhshow prev >"$actual" 2>&1
check "$expected" "$actual"
file
EOF
-run_prog mhshow -nopause last >"$actual" 2>&1
+run_prog mhshow last >"$actual" 2>&1
check "$expected" "$actual"
-I $QUOTEME' file
EOF
-run_prog mhshow -nopause last >"$actual" 2>&1
+run_prog mhshow last >"$actual" 2>&1
check "$expected" "$actual"
file
EOF
-run_prog mhshow -nopause last >"$actual" 2>&1
+run_prog mhshow last >"$actual" 2>&1
check "$expected" "$actual"
EOF
-run_prog mhshow -nopause last >"$actual" 2>&1
+run_prog mhshow last >"$actual" 2>&1
check "$expected" "$actual"
extern int debugsw;
-int pausesw = 1;
int nolist = 0;
char *progsw = NULL;
int nomore = 0;
char *formsw = NULL;
-static sigjmp_buf intrenv;
-
/* mhmisc.c */
int part_ok (CT, int);
static void DisplayMsgHeader (CT, char *);
static int show_switch (CT, int);
static int show_content (CT, int);
-static int show_content_aux2 (CT, int, char *, char *, int, int, int, int);
+static int show_content_aux2 (CT, int, char *, char *, int, int, int);
static int show_text (CT, int);
static int show_multi (CT, int);
static int show_multi_internal (CT, int);
static int show_message_rfc822 (CT, int);
static int show_partial (CT, int);
static int show_external (CT, int);
-static int parse_display_string (CT, char *, int *, int *, int *, char *,
- char *, size_t, int multipart);
+static int parse_display_string (CT, char *, int *, int *, char *, char *,
+ size_t, int multipart);
static int convert_content_charset (CT, char **);
-static void intrser (int);
/*
show_content_aux (CT ct, int alternate, char *cp, char *cracked)
{
int fd;
- int xstdin = 0, xlist = 0, xpause = 0;
+ int xstdin = 0, xlist = 0;
char *file, buffer[BUFSIZ];
if (!ct->c_ceopenfnx) {
goto got_command;
}
- if (parse_display_string (ct, cp, &xstdin, &xlist, &xpause, file,
- buffer, sizeof(buffer) - 1, 0)) {
+ if (parse_display_string (ct, cp, &xstdin, &xlist, file, buffer,
+ sizeof(buffer) - 1, 0)) {
admonish (NULL, "Buffer overflow constructing show command!\n");
return NOTOK;
}
got_command:
return show_content_aux2 (ct, alternate, cracked, buffer,
- fd, xlist, xpause, xstdin);
+ fd, xlist, xstdin);
}
static int
show_content_aux2 (CT ct, int alternate, char *cracked, char *buffer,
- int fd, int xlist, int xpause, int xstdin)
+ int fd, int xlist, int xstdin)
{
pid_t child_id;
int i, vecp;
}
if (xlist) {
- char prompt[BUFSIZ];
-
if (ct->c_type == CT_MULTIPART)
list_content (ct, -1, 1, 0, 0, 0);
else
list_switch (ct, -1, 1, 0, 0, 0);
-
- if (xpause && isatty (fileno (stdout))) {
- int intr;
- SIGNAL_HANDLER istat;
-
- if (SOprintf ("Press <return> to show content..."))
- printf ("Press <return> to show content...");
-
- istat = SIGNAL (SIGINT, intrser);
- if ((intr = sigsetjmp (intrenv, 1)) == OK) {
- fflush (stdout);
- prompt[0] = 0;
- read (fileno (stdout), prompt, sizeof(prompt));
- }
- SIGNAL (SIGINT, istat);
- if (intr != OK || prompt[0] == 'n') {
- (*ct->c_ceclosefnx) (ct);
- return (alternate ? DONE : NOTOK);
- }
- if (prompt[0] == 'q') done(OK);
- }
}
vec = argsplit(buffer, &file, &vecp);
* if it is not a text part of a multipart/alternative
*/
if (!alternate || ct->c_subtype == TEXT_PLAIN) {
- snprintf (buffer, sizeof(buffer), "%%p%s %%F", progsw ? progsw :
+ snprintf (buffer, sizeof(buffer), "%%l%s %%F", progsw ? progsw :
moreproc && *moreproc ? moreproc : DEFAULT_PAGER);
cp = (ct->c_showproc = add (buffer, NULL));
return show_content_aux (ct, alternate, cp, NULL);
{
/* xstdin is only used in the call to parse_display_string():
its value is ignored in the function. */
- int xstdin = 0, xlist = 0, xpause = 0;
+ int xstdin = 0, xlist = 0;
char *file, buffer[BUFSIZ];
struct multipart *m = (struct multipart *) ct->c_ctparams;
struct part *part;
}
}
- if (parse_display_string (ct, cp, &xstdin, &xlist, &xpause, file,
+ if (parse_display_string (ct, cp, &xstdin, &xlist, file,
buffer, sizeof(buffer) - 1, 1)) {
admonish (NULL, "Buffer overflow constructing show command!\n");
return NOTOK;
}
- return show_content_aux2 (ct, alternate, NULL, buffer,
- NOTOK, xlist, xpause, 0);
+ return show_content_aux2 (ct, alternate, NULL, buffer, NOTOK, xlist, 0);
}
static int
-parse_display_string (CT ct, char *cp, int *xstdin, int *xlist, int *xpause,
+parse_display_string (CT ct, char *cp, int *xstdin, int *xlist,
char *file, char *buffer, size_t buflen,
int multipart) {
int len, quoted = 0;
break;
case 'F':
- /* %e, %f, and stdin is terminal not content */
+ /* %f, and stdin is terminal not content */
*xstdin = 1;
/* and fall... */
break;
case 'p':
- /* %l, and pause prior to displaying content */
- *xpause = pausesw;
+ /* No longer supported */
/* and fall... */
case 'l':
return OK;
}
-
-
-static void
-intrser (int i)
-{
- NMH_UNUSED (i);
-
- putchar ('\n');
- siglongjmp (intrenv, DONE);
-}