mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-09 17:38:00 +00: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:
parent
4b8dc56284
commit
9cac27946a
3
pscp.c
3
pscp.c
@ -2189,8 +2189,7 @@ static void usage(void)
|
||||
printf("PuTTY Secure Copy client\n");
|
||||
printf("%s\n", ver);
|
||||
printf("Usage: pscp [options] [user@]host:source target\n");
|
||||
printf(
|
||||
" pscp [options] source [source...] [user@]host:target\n");
|
||||
printf(" pscp [options] source [source...] [user@]host:target\n");
|
||||
printf(" pscp [options] -ls [user@]host:filespec\n");
|
||||
printf("Options:\n");
|
||||
printf(" -V print version information and exit\n");
|
||||
|
@ -514,7 +514,7 @@ void portfwd_raw_setup(Channel *pfchan, Socket *s, SshChannel *sc)
|
||||
}
|
||||
|
||||
/*
|
||||
called when someone connects to the local port
|
||||
* called when someone connects to the local port
|
||||
*/
|
||||
|
||||
static int pfl_accepting(Plug *p, accept_fn_t constructor, accept_ctx_t ctx)
|
||||
|
@ -283,8 +283,7 @@ bool fxp_init(void)
|
||||
return false;
|
||||
}
|
||||
if (remotever > SFTP_PROTO_VERSION) {
|
||||
fxp_internal_error(
|
||||
"remote protocol is more advanced than we support");
|
||||
fxp_internal_error("remote protocol is more advanced than we support");
|
||||
sftp_pkt_free(pktin);
|
||||
return false;
|
||||
}
|
||||
|
@ -1223,8 +1223,9 @@ static void ssh2_userauth_process_queue(PacketProtocolLayer *ppl)
|
||||
ppl_logevent("GSSAPI authentication initialisation "
|
||||
"failed");
|
||||
|
||||
if (s->shgss->lib->display_status(s->shgss->lib,
|
||||
s->shgss->ctx, &s->gss_buf) == SSH_GSS_OK) {
|
||||
if (s->shgss->lib->display_status(
|
||||
s->shgss->lib, s->shgss->ctx, &s->gss_buf)
|
||||
== SSH_GSS_OK) {
|
||||
ppl_logevent("%s", (char *)s->gss_buf.value);
|
||||
sfree(s->gss_buf.value);
|
||||
}
|
||||
|
@ -3128,8 +3128,8 @@ static void do_osc(Terminal *term)
|
||||
{
|
||||
if (term->osc_w) {
|
||||
while (term->osc_strlen--)
|
||||
term->wordness[(unsigned char)
|
||||
term->osc_string[term->osc_strlen]] = term->esc_args[0];
|
||||
term->wordness[(unsigned char)term->osc_string[term->osc_strlen]] =
|
||||
term->esc_args[0];
|
||||
} else {
|
||||
term->osc_string[term->osc_strlen] = '\0';
|
||||
switch (term->esc_args[0]) {
|
||||
|
@ -1915,11 +1915,10 @@ gint key_event(GtkWidget *widget, GdkEventKey *event, gpointer data)
|
||||
if (event->state & GDK_CONTROL_MASK)
|
||||
break;
|
||||
|
||||
end = 1 + format_small_keypad_key(output+1, inst->term, sk_key,
|
||||
event->state & GDK_SHIFT_MASK,
|
||||
end = 1 + format_small_keypad_key(
|
||||
output+1, inst->term, sk_key, event->state & GDK_SHIFT_MASK,
|
||||
event->state & GDK_CONTROL_MASK,
|
||||
event->state & inst->meta_mod_mask,
|
||||
&consumed_meta_key);
|
||||
event->state & inst->meta_mod_mask, &consumed_meta_key);
|
||||
if (consumed_meta_key)
|
||||
start = 1; /* supersedes the usual prefixing of Esc */
|
||||
#ifdef KEY_EVENT_DIAGNOSTICS
|
||||
@ -1941,11 +1940,10 @@ gint key_event(GtkWidget *widget, GdkEventKey *event, gpointer data)
|
||||
xkey = 'G'; goto arrow_key;
|
||||
arrow_key:
|
||||
consumed_meta_key = false;
|
||||
end = 1 + format_arrow_key(output+1, inst->term, xkey,
|
||||
event->state & GDK_SHIFT_MASK,
|
||||
end = 1 + format_arrow_key(
|
||||
output+1, inst->term, xkey, event->state & GDK_SHIFT_MASK,
|
||||
event->state & GDK_CONTROL_MASK,
|
||||
event->state & inst->meta_mod_mask,
|
||||
&consumed_meta_key);
|
||||
event->state & inst->meta_mod_mask, &consumed_meta_key);
|
||||
if (consumed_meta_key)
|
||||
start = 1; /* supersedes the usual prefixing of Esc */
|
||||
#ifdef KEY_EVENT_DIAGNOSTICS
|
||||
|
@ -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
|
||||
|
@ -1494,8 +1494,7 @@ 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,
|
||||
else if (TranslateCharsetInfo ((DWORD *)(ULONG_PTR)cset,
|
||||
&info, TCI_SRCCHARSET))
|
||||
ucsdata.font_codepage = info.ciACP;
|
||||
else
|
||||
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user