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);
-}