From 48ec367aabaaa5328f4072d237001e245a7363df Mon Sep 17 00:00:00 2001 From: Ondrej Filip Date: Sun, 11 Sep 2011 21:21:47 +0200 Subject: Configuration can include other files. --- filter/f-util.c | 2 +- filter/test.conf | 3 +++ filter/test.conf.inc | 6 ++++++ 3 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 filter/test.conf.inc (limited to 'filter') 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"; + + -- cgit v1.2.3