summaryrefslogtreecommitdiffstats
path: root/lib.h
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2011-10-18 00:26:07 -0400
committerKaz Kylheku <kaz@kylheku.com>2011-10-18 00:26:07 -0400
commite8c1b45226fcd493c1faf18bbc2c3cc668b01141 (patch)
treeed0564d7c0dbd766bd2bfb27d335c88ed08dc26e /lib.h
parent3cdd67db736815caafc8007df6930777691316a4 (diff)
downloadtxr-e8c1b45226fcd493c1faf18bbc2c3cc668b01141.tar.gz
txr-e8c1b45226fcd493c1faf18bbc2c3cc668b01141.tar.bz2
txr-e8c1b45226fcd493c1faf18bbc2c3cc668b01141.zip
Task #11425.
Vertical skip directive moved into function dispatched via hash table. Test suite passes. * lib.c (cptr_s): New symbol variable. (cptr_equal_op): New static function. (cptr_equal_op, cptr, cptr_get): New functions. (cptr_ops): New static structure. (obj_init): New variable initialized. * lib.h (cptr_s, cptr, cptr_get): Declared. * match.c (decline_k, same_data_k): New symbol variables. (v_match_func): New typedef. (v_skip): New function. (match_files): Check symbol in v_directive_table and dispatch the associated function if an entry exists. Skip directive handling moved to v_skip function. (syms_init): Initialize new symbol variables. (dir_tables_init): Enter v_skip into v_directive_table under skip_s symbol.
Diffstat (limited to 'lib.h')
-rw-r--r--lib.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib.h b/lib.h
index 7255e4f1..a132296c 100644
--- a/lib.h
+++ b/lib.h
@@ -240,7 +240,7 @@ INLINE val chr(wchar_t ch)
extern val keyword_package, system_package, user_package;
extern val null, t, cons_s, str_s, chr_s, num_s, sym_s, pkg_s, fun_s, vec_s;
-extern val stream_s, hash_s, hash_iter_s, lcons_s, lstr_s, cobj_s;
+extern val stream_s, hash_s, hash_iter_s, lcons_s, lstr_s, cobj_s, cptr_s;
extern val var_s, expr_s, regex_s, chset_s, set_s, cset_s, wild_s, oneplus_s;
extern val nongreedy_s, compiled_regex_s;
extern val zeroplus_s, optional_s, compl_s, compound_s, or_s, and_s, quasi_s;
@@ -403,6 +403,8 @@ val length_str_le(val str, val len);
val cobj(mem_t *handle, val cls_sym, struct cobj_ops *ops);
val cobjp(val obj);
mem_t *cobj_handle(val cobj, val cls_sym);
+val cptr(mem_t *ptr);
+mem_t *cptr_get(val cptr);
val assoc(val list, val key);
val acons(val list, val car, val cdr);
val acons_new(val list, val key, val value);