[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.24 and 1.25

version 1.24, 2005/10/13 12:35:30 version 1.25, 2005/10/13 22:54:46
Line 47 
Line 47 
 #define LOCK_LOCK       1  #define LOCK_LOCK       1
 #define LOCK_UNLOCK     2  #define LOCK_UNLOCK     2
   
   #define DATE_NOW        -1
   #define DATE_MTIME      -2
   
 static char * checkin_diff_file(RCSFILE *, RCSNUM *, const char *);  static char * checkin_diff_file(RCSFILE *, RCSNUM *, const char *);
 static char * checkin_getlogmsg(char *, char *, RCSNUM *, RCSNUM *);  static char * checkin_getlogmsg(char *, char *, RCSNUM *, RCSNUM *);
   
Line 69 
Line 72 
 {  {
         int i, ch, flags, lkmode, interactive, rflag, status;          int i, ch, flags, lkmode, interactive, rflag, status;
         mode_t fmode;          mode_t fmode;
         time_t date = -1;          time_t date = DATE_NOW;
         RCSFILE *file;          RCSFILE *file;
         RCSNUM *frev, *newrev;          RCSNUM *frev, *newrev;
         char fpath[MAXPATHLEN];          char fpath[MAXPATHLEN];
Line 89 
Line 92 
                 exit(1);                  exit(1);
         }          }
   
         while ((ch = rcs_getopt(argc, argv, "j:l::M:N:qu::d:r::m:k:V")) != -1) {          while ((ch = rcs_getopt(argc, argv, "j:l::M:N:qu::d::r::m:k:V")) != -1) {
                 switch (ch) {                  switch (ch) {
                 case 'd':                  case 'd':
                         if ((date = cvs_date_parse(rcs_optarg)) <= 0) {                          if (rcs_optarg == NULL)
                                   date = DATE_MTIME;
                           else if ((date = cvs_date_parse(rcs_optarg)) <= 0) {
                                 cvs_log(LP_ERR, "invalide date");                                  cvs_log(LP_ERR, "invalide date");
                                 exit(1);                                  exit(1);
                         }                          }
Line 240 
Line 245 
                         cvs_log(LP_ERR,                          cvs_log(LP_ERR,
                             "failed to set new rd_text for head rev");                              "failed to set new rd_text for head rev");
                         exit (1);                          exit (1);
                   }
                   /*
                    * Set the date of the revision to be the last modification time
                    * of the working file if -d is specified without an argument.
                    */
                   if (date == DATE_MTIME) {
                           struct stat sb;
                           if (stat(argv[i], &sb) != 0) {
                                   cvs_log(LP_ERRNO, "failed to stat: `%s'", argv[i]);
                                   rcs_close(file);
                                   continue;
                           }
                           date = (time_t)sb.st_mtimespec.tv_sec;
                 }                  }
                 /*                  /*
                  * Now add our new revision                   * Now add our new revision

Legend:
Removed from v.1.24  
changed lines
  Added in v.1.25