mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-07-01 03:22:48 -05:00
Revise the API for seat_stripctrl_new.
Now instead of taking raw arguments to configure the output StripCtrlChars with, it takes an enumerated value giving the context of what's being sanitised, and allows the seat to decide what the output parameters for that context should be. The only context currently used is SIC_BANNER (SSH login banners). I've also added a not-yet-used one for keyboard-interactive prompts.
This commit is contained in:
@ -351,11 +351,11 @@ static bool gtk_seat_get_window_pixel_size(Seat *seat, int *w, int *h)
|
||||
return true;
|
||||
}
|
||||
|
||||
StripCtrlChars *gtk_seat_stripctrl_new(Seat *seat, BinarySink *bs_out,
|
||||
bool permit_cr, wchar_t substitution)
|
||||
StripCtrlChars *gtk_seat_stripctrl_new(
|
||||
Seat *seat, BinarySink *bs_out, SeatInteractionContext sic)
|
||||
{
|
||||
GtkFrontend *inst = container_of(seat, GtkFrontend, seat);
|
||||
return stripctrl_new_term(bs_out, permit_cr, substitution, inst->term);
|
||||
return stripctrl_new_term(bs_out, false, 0, inst->term);
|
||||
}
|
||||
|
||||
static void gtk_seat_notify_remote_exit(Seat *seat);
|
||||
|
@ -465,10 +465,10 @@ static void console_eventlog(LogPolicy *lp, const char *string)
|
||||
console_logging_error(lp, string);
|
||||
}
|
||||
|
||||
StripCtrlChars *console_stripctrl_new(Seat *seat, BinarySink *bs_out,
|
||||
bool permit_cr, wchar_t substitution)
|
||||
StripCtrlChars *console_stripctrl_new(
|
||||
Seat *seat, BinarySink *bs_out, SeatInteractionContext sic)
|
||||
{
|
||||
return stripctrl_new(bs_out, permit_cr, substitution);
|
||||
return stripctrl_new(bs_out, false, 0);
|
||||
}
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user