The Great Defaults Change (and about time too)! SSH now defaults to
[u/mdw/putty] / settings.c
index ef0446f..e905397 100644 (file)
@@ -2,7 +2,6 @@
  * settings.c: read and write saved sessions.
  */
 
-#include <windows.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include "putty.h"
@@ -404,7 +403,7 @@ void load_settings(char *section, int do_host, Config * cfg)
     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, "SshProt", 2, &cfg->sshprot);
     gppi(sesskey, "SSH2DES", 0, &cfg->ssh2_des_cbc);
     gppi(sesskey, "AuthTIS", 0, &cfg->try_tis_auth);
     gppi(sesskey, "AuthKI", 1, &cfg->try_ki_auth);
@@ -462,10 +461,17 @@ void load_settings(char *section, int do_host, Config * cfg)
     gpps(sesskey, "WinTitle", "", cfg->wintitle, sizeof(cfg->wintitle));
     gppi(sesskey, "TermWidth", 80, &cfg->width);
     gppi(sesskey, "TermHeight", 24, &cfg->height);
+#ifdef _WINDOWS
     gpps(sesskey, "Font", "Courier New", cfg->font, sizeof(cfg->font));
+#else
+    gpps(sesskey, "Font", "fixed", cfg->font, sizeof(cfg->font));
+#endif
     gppi(sesskey, "FontIsBold", 0, &cfg->fontisbold);
+#ifdef _WINDOWS
     gppi(sesskey, "FontCharSet", ANSI_CHARSET, &cfg->fontcharset);
+#endif
     gppi(sesskey, "FontHeight", 10, &cfg->fontheight);
+#ifdef _WINDOWS
     if (cfg->fontheight < 0) {
        int oldh, newh;
        HDC hdc = GetDC(NULL);
@@ -478,6 +484,7 @@ void load_settings(char *section, int do_host, Config * cfg)
            newh--;
        cfg->fontheight = newh;
     }
+#endif
     gppi(sesskey, "FontVTMode", VT_UNICODE, (int *) &cfg->vtmode);
     gppi(sesskey, "TryPalette", 0, &cfg->try_palette);
     gppi(sesskey, "BoldAsColour", 1, &cfg->bold_colour);
@@ -542,7 +549,7 @@ void load_settings(char *section, int do_host, Config * cfg)
     gppi(sesskey, "ScrollOnKey", 0, &cfg->scroll_on_key);
     gppi(sesskey, "ScrollOnDisp", 1, &cfg->scroll_on_disp);
     gppi(sesskey, "LockSize", 0, &cfg->resize_action);
-    gppi(sesskey, "BCE", 0, &cfg->bce);
+    gppi(sesskey, "BCE", 1, &cfg->bce);
     gppi(sesskey, "BlinkText", 0, &cfg->blinktext);
     gppi(sesskey, "X11Forward", 0, &cfg->x11_forward);
     gpps(sesskey, "X11Display", "localhost:0", cfg->x11_display,