diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2011-10-01 22:33:10 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2011-10-01 22:33:10 -0700 |
commit | 28f2adb77ce853d675b964f427b16358343444d1 (patch) | |
tree | ec306883dfb55900380979ba9a85b0572a785130 | |
parent | fb042038bc10452110056efc99dac211aa4a6dc3 (diff) | |
download | txr-28f2adb77ce853d675b964f427b16358343444d1.tar.gz txr-28f2adb77ce853d675b964f427b16358343444d1.tar.bz2 txr-28f2adb77ce853d675b964f427b16358343444d1.zip |
Maintaining C++ compiling (except for two issues that will
need another commit).
* filter.c: Include "gc.h" for prototype of protect.
(struct filter_pair): Use const wchar_t *, so we can assign
literals.
(html_hex_continue): Ditto.
* lib.c (and): Function renamed to andf, since and is a C++
operator.
* lib.h (and): Declaration renamed.
* match.c (match_files): Use of and updated to andf.
-rw-r--r-- | ChangeLog | 17 | ||||
-rw-r--r-- | filter.c | 5 | ||||
-rw-r--r-- | lib.c | 2 | ||||
-rw-r--r-- | lib.h | 2 | ||||
-rw-r--r-- | match.c | 24 |
5 files changed, 34 insertions, 16 deletions
@@ -1,5 +1,22 @@ 2011-10-01 Kaz Kylheku <kaz@kylheku.com> + Maintaining C++ compiling (except for two issues that will + need another commit). + + * filter.c: Include "gc.h" for prototype of protect. + (struct filter_pair): Use const wchar_t *, so we can assign + literals. + (html_hex_continue): Ditto. + + * lib.c (and): Function renamed to andf, since and is a C++ + operator. + + * lib.h (and): Declaration renamed. + + * match.c (match_files): Use of and updated to andf. + +2011-10-01 Kaz Kylheku <kaz@kylheku.com> + HACKING: Clarified that --vg-debug is also needed to turn on on the Valgrind support at run-time, in addition to building it in. @@ -33,6 +33,7 @@ #include "hash.h" #include "unwind.h" #include "filter.h" +#include "gc.h" static val make_trie(void) { @@ -127,7 +128,7 @@ val get_filter_trie(val sym) } struct filter_pair { - wchar_t *key, *value; + const wchar_t *key, *value; }; static val build_filter(struct filter_pair *pair, val compress_p) @@ -483,7 +484,7 @@ static struct filter_pair from_html_table[] = { static val html_hex_continue(val hexlist, val ch) { - static wchar_t *hexdigs = L"0123456789ABCDEF"; + static const wchar_t *hexdigs = L"0123456789ABCDEF"; if (iswxdigit(c_chr(ch))) { return func_f1(cons(ch, hexlist), html_hex_continue); @@ -1515,7 +1515,7 @@ static val do_and(val fun1_list, val arg) return t; } -val and(val first_fun, ...) +val andf(val first_fun, ...) { va_list vl; list_collect_decl (out, iter); @@ -356,7 +356,7 @@ val reduce_left(val fun, val list, val init, val key); val bind2(val fun2, val arg); val bind2other(val fun2, val arg2); val chain(val first_fun, ...); -val and(val first_fun, ...); +val andf(val first_fun, ...); val vector(val alloc); val vec_get_fill(val vec); val vec_set_fill(val vec, val fill); @@ -1942,18 +1942,18 @@ repeat_spec_same_data: sem_error(spec_linenum, lit("deffilter: ~a is not a symbol"), first(first_spec), nao); - if (!all_satisfy(table, and(func_n1(listp), - chain(func_n1(length), - bind2(func_n2(eq), two), - nao), - chain(func_n1(first), - func_n1(stringp), - nao), - chain(func_n1(second), - func_n1(stringp), - nao), - nao), - nil)) + if (!all_satisfy(table, andf(func_n1(listp), + chain(func_n1(length), + bind2(func_n2(eq), two), + nao), + chain(func_n1(first), + func_n1(stringp), + nao), + chain(func_n1(second), + func_n1(stringp), + nao), + nao), + nil)) sem_error(spec_linenum, lit("deffilter arguments must be string pairs"), nao); |