mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-07-07 06:22:47 -05:00
Factor out encode_utf8 from luni_send into utils.c.
I knew there had to already be a UTF-8 encoder _somewhere_ in this code base, but it took me a while to find it! Now it's reusable in other contexts.
This commit is contained in:
5
misc.h
5
misc.h
@ -199,6 +199,11 @@ void smemclr(void *b, size_t len);
|
||||
* hinted at by the 'eq' in the name. */
|
||||
bool smemeq(const void *av, const void *bv, size_t len);
|
||||
|
||||
/* Encode a single UTF-8 character. Assumes that illegal characters
|
||||
* (such as things in the surrogate range, or > 0x10FFFF) have already
|
||||
* been removed. */
|
||||
size_t encode_utf8(void *output, unsigned long ch);
|
||||
|
||||
char *buildinfo(const char *newline);
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user