summaryrefslogtreecommitdiff
path: root/usr.bin/at
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>1998-06-26 03:20:12 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>1998-06-26 03:20:12 +0000
commita6b2931862361377baeaf1f2a5b8f3e89784992a (patch)
treefbcf1893fd564c6d5cc73ebd5be35ebfd87240de /usr.bin/at
parent09e6ac4d5e052b2b0de6b46fe59c43d6e6373e78 (diff)
make 'now' work as a timespec
Diffstat (limited to 'usr.bin/at')
-rw-r--r--usr.bin/at/parsetime.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/usr.bin/at/parsetime.c b/usr.bin/at/parsetime.c
index d7ee161bbf8..a8f80fbabbc 100644
--- a/usr.bin/at/parsetime.c
+++ b/usr.bin/at/parsetime.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: parsetime.c,v 1.4 1997/03/01 23:40:10 millert Exp $ */
+/* $OpenBSD: parsetime.c,v 1.5 1998/06/26 03:20:11 millert Exp $ */
/* $NetBSD: parsetime.c,v 1.3 1995/03/25 18:13:36 glass Exp $ */
/*
@@ -137,7 +137,7 @@ static int sc_tokid; /* scanner - token id */
static int sc_tokplur; /* scanner - is token plural? */
#ifndef lint
-static char rcsid[] = "$OpenBSD: parsetime.c,v 1.4 1997/03/01 23:40:10 millert Exp $";
+static char rcsid[] = "$OpenBSD: parsetime.c,v 1.5 1998/06/26 03:20:11 millert Exp $";
#endif
/* Local functions */
@@ -594,7 +594,13 @@ parsetime(argc, argv)
switch (token()) {
case NOW: /* now is optional prefix for PLUS tree */
- expect(PLUS);
+ token();
+ if (sc_tokid == EOF) {
+ runtime = nowtime;
+ break;
+ }
+ else if (sc_tokid != PLUS)
+ plonk(sc_tokid);
case PLUS:
plus(&runtime);
break;