summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2016-10-19 06:42:26 -0700
committerKaz Kylheku <kaz@kylheku.com>2016-10-19 06:42:26 -0700
commita22082e8325d6eb9911604ead620485184c1df6e (patch)
treedfe1ce689d00e3e27f26421f62ce81ffb1ea1528
parent66ae458067d7b9e8490df376bfe3281de68ef768 (diff)
downloadtxr-a22082e8325d6eb9911604ead620485184c1df6e.tar.gz
txr-a22082e8325d6eb9911604ead620485184c1df6e.tar.bz2
txr-a22082e8325d6eb9911604ead620485184c1df6e.zip
Add *print-circle* special variable.
* stream.c (print_circle_s): New symbol variable. (stream_init): Initialize print_circle_s as symbol named *print-circle*; register as special var. * stream.h (print_circle_s): Declared.
-rw-r--r--stream.c3
-rw-r--r--stream.h2
2 files changed, 3 insertions, 2 deletions
diff --git a/stream.c b/stream.c
index 51f0cb33..0c7fa12b 100644
--- a/stream.c
+++ b/stream.c
@@ -74,7 +74,7 @@
val stdin_s, stdout_s, stddebug_s, stderr_s, stdnull_s;
val print_flo_precision_s, print_flo_digits_s, print_flo_format_s;
-val print_base_s;
+val print_base_s, print_circle_s;
val from_start_k, from_current_k, from_end_k;
val real_time_k, name_k, addr_k, fd_k, byte_oriented_k;
@@ -4177,6 +4177,7 @@ void stream_init(void)
lit("~s"));
reg_var(print_base_s = intern(lit("*print-base*"), user_package),
num_fast(10));
+ reg_var(print_circle_s = intern(lit("*print-circle*"), user_package), nil);
#if HAVE_ISATTY
if (isatty(fileno(stdin)) == 1)
diff --git a/stream.h b/stream.h
index 615328b8..14ef8e4f 100644
--- a/stream.h
+++ b/stream.h
@@ -116,7 +116,7 @@ extern val stdio_stream_s;
extern val stdin_s, stdout_s, stddebug_s, stderr_s, stdnull_s;
extern val print_flo_precision_s, print_flo_digits_s, print_flo_format_s;
-extern val print_base_s;
+extern val print_base_s, print_circle_s;
#if HAVE_SOCKETS
extern val socket_error_s;