From 034ea4cc10a765ae15e7e658c751ec6197c50f9b Mon Sep 17 00:00:00 2001 From: Kaz Kylheku <kaz@kylheku.com> Date: Tue, 13 Mar 2012 14:38:56 -0700 Subject: * stream.c (stdio_put_string, stdio_put_char, stdio_put_byte): Do not consider data sent to std_error to be output for the purposes of the output_produced flag. Otherwise the program behavior changes in -v mode; it will not print bindings. --- ChangeLog | 7 +++++++ stream.c | 6 +++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 807896fb..ffccdb02 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2012-03-13 Kaz Kylheku <kaz@kylheku.com> + + * stream.c (stdio_put_string, stdio_put_char, stdio_put_byte): Do not + consider data sent to std_error to be output for the purposes of + the output_produced flag. Otherwise the program behavior changes + in -v mode; it will not print bindings. + 2012-03-13 Kaz Kylheku <kaz@kylheku.com> Implementing URL filtering. diff --git a/stream.c b/stream.c index e4e75982..4a2e4e7f 100644 --- a/stream.c +++ b/stream.c @@ -126,7 +126,7 @@ static val stdio_put_string(val stream, val str) { struct stdio_handle *h = (struct stdio_handle *) stream->co.handle; - if (stream != std_debug) + if (stream != std_debug && stream != std_error) output_produced = t; if (h->f != 0) { @@ -145,7 +145,7 @@ static val stdio_put_char(val stream, val ch) { struct stdio_handle *h = (struct stdio_handle *) stream->co.handle; - if (stream != std_debug) + if (stream != std_debug && stream != std_error) output_produced = t; return h->f != 0 && utf8_encode(c_chr(ch), stdio_put_char_callback, (mem_t *) h->f) @@ -156,7 +156,7 @@ static val stdio_put_byte(val stream, int b) { struct stdio_handle *h = (struct stdio_handle *) stream->co.handle; - if (stream != std_debug) + if (stream != std_debug && stream != std_error) output_produced = t; return h->f != 0 && putc(b, (FILE *) h->f) != EOF -- cgit v1.2.3