documentation/3196: Last(1) typo >Number: 3196
net
>Environment:
System : OpenBSD 3.3
Architecture: OpenBSD.i386
Machine : i386
>Description:
There is a minor problem in the last(1) man page and code comments
that I would like to see updated at some point
>How-To-Repeat:
Read the man page or source code
>Fix:
Two unified diffs follow
- /usr/src/usr.bin/last/last.1 Sun Dec 17 15:33:01 2000
+++ ./last.1 Thu Apr 10 18:49:08 2003
@@ -47,7 +47,7 @@
.Op Fl f Ar file
.Op Fl h Ar host
.Op Fl t Ar tty
-.Op Fl d Ar [[CC]YY][MMDD]hhmm[.SS]
+.Op Fl d Ar [[[CC]YY]MMDD]hhmm[.SS]
.Op Ar user ...
.Sh DESCRIPTION
The
@@ -111,7 +111,7 @@
.Fl n
are ignored.
The argument should be in the form
-.Dq [[CC]YY][MMDD]hhmm[.SS]
+.Dq [[[CC]YY]MMDD]hhmm[.SS]
where each pair of letters represents the following:
.Pp
.Bl -tag -width Ds -compact -offset indent
@@ -149,6 +149,12 @@
.Dq YY
letter pairs are not specified, the values default to the current
year.
+If the
+.Dq MM
+and
+.Dq DD
+letter pairs are not specified, the values default to the current
+month and day.
If the
.Dq SS
letter pair is not specified, the value defaults to 0.
- /usr/src/usr.bin/last/last.c Sun Apr 6 21:35:14 2003
+++ ./last.c Wed Apr 9 11:43:11 2003
@@ -567,7 +567,7 @@
/*
- dateconv --
- 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
*/
time_t
@@ -585,7 +585,7 @@
if ((t = localtime(&timet)) == NULL)
err(1, "localtime");
- /* [[CC]YY][MMDD]hhmm[.SS] */
+ /* [[[CC]YY]MMDD]hhmm[.SS] */
if ((p = strchr(arg, '.')) == NULL)
t->tm_sec = 0; /* Seconds defaults to 0. */
else {
@@ -633,7 +633,7 @@
timet = mktime(t);
if (timet == -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);
}
@@ -663,6 +663,6 @@
fprintf(stderr,
"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);
}
>Release-Note:
Received on Thu Apr 10 20:16:23 2003
This archive was generated by hypermail 2.1.8
: Wed Aug 23 2006 - 13:29:53 EDT
|