mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-07-05 21:42:47 -05:00
StripCtrlChars: retarget and reset functions.
stripctrl_retarget() points the StripCtrlChars at a new BinarySink, to avoid having to pointlessly throw it away and make a new one all the time. Since that probably means the same scc is going to be reused for processing a fresh data stream, we also don't want any character-set conversion state hanging over from the previous stream, so we also reset the state in the process. Just in case it's needed, stripctrl_reset() is also provided to do that operation on its own.
This commit is contained in:
2
misc.h
2
misc.h
@ -384,6 +384,8 @@ StripCtrlChars *stripctrl_new_term_fn(
|
||||
Terminal *, term_utf8_decode *, unsigned char));
|
||||
#define stripctrl_new_term(bs, cr, sub, term) \
|
||||
stripctrl_new_term_fn(bs, cr, sub, term, term_translate)
|
||||
void stripctrl_retarget(StripCtrlChars *sccpub, BinarySink *new_bs_out);
|
||||
void stripctrl_reset(StripCtrlChars *sccpub);
|
||||
void stripctrl_free(StripCtrlChars *sanpub);
|
||||
char *stripctrl_string_ptrlen(ptrlen str);
|
||||
static inline char *stripctrl_string(const char *str)
|
||||
|
Reference in New Issue
Block a user