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

Diff for /src/usr.bin/rcs/diff.c between version 1.37 and 1.38

version 1.37, 2015/01/16 06:40:11 version 1.38, 2015/06/13 20:15:21
Line 72 
Line 72 
 #include <stdint.h>  #include <stdint.h>
 #include <stddef.h>  #include <stddef.h>
 #include <stdio.h>  #include <stdio.h>
   #include <stdlib.h>
 #include <string.h>  #include <string.h>
 #include <unistd.h>  #include <unistd.h>
 #include <limits.h>  #include <limits.h>
Line 374 
Line 375 
         clistlen = 100;          clistlen = 100;
         clist = xcalloc(clistlen, sizeof(*clist));          clist = xcalloc(clistlen, sizeof(*clist));
         i = stone(class, slen[0], member, klist, flags);          i = stone(class, slen[0], member, klist, flags);
         xfree(member);          free(member);
         xfree(class);          free(class);
   
         J = xreallocarray(J, len[0] + 2, sizeof(*J));          J = xreallocarray(J, len[0] + 2, sizeof(*J));
         unravel(klist[i]);          unravel(klist[i]);
         xfree(clist);          free(clist);
         xfree(klist);          free(klist);
   
         ixold = xreallocarray(ixold, len[0] + 2, sizeof(*ixold));          ixold = xreallocarray(ixold, len[0] + 2, sizeof(*ixold));
         ixnew = xreallocarray(ixnew, len[1] + 2, sizeof(*ixnew));          ixnew = xreallocarray(ixnew, len[1] + 2, sizeof(*ixnew));
Line 769 
Line 770 
                 a[f[i].serial] = f[i].value;                  a[f[i].serial] = f[i].value;
         for (i = 1; i <= l; i++)          for (i = 1; i <= l; i++)
                 b[i] = a[i];                  b[i] = a[i];
         xfree(a);          free(a);
 }  }
   
 static int  static int
Line 860 
Line 861 
         int ret;          int ret;
   
         ret = regexec(diff_ignore_re, line, 0, NULL, 0);          ret = regexec(diff_ignore_re, line, 0, NULL, 0);
         xfree(line);          free(line);
         return (ret == 0);      /* if it matched, it should be ignored. */          return (ret == 0);      /* if it matched, it should be ignored. */
 }  }
   
Line 1383 
Line 1384 
                 buf_append(diffbuf, str, strlen(str));                  buf_append(diffbuf, str, strlen(str));
         else          else
                 printf("%s", str);                  printf("%s", str);
         xfree(str);          free(str);
 }  }

Legend:
Removed from v.1.37  
changed lines
  Added in v.1.38