1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-09 17:38:00 +00:00
putty-source/windows
Simon Tatham 6aca7f1eef windows/window.c: move more variables into WinGuiSeat.
In commit f9e572595b I claimed that I'd removed very nearly all
the global and static variables from windows/window.c. It turns out
that this was wildly overoptimistic - I missed quite a few of them!
I'm not quite sure how I managed that; my best guess is that I used an
underpowered 'nm' command that failed to find some classes of
variable.

Some of the remaining function-scope statics were removed completely
by commit afb3dab1e9 just now. In this commit, I've swept up some
more and turn them into fields of WinGuiSeat, where they should have
been moved last September.

The (hopefully complete this time) list of remaining variables,
generated by running this rune in the Windows build directory:

  nm windows/CMakeFiles/putty.dir/window.c.obj |
     grep -E '^([^ ]+)? *[bBcCdDgGsS] [^\.]'

consists of the following variables which are legitimately global
across the whole process and not related to a particular window:

 - 'hinst' and 'hprev', instance handles for Windows loadable modules

 - 'classname' in the terminal_window_class_a() and
   terminal_window_class_w() functions, which allocate a window class
   reusably

 - some pointers to Windows API functions retrieved via the
   DECL_WINDOWS_FUNCTION / GET_WINDOWS_FUNCTION system, such as
   p_AdjustWindowRectExForDpi and p_FlashWindowEx

 - some pointers to Windows API functions set up by assigning them at
   startup to the right one of the ANSI or Unicode version depending on
   the Windows version, e.g. sw_DefWindowProc and sw_DispatchMessage

 - 'unicode_window', a boolean flag set at the same time as those
   sw_Foo function pointers

 - 'sesslist', storing the last-retrieved version of the saved
   sessions menu

 - 'cursor_visible' in show_mouseptr() and 'forced_visible' in
   update_mouse_pointer(), each of which tracks the cumulative number
   of times that function has shown or hidden the mouse pointer, so as
   to manage its effect on the global state updated by ShowCursor

 - 'trust_icon', loaded from the executable's resources

 - 'wgslisthead', the list of all active WinGuiSeats

 - 'wm_mousewheel', the window-message id we use for mouse wheel
   events

and the following which are nothing to do with our code:

 - '_OptionsStorage' in __local_stdio_printf_options() and
   __local_stdio_scanf_options(), which I'd never noticed before, but
   apparently are internal to a standard library header.
