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

Diff for /src/usr.bin/rcs/diff3.c between version 1.3 and 1.4

version 1.3, 2006/04/29 05:31:28 version 1.4, 2006/05/03 07:10:39
Line 78 
Line 78 
 #include "includes.h"  #include "includes.h"
   
 #include "diff.h"  #include "diff.h"
 #include "rcsutil.h"  #include "rcsprog.h"
 #include "xmalloc.h"  
   
 /* diff3 - 3-way differential file comparison */  /* diff3 - 3-way differential file comparison */
   
Line 186 
Line 185 
         d2 = rcs_buf_alloc((size_t)128, BUF_AUTOEXT);          d2 = rcs_buf_alloc((size_t)128, BUF_AUTOEXT);
         diffb = rcs_buf_alloc((size_t)128, BUF_AUTOEXT);          diffb = rcs_buf_alloc((size_t)128, BUF_AUTOEXT);
   
         if (strlcpy(path1, "/tmp/diff1.XXXXXXXXXX", sizeof(path1)) >= sizeof(path1) ||          if (strlcpy(path1, rcs_tmpdir, sizeof(path1)) >= sizeof(path1) ||
             strlcpy(path2, "/tmp/diff2.XXXXXXXXXX", sizeof(path2)) >= sizeof(path2) ||              strlcat(path1, "/diff1.XXXXXXXXXX", sizeof(path1)) >= sizeof(path1))
             strlcpy(path3, "/tmp/diff3.XXXXXXXXXX", sizeof(path3)) >= sizeof(path3))  
                 errx(1, "rcs_diff3: string truncated");                  errx(1, "rcs_diff3: string truncated");
   
           if (strlcpy(path2, rcs_tmpdir, sizeof(path2)) >= sizeof(path2) ||
               strlcat(path2, "/diff2.XXXXXXXXXX", sizeof(path2)) >= sizeof(path2))
                   errx(1, "rcs_diff3: string truncated");
   
           if (strlcpy(path3, rcs_tmpdir, sizeof(path3)) >= sizeof(path3) ||
               strlcat(path3, "/diff3.XXXXXXXXXX", sizeof(path3)) >= sizeof(path3))
                   errx(1, "rcs_diff3: string truncated");
   
         rcs_buf_write_stmp(b1, path1, 0600);          rcs_buf_write_stmp(b1, path1, 0600);
         rcs_buf_write_stmp(b2, path2, 0600);          rcs_buf_write_stmp(b2, path2, 0600);
         rcs_buf_write_stmp(b3, path3, 0600);          rcs_buf_write_stmp(b3, path3, 0600);
Line 201 
Line 207 
         rcs_diffreg(path1, path3, d1);          rcs_diffreg(path1, path3, d1);
         rcs_diffreg(path2, path3, d2);          rcs_diffreg(path2, path3, d2);
   
         if (strlcpy(dp13, "/tmp/d13.XXXXXXXXXX", sizeof(dp13)) >= sizeof(dp13))          if (strlcpy(dp13, rcs_tmpdir, sizeof(dp13)) >= sizeof(dp13) ||
               strlcat(dp13, "/d13.XXXXXXXXXX" , sizeof(dp13)) >= sizeof(dp13))
                 errx(1, "rcs_diff3: string truncated");                  errx(1, "rcs_diff3: string truncated");
   
         rcs_buf_write_stmp(d1, dp13, 0600);          rcs_buf_write_stmp(d1, dp13, 0600);
   
         rcs_buf_free(d1);          rcs_buf_free(d1);
         d1 = NULL;          d1 = NULL;
   
         if (strlcpy(dp23, "/tmp/d23.XXXXXXXXXX", sizeof(dp23)) >= sizeof(dp23))          if (strlcpy(dp23, rcs_tmpdir, sizeof(dp23)) >= sizeof(dp23) ||
               strlcat(dp23, "/d23.XXXXXXXXXX", sizeof(dp23)) >= sizeof(dp23))
                 errx(1, "rcs_diff3: string truncated");                  errx(1, "rcs_diff3: string truncated");
   
         rcs_buf_write_stmp(d2, dp23, 0600);          rcs_buf_write_stmp(d2, dp23, 0600);
   
         rcs_buf_free(d2);          rcs_buf_free(d2);

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4