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

Diff for /src/usr.bin/patch/inp.c between version 1.6 and 1.7

version 1.6, 1997/09/22 05:45:26 version 1.7, 1998/11/25 00:30:25
Line 11 
Line 11 
 #include "INTERN.h"  #include "INTERN.h"
 #include "inp.h"  #include "inp.h"
   
   extern bool check_only;
   
 /* Input-file-with-indexable-lines abstract type */  /* Input-file-with-indexable-lines abstract type */
   
 static off_t i_size;                    /* size of the input file */  static off_t i_size;                    /* size of the input file */
Line 80 
Line 82 
     if (statfailed && ok_to_create_file) {      if (statfailed && ok_to_create_file) {
         if (verbose)          if (verbose)
             say2("(Creating file %s...)\n",filename);              say2("(Creating file %s...)\n",filename);
               /* in check_patch case, we still display `Creating file' even
                  though we're not. The rule is that -C should be as similar
                  to normal patch behavior as possible
                */
           if (check_only)
               return TRUE;
         makedirs(filename, TRUE);          makedirs(filename, TRUE);
         close(creat(filename, 0666));          close(creat(filename, 0666));
         statfailed = stat(filename, &filestat);          statfailed = stat(filename, &filestat);
     }      }
       if (statfailed && check_only)
           fatal2("%s not found, -C mode, can't probe further\n", filename);
     /* For nonexistent or read-only files, look for RCS or SCCS versions.  */      /* For nonexistent or read-only files, look for RCS or SCCS versions.  */
     if (statfailed      if (statfailed
         /* No one can write to it.  */          /* No one can write to it.  */

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.7