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

Diff for /src/usr.bin/last/last.c between version 1.22 and 1.23

version 1.22, 2003/04/06 18:40:14 version 1.23, 2003/04/14 02:04:58
Line 567 
Line 567 
 /*  /*
  * dateconv --   * dateconv --
  * Convert the snapshot time in command line given in the format   * Convert the snapshot time in command line given in the format
  *      [[CC]YY][MMDD]hhmm[.SS]] to a time_t.   *      [[[CC]YY]MMDD]hhmm[.SS]] to a time_t.
  *      Derived from atime_arg1() in usr.bin/touch/touch.c   *      Derived from atime_arg1() in usr.bin/touch/touch.c
  */   */
 time_t  time_t
Line 585 
Line 585 
         if ((t = localtime(&timet)) == NULL)          if ((t = localtime(&timet)) == NULL)
                 err(1, "localtime");                  err(1, "localtime");
   
         /* [[CC]YY][MMDD]hhmm[.SS] */          /* [[[CC]YY]MMDD]hhmm[.SS] */
         if ((p = strchr(arg, '.')) == NULL)          if ((p = strchr(arg, '.')) == NULL)
                 t->tm_sec = 0;          /* Seconds defaults to 0. */                  t->tm_sec = 0;          /* Seconds defaults to 0. */
         else {          else {
Line 633 
Line 633 
         timet = mktime(t);          timet = mktime(t);
         if (timet == -1)          if (timet == -1)
 terr:      errx(1,  terr:      errx(1,
         "out of range or illegal time specification: [[CC]YY][MMDD]hhmm[.SS]");          "out of range or illegal time specification: [[[CC]YY[MMDD]hhmm[.SS]");
         return (timet);          return (timet);
 }  }
   
Line 663 
Line 663 
   
         fprintf(stderr,          fprintf(stderr,
             "usage: %s [-#] [-csT] [-f file] [-t tty] [-h host]"              "usage: %s [-#] [-csT] [-f file] [-t tty] [-h host]"
             " [-d [[CC]YY][MMDD]hhmm[.SS]] [user ...]\n", __progname);              " [-d [[[CC]YY]MMDD]hhmm[.SS]] [user ...]\n", __progname);
         exit(1);          exit(1);
 }  }

Legend:
Removed from v.1.22  
changed lines
  Added in v.1.23