0
0
mirror of https://gitlab.nic.cz/labs/bird.git synced 2024-11-17 08:38:42 +00:00

Made `datetime' more user friendly. Now it should be a quoted string

of type "dd-mm-yyyy".
This commit is contained in:
Martin Mares 2000-03-01 11:42:13 +00:00
parent db1326aa5e
commit aee539f241
2 changed files with 11 additions and 7 deletions

4
TODO
View File

@ -18,10 +18,7 @@ Core
- netlink: import Linux route attributes to our rta's, so that they can be filtered? - netlink: import Linux route attributes to our rta's, so that they can be filtered?
- config: executable config files
- config: when parsing prefix, check zero bits - config: when parsing prefix, check zero bits
- config: useless rules when protocols disabled
- config: better datetime format
- krt: rescan interfaces when route addition fails? - krt: rescan interfaces when route addition fails?
@ -56,6 +53,7 @@ Globals
Various ideas Various ideas
~~~~~~~~~~~~~ ~~~~~~~~~~~~~
- config: executable config files
- client: access control - client: access control
- IPv6 router advertisements - IPv6 router advertisements
- real multipath (doesn't seem to be simple at all :() - real multipath (doesn't seem to be simple at all :()

View File

@ -1,7 +1,7 @@
/* /*
* BIRD -- Configuration Parser Top * BIRD -- Configuration Parser Top
* *
* (c) 1998--1999 Martin Mares <mj@ucw.cz> * (c) 1998--2000 Martin Mares <mj@ucw.cz>
* *
* Can be freely distributed and used under the terms of the GNU GPL. * Can be freely distributed and used under the terms of the GNU GPL.
*/ */
@ -37,6 +37,7 @@ CF_DECLS
struct password_item *p; struct password_item *p;
struct rt_show_data *ra; struct rt_show_data *ra;
void *g; void *g;
bird_clock_t time;
} }
%token END CLI_MARKER INVALID_TOKEN %token END CLI_MARKER INVALID_TOKEN
@ -46,7 +47,8 @@ CF_DECLS
%token <s> SYM %token <s> SYM
%token <t> TEXT %token <t> TEXT
%type <i> expr bool pxlen datetime %type <i> expr bool pxlen
%type <time> datetime
%nonassoc '=' '<' '>' '~' '.' %nonassoc '=' '<' '>' '~' '.'
%left '+' '-' %left '+' '-'
@ -115,8 +117,12 @@ pxlen:
} }
; ;
datetime: /* Return seconds from epoch, FIXME we want be more user friendly */ datetime: /* Return seconds from epoch, FIXME we want be more user friendly */
NUM { $$ = $1; } TEXT {
$$ = tm_parse_date($1);
if (!$$)
cf_error("Invalid date");
}
; ;
CF_CODE CF_CODE