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

Diff for /src/usr.bin/patch/util.c between version 1.35 and 1.36

version 1.35, 2010/07/24 01:10:12 version 1.36, 2013/11/26 13:19:07
Line 129 
Line 129 
         while (stat(bakname, &filestat) == 0 &&          while (stat(bakname, &filestat) == 0 &&
             orig_device == filestat.st_dev && orig_inode == filestat.st_ino) {              orig_device == filestat.st_dev && orig_inode == filestat.st_ino) {
                 /* Skip initial non-lowercase chars.  */                  /* Skip initial non-lowercase chars.  */
                 for (s = simplename; *s && !islower(*s); s++)                  for (s = simplename; *s && !islower((unsigned char)*s); s++)
                         ;                          ;
                 if (*s)                  if (*s)
                         *s = toupper(*s);                          *s = toupper((unsigned char)*s);
                 else                  else
                         memmove(simplename, simplename + 1,                          memmove(simplename, simplename + 1,
                             strlen(simplename + 1) + 1);                              strlen(simplename + 1) + 1);
Line 333 
Line 333 
   
         if (at == NULL || *at == '\0')          if (at == NULL || *at == '\0')
                 return NULL;                  return NULL;
         while (isspace(*at))          while (isspace((unsigned char)*at))
                 at++;                  at++;
 #ifdef DEBUGGING  #ifdef DEBUGGING
         if (debug & 128)          if (debug & 128)
Line 347 
Line 347 
         tab = strchr(t, '\t') != NULL;          tab = strchr(t, '\t') != NULL;
         /* Strip off up to `strip_leading' path components and NUL terminate. */          /* Strip off up to `strip_leading' path components and NUL terminate. */
         for (sleading = strip_leading; *t != '\0' && ((tab && *t != '\t') ||          for (sleading = strip_leading; *t != '\0' && ((tab && *t != '\t') ||
             !isspace(*t)); t++) {              !isspace((unsigned char)*t)); t++) {
                 if (t[0] == '/' && t[1] != '/' && t[1] != '\0')                  if (t[0] == '/' && t[1] != '/' && t[1] != '\0')
                         if (--sleading >= 0)                          if (--sleading >= 0)
                                 name = t + 1;                                  name = t + 1;

Legend:
Removed from v.1.35  
changed lines
  Added in v.1.36