mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-07-01 03:22:48 -05:00
Remove remaining uses of the GLOBAL macro.
We now have no remaining things in header files that switch from being a declaration to a definition depending on an awkward #define at the point of including that header. There are still a few mutable variables with external linkage, but at least now each one is defined in a specific source file file appropriate to its purpose and context. The remaining globals as of this commit were: - 'logctx' and 'term', which never needed to be globals in the first place, because they were never actually shared between source files. Now 'term' is just a static in window.c, and 'logctx' is a static in each of that and winplink.c. - 'hinst', which still has external linkage, but is now defined separately in each source file that sets it up (i.e. those with a WinMain) - osMajorVersion, osMinorVersion and osPlatformId, whose definitions now live in winmisc.c alongside the code which sets them up. (Actually they were defined there all along, it turns out, but every toolchain I've built with has commoned them together with the version defined by the GLOBAL in the header.) - 'hwnd', which nothing was actually _using_ any more after previous commits, so all this commit had to do was delete it.
This commit is contained in:
@ -147,6 +147,8 @@ enum { SYSMENU, CTXMENU };
|
||||
static HMENU savedsess_menu;
|
||||
|
||||
static Conf *conf;
|
||||
static LogContext *logctx;
|
||||
static Terminal *term;
|
||||
|
||||
struct wm_netevent_params {
|
||||
/* Used to pass data to wm_netevent_callback */
|
||||
@ -473,6 +475,8 @@ const unsigned cmdline_tooltype =
|
||||
TOOLTYPE_PORT_ARG |
|
||||
TOOLTYPE_NO_VERBOSE_OPTION;
|
||||
|
||||
HINSTANCE hinst;
|
||||
|
||||
int WINAPI WinMain(HINSTANCE inst, HINSTANCE prev, LPSTR cmdline, int show)
|
||||
{
|
||||
MSG msg;
|
||||
|
Reference in New Issue
Block a user