diff options
author | 1998-06-26 03:20:11 +0000 | |
---|---|---|
committer | 1998-06-26 03:20:11 +0000 | |
commit | 6cb3b6d6372f180af064dcaa11baf90fd2b9788e (patch) | |
tree | d19e18441fca3322f1fb736f355086b093155f1b | |
parent | add FILES section (diff) | |
download | wireguard-openbsd-6cb3b6d6372f180af064dcaa11baf90fd2b9788e.tar.xz wireguard-openbsd-6cb3b6d6372f180af064dcaa11baf90fd2b9788e.zip |
make 'now' work as a timespec
-rw-r--r-- | usr.bin/at/parsetime.c | 12 |
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; |