.IR content ]
\&...
.RB [ \-serialonly " | " \-noserialonly ]
-.RB [ \-pause " | " \-nopause ]
.RB [ \-form
.IR formfile ]
.RB [ \-rcache
%f Insert filename containing content
%F %e, %f, and stdin is terminal not content
%l display listing prior to displaying content
-%p %l, and ask for confirmation
+%p synonym to %l
%s Insert content subtype
%d Insert content description
%% Insert the character %
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
.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 ` \-realsize '
.RB ` \-noserialonly '
extern int debugsw;
-int pausesw = 1;
int serialsw = 0;
int nolist = 0;
pid_t xpid = 0;
-static sigjmp_buf intrenv;
-
/* termsbr.c */
int SOprintf(char *, ...);
static void DisplayMsgHeader(CT, char *);
static int show_switch(CT, int, int);
static int show_content(CT, int, int);
-static int show_content_aux2(CT, int, int, char *, char *,
- int, int, int, int, int);
+static int show_content_aux2(CT, int, int, char *, char *, int, int, int, int);
static int show_text(CT, int, int);
static int show_multi(CT, int, int);
static int show_multi_internal(CT, int, int);
static int show_message_rfc822(CT, int, int);
static int show_partial(CT, int, int);
static int show_external(CT, int, int);
-static RETSIGTYPE intrser(int);
/*
show_content_aux(CT ct, int serial, int alternate, char *cp, char *cracked)
{
int fd, len, buflen, quoted;
- int xstdin, xlist, xpause, xtty;
+ int xstdin, xlist, xtty;
char *bp, *pp, *file, buffer[BUFSIZ];
CI ci = &ct->c_ctinfo;
return (alternate ? DONE : OK);
xlist = 0;
- xpause = 0;
xstdin = 0;
xtty = 0;
break;
case 'p':
- /* %l, and pause prior to displaying content */
- xpause = pausesw;
- /* and fall... */
-
case 'l':
/*
** display listing prior to displaying content
got_command:
return show_content_aux2(ct, serial, alternate, cracked, buffer,
- fd, xlist, xpause, xstdin, xtty);
+ fd, xlist, xstdin, xtty);
}
static int
show_content_aux2(CT ct, int serial, int alternate, char *cracked,
- char *buffer, int fd, int xlist, int xpause, int xstdin, int xtty)
+ char *buffer, int fd, int xlist, int xstdin, int xtty)
{
pid_t child_id;
int i;
}
if (xlist) {
- char prompt[BUFSIZ];
-
if (ct->c_type == CT_MULTIPART)
list_content(ct, -1, 1, 0, 0);
else
list_switch(ct, -1, 1, 0, 0);
-
- if (xpause && SOprintf("Press <return> to show content..."))
- printf("Press <return> to show content...");
-
- if (xpause) {
- int intr;
- SIGNAL_HANDLER istat;
-
- 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);
- }
}
snprintf(exec, sizeof(exec), "exec %s", buffer);
show_multi_aux(CT ct, int serial, int alternate, char *cp)
{
int len, buflen, quoted;
- int xlist, xpause, xtty;
+ int xlist, xtty;
char *bp, *pp, *file, buffer[BUFSIZ];
struct multipart *m = (struct multipart *) ct->c_ctparams;
struct part *part;
}
xlist = 0;
- xpause = 0;
xtty = 0;
/* get buffer ready to go */
break;
case 'p':
- /* %l, and pause prior to displaying content */
- xpause = pausesw;
- /* and fall... */
-
case 'l':
/*
** display listing prior to displaying content
}
return show_content_aux2(ct, serial, alternate, NULL, buffer,
- NOTOK, xlist, xpause, 0, xtty);
+ NOTOK, xlist, 0, xtty);
}
return NOTOK;
#endif
}
-
-
-static RETSIGTYPE
-intrser(int i)
-{
-#ifndef RELIABLE_SIGNALS
- SIGNAL(SIGINT, intrser);
-#endif
-
- putchar('\n');
- siglongjmp(intrenv, DONE);
-}