mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-06-30 19:12:48 -05:00
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.
This commit is contained in:
@ -14,6 +14,8 @@ const bool dup_check_launchable = false; /* no need to check host name
|
||||
* in conf */
|
||||
const bool use_pty_argv = true;
|
||||
|
||||
const unsigned cmdline_tooltype = TOOLTYPE_NONNETWORK;
|
||||
|
||||
/* gtkwin.c will call this, and in pterm it's not needed */
|
||||
void noise_ultralight(NoiseSourceId id, unsigned long data) { }
|
||||
|
||||
@ -46,7 +48,6 @@ char *make_default_wintitle(char *hostname)
|
||||
|
||||
void setup(bool single)
|
||||
{
|
||||
cmdline_tooltype = TOOLTYPE_NONNETWORK;
|
||||
default_protocol = -1;
|
||||
|
||||
if (single)
|
||||
|
Reference in New Issue
Block a user