X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=windlg.c;h=0a8f8009d18647b9c7c3d78f9ba9a4d37ee9ae80;hb=e0baec8159d43b1294e80ff2037131a684f54f7e;hp=1d0604e56607ae697e363ec07c959023be0c3d7a;hpb=59e798fc6d78c472f7ce013cfca1b7af6ab95330;p=PuTTY.git diff --git a/windlg.c b/windlg.c index 1d0604e5..0a8f8009 100644 --- a/windlg.c +++ b/windlg.c @@ -15,8 +15,9 @@ 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"; @@ -153,6 +154,10 @@ static void save_settings (char *section, int do_host) { 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); @@ -283,6 +288,10 @@ static void load_settings (char *section, int do_host) { 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); @@ -355,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);