Post-release destabilisation! Completely remove the struct type
authorsimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Thu, 14 Jul 2011 18:52:21 +0000 (18:52 +0000)
committersimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Thu, 14 Jul 2011 18:52:21 +0000 (18:52 +0000)
commit4a693cfc5c3ee0e639bbee0215345e921715ab04
tree9d43d8709b4675dfc02c8c46537f23915dca475b
parentd87d258a8f5d8fc9c43e73cc59ff4258b3755485
Post-release destabilisation! Completely remove the struct type
'Config' in putty.h, which stores all PuTTY's settings and includes an
arbitrary length limit on every single one of those settings which is
stored in string form. In place of it is 'Conf', an opaque data type
everywhere outside the new file conf.c, which stores a list of (key,
value) pairs in which every key contains an integer identifying a
configuration setting, and for some of those integers the key also
contains extra parts (so that, for instance, CONF_environmt is a
string-to-string mapping). Everywhere that a Config was previously
used, a Conf is now; everywhere there was a Config structure copy,
conf_copy() is called; every lookup, adjustment, load and save
operation on a Config has been rewritten; and there's a mechanism for
serialising a Conf into a binary blob and back for use with Duplicate
Session.

User-visible effects of this change _should_ be minimal, though I
don't doubt I've introduced one or two bugs here and there which will
eventually be found. The _intended_ visible effects of this change are
that all arbitrary limits on configuration strings and lists (e.g.
limit on number of port forwardings) should now disappear; that list
boxes in the configuration will now be displayed in a sorted order
rather than the arbitrary order in which they were added to the list
(since the underlying data structure is now a sorted tree234 rather
than an ad-hoc comma-separated string); and one more specific change,
which is that local and dynamic port forwardings on the same port
number are now mutually exclusive in the configuration (putting 'D' in
the key rather than the value was a mistake in the first place).

One other reorganisation as a result of this is that I've moved all
the dialog.c standard handlers (dlg_stdeditbox_handler and friends)
out into config.c, because I can't really justify calling them generic
any more. When they took a pointer to an arbitrary structure type and
the offset of a field within that structure, they were independent of
whether that structure was a Config or something completely different,
but now they really do expect to talk to a Conf, which can _only_ be
used for PuTTY configuration, so I've renamed them all things like
conf_editbox_handler and moved them out of the nominally independent
dialog-box management module into the PuTTY-specific config.c.

git-svn-id: svn://svn.tartarus.org/sgt/putty@9214 cda61777-01e9-0310-a592-d414129be87e
64 files changed:
Recipe
cmdline.c
conf.c [new file with mode: 0644]
config.c
cproxy.c
dialog.c
dialog.h
ldisc.c
ldisc.h
logging.c
macosx/README.OSX
misc.c
network.h
pinger.c
portfwd.c
pproxy.c
proxy.c
proxy.h
pscp.c
psftp.c
putty.h
raw.c
rlogin.c
sercfg.c
settings.c
ssh.c
ssh.h
sshgss.h
sshnogss.c
storage.h
telnet.c
terminal.c
terminal.h
testback.c
unix/gtkcfg.c
unix/gtkdlg.c
unix/gtkwin.c
unix/unix.h
unix/ux_x11.c
unix/uxcfg.c
unix/uxgss.c
unix/uxplink.c
unix/uxproxy.c
unix/uxpterm.c
unix/uxpty.c
unix/uxputty.c
unix/uxser.c
unix/uxsftp.c
unix/uxstore.c
unix/uxucs.c
windows/wincfg.c
windows/winctrls.c
windows/windlg.c
windows/window.c
windows/wingss.c
windows/winplink.c
windows/winproxy.c
windows/winser.c
windows/winsftp.c
windows/winstore.c
windows/winstuff.h
windows/winucs.c
windows/winx11.c
x11fwd.c