summaryrefslogtreecommitdiffstats
path: root/filter.h
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2011-09-26 20:22:06 -0700
committerKaz Kylheku <kaz@kylheku.com>2011-09-26 20:22:06 -0700
commit070d3dfe7759943406cd76e7aebe72bf92ab3503 (patch)
tree254d02889a993cb4caeb568422291e7cf2726cca /filter.h
parentf3fe0151fc4116f0fec40e7454d8866f11908560 (diff)
downloadtxr-070d3dfe7759943406cd76e7aebe72bf92ab3503.tar.gz
txr-070d3dfe7759943406cd76e7aebe72bf92ab3503.tar.bz2
txr-070d3dfe7759943406cd76e7aebe72bf92ab3503.zip
New feature: @(deffilter)
Bugfix in @(throw) when non-symbol is thrown: exception message referred to the symbol throw rather than the erroneous object. * filter.c (build_filter_from_list, register_filter): New functions. * filter.h (register_filter): New function declared. * lib.c (deffilter_s): New variable defined. (chain): Function changed from single list argument to variable argument list to reduce the complexity of use. (do_and, and): New functions. (obj_init): deffilter_s initializatio added. * lib.h (deffilter_s, and): New declarations. (chain): Declaration updated to new function signature. (eq): Changed from macro to inline function. * match.c (do_output_line): Simplified expression involving chain. (do_output): Likewise. (match_files): Bugfix in error handling of throw. Implementation of deffilter. * txr.1: Documented deffilter.
Diffstat (limited to 'filter.h')
-rw-r--r--filter.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/filter.h b/filter.h
index dca864a3..40602f51 100644
--- a/filter.h
+++ b/filter.h
@@ -32,5 +32,6 @@ val trie_value_at(val node);
val trie_lookup_feed_char(val node, val ch);
val get_filter_trie(val sym);
val filter_string(val trie, val str);
+val register_filter(val sym, val table);
void filter_init(void);