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
changed start up code to exit if there are 0 messages and
[unix-history]
/
usr
/
src
/
usr.bin
/
mail
/
aux.c
diff --git
a/usr/src/usr.bin/mail/aux.c
b/usr/src/usr.bin/mail/aux.c
index
1894134
..
0d82d3c
100644
(file)
--- a/
usr/src/usr.bin/mail/aux.c
+++ b/
usr/src/usr.bin/mail/aux.c
@@
-11,7
+11,7
@@
* Auxiliary functions.
*/
* Auxiliary functions.
*/
-static char *SccsId = "@(#)aux.c
1.6
%G%";
+static char *SccsId = "@(#)aux.c
2.2
%G%";
/*
* Return a pointer to a dynamic copy of the argument.
/*
* Return a pointer to a dynamic copy of the argument.
@@
-395,9
+395,12
@@
source(name)
char name[];
{
register FILE *fi;
char name[];
{
register FILE *fi;
+ register char *cp;
- if ((fi = fopen(name, "r")) == NULL) {
- perror(name);
+ if ((cp = expand(name)) == NOSTR)
+ return(1);
+ if ((fi = fopen(cp, "r")) == NULL) {
+ perror(cp);
return(1);
}
if (ssp >= _NFILE-2) {
return(1);
}
if (ssp >= _NFILE-2) {
@@
-477,14
+480,9
@@
alter(name)
time_p[1] = statb.st_mtime;
utime(name, time_p);
#else
time_p[1] = statb.st_mtime;
utime(name, time_p);
#else
- if ((pid = fork()) != 0)
- return;
- clrbuf(stdout);
- clrbuf(stderr);
- clrbuf(stdin);
sleep(1);
if ((f = open(name, 0)) < 0)
sleep(1);
if ((f = open(name, 0)) < 0)
-
exit(1)
;
+
return
;
read(f, &w, 1);
exit(0);
#endif
read(f, &w, 1);
exit(0);
#endif