Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mRemoteNG/PuTTYNG.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Tatham <anakin@pobox.com>2020-01-30 09:40:22 +0300
committerSimon Tatham <anakin@pobox.com>2020-01-30 09:40:22 +0300
commit575ee4f8fc2bf681d558a6197fc9cc17478abb47 (patch)
tree675885e069729baca7fee5a6fa23b16856370654 /cmdline.c
parent9da36bd897533db6811fefb7954ff81ab2dfbb63 (diff)
Make cmdline_tooltype a const int.
Another ugly mutable global variable gone: now, instead of this variable being defined in cmdline.c and written to by everyone's main(), it's defined _alongside_ everyone's main() as a constant, and cmdline.c just refers to it. A bonus is that now nocmdline.c doesn't have to define it anyway for tools that don't use cmdline.c. But mostly, it didn't need to be mutable, so better for it not to be. While I'm at it, I've also fiddled with the bit flags that go in it, to define their values automatically using a list macro instead of manually specifying each one to be a different power of 2.
Diffstat (limited to 'cmdline.c')
-rw-r--r--cmdline.c12
1 files changed, 0 insertions, 12 deletions
diff --git a/cmdline.c b/cmdline.c
index fae28e58..d5364ff7 100644
--- a/cmdline.c
+++ b/cmdline.c
@@ -109,18 +109,6 @@ int cmdline_get_passwd_input(prompts_t *p)
return 1;
}
-/*
- * Here we have a flags word which describes the capabilities of
- * the particular tool on whose behalf we're running. We will
- * refuse certain command-line options if a particular tool
- * inherently can't do anything sensible. For example, the file
- * transfer tools (psftp, pscp) can't do a great deal with protocol
- * selections (ever tried running scp over telnet?) or with port
- * forwarding (even if it wasn't a hideously bad idea, they don't
- * have the select/poll infrastructure to make them work).
- */
-int cmdline_tooltype = 0;
-
static bool cmdline_check_unavailable(int flag, const char *p)
{
if (cmdline_tooltype & flag) {