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

Diff for /src/usr.bin/patch/pch.c between version 1.48 and 1.49

version 1.48, 2014/12/08 21:59:36 version 1.49, 2014/12/13 10:31:07
Line 215 
Line 215 
         while (filearg[0] == NULL) {          while (filearg[0] == NULL) {
                 if (force || batch) {                  if (force || batch) {
                         say("No file to patch.  Skipping...\n");                          say("No file to patch.  Skipping...\n");
                         filearg[0] = savestr(bestguess);                          filearg[0] = xstrdup(bestguess);
                         skip_rest_of_patch = true;                          skip_rest_of_patch = true;
                         return true;                          return true;
                 }                  }
                 ask("File to patch: ");                  ask("File to patch: ");
                 if (*buf != '\n') {                  if (*buf != '\n') {
                         free(bestguess);                          free(bestguess);
                         bestguess = savestr(buf);                          bestguess = xstrdup(buf);
                         filearg[0] = fetchname(buf, &exists, 0);                          filearg[0] = fetchname(buf, &exists, 0);
                 }                  }
                 if (!exists) {                  if (!exists) {
Line 310 
Line 310 
                 else if (strnEQ(s, "Prereq:", 7)) {                  else if (strnEQ(s, "Prereq:", 7)) {
                         for (t = s + 7; isspace((unsigned char)*t); t++)                          for (t = s + 7; isspace((unsigned char)*t); t++)
                                 ;                                  ;
                         revision = savestr(t);                          revision = xstrdup(t);
                         for (t = revision;                          for (t = revision;
                             *t && !isspace((unsigned char)*t); t++)                              *t && !isspace((unsigned char)*t); t++)
                                 ;                                  ;
Line 389 
Line 389 
         free(bestguess);          free(bestguess);
         bestguess = NULL;          bestguess = NULL;
         if (filearg[0] != NULL)          if (filearg[0] != NULL)
                 bestguess = savestr(filearg[0]);                  bestguess = xstrdup(filearg[0]);
         else if (!ok_to_create_file) {          else if (!ok_to_create_file) {
                 /*                  /*
                  * We don't want to create a new file but we need a                   * We don't want to create a new file but we need a
Line 1473 
Line 1473 
                         path = names[NEW_FILE].path;                          path = names[NEW_FILE].path;
         }          }
   
         return path ? savestr(path) : NULL;          return path ? xstrdup(path) : NULL;
 }  }
   
 static char *  static char *
Line 1538 
Line 1538 
                     names[NEW_FILE].path != NULL)                      names[NEW_FILE].path != NULL)
                         best = names[NEW_FILE].path;                          best = names[NEW_FILE].path;
         }          }
         return best ? savestr(best) : NULL;          return best ? xstrdup(best) : NULL;
 }  }
   
 static size_t  static size_t

Legend:
Removed from v.1.48  
changed lines
  Added in v.1.49