summaryrefslogtreecommitdiffstats
path: root/match.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2012-02-27 05:05:58 -0800
committerKaz Kylheku <kaz@kylheku.com>2012-02-27 05:05:58 -0800
commit7c1eda9eec81468c7083877f88f94b0dbd3ef068 (patch)
tree018d77d2bee949b185be9ed71cc10e22e60ac490 /match.c
parent61f40e03c573f995f4cc156e0284096ad30eb692 (diff)
downloadtxr-7c1eda9eec81468c7083877f88f94b0dbd3ef068.tar.gz
txr-7c1eda9eec81468c7083877f88f94b0dbd3ef068.tar.bz2
txr-7c1eda9eec81468c7083877f88f94b0dbd3ef068.zip
* match.c (extract): Check for negative value of opt_nobindings,
which forces the printing. * txr.c (help): Under -b, mention that printing the word false is suppressed also. Added documentation for -B. (main): Implemented -B option. * txr.1: Documented -B option and added clarifying text under -b option explaining the conditions under which bindings are printed.
Diffstat (limited to 'match.c')
-rw-r--r--match.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/match.c b/match.c
index 5dda9602..bf6b82a6 100644
--- a/match.c
+++ b/match.c
@@ -3590,12 +3590,10 @@ int extract(val spec, val files, val predefined_bindings)
predefined_bindings,
t, nil)));
- if (!output_produced) {
- if (!opt_nobindings) {
- if (bindings) {
- bindings = nreverse(bindings);
- dump_bindings(bindings);
- }
+ if ((!output_produced && opt_nobindings <= 0) || opt_nobindings < 0) {
+ if (bindings) {
+ bindings = nreverse(bindings);
+ dump_bindings(bindings);
}
if (!success)