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

Diff for /src/usr.bin/sed/compile.c between version 1.44 and 1.45

version 1.44, 2017/12/11 13:25:57 version 1.45, 2017/12/12 12:52:01
Line 603 
Line 603 
 compile_tr(char *old, char **transtab)  compile_tr(char *old, char **transtab)
 {  {
         int i;          int i;
         char delimiter, check[UCHAR_MAX];          char delimiter, check[UCHAR_MAX + 1];
         char *new, *end;          char *new, *end;
   
         memset(check, 0, sizeof(check));          memset(check, 0, sizeof(check));
Line 652 
Line 652 
                 if (check[*old] == 1)                  if (check[*old] == 1)
                         error(COMPILE, "Repeated character in source string");                          error(COMPILE, "Repeated character in source string");
                 check[*old] = 1;                  check[*old] = 1;
                 (*transtab)[*old++] = *new++;                  (*transtab)[(u_char) *old++] = *new++;
         }          }
         if (*old != '\0' || *new != '\0')          if (*old != '\0' || *new != '\0')
                 error(COMPILE, "transform strings are not the same length");                  error(COMPILE, "transform strings are not the same length");

Legend:
Removed from v.1.44  
changed lines
  Added in v.1.45