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

Diff for /src/usr.bin/error/Attic/touch.c between version 1.3 and 1.4

version 1.3, 1996/06/26 05:32:46 version 1.4, 1996/09/16 01:47:06
Line 521 
Line 521 
 FILE    *n_touchedfile; /* the new file */  FILE    *n_touchedfile; /* the new file */
 char    *o_name;  char    *o_name;
 char    n_name[64];  char    n_name[64];
 char    *canon_name = _PATH_TMP;  
 int     o_lineno;  int     o_lineno;
 int     n_lineno;  int     n_lineno;
 boolean tempfileopen = FALSE;  boolean tempfileopen = FALSE;
Line 540 
Line 539 
                         processname, name);                          processname, name);
                 return(TRUE);                  return(TRUE);
         }          }
         (void)strcpy(n_name, canon_name);          snprintf(n_name, sizeof n_name, "%s/error.XXXXXXXX", _PATH_TMP);
         if ((fd = mkstemp(n_name)) == -1 ||          if ((fd = mkstemp(n_name)) == -1 ||
             (n_touchedfile = fdopen(fd, "w")) == NULL) {              (n_touchedfile = fdopen(fd, "w")) == NULL) {
                 if (fd != -1)                  if (fd != -1)
Line 639 
Line 638 
                         fclose(tmpfile);                          fclose(tmpfile);
         }          }
         if (oktorm == 0){          if (oktorm == 0){
                 fprintf(stderr, "%s: Catastrophe: A copy of \"%s\": was saved in \"%s\"\n",                  fprintf(stderr,
                         processname, o_name, n_name);                      "%s: Catastrophe: A copy of \"%s\": was saved in \"%s\"\n",
                       processname, o_name, n_name);
                 exit(1);                  exit(1);
         }          }
         /*          /*

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4