[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.46 and 1.47

version 1.46, 2008/08/20 18:28:46 version 1.47, 2009/04/05 13:36:00
Line 149 
Line 149 
 main(int argc, char *argv[])  main(int argc, char *argv[])
 {  {
         int     error = 0, hunk, failed, i, fd;          int     error = 0, hunk, failed, i, fd;
           bool    patch_seen;
         LINENUM where = 0, newwhere, fuzz, mymaxfuzz;          LINENUM where = 0, newwhere, fuzz, mymaxfuzz;
         const   char *tmpdir;          const   char *tmpdir;
         char    *v;          char    *v;
Line 208 
Line 209 
         /* make sure we clean up /tmp in case of disaster */          /* make sure we clean up /tmp in case of disaster */
         set_signals(0);          set_signals(0);
   
           patch_seen = false;
         for (open_patch_file(filearg[1]); there_is_another_patch();          for (open_patch_file(filearg[1]); there_is_another_patch();
             reinitialize_almost_everything()) {              reinitialize_almost_everything()) {
                 /* for each patch in patch file */                  /* for each patch in patch file */
   
                   patch_seen = true;
   
                 warn_on_invalid_line = true;                  warn_on_invalid_line = true;
   
Line 397 
Line 401 
                 }                  }
                 set_signals(1);                  set_signals(1);
         }          }
   
           if (!patch_seen)
                   error = 2;
   
         my_exit(error);          my_exit(error);
         /* NOTREACHED */          /* NOTREACHED */
 }  }

Legend:
Removed from v.1.46  
changed lines
  Added in v.1.47