summaryrefslogtreecommitdiffstats
path: root/match.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2015-11-17 06:40:02 -0800
committerKaz Kylheku <kaz@kylheku.com>2015-11-20 16:17:18 -0800
commit559c24b4900f70e893902dbac99d7a8a113fb6f0 (patch)
tree0ca0b99be5d3fc73b143c4c9fa09d60bc9952a1f /match.c
parent0db63e0d78208c382318bd9d55f8fd2a258c46db (diff)
downloadtxr-559c24b4900f70e893902dbac99d7a8a113fb6f0.tar.gz
txr-559c24b4900f70e893902dbac99d7a8a113fb6f0.tar.bz2
txr-559c24b4900f70e893902dbac99d7a8a113fb6f0.zip
Use symbol in diagnostics in collect.
* match.c (v_collect): Don't use hard-coded "collect" in diagnostics because the symbol can be repeat.
Diffstat (limited to 'match.c')
-rw-r--r--match.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/match.c b/match.c
index eb46e7cc..1577b735 100644
--- a/match.c
+++ b/match.c
@@ -2862,7 +2862,7 @@ static val v_collect(match_files_ctx *c)
last_bindings = set_diff(until_last_bindings,
new_bindings, eq_f, nil);
if (success == t) {
- debuglf(specline, lit("collect consumed entire file"), nao);
+ debuglf(specline, lit("~s: consumed entire file"), op_sym, nao);
c->data = nil;
} else {
cons_bind (new_data, new_line, success);
@@ -2880,8 +2880,8 @@ static val v_collect(match_files_ctx *c)
c->bindings, eq_f, nil);
val have_new = strictly_new_bindings;
- debuglf(specline, lit("collect matched ~a:~d"),
- c->curfile, c->data_lineno, nao);
+ debuglf(specline, lit("~s matched ~a:~d"),
+ op_sym, c->curfile, c->data_lineno, nao);
for (iter = vars; iter; iter = cdr(iter)) {
cons_bind (var, dfl, car(iter));
@@ -2896,8 +2896,8 @@ static val v_collect(match_files_ctx *c)
}
if (have_new && missing)
- sem_error(specline, lit("collect failed to bind ~a"),
- missing, nao);
+ sem_error(specline, lit("~s failed to bind ~a"),
+ op_sym, missing, nao);
for (iter = strictly_new_bindings; iter; iter = cdr(iter))
{
@@ -2923,14 +2923,14 @@ static val v_collect(match_files_ctx *c)
new_line = plus(new_line, one);
}
- debuglf(specline, lit("collect advancing from line ~d to ~d"),
- c->data_lineno, new_line, nao);
+ debuglf(specline, lit("~s advancing from line ~d to ~d"),
+ op_sym, c->data_lineno, new_line, nao);
c->data = new_data;
c->data_lineno = new_line;
deref(car_l(success)) = nil;
} else {
- debuglf(specline, lit("collect consumed entire file"), nao);
+ debuglf(specline, lit("~s consumed entire file"), op_sym, nao);
c->data = nil;
}
mincounter = 0;
@@ -2954,7 +2954,7 @@ next_collect:
uw_block_end;
if (!result) {
- debuglf(specline, lit("collect explicitly failed"), nao);
+ debuglf(specline, lit("~s explicitly failed"), op_sym, nao);
return nil;
}