summaryrefslogtreecommitdiffstats
path: root/eval.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2012-02-27 01:52:15 -0800
committerKaz Kylheku <kaz@kylheku.com>2012-02-27 01:52:15 -0800
commit61f40e03c573f995f4cc156e0284096ad30eb692 (patch)
treed62c0ec5c1d36d71d2239462b6f5ce0dd6d4415a /eval.c
parent73625e0ae9b4fde9c6ff64bd6dc22a1b7797be1a (diff)
downloadtxr-61f40e03c573f995f4cc156e0284096ad30eb692.tar.gz
txr-61f40e03c573f995f4cc156e0284096ad30eb692.tar.bz2
txr-61f40e03c573f995f4cc156e0284096ad30eb692.zip
Fix the issue properly, once and for all, of how to determine
that output has taken place and suppress the printing of bindings. * debug.c (debug): std_output replaced with std_debug. * eval.c (eval_init): Registered new *stddebug* variable. * stream.c (std_debug): New variable. (stdio_put_string): Check that stream is other than std_debug, to determine that output has taken place. * stream.h (std_debug): Declared. * txr.1: Added *stddebug* to documentation stub heading.
Diffstat (limited to 'eval.c')
-rw-r--r--eval.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/eval.c b/eval.c
index c0a38ed5..532b63f0 100644
--- a/eval.c
+++ b/eval.c
@@ -2181,6 +2181,7 @@ void eval_init(void)
reg_fun(intern(lit("eval"), user_package), func_n2o(eval_intrinsic, 1));
reg_var(intern(lit("*stdout*"), user_package), &std_output);
+ reg_var(intern(lit("*stddebug*"), user_package), &std_debug);
reg_var(intern(lit("*stdin*"), user_package), &std_input);
reg_var(intern(lit("*stderr*"), user_package), &std_error);
reg_fun(intern(lit("format"), user_package), func_n2v(formatv));