| ︙ | | | ︙ | |
154
155
156
157
158
159
160
161
162
163
164
165
166
167
|
/* this allows xterm-style mouse handling. */
static int send_raw_mouse = 0;
static int wheel_accumulator = 0;
static char *window_name, *icon_name;
static int compose_state = 0;
static OSVERSIONINFO osVersion;
static UINT wm_mousewheel = WM_MOUSEWHEEL;
/* Dummy routine, only required in plink. */
void ldisc_update(int echo, int edit)
|
>
>
|
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
|
/* this allows xterm-style mouse handling. */
static int send_raw_mouse = 0;
static int wheel_accumulator = 0;
static char *window_name, *icon_name;
static int compose_state = 0;
static int wsa_started = 0;
static OSVERSIONINFO osVersion;
static UINT wm_mousewheel = WM_MOUSEWHEEL;
/* Dummy routine, only required in plink. */
void ldisc_update(int echo, int edit)
|
| ︙ | | | ︙ | |
188
189
190
191
192
193
194
195
196
197
198
199
200
201
|
}
if (LOBYTE(wsadata.wVersion) != 1 || HIBYTE(wsadata.wVersion) != 1) {
MessageBox(NULL, "WinSock version is incompatible with 1.1",
"WinSock Error", MB_OK | MB_ICONEXCLAMATION);
WSACleanup();
return 1;
}
/* WISHLIST: maybe allow config tweaking even if winsock not present? */
sk_init();
InitCommonControls();
/* Ensure a Maximize setting in Explorer doesn't maximise the
* config box. */
|
>
|
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
|
}
if (LOBYTE(wsadata.wVersion) != 1 || HIBYTE(wsadata.wVersion) != 1) {
MessageBox(NULL, "WinSock version is incompatible with 1.1",
"WinSock Error", MB_OK | MB_ICONEXCLAMATION);
WSACleanup();
return 1;
}
wsa_started = 1;
/* WISHLIST: maybe allow config tweaking even if winsock not present? */
sk_init();
InitCommonControls();
/* Ensure a Maximize setting in Explorer doesn't maximise the
* config box. */
|
| ︙ | | | ︙ | |
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
|
*/
WaitMessage();
if (GetMessage(&msg, NULL, 0, 0) != 1)
break;
}
}
/*
* Clean up.
*/
deinit_fonts();
sfree(logpal);
if (pal)
DeleteObject(pal);
WSACleanup();
if (cfg.protocol == PROT_SSH) {
random_save_seed();
#ifdef MSCRYPTOAPI
crypto_wrapup();
#endif
}
return msg.wParam;
}
/*
* Set up, or shut down, an AsyncSelect. Called from winnet.c.
*/
char *do_select(SOCKET skt, int startup)
{
|
>
>
>
>
>
>
>
>
>
>
|
|
|
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
|
*/
WaitMessage();
if (GetMessage(&msg, NULL, 0, 0) != 1)
break;
}
}
cleanup_exit(msg.wParam);
}
/*
* Clean up and exit.
*/
void cleanup_exit(int code)
{
/*
* Clean up.
*/
deinit_fonts();
sfree(logpal);
if (pal)
DeleteObject(pal);
sk_cleanup();
if (wsa_started)
WSACleanup();
if (cfg.protocol == PROT_SSH) {
random_save_seed();
#ifdef MSCRYPTOAPI
crypto_wrapup();
#endif
}
exit(code);
}
/*
* Set up, or shut down, an AsyncSelect. Called from winnet.c.
*/
char *do_select(SOCKET skt, int startup)
{
|
| ︙ | | | ︙ | |
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
|
va_list ap;
char stuff[200];
va_start(ap, fmt);
vsprintf(stuff, fmt, ap);
va_end(ap);
MessageBox(hwnd, stuff, "PuTTY Fatal Error", MB_ICONERROR | MB_OK);
exit(1);
}
/*
* Manage window caption / taskbar flashing, if enabled.
* 0 = stop, 1 = maintain, 2 = start
*/
static void flash_window(int mode)
|
|
|
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
|
va_list ap;
char stuff[200];
va_start(ap, fmt);
vsprintf(stuff, fmt, ap);
va_end(ap);
MessageBox(hwnd, stuff, "PuTTY Fatal Error", MB_ICONERROR | MB_OK);
cleanup_exit(1);
}
/*
* Manage window caption / taskbar flashing, if enabled.
* 0 = stop, 1 = maintain, 2 = start
*/
static void flash_window(int mode)
|
| ︙ | | | ︙ | |