New utility script to parse an SSH packet dump and write out an
interpretation with some analysis done on it. The script will do its
own tracking of the set of open channels and their states, and its
output is in a one-line-per-packet format such that every distinct
channel has a unique identifier in it which should make it easy to
grep out all lines relating to that channel. The script also matches
up {CHANNEL,REQUEST}_{SUCCESS_FAILURE} to the requests that caused
them, by tracking a queue of requests in each direction per channel
and for global requests. Command-line options permit generating a
final dump of all channels ever known to the script and their various
ids and final state, and also dumping out the data transferred over
each channel in each direction.

Output is not complete, in the sense that some parameters in some
messages (e.g. pixel sizes in window-size specifications) are
deliberately omitted due to being boring, and the entire contents of
some messages (e.g. KEXINIT) are omitted because I haven't yet seen
any purpose in decoding them. Filling them in might be a useful thing,
although I'm inclined to think that the default should still be to
show only the potentially interesting stuff (e.g. still not pixel
sizes!) and enable the rest using a -v option.

Hopefully this should do a lot of the legwork in debugging issues in
which a channel mysteriously remains partially open and prevents PuTTY
closing.


git-svn-id: svn://svn.tartarus.org/sgt/putty@9457 cda61777-01e9-0310-a592-d414129be87e
Fix a Perl warning about useless use of a constant in void context.


git-svn-id: svn://svn.tartarus.org/sgt/putty@9458 cda61777-01e9-0310-a592-d414129be87e
Conditionalise the calls to premsg and postmsg in uxcons.c's
logevent(), which temporarily turn off the raw mode we've put stderr
into, so that they don't get called if the log_eventlog() call between
them is not _actually_ going to write to stderr.

Fixes a bug in which, if you define a Unix PuTTY saved session which
uses 'plink -nc' as a local proxy command and then run PuTTY
backgrounded from the shell with that session loaded, the subprocess
Plink would get SIGTTOU when it tried to muck about with stderr and
the whole thing would grind to a halt. I'm prepared to consider that
acceptable if Plink _really_ wants to write on standard error, but if
it doesn't, it should just carry on working in the background!


git-svn-id: svn://svn.tartarus.org/sgt/putty@9462 cda61777-01e9-0310-a592-d414129be87e
Bug fix from Robert de Bath: if wc_to_mb returns a length of zero, it
will not even initialise sbstring[0], so we shouldn't even look at it
let alone depend on it to tell us the desired character was absent.


git-svn-id: svn://svn.tartarus.org/sgt/putty@9465 cda61777-01e9-0310-a592-d414129be87e
Bug fix from Robert de Bath: if the utf8_override setting is changed
in mid-session, it affects translation and hence display, so it should
be listed among the settings that require a redraw.


git-svn-id: svn://svn.tartarus.org/sgt/putty@9466 cda61777-01e9-0310-a592-d414129be87e
Patch from Robert de Bath to ifdef out the Windows-specific hack for
the offset horizontal line characters in the VT100 line-drawing set
(o,p,r,s), so that no trace of it - and hence no pointless performance
hit - is compiled into the cross-platform modules on non-Windows
platforms.


git-svn-id: svn://svn.tartarus.org/sgt/putty@9467 cda61777-01e9-0310-a592-d414129be87e
Call sshfwd_unclean_close() in the event of a local socket error on a
forwarded X connection. (I somehow forgot to do this in r9364, despite
making the identical change in portfwd.c.)


git-svn-id: svn://svn.tartarus.org/sgt/putty@9470 cda61777-01e9-0310-a592-d414129be87e
Fix an inverted comparison in rlogin.c which must surely have broken
logins completely, with or without a supplied username. Ahem.


git-svn-id: svn://svn.tartarus.org/sgt/putty@9471 cda61777-01e9-0310-a592-d414129be87e
Fix trivial Perl goof in logparse.pl which caused
SSH2_MSG_CHANNEL_FAILURE to be reported as replying to
ARRAY(0xrubbish) instead of to a message number.


git-svn-id: svn://svn.tartarus.org/sgt/putty@9472 cda61777-01e9-0310-a592-d414129be87e