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

Diff for /src/usr.bin/rcs/rcsdiff.c between version 1.51 and 1.52

version 1.51, 2006/04/19 06:53:41 version 1.52, 2006/04/21 14:18:26
Line 58 
Line 58 
                 case 'k':                  case 'k':
                         kflag = rcs_kflag_get(rcs_optarg);                          kflag = rcs_kflag_get(rcs_optarg);
                         if (RCS_KWEXP_INVAL(kflag)) {                          if (RCS_KWEXP_INVAL(kflag)) {
                                 cvs_log(LP_ERR,                                  warnx("invalid RCS keyword expansion mode");
                                     "invalid RCS keyword expansion mode");  
                                 (usage)();                                  (usage)();
                                 exit(1);                                  exit(1);
                         }                          }
Line 104 
Line 103 
         argv += rcs_optind;          argv += rcs_optind;
   
         if (argc == 0) {          if (argc == 0) {
                 cvs_log(LP_ERR, "no input file");                  warnx("no input file");
                 (usage)();                  (usage)();
                 exit(1);                  exit(1);
         }          }
Line 193 
Line 192 
         diff_rev2 = NULL;          diff_rev2 = NULL;
   
         if (stat(filename, &st) == -1) {          if (stat(filename, &st) == -1) {
                 cvs_log(LP_ERRNO, "%s", filename);                  warn("%s", filename);
                 goto out;                  goto out;
         }          }
   
Line 204 
Line 203 
         }          }
   
         if ((b1 = rcs_getrev(file, rev)) == NULL) {          if ((b1 = rcs_getrev(file, rev)) == NULL) {
                 cvs_log(LP_ERR, "failed to retrieve revision %s", rbuf);                  warnx("failed to retrieve revision %s", rbuf);
                 goto out;                  goto out;
         }          }
   
Line 213 
Line 212 
         tv[1].tv_sec = tv[0].tv_sec;          tv[1].tv_sec = tv[0].tv_sec;
   
         if ((b2 = cvs_buf_load(filename, BUF_AUTOEXT)) == NULL) {          if ((b2 = cvs_buf_load(filename, BUF_AUTOEXT)) == NULL) {
                 cvs_log(LP_ERR, "failed to load file: '%s'", filename);                  warnx("failed to load file: `%s'", filename);
                 goto out;                  goto out;
         }          }
   
Line 232 
Line 231 
         b1 = NULL;          b1 = NULL;
   
         if (utimes(path1, (const struct timeval *)&tv) < 0)          if (utimes(path1, (const struct timeval *)&tv) < 0)
                 cvs_log(LP_ERRNO, "error setting utimes");                  warn("utimes");
   
         strlcpy(path2, rcs_tmpdir, sizeof(path2));          strlcpy(path2, rcs_tmpdir, sizeof(path2));
         strlcat(path2, "/diff2.XXXXXXXXXX", sizeof(path2));          strlcat(path2, "/diff2.XXXXXXXXXX", sizeof(path2));
Line 242 
Line 241 
         b2 = NULL;          b2 = NULL;
   
         if (utimes(path2, (const struct timeval *)&tv2) < 0)          if (utimes(path2, (const struct timeval *)&tv2) < 0)
                 cvs_log(LP_ERRNO, "error setting utimes");                  warn("utimes");
   
         cvs_diffreg(path1, path2, NULL);          cvs_diffreg(path1, path2, NULL);
         ret = 0;          ret = 0;
Line 278 
Line 277 
                 fprintf(stderr, "retrieving revision %s\n", rbuf1);                  fprintf(stderr, "retrieving revision %s\n", rbuf1);
   
         if ((b1 = rcs_getrev(file, rev1)) == NULL) {          if ((b1 = rcs_getrev(file, rev1)) == NULL) {
                 cvs_log(LP_ERR, "failed to retrieve revision %s", rbuf1);                  warnx("failed to retrieve revision %s", rbuf1);
                 goto out;                  goto out;
         }          }
   
Line 291 
Line 290 
                 fprintf(stderr, "retrieving revision %s\n", rbuf2);                  fprintf(stderr, "retrieving revision %s\n", rbuf2);
   
         if ((b2 = rcs_getrev(file, rev2)) == NULL) {          if ((b2 = rcs_getrev(file, rev2)) == NULL) {
                 cvs_log(LP_ERR, "failed to retrieve revision %s", rbuf2);                  warnx("failed to retrieve revision %s", rbuf2);
                 goto out;                  goto out;
         }          }
   
Line 310 
Line 309 
         b1 = NULL;          b1 = NULL;
   
         if (utimes(path1, (const struct timeval *)&tv) < 0)          if (utimes(path1, (const struct timeval *)&tv) < 0)
                 cvs_log(LP_ERRNO, "error setting utimes");                  warn("utimes");
   
         strlcpy(path2, rcs_tmpdir, sizeof(path2));          strlcpy(path2, rcs_tmpdir, sizeof(path2));
         strlcat(path2, "/diff2.XXXXXXXXXX", sizeof(path2));          strlcat(path2, "/diff2.XXXXXXXXXX", sizeof(path2));
Line 320 
Line 319 
         b2 = NULL;          b2 = NULL;
   
         if (utimes(path2, (const struct timeval *)&tv2) < 0)          if (utimes(path2, (const struct timeval *)&tv2) < 0)
                 cvs_log(LP_ERRNO, "error setting utimes");                  warn("utimes");
   
         cvs_diffreg(path1, path2, NULL);          cvs_diffreg(path1, path2, NULL);
         ret = 0;          ret = 0;

Legend:
Removed from v.1.51  
changed lines
  Added in v.1.52