summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2012-03-13 14:38:56 -0700
committerKaz Kylheku <kaz@kylheku.com>2012-03-13 14:38:56 -0700
commit034ea4cc10a765ae15e7e658c751ec6197c50f9b (patch)
tree97f58dfce21c9d7c31e7816f9f2c08c3c8658128
parent5961f0de80abce4645ec2f022b2346e24b6479ed (diff)
downloadtxr-034ea4cc10a765ae15e7e658c751ec6197c50f9b.tar.gz
txr-034ea4cc10a765ae15e7e658c751ec6197c50f9b.tar.bz2
txr-034ea4cc10a765ae15e7e658c751ec6197c50f9b.zip
* 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.
-rw-r--r--ChangeLog7
-rw-r--r--stream.c6
2 files changed, 10 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 807896fb..ffccdb02 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
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.
* eval.c (eval_init): New intrinsic functions: url-encode, url-decode.
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