summaryrefslogtreecommitdiffstats
path: root/filter/config.Y
diff options
context:
space:
mode:
authorPavel Machek <pavel@ucw.cz>2000-04-26 10:03:50 +0200
committerPavel Machek <pavel@ucw.cz>2000-04-26 10:03:50 +0200
commit7a86a8b08db03f002a672d1e8a6481ad52114d1e (patch)
tree8836e9031a335c91a27ff89b238cf17f008a7a53 /filter/config.Y
parent471bd6c30bb0d172699ea7af8f8b9356c8fe48b3 (diff)
downloadbird-7a86a8b08db03f002a672d1e8a6481ad52114d1e.tar
bird-7a86a8b08db03f002a672d1e8a6481ad52114d1e.zip
Added code for testing filters.
Diffstat (limited to 'filter/config.Y')
-rw-r--r--filter/config.Y6
1 files changed, 5 insertions, 1 deletions
diff --git a/filter/config.Y b/filter/config.Y
index 2572501..ffb9a74 100644
--- a/filter/config.Y
+++ b/filter/config.Y
@@ -206,10 +206,14 @@ function_body:
CF_ADDTO(conf, function_def)
function_def:
FUNCTION SYM { DBG( "Begining of function %s\n", $2->name ); cf_push_scope($2); } function_params function_body {
- extern struct f_inst *startup_func;
+ extern struct f_inst *startup_func, *test1_func, *test2_func;
cf_define_symbol($2, SYM_FUNCTION, $5);
if (!strcasecmp($2->name, "__startup"))
startup_func = $5;
+ if (!strcasecmp($2->name, "__test1"))
+ test1_func = $5;
+ if (!strcasecmp($2->name, "__test2"))
+ test2_func = $5;
$2->aux = (int) $4;
$2->aux2 = $5;
DBG("Hmm, we've got one function here - %s\n", $2->name);