From 4ea811a0bf03432df67d98cd67d47921f4e532a1 Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Thu, 30 Jan 2020 06:40:21 +0000 Subject: [PATCH] Remove 'GLOBAL int flags' completely! It no longer has any flags in it at all, so its day is done. --- pscp.c | 1 - psftp.c | 1 - putty.h | 13 ------------- unix/uxplink.c | 1 - windows/winpgnt.c | 2 -- windows/winplink.c | 1 - 6 files changed, 19 deletions(-) diff --git a/pscp.c b/pscp.c index 9292052a..cd27c395 100644 --- a/pscp.c +++ b/pscp.c @@ -2235,7 +2235,6 @@ int psftp_main(int argc, char *argv[]) default_protocol = PROT_TELNET; - flags = 0; cmdline_tooltype = TOOLTYPE_FILETRANSFER; sk_init(); diff --git a/psftp.c b/psftp.c index cf9e88e3..ac074fdc 100644 --- a/psftp.c +++ b/psftp.c @@ -2769,7 +2769,6 @@ int psftp_main(int argc, char *argv[]) bool sanitise_stderr = true; char *batchfile = NULL; - flags = 0; cmdline_tooltype = TOOLTYPE_FILETRANSFER; sk_init(); diff --git a/putty.h b/putty.h index b441f93d..572d8ab2 100644 --- a/putty.h +++ b/putty.h @@ -578,19 +578,6 @@ extern const int be_default_protocol; */ extern const char *const appname; -/* - * Some global flags denoting the type of application. - * - * These flags describe the type of _application_ - they wouldn't - * vary between individual sessions - and so it's OK to have this - * variable be GLOBAL. - * - * Note that additional flags may be defined in platform-specific - * headers. It's probably best if those ones start from 0x1000, to - * avoid collision. - */ -GLOBAL int flags; - /* * Likewise, these two variables are set up when the application * initialises, and inform all default-settings accesses after diff --git a/unix/uxplink.c b/unix/uxplink.c index 41875e43..af08bcbd 100644 --- a/unix/uxplink.c +++ b/unix/uxplink.c @@ -603,7 +603,6 @@ int main(int argc, char **argv) stderr_bs = BinarySink_UPCAST(&stderr_bcs); outgoingeof = EOF_NO; - flags = 0; cmdline_tooltype |= (TOOLTYPE_HOST_ARG | TOOLTYPE_HOST_ARG_CAN_BE_SESSION | diff --git a/windows/winpgnt.c b/windows/winpgnt.c index 089ba7ad..a24cc467 100644 --- a/windows/winpgnt.c +++ b/windows/winpgnt.c @@ -1183,8 +1183,6 @@ void cleanup_exit(int code) exit(code); } -int flags = 0; - struct winpgnt_client { PageantListenerClient plc; }; diff --git a/windows/winplink.c b/windows/winplink.c index 45a07f4b..c004025d 100644 --- a/windows/winplink.c +++ b/windows/winplink.c @@ -269,7 +269,6 @@ int main(int argc, char **argv) default_protocol = PROT_SSH; default_port = 22; - flags = 0; cmdline_tooltype |= (TOOLTYPE_HOST_ARG | TOOLTYPE_HOST_ARG_CAN_BE_SESSION |