1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-07-01 11:32:48 -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

@ -409,8 +409,8 @@ static void gtk_logging_error(LogPolicy *lp, const char *event)
/* Send 'can't open log file' errors to the terminal window.
* (Marked as stderr, although terminal.c won't care.) */
seat_stderr(&inst->seat, event, strlen(event));
seat_stderr(&inst->seat, "\r\n", 2);
seat_stderr_pl(&inst->seat, ptrlen_from_asciz(event));
seat_stderr_pl(&inst->seat, PTRLEN_LITERAL("\r\n"));
}
static const LogPolicyVtable gtk_logpolicy_vt = {

View File

@ -729,7 +729,7 @@ static void pty_real_select_result(Pty *pty, int fd, int event, int status)
* is better than no message at all */
message = dupprintf("\r\n[pterm: process terminated]\r\n");
}
seat_stdout(pty->seat, message, strlen(message));
seat_stdout_pl(pty->seat, ptrlen_from_asciz(message));
sfree(message);
}