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

Diff for /src/usr.bin/rcs/ci.c between version 1.112 and 1.113

version 1.112, 2006/03/08 20:19:39 version 1.113, 2006/03/10 11:51:19
Line 480 
Line 480 
         if (pb->date != DATE_NOW) {          if (pb->date != DATE_NOW) {
                 time_t head_date = rcs_rev_getdate(pb->file, pb->frev);                  time_t head_date = rcs_rev_getdate(pb->file, pb->frev);
                 if (pb->date <= head_date) {                  if (pb->date <= head_date) {
                         char *head_date_str, *tdate;                          char dbuf1[256], dbuf2[256], *fmt;
                         head_date_str = xstrdup(ctime(&head_date));                          struct tm *t, *t_head;
                         head_date_str[strlen(head_date_str) - 1] = '\0';  
                         tdate = xstrdup(ctime(&pb->date));                          fmt = "%Y/%m/%d %H:%M:%S";
                         tdate[strlen(tdate) - 1] = '\0';  
                         cvs_log(LP_ERR,                          t = localtime(&pb->date);
                             "%s: Date %s preceeds %s in revision %s",                          strftime(dbuf1, sizeof(dbuf1), fmt, t);
                             pb->file->rf_path, tdate, head_date_str,                          t_head = localtime(&head_date);
                           strftime(dbuf2, sizeof(dbuf2), fmt, t_head);
   
                           fatal("%s: Date %s preceeds %s in revision %s.",
                               pb->file->rf_path, dbuf1, dbuf2,
                             rcsnum_tostr(pb->frev, numb2, sizeof(numb2)));                              rcsnum_tostr(pb->frev, numb2, sizeof(numb2)));
                         rcs_close(pb->file);  
                         xfree(head_date_str);  
                         xfree(tdate);  
                         return (-1);  
                 }                  }
         }          }
   

Legend:
Removed from v.1.112  
changed lines
  Added in v.1.113