summaryrefslogtreecommitdiffstats
path: root/match.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2012-02-17 23:35:57 -0800
committerKaz Kylheku <kaz@kylheku.com>2012-02-17 23:35:57 -0800
commitce6020f1f8248050bb17699cc229205e8cdbdf4e (patch)
tree08dcc1cc2d14f6b13975851b683465907d4a137e /match.c
parent0c9e4bf7503de3feca97c602689d73b467b33889 (diff)
downloadtxr-ce6020f1f8248050bb17699cc229205e8cdbdf4e.tar.gz
txr-ce6020f1f8248050bb17699cc229205e8cdbdf4e.tar.bz2
txr-ce6020f1f8248050bb17699cc229205e8cdbdf4e.zip
Reimplementation of how TXR decides whether to dump bindings
or not. This is now done right inside the standard output stream. * match.c (output_produced): Variable removed. (complex_open): Assignment to output_produced removed. * stream.c (output_produced): New global variable. (stdio_put_string, stdio_put_char): Set output_produced to t if the target of the output is stdout. * stream.h (output_produced): Declared. * txr.h (output_produced): Declaration removed.
Diffstat (limited to 'match.c')
-rw-r--r--match.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/match.c b/match.c
index b5e489dd..d921757e 100644
--- a/match.c
+++ b/match.c
@@ -47,7 +47,6 @@
#include "eval.h"
#include "match.h"
-int output_produced;
int opt_nobindings = 0;
int opt_lisp_bindings = 0;
int opt_arraydims = 1;
@@ -1459,7 +1458,6 @@ static fpip_t complex_open(val name, val output, val append)
if (!wcscmp(namestr, L"-")) {
ret.close = fpip_fclose;
ret.f = output ? stdout : stdin;
- output_produced = output ? 1 : 0;
} else if (namestr[0] == '!') {
ret.close = fpip_pclose;
ret.f = w_popen(namestr+1, output ? L"w" : L"r");