Jordan Russell's patch: only process mouse drags when we have the
[u/mdw/putty] / settings.c
index dbd745e..266e37f 100644 (file)
@@ -145,6 +145,7 @@ void save_settings(char *section, int do_host, Config * cfg)
     write_setting_i(sesskey, "WarnOnClose", !!cfg->warn_on_close);
     write_setting_i(sesskey, "PingInterval", cfg->ping_interval / 60); /* minutes */
     write_setting_i(sesskey, "PingIntervalSecs", cfg->ping_interval % 60);     /* seconds */
+    write_setting_i(sesskey, "TCPNoDelay", cfg->tcp_nodelay);
     write_setting_s(sesskey, "TerminalType", cfg->termtype);
     write_setting_s(sesskey, "TerminalSpeed", cfg->termspeed);
     {
@@ -171,11 +172,14 @@ void save_settings(char *section, int do_host, Config * cfg)
     write_setting_i(sesskey, "NoPTY", cfg->nopty);
     write_setting_i(sesskey, "Compression", cfg->compression);
     write_setting_i(sesskey, "AgentFwd", cfg->agentfwd);
+    write_setting_i(sesskey, "ChangeUsername", cfg->change_username);
     wprefs(sesskey, "Cipher", ciphernames, CIPHER_MAX,
           cfg->ssh_cipherlist);
     write_setting_i(sesskey, "AuthTIS", cfg->try_tis_auth);
+    write_setting_i(sesskey, "AuthKI", cfg->try_ki_auth);
     write_setting_i(sesskey, "SshProt", cfg->sshprot);
     write_setting_i(sesskey, "BuggyMAC", cfg->buggymac);
+    write_setting_i(sesskey, "SSH2DES", cfg->ssh2_des_cbc);
     write_setting_s(sesskey, "PublicKeyFile", cfg->keyfile);
     write_setting_s(sesskey, "RemoteCommand", cfg->remote_cmd);
     write_setting_i(sesskey, "RFCEnviron", cfg->rfc_environ);
@@ -261,6 +265,7 @@ void save_settings(char *section, int do_host, Config * cfg)
     write_setting_i(sesskey, "X11Forward", cfg->x11_forward);
     write_setting_s(sesskey, "X11Display", cfg->x11_display);
     write_setting_i(sesskey, "LocalPortAcceptAll", cfg->lport_acceptall);
+    write_setting_i(sesskey, "RemotePortAcceptAll", cfg->rport_acceptall);
     {
        char buf[2 * sizeof(cfg->portfwd)], *p, *q;
        p = buf;
@@ -296,7 +301,11 @@ void load_settings(char *section, int do_host, Config * cfg)
     cfg->remote_cmd_ptr = cfg->remote_cmd;
     cfg->remote_cmd_ptr2 = NULL;
 
-    gpps(sesskey, "HostName", "", cfg->host, sizeof(cfg->host));
+    if (do_host) {
+       gpps(sesskey, "HostName", "", cfg->host, sizeof(cfg->host));
+    } else {
+       cfg->host[0] = '\0';           /* blank hostname */
+    }
     gpps(sesskey, "LogFileName", "putty.log",
         cfg->logfilename, sizeof(cfg->logfilename));
     gppi(sesskey, "LogType", 0, &cfg->logtype);
@@ -321,6 +330,7 @@ void load_settings(char *section, int do_host, Config * cfg)
        gppi(sesskey, "PingIntervalSecs", 0, &pingsec);
        cfg->ping_interval = pingmin * 60 + pingsec;
     }
+    gppi(sesskey, "TCPNoDelay", 1, &cfg->tcp_nodelay);
     gpps(sesskey, "TerminalType", "xterm", cfg->termtype,
         sizeof(cfg->termtype));
     gpps(sesskey, "TerminalSpeed", "38400,38400", cfg->termspeed,
@@ -351,11 +361,14 @@ void load_settings(char *section, int do_host, Config * cfg)
     gppi(sesskey, "NoPTY", 0, &cfg->nopty);
     gppi(sesskey, "Compression", 0, &cfg->compression);
     gppi(sesskey, "AgentFwd", 0, &cfg->agentfwd);
+    gppi(sesskey, "ChangeUsername", 0, &cfg->change_username);
     gprefs(sesskey, "Cipher", "\0",
           ciphernames, CIPHER_MAX, cfg->ssh_cipherlist);
     gppi(sesskey, "SshProt", 1, &cfg->sshprot);
     gppi(sesskey, "BuggyMAC", 0, &cfg->buggymac);
+    gppi(sesskey, "SSH2DES", 0, &cfg->ssh2_des_cbc);
     gppi(sesskey, "AuthTIS", 0, &cfg->try_tis_auth);
+    gppi(sesskey, "AuthKI", 1, &cfg->try_ki_auth);
     gpps(sesskey, "PublicKeyFile", "", cfg->keyfile, sizeof(cfg->keyfile));
     gpps(sesskey, "RemoteCommand", "", cfg->remote_cmd,
         sizeof(cfg->remote_cmd));
@@ -489,6 +502,7 @@ void load_settings(char *section, int do_host, Config * cfg)
         sizeof(cfg->x11_display));
 
     gppi(sesskey, "LocalPortAcceptAll", 0, &cfg->lport_acceptall);
+    gppi(sesskey, "RemotePortAcceptAll", 0, &cfg->rport_acceptall);
     {
        char buf[2 * sizeof(cfg->portfwd)], *p, *q;
        gpps(sesskey, "PortForwardings", "", buf, sizeof(buf));
@@ -534,6 +548,10 @@ static int sessioncmp(const void *av, const void *bv)
        return -1;                     /* a comes first */
     if (!strcmp(b, "Default Settings"))
        return +1;                     /* b comes first */
+    /*
+     * FIXME: perhaps we should ignore the first & in determining
+     * sort order.
+     */
     return strcmp(a, b);              /* otherwise, compare normally */
 }