summaryrefslogtreecommitdiff
path: root/conf/cf-lex.l
diff options
context:
space:
mode:
authorMartin Mares <mj@ucw.cz>1999-11-15 11:35:41 +0000
committerMartin Mares <mj@ucw.cz>1999-11-15 11:35:41 +0000
commit944f008af7a46144e38f963097e8e4cce493e2a7 (patch)
treeb6821d20d592a846477dccef76608f7c135bab5a /conf/cf-lex.l
parentcbc31830079fb5e49c14c3de446b10ed8da99ce0 (diff)
Defined CF_ENUM.
Diffstat (limited to 'conf/cf-lex.l')
-rw-r--r--conf/cf-lex.l14
1 files changed, 11 insertions, 3 deletions
diff --git a/conf/cf-lex.l b/conf/cf-lex.l
index 797dbeac..5959e701 100644
--- a/conf/cf-lex.l
+++ b/conf/cf-lex.l
@@ -9,14 +9,14 @@
%{
#undef REJECT /* Avoid name clashes */
-#include "filter/filter.h"
-
#include <errno.h>
#include <stdlib.h>
#include <string.h>
#include <stdarg.h>
#include "nest/bird.h"
+#include "nest/route.h"
+#include "filter/filter.h"
#include "conf/conf.h"
#include "conf/cf-parse.tab.h"
@@ -119,7 +119,15 @@ WHITE [ \t]
while (k)
{
if (!strcmp(k->name, yytext))
- return k->value;
+ {
+ if (k->value > 0)
+ return k->value;
+ else
+ {
+ cf_lval.i = -k->value;
+ return ENUM;
+ }
+ }
k=k->next;
}
cf_lval.s = cf_find_sym(yytext, h);