projects
/
u
/
mdw
/
putty
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Placate gcc's `-Wall' warnings.
[u/mdw/putty]
/
window.c
diff --git
a/window.c
b/window.c
index
761097e
..
ea349bd
100644
(file)
--- a/
window.c
+++ b/
window.c
@@
-302,6
+302,14
@@
int WINAPI WinMain(HINSTANCE inst, HINSTANCE prev, LPSTR cmdline, int show)
}
}
}
}
+ /*
+ * Trim leading whitespace off the hostname if it's there.
+ */
+ {
+ int space = strspn(cfg.host, " \t");
+ memmove(cfg.host, cfg.host+space, 1+strlen(cfg.host)-space);
+ }
+
/* See if host is of the form user@host */
if (cfg.host[0] != '\0') {
char *atsign = strchr(cfg.host, '@');
/* See if host is of the form user@host */
if (cfg.host[0] != '\0') {
char *atsign = strchr(cfg.host, '@');
@@
-1134,6
+1142,7
@@
Mouse_Button translate_button(Mouse_Button button)
return cfg.mouse_is_xterm ? MBT_PASTE : MBT_EXTEND;
if (button == MBT_RIGHT)
return cfg.mouse_is_xterm ? MBT_EXTEND : MBT_PASTE;
return cfg.mouse_is_xterm ? MBT_PASTE : MBT_EXTEND;
if (button == MBT_RIGHT)
return cfg.mouse_is_xterm ? MBT_EXTEND : MBT_PASTE;
+ return 0; /* shouldn't happen */
}
static void show_mouseptr(int show)
}
static void show_mouseptr(int show)
@@
-1549,6
+1558,8
@@
static LRESULT CALLBACK WndProc(HWND hwnd, UINT message,
button = MBT_RIGHT;
press = 0;
break;
button = MBT_RIGHT;
press = 0;
break;
+ default:
+ button = press = 0; /* shouldn't happen */
}
show_mouseptr(1);
if (press) {
}
show_mouseptr(1);
if (press) {
@@
-3165,7
+3176,7
@@
void get_clip(wchar_t ** p, int *len)
clipdata = NULL;
return;
} else if (OpenClipboard(NULL)) {
clipdata = NULL;
return;
} else if (OpenClipboard(NULL)) {
- if (
clipdata = GetClipboardData(CF_UNICODETEXT
)) {
+ if (
(clipdata = GetClipboardData(CF_UNICODETEXT)
)) {
CloseClipboard();
*p = GlobalLock(clipdata);
if (*p) {
CloseClipboard();
*p = GlobalLock(clipdata);
if (*p) {
@@
-3173,7
+3184,7
@@
void get_clip(wchar_t ** p, int *len)
*len = p2 - *p;
return;
}
*len = p2 - *p;
return;
}
- } else if (
clipdata = GetClipboardData(CF_TEXT)
) {
+ } else if (
(clipdata = GetClipboardData(CF_TEXT))
) {
char *s;
int i;
CloseClipboard();
char *s;
int i;
CloseClipboard();