mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-07-14 17:47:33 -05:00
Switch some Conf settings over to being bool.
I think this is the full set of things that ought logically to be boolean. One annoyance is that quite a few radio-button controls in config.c address Conf fields that are now bool rather than int, which means that the shared handler function can't just access them all with conf_{get,set}_int. Rather than back out the rigorous separation of int and bool in conf.c itself, I've just added a similar alternative handler function for the bool-typed ones.
This commit is contained in:
@ -486,31 +486,31 @@ int do_cmdline(int argc, char **argv, int do_everything, Conf *conf)
|
||||
|
||||
} else if (!strcmp(p, "-ut-") || !strcmp(p, "+ut")) {
|
||||
SECOND_PASS_ONLY;
|
||||
conf_set_int(conf, CONF_stamp_utmp, 0);
|
||||
conf_set_bool(conf, CONF_stamp_utmp, false);
|
||||
|
||||
} else if (!strcmp(p, "-ut")) {
|
||||
SECOND_PASS_ONLY;
|
||||
conf_set_int(conf, CONF_stamp_utmp, 1);
|
||||
conf_set_bool(conf, CONF_stamp_utmp, true);
|
||||
|
||||
} else if (!strcmp(p, "-ls-") || !strcmp(p, "+ls")) {
|
||||
SECOND_PASS_ONLY;
|
||||
conf_set_int(conf, CONF_login_shell, 0);
|
||||
conf_set_bool(conf, CONF_login_shell, false);
|
||||
|
||||
} else if (!strcmp(p, "-ls")) {
|
||||
SECOND_PASS_ONLY;
|
||||
conf_set_int(conf, CONF_login_shell, 1);
|
||||
conf_set_bool(conf, CONF_login_shell, true);
|
||||
|
||||
} else if (!strcmp(p, "-nethack")) {
|
||||
SECOND_PASS_ONLY;
|
||||
conf_set_int(conf, CONF_nethack_keypad, 1);
|
||||
conf_set_bool(conf, CONF_nethack_keypad, true);
|
||||
|
||||
} else if (!strcmp(p, "-sb-") || !strcmp(p, "+sb")) {
|
||||
SECOND_PASS_ONLY;
|
||||
conf_set_int(conf, CONF_scrollbar, 0);
|
||||
conf_set_bool(conf, CONF_scrollbar, false);
|
||||
|
||||
} else if (!strcmp(p, "-sb")) {
|
||||
SECOND_PASS_ONLY;
|
||||
conf_set_int(conf, CONF_scrollbar, 1);
|
||||
conf_set_bool(conf, CONF_scrollbar, true);
|
||||
|
||||
} else if (!strcmp(p, "-name")) {
|
||||
EXPECTS_ARG;
|
||||
|
Reference in New Issue
Block a user