X-Git-Url: https://git.distorted.org.uk/u/mdw/putty/blobdiff_plain/2c9c6388caa7e80195bffd93be7be7369c20bb98..83616aab6bc220846b1f70b4b5b13b3c395a2ef9:/settings.c diff --git a/settings.c b/settings.c index faed9e5a..a8ff83ff 100644 --- a/settings.c +++ b/settings.c @@ -2,7 +2,6 @@ * settings.c: read and write saved sessions. */ -#include #include #include #include "putty.h" @@ -309,6 +308,7 @@ void save_settings(char *section, int do_host, Config * cfg) write_setting_i(sesskey, "BugHMAC2", cfg->sshbug_hmac2); write_setting_i(sesskey, "BugDeriveKey2", cfg->sshbug_derivekey2); write_setting_i(sesskey, "BugRSAPad2", cfg->sshbug_rsapad2); + write_setting_i(sesskey, "BugDHGEx2", cfg->sshbug_dhgex2); close_settings_w(sesskey); } @@ -461,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); @@ -477,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); @@ -583,6 +591,7 @@ void load_settings(char *section, int do_host, Config * cfg) } gppi(sesskey, "BugDeriveKey2", BUG_AUTO, &cfg->sshbug_derivekey2); gppi(sesskey, "BugRSAPad2", BUG_AUTO, &cfg->sshbug_rsapad2); + gppi(sesskey, "BugDHGEx2", BUG_AUTO, &cfg->sshbug_dhgex2); close_settings_r(sesskey); }