2023-05-27 17:45:15 +01:00
..
test Start a windows/test subdirectory. 2023-03-15 19:40:23 +00:00
utils split_into_argv: stop using isspace(). 2023-04-19 14:28:36 +01:00
agent-client.c Formatting: standardise on "func(\n", not "func\n(". 2022-08-03 20:48:46 +01:00
cliloop.c Reorganise Windows HANDLE management. 2021-05-24 15:27:38 +01:00
CMakeLists.txt Add a Unicode version of split_into_argv(). 2023-03-16 17:33:49 +00:00
config.c Macro wrapper on ctrl_radiobuttons to fill in the NULL. 2022-06-01 11:14:21 +01:00
conpty.c pterm.exe: load the ConPTY API at run time. 2022-05-21 09:53:03 +01:00
console.c term_get_userpass_input: support the prompts->utf8 flag. 2023-03-04 14:06:04 +00:00
controls.c Add platform-independent fontspec_new_default() function. 2023-02-18 14:10:21 +00:00
cryptoapi.h Rename most of the platform source files. 2021-04-26 18:00:01 +01:00
dialog.c Rewrite some manual char-buffer-handling code. 2022-09-14 16:10:29 +01:00
gss.c Formatting: normalise to put a space after condition keywords. 2022-12-28 15:32:24 +00:00
handle-io.c Update source file names in comments and docs. 2022-01-22 15:51:31 +00:00
handle-socket.c New facility, platform_start_subprocess. 2022-09-01 20:43:23 +01:00
handle-wait.c Fix an unused variable. 2021-05-27 09:48:32 +01:00
help.c Fix potential corruption when writing help file. 2023-04-19 14:28:36 +01:00
help.h Work around key algorithm naming change in OpenSSH <= 7.7. 2023-05-05 00:05:28 +01:00
help.rc2 Rename most of the platform source files. 2021-04-26 18:00:01 +01:00
installer.wxs Windows installer: restore InstallScope setting. 2023-04-19 14:28:36 +01:00
jump-list.c Formatting: miscellaneous. 2022-08-03 20:48:46 +01:00
local-proxy.c New facility, platform_start_subprocess. 2022-09-01 20:43:23 +01:00
make_install_images.sh Remove white dialog background in MSI user interface. 2020-06-21 16:39:47 +01:00
msifixup.py Remove white dialog background in MSI user interface. 2020-06-21 16:39:47 +01:00
named-pipe-client.c Update source file names in comments and docs. 2022-01-22 15:51:31 +00:00
named-pipe-server.c Rename 'ret' variables passed from allocation to return. 2022-09-14 16:10:29 +01:00
network.c Formatting: normalise to { on same line. 2022-12-28 15:37:57 +00:00
no-jump-list.c Add some missing #includes. 2022-09-03 11:59:12 +01:00
nohelp.c Update source file names in comments and docs. 2022-01-22 15:51:31 +00:00
noise.c Rename most of the platform source files. 2021-04-26 18:00:01 +01:00
pageant-rc.h winpgnt: say 'click to focus' in async passphrase prompt. 2021-04-22 20:00:46 +01:00
pageant.c Add some missing casts in ctype functions. 2023-04-19 14:28:36 +01:00
pageant.ico
pageant.mft Whitespace rationalisation of entire code base. 2019-09-08 20:29:21 +01:00
pageant.rc Certificate-aware handling of key fingerprints. 2022-08-05 18:08:59 +01:00
pageants.ico
platform.h Initial work on a terminal test program. 2023-03-05 10:18:50 +00:00
plink.c Handle the -batch option centrally in cmdline.c. 2022-11-26 10:31:18 +00:00
plink.rc
printing.c Rename 'ret' variables passed from allocation to return. 2022-09-14 16:10:29 +01:00
pscp.ico
pscp.rc
psftp.rc
psocks.c Rename most of the platform source files. 2021-04-26 18:00:01 +01:00
pterm.c split_into_argv: add special case for program name. 2022-11-26 10:32:36 +00:00
pterm.ico Make Windows versions of the pterm icons. 2021-05-08 17:33:25 +01:00
pterm.rc New application: a Windows version of 'pterm'! 2021-05-08 17:51:27 +01:00
ptermcfg.ico Make Windows versions of the pterm icons. 2021-05-08 17:33:25 +01:00
putty-common.rc2 Windows host-key warning: reinstate shortcut. 2022-10-21 20:41:36 +01:00
putty-rc.h Centralise most details of host-key prompting. 2022-07-07 18:05:32 +01:00
putty.c split_into_argv: add special case for program name. 2022-11-26 10:32:36 +00:00
putty.ico
putty.mft Windows 10: add per monitor DPI awareness support. 2021-04-02 19:04:19 +01:00
putty.rc Move icon declarations out of putty-common.rc2. 2021-05-08 17:33:25 +01:00
puttycfg.ico
puttygen-rc.h PuTTYgen: option to control Argon2 flavour. 2021-02-23 18:26:50 +00:00
puttygen.c split_into_argv: add special case for program name. 2022-11-26 10:32:36 +00:00
puttygen.ico
puttygen.mft Whitespace rationalisation of entire code base. 2019-09-08 20:29:21 +01:00
puttygen.rc Windows PuTTYgen: also display certificate info. 2022-07-30 17:16:55 +01:00
puttyins.ico
puttytel.mft Windows 10: add per monitor DPI awareness support. 2021-04-02 19:04:19 +01:00
puttytel.rc Move icon declarations out of putty-common.rc2. 2021-05-08 17:33:25 +01:00
rcstuff.h Replace mkfiles.pl with a CMake build system. 2021-04-17 13:53:02 +01:00
README-msi.txt Remove note about .CHM on network drives. 2019-03-18 21:53:45 +00:00
security-api.h Update source file names in comments and docs. 2022-01-22 15:51:31 +00:00
select-cli.c Update source file names in comments and docs. 2022-01-22 15:51:31 +00:00
select-gui.c Handle WM_NETEVENT in Windows Pageant. 2022-02-04 19:32:47 +00:00
serial.c Add memsets after allocation of all Backend implementors. 2021-10-30 17:28:28 +01:00
sftp.c Formatting: normalise to put a space after condition keywords. 2022-12-28 15:32:24 +00:00
sharing.c Windows: factor out mutex lock/unlock from sharing.c. 2022-01-03 12:12:05 +00:00
sizetip.c Formatting change to braces around one case of a switch. 2020-02-16 11:26:21 +00:00
storage.c Rename 'ret' variables passed from allocation to return. 2022-09-14 16:10:29 +01:00
unicode.c Add some missing casts in ctype functions. 2023-04-19 14:28:36 +01:00
version.rc2 FIXME about Windows resource CHMfulness hint. 2019-03-18 22:02:13 +00:00
website.url Switch chiark URLs to https. 2017-05-07 16:29:01 +01:00
win-gui-seat.h windows/window.c: move more variables into WinGuiSeat. 2023-05-27 17:45:15 +01:00
window.c windows/window.c: move more variables into WinGuiSeat. 2023-05-27 17:45:15 +01:00
x11.c Update source file names in comments and docs. 2022-01-22 15:51:31 +00:00