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

Diff for /src/usr.bin/patch/patch.c between version 1.59 and 1.60

version 1.59, 2015/10/09 01:37:08 version 1.60, 2015/10/16 07:33:47
Line 43 
Line 43 
 #include "inp.h"  #include "inp.h"
 #include "backupfile.h"  #include "backupfile.h"
 #include "pathnames.h"  #include "pathnames.h"
   #include "ed.h"
   
 mode_t          filemode = 0644;  mode_t          filemode = 0644;
   
Line 147 
Line 148 
         const   char *tmpdir;          const   char *tmpdir;
         char    *v;          char    *v;
   
         if (pledge("stdio rpath wpath cpath tmppath fattr proc exec", NULL) == -1)          if (pledge("stdio rpath wpath cpath tmppath fattr", NULL) == -1)
                 perror("pledge");                  perror("pledge");
   
         setvbuf(stdout, NULL, _IOLBF, 0);          setvbuf(stdout, NULL, _IOLBF, 0);
Line 218 
Line 219 
                 if (outname == NULL)                  if (outname == NULL)
                         outname = xstrdup(filearg[0]);                          outname = xstrdup(filearg[0]);
   
                 /* for ed script just up and do it and exit */  
                 if (diff_type == ED_DIFF) {  
                         do_ed_script();  
                         continue;  
                 }  
                 /* initialize the patched file */                  /* initialize the patched file */
                 if (!skip_rest_of_patch)                  if (!skip_rest_of_patch)
                         init_output(TMPOUTNAME);                          init_output(TMPOUTNAME);
Line 233 
Line 229 
                 /* find out where all the lines are */                  /* find out where all the lines are */
                 if (!skip_rest_of_patch)                  if (!skip_rest_of_patch)
                         scan_input(filearg[0]);                          scan_input(filearg[0]);
   
                   /* for ed script just up and do it and exit */
                   if (diff_type == ED_DIFF) {
                           do_ed_script();
                           continue;
                   }
   
                 /* from here on, open no standard i/o files, because malloc */                  /* from here on, open no standard i/o files, because malloc */
                 /* might misfire and we can't catch it easily */                  /* might misfire and we can't catch it easily */

Legend:
Removed from v.1.59  
changed lines
  Added in v.1.60