version 1.1, 1995/10/18 08:45:50 |
version 1.2, 1996/06/25 01:02:48 |
|
|
|
|
#include <sys/param.h> |
#include <sys/param.h> |
#include <sys/ioctl.h> |
#include <sys/ioctl.h> |
|
#include <sys/file.h> |
#include <sys/stat.h> |
#include <sys/stat.h> |
#include <dirent.h> |
#include <dirent.h> |
#include <ctype.h> |
#include <ctype.h> |
|
|
time_t t; |
time_t t; |
time_t keep; |
time_t keep; |
|
|
char *mktemp(); |
|
char *nxtfld(); |
char *nxtfld(); |
void onintr(); |
void onintr(); |
void onsusp(); |
void onsusp(); |
|
|
char *prompt; |
char *prompt; |
{ |
{ |
char inch; |
char inch; |
int n, cmsg; |
int n, cmsg, fd; |
off_t oldpos; |
off_t oldpos; |
FILE *cpfrom, *cpto; |
FILE *cpfrom, *cpto; |
|
|
|
|
sprintf(cmdbuf, _PATH_MAIL, fname); |
sprintf(cmdbuf, _PATH_MAIL, fname); |
mailing = YES; |
mailing = YES; |
} |
} |
cpto = fopen(fname, "a"); |
if ((fd = open(fname, O_RDWR|O_EXCL|O_CREAT|O_APPEND)) == -1 || |
if (!cpto) { |
(cpto = fdopen(fd, "a")) == NULL) { |
|
if (fd == -1) |
|
close(fd); |
perror(fname); |
perror(fname); |
mailing = NO; |
mailing = NO; |
fseek(newmsg, oldpos, 0); |
fseek(newmsg, oldpos, 0); |