X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=windlg.c;h=0a8f8009d18647b9c7c3d78f9ba9a4d37ee9ae80;hb=e0baec8159d43b1294e80ff2037131a684f54f7e;hp=8a200e91b5a34701468086707ad860256ae52bfc;hpb=9fc2b746b0c24efc24b6a2f960da396fb534565c;p=PuTTY.git diff --git a/windlg.c b/windlg.c index 8a200e91..0a8f8009 100644 --- a/windlg.c +++ b/windlg.c @@ -9,14 +9,15 @@ #include "putty.h" #include "win_res.h" -#define NPANELS 7 -#define MAIN_NPANELS 7 -#define RECONF_NPANELS 4 +#define NPANELS 8 +#define MAIN_NPANELS 8 +#define RECONF_NPANELS 5 static const char *const puttystr = PUTTY_REG_POS "\\Sessions"; -static char **negots = NULL; -static int nnegots = 0, negsize = 0; +static char **events = NULL; +static int nevents = 0, negsize = 0; + static HWND logbox = NULL, abtbox = NULL; static char hex[16] = "0123456789ABCDEF"; @@ -116,9 +117,11 @@ static void save_settings (char *section, int do_host) { wpps (sesskey, "HostName", cfg.host); wppi (sesskey, "PortNumber", cfg.port); wpps (sesskey, "Protocol", - cfg.protocol == PROT_SSH ? "ssh" : "telnet"); + cfg.protocol == PROT_SSH ? "ssh" : + cfg.protocol == PROT_TELNET ? "telnet" : "raw" ); } wppi (sesskey, "CloseOnExit", !!cfg.close_on_exit); + wppi (sesskey, "WarnOnClose", !!cfg.warn_on_close); wpps (sesskey, "TerminalType", cfg.termtype); wpps (sesskey, "TerminalSpeed", cfg.termspeed); { @@ -144,12 +147,17 @@ static void save_settings (char *section, int do_host) { wppi (sesskey, "NoPTY", cfg.nopty); wpps (sesskey, "Cipher", cfg.cipher == CIPHER_BLOWFISH ? "blowfish" : cfg.cipher == CIPHER_DES ? "des" : "3des"); + wppi (sesskey, "AuthTIS", cfg.try_tis_auth); wppi (sesskey, "RFCEnviron", cfg.rfc_environ); wppi (sesskey, "BackspaceIsDelete", cfg.bksp_is_delete); wppi (sesskey, "RXVTHomeEnd", cfg.rxvt_homeend); wppi (sesskey, "LinuxFunctionKeys", cfg.linux_funkeys); wppi (sesskey, "ApplicationCursorKeys", cfg.app_cursor); wppi (sesskey, "ApplicationKeypad", cfg.app_keypad); + wppi (sesskey, "NetHackKeypad", cfg.nethack_keypad); + wppi (sesskey, "AltF4", cfg.alt_f4); + wppi (sesskey, "AltSpace", cfg.alt_space); + wppi (sesskey, "LdiscTerm", cfg.ldisc_term); wppi (sesskey, "ScrollbackLines", cfg.savelines); wppi (sesskey, "DECOriginMode", cfg.dec_om); wppi (sesskey, "AutoWrapMode", cfg.wrap_mode); @@ -159,6 +167,7 @@ static void save_settings (char *section, int do_host) { wppi (sesskey, "TermHeight", cfg.height); wpps (sesskey, "Font", cfg.font); wppi (sesskey, "FontIsBold", cfg.fontisbold); + wppi (sesskey, "FontCharSet", cfg.fontcharset); wppi (sesskey, "FontHeight", cfg.fontheight); wppi (sesskey, "FontVTMode", cfg.vtmode); wppi (sesskey, "TryPalette", cfg.try_palette); @@ -182,6 +191,8 @@ static void save_settings (char *section, int do_host) { } wpps (sesskey, buf, buf2); } + wppi (sesskey, "KoiWinXlat", cfg.xlat_enablekoiwin); + wppi (sesskey, "CapsLockCyr", cfg.xlat_capslockcyr); RegCloseKey(sesskey); } @@ -228,10 +239,13 @@ static void load_settings (char *section, int do_host) { cfg.protocol = PROT_SSH; else if (!strcmp(prot, "telnet")) cfg.protocol = PROT_TELNET; + else if (!strcmp(prot, "raw")) + cfg.protocol = PROT_RAW; else cfg.protocol = default_protocol; gppi (sesskey, "CloseOnExit", 1, &cfg.close_on_exit); + gppi (sesskey, "WarnOnClose", 1, &cfg.warn_on_close); gpps (sesskey, "TerminalType", "xterm", cfg.termtype, sizeof(cfg.termtype)); gpps (sesskey, "TerminalSpeed", "38400,38400", cfg.termspeed, @@ -267,12 +281,17 @@ static void load_settings (char *section, int do_host) { else cfg.cipher = CIPHER_3DES; } + gppi (sesskey, "AuthTIS", 0, &cfg.try_tis_auth); gppi (sesskey, "RFCEnviron", 0, &cfg.rfc_environ); gppi (sesskey, "BackspaceIsDelete", 1, &cfg.bksp_is_delete); gppi (sesskey, "RXVTHomeEnd", 0, &cfg.rxvt_homeend); gppi (sesskey, "LinuxFunctionKeys", 0, &cfg.linux_funkeys); gppi (sesskey, "ApplicationCursorKeys", 0, &cfg.app_cursor); gppi (sesskey, "ApplicationKeypad", 0, &cfg.app_keypad); + gppi (sesskey, "NetHackKeypad", 0, &cfg.nethack_keypad); + gppi (sesskey, "AltF4", 1, &cfg.alt_f4); + gppi (sesskey, "AltSpace", 0, &cfg.alt_space); + gppi (sesskey, "LdiscTerm", 0, &cfg.ldisc_term); gppi (sesskey, "ScrollbackLines", 200, &cfg.savelines); gppi (sesskey, "DECOriginMode", 0, &cfg.dec_om); gppi (sesskey, "AutoWrapMode", 1, &cfg.wrap_mode); @@ -282,6 +301,7 @@ static void load_settings (char *section, int do_host) { gppi (sesskey, "TermHeight", 24, &cfg.height); gpps (sesskey, "Font", "Courier", cfg.font, sizeof(cfg.font)); gppi (sesskey, "FontIsBold", 0, &cfg.fontisbold); + gppi (sesskey, "FontCharSet", ANSI_CHARSET, &cfg.fontcharset); gppi (sesskey, "FontHeight", 10, &cfg.fontheight); gppi (sesskey, "FontVTMode", VT_POORMAN, &cfg.vtmode); gppi (sesskey, "TryPalette", 0, &cfg.try_palette); @@ -324,6 +344,9 @@ static void load_settings (char *section, int do_host) { cfg.wordness[j] = atoi(q); } } + gppi (sesskey, "KoiWinXlat", 0, &cfg.xlat_enablekoiwin); + gppi (sesskey, "CapsLockCyr", 0, &cfg.xlat_capslockcyr); + RegCloseKey(sesskey); } @@ -341,9 +364,9 @@ static int CALLBACK LogProc (HWND hwnd, UINT msg, switch (msg) { case WM_INITDIALOG: - for (i=0; i= negsize) { +void logevent (char *string) { + if (nevents >= negsize) { negsize += 64; - negots = srealloc (negots, negsize * sizeof(*negots)); + events = srealloc (events, negsize * sizeof(*events)); } - negots[nnegots] = smalloc(1+strlen(string)); - strcpy (negots[nnegots], string); - nnegots++; + events[nevents] = smalloc(1+strlen(string)); + strcpy (events[nevents], string); + nevents++; if (logbox) SendDlgItemMessage (logbox, IDN_LIST, LB_ADDSTRING, 0, (LPARAM)string); } -void shownegot (HWND hwnd) { +void showeventlog (HWND hwnd) { if (!logbox) { logbox = CreateDialog (hinst, MAKEINTRESOURCE(IDD_LOGBOX), hwnd, LogProc);