1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-07-18 11:31:00 -05:00

Utility function to do terminal word wrapping.

I'm planning to use this to replace some of the manually wrapped lines
in console messages.
This commit is contained in:
Simon Tatham
2022-07-06 19:01:15 +01:00
parent d8f8c8972a
commit d155009ded
3 changed files with 39 additions and 0 deletions

2
misc.h
View File

@ -232,6 +232,8 @@ int string_length_for_printf(size_t);
/* Make a ptrlen out of a constant byte array. */
#define PTRLEN_FROM_CONST_BYTES(a) make_ptrlen(a, sizeof(a))
void wordwrap(BinarySink *bs, ptrlen input, size_t maxwid);
/* Wipe sensitive data out of memory that's about to be freed. Simpler
* than memset because we don't need the fill char parameter; also
* attempts (by fiddly use of volatile) to inhibit the compiler from