diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2024-05-03 21:23:06 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2024-05-03 21:23:06 -0700 |
commit | 5b3398c05bfdb7dcb448d66814256b509e45b7e5 (patch) | |
tree | 8910b9dba10250145c65f58916cc602d0e417801 /gzio.h | |
parent | 5da9e32de83f6fb0f983fd5e893e6ba41e2f1446 (diff) | |
download | txr-5b3398c05bfdb7dcb448d66814256b509e45b7e5.tar.gz txr-5b3398c05bfdb7dcb448d66814256b509e45b7e5.tar.bz2 txr-5b3398c05bfdb7dcb448d66814256b509e45b7e5.zip |
quasilit: move separator defaulting to fmt_cat.
The motivation here is an upcoming change in which
we will support the separator modifier for buffers
and strings. Currently, it does nothing. If we write
`@{a ":"}`, and a is a buffer or string, the separator
is ignored. We don't fix that in this commit, but
we fix the problem that some higher level formatting
functions are defaulting the separator to " " (single
space) and passing it down. We want to control the
defaulting based on the type of the object in one place.
* eval.c (fmt_cat): Do not assume here that sep has been
defaulted; do the defaulting to space here.
(format_field, fmt_flex): Initialize the separator to nil,
not space. If no separator occurs among the modifiers,
it gets passed down as nil through to fmt_cat.
(fmt_simple): Don't default the sep argument to space;
pass it through to do_format_field which will pass it down
to fmt_cat.
Diffstat (limited to 'gzio.h')
0 files changed, 0 insertions, 0 deletions