projects
/
unix-history
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
tags
|
clone url
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
man page in the right palce
[unix-history]
/
usr
/
src
/
usr.bin
/
mail
/
cmd3.c
diff --git
a/usr/src/usr.bin/mail/cmd3.c
b/usr/src/usr.bin/mail/cmd3.c
index
4b661c8
..
d3069f0
100644
(file)
--- a/
usr/src/usr.bin/mail/cmd3.c
+++ b/
usr/src/usr.bin/mail/cmd3.c
@@
-16,7
+16,7
@@
*/
#ifndef lint
*/
#ifndef lint
-static char sccsid[] = "@(#)cmd3.c 5.
18
(Berkeley) %G%";
+static char sccsid[] = "@(#)cmd3.c 5.
22
(Berkeley) %G%";
#endif /* not lint */
#include "rcv.h"
#endif /* not lint */
#include "rcv.h"
@@
-34,8
+34,7
@@
static char sccsid[] = "@(#)cmd3.c 5.18 (Berkeley) %G%";
shell(str)
char *str;
{
shell(str)
char *str;
{
- int (*sigint)() = signal(SIGINT, SIG_IGN);
- int (*sigcont)() = signal(SIGCONT, SIG_DFL);
+ sig_t sigint = signal(SIGINT, SIG_IGN);
char *shell;
char cmd[BUFSIZ];
char *shell;
char cmd[BUFSIZ];
@@
-43,10
+42,9
@@
shell(str)
if (bangexp(cmd) < 0)
return 1;
if ((shell = value("SHELL")) == NOSTR)
if (bangexp(cmd) < 0)
return 1;
if ((shell = value("SHELL")) == NOSTR)
- shell = SHELL;
+ shell =
_PATH_C
SHELL;
(void) run_command(shell, 0, -1, -1, "-c", cmd, NOSTR);
(void) signal(SIGINT, sigint);
(void) run_command(shell, 0, -1, -1, "-c", cmd, NOSTR);
(void) signal(SIGINT, sigint);
- (void) signal(SIGCONT, sigcont);
printf("!\n");
return 0;
}
printf("!\n");
return 0;
}
@@
-58,15
+56,13
@@
shell(str)
dosh(str)
char *str;
{
dosh(str)
char *str;
{
- int (*sigint)() = signal(SIGINT, SIG_IGN);
- int (*sigcont)() = signal(SIGCONT, SIG_DFL);
+ sig_t sigint = signal(SIGINT, SIG_IGN);
char *shell;
if ((shell = value("SHELL")) == NOSTR)
char *shell;
if ((shell = value("SHELL")) == NOSTR)
- shell = SHELL;
+ shell =
_PATH_C
SHELL;
(void) run_command(shell, 0, -1, -1, NOSTR);
(void) signal(SIGINT, sigint);
(void) run_command(shell, 0, -1, -1, NOSTR);
(void) signal(SIGINT, sigint);
- (void) signal(SIGCONT, sigcont);
putchar('\n');
return 0;
}
putchar('\n');
return 0;
}
@@
-134,8
+130,8
@@
help()
register c;
register FILE *f;
register c;
register FILE *f;
- if ((f = fopen(
HELPFILE
, "r")) == NULL) {
- perror(
HELPFILE
);
+ if ((f = fopen(
_PATH_HELP
, "r")) == NULL) {
+ perror(
_PATH_HELP
);
return(1);
}
while ((c = getc(f)) != EOF)
return(1);
}
while ((c = getc(f)) != EOF)
@@
-518,16
+514,12
@@
null(e)
file(argv)
register char **argv;
{
file(argv)
register char **argv;
{
- char *cp;
if (argv[0] == NOSTR) {
newfileinfo();
return 0;
}
if (argv[0] == NOSTR) {
newfileinfo();
return 0;
}
- if ((cp = expand(*argv)) == NOSTR)
- return 1;
- strcpy(prevfile, mailname);
- if (setfile(cp, **argv != '%') < 0)
+ if (setfile(*argv) < 0)
return 1;
announce();
return 0;
return 1;
announce();
return 0;