X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=settings.c;h=0d3798aa46fbdfe57c8fad07da0043c41a084e79;hb=12e019bafc75cb441e965c63e15dfceeaf71ca1e;hp=98eefce3b3261e2535981a68c2f4648d2afb7bf9;hpb=dd924a644e8d741f476c723faa97d6a22c214066;p=PuTTY.git diff --git a/settings.c b/settings.c index 98eefce3..0d3798aa 100644 --- a/settings.c +++ b/settings.c @@ -297,6 +297,7 @@ void save_open_settings(void *sesskey, int do_host, Config *cfg) write_setting_s(sesskey, "LocalUserName", cfg->localusername); write_setting_i(sesskey, "NoPTY", cfg->nopty); write_setting_i(sesskey, "Compression", cfg->compression); + write_setting_i(sesskey, "TryAgent", cfg->tryagent); write_setting_i(sesskey, "AgentFwd", cfg->agentfwd); write_setting_i(sesskey, "ChangeUsername", cfg->change_username); wprefs(sesskey, "Cipher", ciphernames, CIPHER_MAX, @@ -323,7 +324,7 @@ void save_open_settings(void *sesskey, int do_host, Config *cfg) write_setting_i(sesskey, "NoRemoteResize", cfg->no_remote_resize); write_setting_i(sesskey, "NoAltScreen", cfg->no_alt_screen); write_setting_i(sesskey, "NoRemoteWinTitle", cfg->no_remote_wintitle); - write_setting_i(sesskey, "NoRemoteQTitle", cfg->no_remote_qtitle); + write_setting_i(sesskey, "RemoteQTitleAction", cfg->remote_qtitle_action); write_setting_i(sesskey, "NoDBackspace", cfg->no_dbackspace); write_setting_i(sesskey, "NoRemoteCharset", cfg->no_remote_charset); write_setting_i(sesskey, "ApplicationCursorKeys", cfg->app_cursor); @@ -438,6 +439,12 @@ void save_open_settings(void *sesskey, int do_host, Config *cfg) write_setting_fontspec(sesskey, "WideBoldFont", cfg->wideboldfont); write_setting_i(sesskey, "ShadowBold", cfg->shadowbold); write_setting_i(sesskey, "ShadowBoldOffset", cfg->shadowboldoffset); + write_setting_s(sesskey, "SerialLine", cfg->serline); + write_setting_i(sesskey, "SerialSpeed", cfg->serspeed); + write_setting_i(sesskey, "SerialDataBits", cfg->serdatabits); + write_setting_i(sesskey, "SerialStopHalfbits", cfg->serstopbits); + write_setting_i(sesskey, "SerialParity", cfg->serparity); + write_setting_i(sesskey, "SerialFlowControl", cfg->serflow); } void load_settings(char *section, int do_host, Config * cfg) @@ -457,6 +464,7 @@ void load_open_settings(void *sesskey, int do_host, Config *cfg) cfg->ssh_subsys = 0; /* FIXME: load this properly */ cfg->remote_cmd_ptr = NULL; cfg->remote_cmd_ptr2 = NULL; + cfg->ssh_nc_host[0] = '\0'; if (do_host) { gpps(sesskey, "HostName", "", cfg->host, sizeof(cfg->host)); @@ -556,6 +564,7 @@ void load_open_settings(void *sesskey, int do_host, Config *cfg) sizeof(cfg->localusername)); gppi(sesskey, "NoPTY", 0, &cfg->nopty); gppi(sesskey, "Compression", 0, &cfg->compression); + gppi(sesskey, "TryAgent", 1, &cfg->tryagent); gppi(sesskey, "AgentFwd", 0, &cfg->agentfwd); gppi(sesskey, "ChangeUsername", 0, &cfg->change_username); gprefs(sesskey, "Cipher", "\0", @@ -597,7 +606,17 @@ void load_open_settings(void *sesskey, int do_host, Config *cfg) gppi(sesskey, "NoRemoteResize", 0, &cfg->no_remote_resize); gppi(sesskey, "NoAltScreen", 0, &cfg->no_alt_screen); gppi(sesskey, "NoRemoteWinTitle", 0, &cfg->no_remote_wintitle); - gppi(sesskey, "NoRemoteQTitle", 1, &cfg->no_remote_qtitle); + { + /* Backward compatibility */ + int no_remote_qtitle; + gppi(sesskey, "NoRemoteQTitle", 1, &no_remote_qtitle); + /* We deliberately interpret the old setting of "no response" as + * "empty string". This changes the behaviour, but hopefully for + * the better; the user can always recover the old behaviour. */ + gppi(sesskey, "RemoteQTitleAction", + no_remote_qtitle ? TITLE_EMPTY : TITLE_REAL, + &cfg->remote_qtitle_action); + } gppi(sesskey, "NoDBackspace", 0, &cfg->no_dbackspace); gppi(sesskey, "NoRemoteCharset", 0, &cfg->no_remote_charset); gppi(sesskey, "ApplicationCursorKeys", 0, &cfg->app_cursor); @@ -756,6 +775,12 @@ void load_open_settings(void *sesskey, int do_host, Config *cfg) gppfont(sesskey, "WideFont", &cfg->widefont); gppfont(sesskey, "WideBoldFont", &cfg->wideboldfont); gppi(sesskey, "ShadowBoldOffset", 1, &cfg->shadowboldoffset); + gpps(sesskey, "SerialLine", "", cfg->serline, sizeof(cfg->serline)); + gppi(sesskey, "SerialSpeed", 9600, &cfg->serspeed); + gppi(sesskey, "SerialDataBits", 8, &cfg->serdatabits); + gppi(sesskey, "SerialStopHalfbits", 2, &cfg->serstopbits); + gppi(sesskey, "SerialParity", SER_PAR_NONE, &cfg->serparity); + gppi(sesskey, "SerialFlowControl", SER_FLOW_XONXOFF, &cfg->serflow); } void do_defaults(char *session, Config * cfg)