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
add imagen
[unix-history]
/
usr
/
src
/
usr.bin
/
mail
/
main.c
diff --git
a/usr/src/usr.bin/mail/main.c
b/usr/src/usr.bin/mail/main.c
index
e1526ad
..
218e349
100644
(file)
--- a/
usr/src/usr.bin/mail/main.c
+++ b/
usr/src/usr.bin/mail/main.c
@@
-1,6
+1,18
@@
+/*
+ * Copyright (c) 1980 Regents of the University of California.
+ * All rights reserved. The Berkeley software License Agreement
+ * specifies the terms and conditions for redistribution.
+ */
+
#ifndef lint
#ifndef lint
-static char sccsid[] = "@(#)main.c 2.12 (Berkeley) %G%";
-#endif
+char *copyright =
+"@(#) Copyright (c) 1980 Regents of the University of California.\n\
+ All rights reserved.\n";
+#endif not lint
+
+#ifndef lint
+static char *sccsid = "@(#)main.c 5.3 (Berkeley) %G%";
+#endif not lint
#include "rcv.h"
#include <sys/stat.h>
#include "rcv.h"
#include <sys/stat.h>
@@
-31,7
+43,6
@@
main(argc, argv)
register int i, argp;
int mustsend, uflag, hdrstop(), (*prevint)(), f;
FILE *ibuf, *ftat;
register int i, argp;
int mustsend, uflag, hdrstop(), (*prevint)(), f;
FILE *ibuf, *ftat;
- extern char _sobuf[];
struct sgttyb tbuf;
#ifdef signal
struct sgttyb tbuf;
#ifdef signal
@@
-60,7
+71,6
@@
main(argc, argv)
else
baud = B9600;
image = -1;
else
baud = B9600;
image = -1;
- setbuf(stdout, _sobuf);
/*
* Now, determine how we are being used.
/*
* Now, determine how we are being used.
@@
-214,6
+224,13
@@
main(argc, argv)
assign("verbose", "");
break;
assign("verbose", "");
break;
+ case 'I':
+ /*
+ * We're interactive
+ */
+ intty = 1;
+ break;
+
default:
fprintf(stderr, "Unknown flag: %s\n", argv[i]);
exit(1);
default:
fprintf(stderr, "Unknown flag: %s\n", argv[i]);
exit(1);
@@
-273,7
+290,7
@@
main(argc, argv)
fprintf(stderr, "No mail for %s\n", myname);
exit(1);
}
fprintf(stderr, "No mail for %s\n", myname);
exit(1);
}
- if (!
edit && !
noheader && value("noheader") == NOSTR) {
+ if (!noheader && value("noheader") == NOSTR) {
if (setjmp(hdrjmp) == 0) {
if ((prevint = sigset(SIGINT, SIG_IGN)) != SIG_IGN)
sigset(SIGINT, hdrstop);
if (setjmp(hdrjmp) == 0) {
if ((prevint = sigset(SIGINT, SIG_IGN)) != SIG_IGN)
sigset(SIGINT, hdrstop);
@@
-282,8
+299,6
@@
main(argc, argv)
sigset(SIGINT, prevint);
}
}
sigset(SIGINT, prevint);
}
}
- if (edit)
- newfileinfo();
if (!edit && msgCount == 0) {
printf("No mail\n");
fflush(stdout);
if (!edit && msgCount == 0) {
printf("No mail\n");
fflush(stdout);
@@
-305,8
+320,7
@@
main(argc, argv)
hdrstop()
{
hdrstop()
{
- clrbuf(stdout);
- printf("\nInterrupt\n");
fflush(stdout);
fflush(stdout);
+ fprintf(stderr, "\nInterrupt\n");
longjmp(hdrjmp, 1);
}
longjmp(hdrjmp, 1);
}