1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-09 17:38:00 +00:00

Split a trigraph sequence in a string constant.

[originally from svn r2166]
This commit is contained in:
Simon Tatham 2002-11-01 12:52:51 +00:00
parent 317180ed49
commit aa3d962ae0

View File

@ -226,9 +226,14 @@ static void c_write1(Telnet telnet, int c)
static void log_option(Telnet telnet, char *sender, int cmd, int option)
{
char buf[50];
/*
* The strange-looking "<?""?>" below is there to avoid a
* trigraph - a double question mark followed by > maps to a
* closing brace character!
*/
sprintf(buf, "%s:\t%s %s", sender,
(cmd == WILL ? "WILL" : cmd == WONT ? "WONT" :
cmd == DO ? "DO" : cmd == DONT ? "DONT" : "<??>"),
cmd == DO ? "DO" : cmd == DONT ? "DONT" : "<?""?>"),
telopt(option));
logevent(telnet->frontend, buf);
}