diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2015-12-28 06:44:58 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2015-12-28 06:44:58 -0800 |
commit | 92dd3486727d748253b8b1a0dd4416c07e61addb (patch) | |
tree | 2d46d0f93e777d457990c5296d659f68280378eb /debug.c | |
parent | d2488974756c21c064ddd293fbb72d5a85b91e12 (diff) | |
download | txr-92dd3486727d748253b8b1a0dd4416c07e61addb.tar.gz txr-92dd3486727d748253b8b1a0dd4416c07e61addb.tar.bz2 txr-92dd3486727d748253b8b1a0dd4416c07e61addb.zip |
Overhaul printing of lazy strings.
The #<lazy-string ...> print syntax is gone. Lazy strings are
now printed by traversing their structure, without forcing
them to the flat representation.
* lib.c (lazy_str_put): New function.
(out_str_char, out_str_pretty, out_lazy_str): New static functions.
(obj_print_impl): Use out_str_pretty for standard-printing
regular strings. Use lazy_put_str for pretty-printing lazy
strings, and out_lazy_str for standard-printing them.
* lib.h (lazy_str_put): Declared.
* stream.c (put_string): Check for a lazy string and route
to lazy_str_put, so the string doesn't get forced
(though of course the underlying list does, if it is lazy).
Diffstat (limited to 'debug.c')
0 files changed, 0 insertions, 0 deletions