diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2021-04-17 09:36:50 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2021-04-17 09:36:50 -0700 |
commit | af09cb0e30fd40250a0d74f5effc14713eba23bd (patch) | |
tree | 6bf91085122bee113c4f6e5efedf398ed9a05c05 /genvmop.txr | |
parent | 6b9c1f1f30b92211f7d4e6f3edc56a6cd7f0bd9c (diff) | |
download | txr-af09cb0e30fd40250a0d74f5effc14713eba23bd.tar.gz txr-af09cb0e30fd40250a0d74f5effc14713eba23bd.tar.bz2 txr-af09cb0e30fd40250a0d74f5effc14713eba23bd.zip |
streams: revise stream-max-len over strings.
The maximum number of characters printed from a string
is too small, if it is directly taken from the stream-max-len
value. We are going to multiply it by 8, and clamp the
minimum characters at 24.
* lib.c (max_str_chars): New inline function.
(lazy_str_put, out_lazy_str, out_quasi_str): Use inline
function to determine maximum number of chracters to print.
Also bugfix here: decrement and test max_chr in the loop, not
max_len. This bug was copy-pasted across all these functions.
(obj_print_impl): Similarly revise the printing of strings.
* txr.1: Documentation updated.
Diffstat (limited to 'genvmop.txr')
0 files changed, 0 insertions, 0 deletions