summaryrefslogtreecommitdiffstats
path: root/filter
diff options
context:
space:
mode:
authorOndrej Filip <feela@network.cz>2011-09-11 21:21:47 +0200
committerOndrej Filip <feela@network.cz>2011-09-11 21:21:47 +0200
commit48ec367aabaaa5328f4072d237001e245a7363df (patch)
tree9a65d5e1b051ff6aa24cd036ff1930bcb370fb8b /filter
parenta98995273bd8788cf525f44479026d5ce6b7dd52 (diff)
downloadbird-48ec367aabaaa5328f4072d237001e245a7363df.tar
bird-48ec367aabaaa5328f4072d237001e245a7363df.zip
Configuration can include other files.
Diffstat (limited to 'filter')
-rw-r--r--filter/f-util.c2
-rw-r--r--filter/test.conf3
-rw-r--r--filter/test.conf.inc6
3 files changed, 10 insertions, 1 deletions
diff --git a/filter/f-util.c b/filter/f-util.c
index 4a2a94b..9f2eb6b 100644
--- a/filter/f-util.c
+++ b/filter/f-util.c
@@ -19,7 +19,7 @@ f_new_inst(void)
ret = cfg_alloc(sizeof(struct f_inst));
ret->code = ret->aux = 0;
ret->arg1 = ret->arg2 = ret->next = NULL;
- ret->lineno = conf_lino;
+ ret->lineno = ifs->conf_lino;
return ret;
}
diff --git a/filter/test.conf b/filter/test.conf
index 19372f2..4f09637 100644
--- a/filter/test.conf
+++ b/filter/test.conf
@@ -329,6 +329,9 @@ string s;
test_undef(3);
test_undef(2);
+ print "Testing include";
+ include "test.conf.inc";
+
print "done";
quitbird;
# print "*** FAIL: this is unreachable";
diff --git a/filter/test.conf.inc b/filter/test.conf.inc
new file mode 100644
index 0000000..10fc701
--- /dev/null
+++ b/filter/test.conf.inc
@@ -0,0 +1,6 @@
+
+print "Entering include";
+print "Should be 2: ", 1+1;
+print "Leaving include";
+
+