[BACK]Return to msgs.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / msgs

Diff for /src/usr.bin/msgs/Attic/msgs.c between version 1.1 and 1.2

version 1.1, 1995/10/18 08:45:50 version 1.2, 1996/06/25 01:02:48
Line 76 
Line 76 
   
 #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>
Line 139 
Line 140 
 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();
Line 717 
Line 717 
 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;
   
Line 768 
Line 768 
                         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);

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2