mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-07-01 03:22:48 -05:00
Formatting: miscellaneous.
This patch fixes a few other whitespace and formatting issues which were pointed out by the bulk-reindent or which I spotted in passing, some involving manual editing to break lines more nicely. I think the weirdest hunk in here is the one in windows/window.c TranslateKey() where _half_ of an assignment statement inside an 'if' was on the same line as the trailing paren of the if condition. No idea at all how that one managed to happen!
This commit is contained in:
@ -721,8 +721,7 @@ bool set_explicit_app_user_model_id(void)
|
||||
|
||||
static HMODULE shell32_module = 0;
|
||||
|
||||
if (!shell32_module)
|
||||
{
|
||||
if (!shell32_module) {
|
||||
shell32_module = load_system32_dll("Shell32.dll");
|
||||
/*
|
||||
* We can't typecheck this function here, because it's defined
|
||||
@ -733,11 +732,9 @@ bool set_explicit_app_user_model_id(void)
|
||||
shell32_module, SetCurrentProcessExplicitAppUserModelID);
|
||||
}
|
||||
|
||||
if (p_SetCurrentProcessExplicitAppUserModelID)
|
||||
{
|
||||
if (p_SetCurrentProcessExplicitAppUserModelID) {
|
||||
const wchar_t *id = get_app_user_model_id();
|
||||
if (p_SetCurrentProcessExplicitAppUserModelID(id) == S_OK)
|
||||
{
|
||||
if (p_SetCurrentProcessExplicitAppUserModelID(id) == S_OK) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
@ -1166,8 +1166,7 @@ static char *answer_filemapping_message(const char *mapname)
|
||||
err = dupstr("wrong owning SID of file mapping");
|
||||
goto cleanup;
|
||||
}
|
||||
} else
|
||||
{
|
||||
} else {
|
||||
#ifdef DEBUG_IPC
|
||||
debug("security APIs not present\n");
|
||||
#endif
|
||||
|
@ -681,7 +681,7 @@ void init_ucs(Conf *conf, struct unicode_data *ucsdata)
|
||||
for (i = 96; i < 127; i++)
|
||||
if (!DIRECT_FONT(ucsdata->unitab_xterm[i]))
|
||||
ucsdata->unitab_xterm[i] =
|
||||
(WCHAR) (CSET_ACP + poorman_vt100[i - 96]);
|
||||
(WCHAR) (CSET_ACP + poorman_vt100[i - 96]);
|
||||
for(i=128;i<256;i++)
|
||||
if (!DIRECT_FONT(ucsdata->unitab_scoacs[i]))
|
||||
ucsdata->unitab_scoacs[i] =
|
||||
@ -724,7 +724,7 @@ wchar_t xlat_uskbd2cyrllic(int ch)
|
||||
0x0440, 0x0448, 0x043e, 0x043b, 0x0434, 0x044c, 0x0442, 0x0449,
|
||||
0x0437, 0x0439, 0x043a, 0x044b, 0x0435, 0x0433, 0x043c, 0x0446,
|
||||
0x0447, 0x043d, 0x044f, 0x0425, 0x0407, 0x042a, 126, 127
|
||||
};
|
||||
};
|
||||
return cyrtab[ch&0x7F];
|
||||
}
|
||||
|
||||
|
@ -1494,10 +1494,9 @@ static void init_fonts(int pick_width, int pick_height)
|
||||
/* !!! Yes the next line is right */
|
||||
if (cset == OEM_CHARSET)
|
||||
ucsdata.font_codepage = GetOEMCP();
|
||||
else
|
||||
if (TranslateCharsetInfo ((DWORD *)(ULONG_PTR)cset,
|
||||
&info, TCI_SRCCHARSET))
|
||||
ucsdata.font_codepage = info.ciACP;
|
||||
else if (TranslateCharsetInfo ((DWORD *)(ULONG_PTR)cset,
|
||||
&info, TCI_SRCCHARSET))
|
||||
ucsdata.font_codepage = info.ciACP;
|
||||
else
|
||||
ucsdata.font_codepage = -1;
|
||||
|
||||
@ -2040,10 +2039,10 @@ static Mouse_Button translate_button(Mouse_Button button)
|
||||
return MBT_SELECT;
|
||||
if (button == MBT_MIDDLE)
|
||||
return conf_get_int(conf, CONF_mouse_is_xterm) == 1 ?
|
||||
MBT_PASTE : MBT_EXTEND;
|
||||
MBT_PASTE : MBT_EXTEND;
|
||||
if (button == MBT_RIGHT)
|
||||
return conf_get_int(conf, CONF_mouse_is_xterm) == 1 ?
|
||||
MBT_EXTEND : MBT_PASTE;
|
||||
MBT_EXTEND : MBT_PASTE;
|
||||
return 0; /* shouldn't happen */
|
||||
}
|
||||
|
||||
@ -3819,9 +3818,7 @@ static void do_text_internal(
|
||||
MultiByteToWideChar(ucsdata.font_codepage, MB_USEGLYPHCHARS,
|
||||
dbcstext, 2, uni_buf+nlen, 1);
|
||||
mptr++;
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
char dbcstext[1];
|
||||
dbcstext[0] = text[mptr] & 0xFF;
|
||||
MultiByteToWideChar(ucsdata.font_codepage, MB_USEGLYPHCHARS,
|
||||
@ -4301,9 +4298,9 @@ static int TranslateKey(UINT message, WPARAM wParam, LPARAM lParam,
|
||||
}
|
||||
|
||||
if (wParam == compose_keycode) {
|
||||
if (compose_state == 0
|
||||
&& (HIWORD(lParam) & (KF_UP | KF_REPEAT)) == 0) compose_state =
|
||||
1;
|
||||
if (compose_state == 0 &&
|
||||
(HIWORD(lParam) & (KF_UP | KF_REPEAT)) == 0)
|
||||
compose_state = 1;
|
||||
else if (compose_state == 1 && (HIWORD(lParam) & KF_UP))
|
||||
compose_state = 2;
|
||||
else
|
||||
|
Reference in New Issue
Block a user