]> asedeno.scripts.mit.edu Git - PuTTY_svn.git/blobdiff - settings.c
Enable xterm mouse reporting of wheel actions in GTK.
[PuTTY_svn.git] / settings.c
index a561602c9f0698fae005a3d3131dc6ddb4ed27dd..a82a388bf099d64a64332f2eb50673f5b5b0e2cf 100644 (file)
@@ -178,7 +178,7 @@ static int gppmap(void *handle, char *name, Conf *conf, int primary)
            val = q;
        *q = '\0';
 
-        if (primary == CONF_portfwd && buf[0] == 'D') {
+        if (primary == CONF_portfwd && strchr(buf, 'D') != NULL) {
             /*
              * Backwards-compatibility hack: dynamic forwardings are
              * indexed in the data store as a third type letter in the
@@ -188,9 +188,10 @@ static int gppmap(void *handle, char *name, Conf *conf, int primary)
              * _listening_ on a local port, and are hence mutually
              * exclusive on the same port number. So here we translate
              * the legacy storage format into the sensible internal
-             * form.
+             * form, by finding the D and turning it into a L.
              */
-            char *newkey = dupcat("L", buf+1, NULL);
+            char *newkey = dupstr(buf);
+            *strchr(newkey, 'D') = 'L';
             conf_set_str_str(conf, primary, newkey, "D");
             sfree(newkey);
         } else {
@@ -232,9 +233,13 @@ static void wmap(void *handle, char const *outkey, Conf *conf, int primary)
              * conceptually incoherent legacy storage format (key
              * "D<port>", value empty).
              */
+            char *L;
+
             realkey = key;             /* restore it at end of loop */
             val = "";
-            key = dupcat("D", key+1, NULL);
+            key = dupstr(key);
+            L = strchr(key, 'L');
+            if (L) *L = 'D';
         } else {
             realkey = NULL;
         }
@@ -636,6 +641,9 @@ void save_open_settings(void *sesskey, Conf *conf)
     write_setting_i(sesskey, "SerialParity", conf_get_int(conf, CONF_serparity));
     write_setting_i(sesskey, "SerialFlowControl", conf_get_int(conf, CONF_serflow));
     write_setting_s(sesskey, "WindowClass", conf_get_str(conf, CONF_winclass));
+    write_setting_i(sesskey, "ConnectionSharing", conf_get_int(conf, CONF_ssh_connection_sharing));
+    write_setting_i(sesskey, "ConnectionSharingUpstream", conf_get_int(conf, CONF_ssh_connection_sharing_upstream));
+    write_setting_i(sesskey, "ConnectionSharingDownstream", conf_get_int(conf, CONF_ssh_connection_sharing_downstream));
 }
 
 void load_settings(char *section, Conf *conf)
@@ -848,7 +856,7 @@ void load_open_settings(void *sesskey, Conf *conf)
                 / 1000
 #endif
                 );
-    gppi(sesskey, "ScrollbackLines", 200, conf, CONF_savelines);
+    gppi(sesskey, "ScrollbackLines", 2000, conf, CONF_savelines);
     gppi(sesskey, "DECOriginMode", 0, conf, CONF_dec_om);
     gppi(sesskey, "AutoWrapMode", 1, conf, CONF_wrap_mode);
     gppi(sesskey, "LFImpliesCR", 0, conf, CONF_lfhascr);
@@ -866,7 +874,7 @@ void load_open_settings(void *sesskey, Conf *conf)
     gppi(sesskey, "TryPalette", 0, conf, CONF_try_palette);
     gppi(sesskey, "ANSIColour", 1, conf, CONF_ansi_colour);
     gppi(sesskey, "Xterm256Colour", 1, conf, CONF_xterm_256_colour);
-    i = gppi_raw(sesskey, "BoldAsColour", 0); conf_set_int(conf, CONF_bold_style, i+1);
+    i = gppi_raw(sesskey, "BoldAsColour", 1); conf_set_int(conf, CONF_bold_style, i+1);
 
     for (i = 0; i < 22; i++) {
        static const char *const defaults[] = {
@@ -978,6 +986,9 @@ void load_open_settings(void *sesskey, Conf *conf)
     gppi(sesskey, "SerialParity", SER_PAR_NONE, conf, CONF_serparity);
     gppi(sesskey, "SerialFlowControl", SER_FLOW_XONXOFF, conf, CONF_serflow);
     gpps(sesskey, "WindowClass", "", conf, CONF_winclass);
+    gppi(sesskey, "ConnectionSharing", 0, conf, CONF_ssh_connection_sharing);
+    gppi(sesskey, "ConnectionSharingUpstream", 1, conf, CONF_ssh_connection_sharing_upstream);
+    gppi(sesskey, "ConnectionSharingDownstream", 1, conf, CONF_ssh_connection_sharing_downstream);
 }
 
 void do_defaults(char *session, Conf *conf)