1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-07-04 04:52:47 -05:00

Extra inline helpers seat_{stdout,stderr}_pl.

These take a ptrlen in place of separate buffer and length arguments.
Switched over to them in lots of places.
This commit is contained in:
Simon Tatham
2019-03-07 10:17:08 +00:00
parent 71a3e7da9e
commit 5eb6c19047
7 changed files with 12 additions and 8 deletions

View File

@ -991,8 +991,12 @@ void seat_connection_fatal(Seat *seat, const char *fmt, ...);
/* Handy aliases for seat_output which set is_stderr to a fixed value. */
static inline size_t seat_stdout(Seat *seat, const void *data, size_t len)
{ return seat_output(seat, false, data, len); }
static inline size_t seat_stdout_pl(Seat *seat, ptrlen data)
{ return seat_output(seat, false, data.ptr, data.len); }
static inline size_t seat_stderr(Seat *seat, const void *data, size_t len)
{ return seat_output(seat, true, data, len); }
static inline size_t seat_stderr_pl(Seat *seat, ptrlen data)
{ return seat_output(seat, true, data.ptr, data.len); }
/*
* Stub methods for seat implementations that want to use the obvious