mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-07-08 06:45:05 -05:00
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. [originally from svn r9214]
This commit is contained in:
15
ssh.h
15
ssh.h
@ -334,13 +334,11 @@ void ssh_send_port_open(void *channel, char *hostname, int port, char *org);
|
||||
|
||||
/* Exports from portfwd.c */
|
||||
extern const char *pfd_newconnect(Socket * s, char *hostname, int port,
|
||||
void *c, const Config *cfg,
|
||||
int addressfamily);
|
||||
void *c, Conf *conf, int addressfamily);
|
||||
/* desthost == NULL indicates dynamic (SOCKS) port forwarding */
|
||||
extern const char *pfd_addforward(char *desthost, int destport, char *srcaddr,
|
||||
int port, void *backhandle,
|
||||
const Config *cfg, void **sockdata,
|
||||
int address_family);
|
||||
int port, void *backhandle, Conf *conf,
|
||||
void **sockdata, int address_family);
|
||||
extern void pfd_close(Socket s);
|
||||
extern void pfd_terminate(void *sockdata);
|
||||
extern int pfd_send(Socket s, char *data, int len);
|
||||
@ -393,18 +391,17 @@ struct X11Display {
|
||||
* details are looked up by calling platform_get_x11_auth.
|
||||
*/
|
||||
extern struct X11Display *x11_setup_display(char *display, int authtype,
|
||||
const Config *);
|
||||
Conf *);
|
||||
void x11_free_display(struct X11Display *disp);
|
||||
extern const char *x11_init(Socket *, struct X11Display *, void *,
|
||||
const char *, int, const Config *);
|
||||
const char *, int, Conf *);
|
||||
extern void x11_close(Socket);
|
||||
extern int x11_send(Socket, char *, int);
|
||||
extern void x11_unthrottle(Socket s);
|
||||
extern void x11_override_throttle(Socket s, int enable);
|
||||
char *x11_display(const char *display);
|
||||
/* Platform-dependent X11 functions */
|
||||
extern void platform_get_x11_auth(struct X11Display *display,
|
||||
const Config *);
|
||||
extern void platform_get_x11_auth(struct X11Display *display, Conf *);
|
||||
/* examine a mostly-filled-in X11Display and fill in localauth* */
|
||||
extern const int platform_uses_x11_unix_by_default;
|
||||
/* choose default X transport in the absence of a specified one */
|
||||
|
Reference in New Issue
Block a user