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

Diff for /src/usr.bin/cvs/diff.c between version 1.1 and 1.2

version 1.1, 2004/07/13 22:02:40 version 1.2, 2004/07/14 03:59:36
Line 247 
Line 247 
 static int context, status;  static int context, status;
 static int format = D_NORMAL;  static int format = D_NORMAL;
 static struct stat stb1, stb2;  static struct stat stb1, stb2;
 static char *ifdefname, *diffargs, *ignore_pats, *diff_file;  static char *ifdefname, *ignore_pats, diffargs[128];
   static const char *diff_file;
 regex_t ignore_re;  regex_t ignore_re;
   
 static int  *J;                 /* will be overlaid on class */  static int  *J;                 /* will be overlaid on class */
Line 354 
Line 355 
         char dir[MAXPATHLEN], file[MAXPATHLEN], *d1, *d2, *r1, *r2;          char dir[MAXPATHLEN], file[MAXPATHLEN], *d1, *d2, *r1, *r2;
   
         context = CVS_DIFF_DEFCTX;          context = CVS_DIFF_DEFCTX;
           strlcpy(diffargs, argv[0], sizeof(diffargs));
   
         d1 = d2 = NULL;          d1 = d2 = NULL;
         r1 = r2 = NULL;          r1 = r2 = NULL;
Line 362 
Line 364 
         while ((ch = getopt(argc, argv, "cD:lir:u")) != -1) {          while ((ch = getopt(argc, argv, "cD:lir:u")) != -1) {
                 switch (ch) {                  switch (ch) {
                 case 'c':                  case 'c':
                           strlcat(diffargs, " -c", sizeof(diffargs));
                         format = D_CONTEXT;                          format = D_CONTEXT;
                         break;                          break;
                 case 'D':                  case 'D':
Line 376 
Line 379 
                         }                          }
                         break;                          break;
                 case 'l':                  case 'l':
                           strlcat(diffargs, " -l", sizeof(diffargs));
                         recurse = 0;                          recurse = 0;
                         break;                          break;
                 case 'i':                  case 'i':
                           strlcat(diffargs, " -i", sizeof(diffargs));
                         iflag = 1;                          iflag = 1;
                         break;                          break;
                 case 'r':                  case 'r':
Line 394 
Line 399 
                         }                          }
                         break;                          break;
                 case 'u':                  case 'u':
                           strlcat(diffargs, " -u", sizeof(diffargs));
                         format = D_UNIFIED;                          format = D_UNIFIED;
                         break;                          break;
                 default:                  default:
Line 577 
Line 583 
                         b2 = cvs_buf_load(path, BUF_AUTOEXT);                          b2 = cvs_buf_load(path, BUF_AUTOEXT);
                 }                  }
   
                 printf("%s\n", diffargs);                  printf("%s", diffargs);
                   printf(" -r%s", buf);
                   if (rev2 != NULL)
                           printf(" -r%s", rev2);
                   printf(" %s\n", path);
                 cvs_buf_write(b1, "/tmp/diff1", 0600);                  cvs_buf_write(b1, "/tmp/diff1", 0600);
                 cvs_buf_write(b2, "/tmp/diff2", 0600);                  cvs_buf_write(b2, "/tmp/diff2", 0600);
                 cvs_diffreg("/tmp/diff1", "/tmp/diff2");                  cvs_diffreg("/tmp/diff1", "/tmp/diff2");

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2