summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2011-10-01 22:33:10 -0700
committerKaz Kylheku <kaz@kylheku.com>2011-10-01 22:33:10 -0700
commit28f2adb77ce853d675b964f427b16358343444d1 (patch)
treeec306883dfb55900380979ba9a85b0572a785130
parentfb042038bc10452110056efc99dac211aa4a6dc3 (diff)
downloadtxr-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--ChangeLog17
-rw-r--r--filter.c5
-rw-r--r--lib.c2
-rw-r--r--lib.h2
-rw-r--r--match.c24
5 files changed, 34 insertions, 16 deletions
diff --git a/ChangeLog b/ChangeLog
index d93cf59f..1aab5011 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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.
diff --git a/filter.c b/filter.c
index bf20cffb..9b190ac9 100644
--- a/filter.c
+++ b/filter.c
@@ -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);
diff --git a/lib.c b/lib.c
index d4918993..932fecde 100644
--- a/lib.c
+++ b/lib.c
@@ -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);
diff --git a/lib.h b/lib.h
index 1ffbc2e9..329504a5 100644
--- a/lib.h
+++ b/lib.h
@@ -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);
diff --git a/match.c b/match.c
index 977f8cee..af259cf2 100644
--- a/match.c
+++ b/match.c
@@ -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);