[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.60 and 1.61

version 1.60, 2005/11/17 00:03:04 version 1.61, 2005/11/17 00:16:35
Line 72 
Line 72 
 static char * checkin_getlogmsg(RCSNUM *, RCSNUM *);  static char * checkin_getlogmsg(RCSNUM *, RCSNUM *);
 static void   checkin_init(struct checkin_params *);  static void   checkin_init(struct checkin_params *);
 static void   checkin_revert(struct checkin_params *pb);  static void   checkin_revert(struct checkin_params *pb);
   static int    checkin_setrevdate(struct checkin_params *pb);
   
 void  void
 checkin_usage(void)  checkin_usage(void)
Line 325 
Line 326 
                  * Set the date of the revision to be the last modification                   * Set the date of the revision to be the last modification
                  * time of the working file if -d has no argument.                   * time of the working file if -d has no argument.
                  */                   */
                 if (pb.date == DATE_MTIME) {                  if (pb.date == DATE_MTIME
                         if (stat(pb.filename, &sb) != 0) {                      && (checkin_setrevdate(&pb) < 0))
                                 cvs_log(LP_ERRNO, "failed to stat: `%s'",                              continue;
                                     pb.filename);  
                                 rcs_close(pb.file);  
                                 continue;  
                         }  
                         pb.date = (time_t)sb.st_mtimespec.tv_sec;  
                 }  
   
                 /*                  /*
                  * Now add our new revision                   * Now add our new revision
Line 673 
Line 669 
                 rcs_close(pb->file);                  rcs_close(pb->file);
                 return (-1);                  return (-1);
         }          }
           return (0);
   }
   
   /*
    * checkin_setrevdate()
    *
    * Set the date of the revision to be the last modification
    * time of the working file if -d has no argument.
    *
    * On success, return 0. On error return -1.
    */
   static int
   checkin_setrevdate(struct checkin_params *pb)
   {
           struct stat sb;
           if (stat(pb->filename, &sb) != 0) {
                   cvs_log(LP_ERRNO, "failed to stat: `%s'",
                       pb->filename);
                   rcs_close(pb->file);
                   return (-1);
           }
           pb->date = (time_t)sb.st_mtimespec.tv_sec;
         return (0);          return (0);
 }  }

Legend:
Removed from v.1.60  
changed lines
  Added in v.1.61