simon-svn: putty: simon

Commits to Tartarus CVS repository. tartarus-commits at lists.tartarus.org
Sat Jan 25 15:58:47 GMT 2014


SVN root:       svn://svn.tartarus.org/sgt
Changes by:     simon
Revision:       10119
Date:           2014-01-25 15:58:47 +0000 (Sat, 25 Jan 2014)

Log message (15 lines):
New hostname-handling functions in misc.c.

These are intended to make it easier to handle strings of the form
"hostname:port" or other colon-separated things including hostnames
(such as the -L and -R command-line option arguments), even though the
hostname part might be a square-bracketed IPv6 address literal
containing colons that have to _not_ be treated as separating the
top-level string components.

Three of these functions have semantics as much like existing C
library functions as I could make them (host_strchr, host_strrchr,
host_strcspn) so that it wouldn't be too error-prone to replace
existing C functions with them at lots of call sites. The fourth
function (host_strduptrim) just strips square brackets off anything
that looks like an IPv6 literal.

Modified files:
U   putty/misc.c
U   putty/misc.h

Links:
http://svn.tartarus.org/sgt/?rev=10119&view=rev
http://svn.tartarus.org/sgt/putty/misc.c?rev=10119&r1=10118&r2=10119
http://svn.tartarus.org/sgt/putty/misc.h?rev=10119&r1=10118&r2=10119



More information about the tartarus-commits mailing list