1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-10 01:48:00 +00:00
putty-source/utils
Simon Tatham be8d3974ff Generalise strbuf_catf() into put_fmt().
marshal.h now provides a macro put_fmt() which allows you to write
arbitrary printf-formatted data to an arbitrary BinarySink.

We already had this facility for strbufs in particular, in the form of
strbuf_catf(). That was able to take advantage of knowing the inner
structure of a strbuf to minimise memory allocation (it would snprintf
directly into the strbuf's existing buffer if possible). For a general
black-box BinarySink we can't do that, so instead we dupvprintf into a
temporary buffer.

For consistency, I've removed strbuf_catf, and converted all uses of
it into the new put_fmt - and I've also added an extra vtable method
in the BinarySink API, so that put_fmt can still use strbuf_catf's
more efficient memory management when talking to a strbuf, and fall
back to the simpler strategy when that's not available.
2021-11-19 11:32:47 +00:00
..
antispoof.c Generalise strbuf_catf() into put_fmt(). 2021-11-19 11:32:47 +00:00
base64_decode_atom.c New library-style 'utils' subdirectories. 2021-04-18 08:18:27 +01:00
base64_encode_atom.c New library-style 'utils' subdirectories. 2021-04-18 08:18:27 +01:00
bufchain.c Add some more bufchain_try_* functions. 2021-11-19 10:35:38 +00:00
buildinfo.c Generalise strbuf_catf() into put_fmt(). 2021-11-19 11:32:47 +00:00
burnstr.c New library-style 'utils' subdirectories. 2021-04-18 08:18:27 +01:00
chomp.c New library-style 'utils' subdirectories. 2021-04-18 08:18:27 +01:00
CMakeLists.txt Add 'description' methods for Backend and Plug. 2021-10-24 10:48:25 +01:00
conf_dest.c New library-style 'utils' subdirectories. 2021-04-18 08:18:27 +01:00
conf_launchable.c New library-style 'utils' subdirectories. 2021-04-18 08:18:27 +01:00
conf.c New library-style 'utils' subdirectories. 2021-04-18 08:18:27 +01:00
ctrlparse.c New library-style 'utils' subdirectories. 2021-04-18 08:18:27 +01:00
debug.c New library-style 'utils' subdirectories. 2021-04-18 08:18:27 +01:00
default_description.c Add 'description' methods for Backend and Plug. 2021-10-24 10:48:25 +01:00
dup_mb_to_wc.c win_set_[icon_]title: send a codepage along with the string. 2021-10-16 14:00:46 +01:00
dupcat.c New library-style 'utils' subdirectories. 2021-04-18 08:18:27 +01:00
dupprintf.c New library-style 'utils' subdirectories. 2021-04-18 08:18:27 +01:00
dupstr.c New library-style 'utils' subdirectories. 2021-04-18 08:18:27 +01:00
encode_utf8.c New library-style 'utils' subdirectories. 2021-04-18 08:18:27 +01:00
encode_wide_string_as_utf8.c win_set_[icon_]title: send a codepage along with the string. 2021-10-16 14:00:46 +01:00
fgetline.c New library-style 'utils' subdirectories. 2021-04-18 08:18:27 +01:00
host_strchr_internal.c Build various unit-test main() programs in utils. 2021-04-18 08:30:44 +01:00
host_strchr.c New library-style 'utils' subdirectories. 2021-04-18 08:18:27 +01:00
host_strcspn.c New library-style 'utils' subdirectories. 2021-04-18 08:18:27 +01:00
host_strduptrim.c New library-style 'utils' subdirectories. 2021-04-18 08:18:27 +01:00
host_strrchr.c New library-style 'utils' subdirectories. 2021-04-18 08:18:27 +01:00
ltime.c New library-style 'utils' subdirectories. 2021-04-18 08:18:27 +01:00
marshal.c Generalise strbuf_catf() into put_fmt(). 2021-11-19 11:32:47 +00:00
memory.c New library-style 'utils' subdirectories. 2021-04-18 08:18:27 +01:00
memxor.c New library-style 'utils' subdirectories. 2021-04-18 08:18:27 +01:00
miscucs.c New library-style 'utils' subdirectories. 2021-04-18 08:18:27 +01:00
null_lp.c New library-style 'utils' subdirectories. 2021-04-18 08:18:27 +01:00
nullseat.c New Seat query, has_mixed_input_stream(). 2021-11-06 14:48:26 +00:00
nullstrcmp.c New library-style 'utils' subdirectories. 2021-04-18 08:18:27 +01:00
out_of_memory.c New library-style 'utils' subdirectories. 2021-04-18 08:18:27 +01:00
parse_blocksize.c New library-style 'utils' subdirectories. 2021-04-18 08:18:27 +01:00
prompts.c free_prompts: deal with a reference from an Ldisc. 2021-09-16 13:55:10 +01:00
ptrlen.c New library-style 'utils' subdirectories. 2021-04-18 08:18:27 +01:00
read_file_into.c New library-style 'utils' subdirectories. 2021-04-18 08:18:27 +01:00
seat_connection_fatal.c New library-style 'utils' subdirectories. 2021-04-18 08:18:27 +01:00
sessprep.c New library-style 'utils' subdirectories. 2021-04-18 08:18:27 +01:00
sk_free_peer_info.c New library-style 'utils' subdirectories. 2021-04-18 08:18:27 +01:00
smemclr.c Fix typo in comment. 2021-04-19 17:14:01 +01:00
smemeq.c New library-style 'utils' subdirectories. 2021-04-18 08:18:27 +01:00
ssh2_pick_fingerprint.c New library-style 'utils' subdirectories. 2021-04-18 08:18:27 +01:00
sshutils.c Move the SSH implementation into its own subdirectory. 2021-04-22 18:09:13 +01:00
strbuf.c Generalise strbuf_catf() into put_fmt(). 2021-11-19 11:32:47 +00:00
string_length_for_printf.c New library-style 'utils' subdirectories. 2021-04-18 08:18:27 +01:00
stripctrl.c New library-style 'utils' subdirectories. 2021-04-18 08:18:27 +01:00
tempseat.c Fix obvious braino in tempseat_output. 2021-11-07 06:37:30 +00:00
tree234.c Build various unit-test main() programs in utils. 2021-04-18 08:30:44 +01:00
utils.h New library-style 'utils' subdirectories. 2021-04-18 08:18:27 +01:00
validate_manual_hostkey.c Fix manual host key validation. 2021-10-25 18:12:21 +01:00
version.c New library-style 'utils' subdirectories. 2021-04-18 08:18:27 +01:00
wcwidth.c wcwidth.c: update to Unicode 14.0.0. 2021-10-10 14:55:15 +01:00
wildcard.c Build various unit-test main() programs in utils. 2021-04-18 08:30:44 +01:00
write_c_string_literal.c New library-style 'utils' subdirectories. 2021-04-18 08:18:27 +01:00
x11_dehexify.c Break up x11fwd.c. 2021-04-18 08:18:27 +01:00
x11_identify_auth_proto.c Break up x11fwd.c. 2021-04-18 08:18:27 +01:00
x11_make_greeting.c Break up x11fwd.c. 2021-04-18 08:18:27 +01:00
x11_parse_ip.c Break up x11fwd.c. 2021-04-18 08:18:27 +01:00
x11authfile.c Break up x11fwd.c. 2021-04-18 08:18:27 +01:00
x11authnames.c Break up x11fwd.c. 2021-04-18 08:18:27 +01:00