summaryrefslogtreecommitdiffstats
path: root/match.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2014-06-09 07:13:59 -0700
committerKaz Kylheku <kaz@kylheku.com>2014-06-09 07:13:59 -0700
commit26e61191b5b5eb346be5f6c245b98d8e1c0fe718 (patch)
treee8f7f1b3cec4cbe9c6df2f03f507232866cb5deb /match.c
parentc27a97c95c628ff1e49339f82537bbf3719ab75a (diff)
downloadtxr-26e61191b5b5eb346be5f6c245b98d8e1c0fe718.tar.gz
txr-26e61191b5b5eb346be5f6c245b98d8e1c0fe718.tar.bz2
txr-26e61191b5b5eb346be5f6c245b98d8e1c0fe718.zip
The dumping of bindings and printing of false must now
be explicitly requested by the -B option. * match.c (opt_nobindings): Variable removed. (opt_print_bindings): New variable. (extract): Print bindings or "false" if opt_print_bindings is true. * stream.c (output_produced): Variable removed. (stdio_put_string, stdio_put_char, stdio_put_byte): Remove update of output_produced. * stream.h (output_produced): Declaration removed. * txr.1: Documentation updated. * txr.c (txr_main): Option 'b' does nothing. 'B', 'l', 'a', and '--lisp-bindings' set opt_print_bindings to 1. * txr.h (opt_nobindings): Declaration removed. (opt_print_bindings): Declared. * unwind.c (uw_throw): When exiting due to a query error or file error, print false when opt_print_bindings is true.
Diffstat (limited to 'match.c')
-rw-r--r--match.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/match.c b/match.c
index acd82b1d..c2f72cf6 100644
--- a/match.c
+++ b/match.c
@@ -49,7 +49,7 @@
#include "eval.h"
#include "match.h"
-int opt_nobindings = 0;
+int opt_print_bindings = 0;
int opt_lisp_bindings = 0;
int opt_arraydims = 1;
@@ -3939,7 +3939,7 @@ int extract(val spec, val files, val predefined_bindings)
predefined_bindings,
t, nil, nil)));
- if ((!output_produced && opt_nobindings <= 0) || opt_nobindings < 0) {
+ if (opt_print_bindings) {
if (bindings) {
bindings = nreverse(bindings);
dump_bindings(bindings);