mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-06-30 19:12:48 -05:00
Formatting: realign run-on parenthesised stuff.
My bulk indentation check also turned up a lot of cases where a run-on function call or if statement didn't have its later lines aligned correctly relative to the open paren. I think this is quite easy to do by getting things out of sync (editing the first line of the function call and forgetting to update the rest, perhaps even because you never _saw_ the rest during a search-replace). But a few didn't quite fit into that pattern, in particular an outright misleading case in unix/askpass.c where the second line of a call was aligned neatly below the _wrong_ one of the open parens on the opening line. Restored as many alignments as I could easily find.
This commit is contained in:
@ -1854,7 +1854,7 @@ bool winctrl_handle_command(struct dlgparam *dp, UINT msg,
|
||||
SetMapMode(hdc, MM_TEXT); /* ensure logical units == pixels */
|
||||
|
||||
GetTextExtentPoint32(hdc, (char *)c->data,
|
||||
strlen((char *)c->data), &s);
|
||||
strlen((char *)c->data), &s);
|
||||
DrawEdge(hdc, &r, EDGE_ETCHED, BF_ADJUST | BF_RECT);
|
||||
TextOut(hdc,
|
||||
r.left + (r.right-r.left-s.cx)/2,
|
||||
@ -2286,7 +2286,7 @@ void dlg_listbox_addwithid(dlgcontrol *ctrl, dlgparam *dp,
|
||||
msg = (c->ctrl->type==CTRL_LISTBOX && c->ctrl->listbox.height!=0 ?
|
||||
LB_ADDSTRING : CB_ADDSTRING);
|
||||
msg2 = (c->ctrl->type==CTRL_LISTBOX && c->ctrl->listbox.height!=0 ?
|
||||
LB_SETITEMDATA : CB_SETITEMDATA);
|
||||
LB_SETITEMDATA : CB_SETITEMDATA);
|
||||
index = SendDlgItemMessage(dp->hwnd, c->base_id+1, msg, 0, (LPARAM)text);
|
||||
SendDlgItemMessage(dp->hwnd, c->base_id+1, msg2, index, (LPARAM)id);
|
||||
}
|
||||
@ -2547,7 +2547,7 @@ void dlg_refresh(dlgcontrol *ctrl, dlgparam *dp)
|
||||
i++) {
|
||||
if (c->ctrl && c->ctrl->handler != NULL)
|
||||
c->ctrl->handler(c->ctrl, dp,
|
||||
dp->data, EVENT_REFRESH);
|
||||
dp->data, EVENT_REFRESH);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
@ -928,7 +928,7 @@ static INT_PTR HostKeyMoreInfoProc(HWND hwnd, UINT msg, WPARAM wParam,
|
||||
MapDialogRect(hwnd, &r);
|
||||
HWND ctl = GetDlgItem(hwnd, IDOK);
|
||||
SetWindowPos(ctl, NULL, r.left, r.top, 0, 0,
|
||||
SWP_NOSIZE | SWP_NOREDRAW | SWP_NOZORDER);
|
||||
SWP_NOSIZE | SWP_NOREDRAW | SWP_NOZORDER);
|
||||
|
||||
r.left = r.top = r.right = 0;
|
||||
r.bottom = 300;
|
||||
|
@ -665,8 +665,8 @@ static Ssh_gss_stat ssh_sspi_verify_mic(struct ssh_gss_library *lib,
|
||||
InputSecurityToken[1].pvBuffer = mic->value;
|
||||
|
||||
winctx->maj_stat = p_VerifySignature(&winctx->context,
|
||||
&InputBufferDescriptor,
|
||||
0, &qop);
|
||||
&InputBufferDescriptor,
|
||||
0, &qop);
|
||||
return winctx->maj_stat;
|
||||
}
|
||||
|
||||
|
@ -103,7 +103,7 @@ struct PassphraseProcStruct {
|
||||
* Dialog-box function for the Licence box.
|
||||
*/
|
||||
static INT_PTR CALLBACK LicenceProc(HWND hwnd, UINT msg,
|
||||
WPARAM wParam, LPARAM lParam)
|
||||
WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
switch (msg) {
|
||||
case WM_INITDIALOG:
|
||||
@ -128,7 +128,7 @@ static INT_PTR CALLBACK LicenceProc(HWND hwnd, UINT msg,
|
||||
* Dialog-box function for the About box.
|
||||
*/
|
||||
static INT_PTR CALLBACK AboutProc(HWND hwnd, UINT msg,
|
||||
WPARAM wParam, LPARAM lParam)
|
||||
WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
switch (msg) {
|
||||
case WM_INITDIALOG: {
|
||||
@ -214,7 +214,7 @@ static void end_passphrase_dialog(HWND hwnd, INT_PTR result)
|
||||
* Dialog-box function for the passphrase box.
|
||||
*/
|
||||
static INT_PTR CALLBACK PassphraseProc(HWND hwnd, UINT msg,
|
||||
WPARAM wParam, LPARAM lParam)
|
||||
WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
struct PassphraseProcStruct *p;
|
||||
|
||||
@ -592,7 +592,7 @@ static void prompt_add_keyfile(bool encrypted)
|
||||
* Dialog-box function for the key list box.
|
||||
*/
|
||||
static INT_PTR CALLBACK KeyListProc(HWND hwnd, UINT msg,
|
||||
WPARAM wParam, LPARAM lParam)
|
||||
WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
static const struct {
|
||||
const char *name;
|
||||
@ -1865,7 +1865,7 @@ int WINAPI WinMain(HINSTANCE inst, HINSTANCE prev, LPSTR cmdline, int show)
|
||||
AppendMenu(systray_menu, MF_SEPARATOR, 0, 0);
|
||||
}
|
||||
AppendMenu(systray_menu, MF_ENABLED, IDM_VIEWKEYS,
|
||||
"&View Keys");
|
||||
"&View Keys");
|
||||
AppendMenu(systray_menu, MF_ENABLED, IDM_ADDKEY, "Add &Key");
|
||||
AppendMenu(systray_menu, MF_ENABLED, IDM_ADDKEY_ENCRYPTED,
|
||||
"Add key (encrypted)");
|
||||
|
@ -203,7 +203,7 @@ struct PassphraseProcStruct {
|
||||
* Dialog-box function for the passphrase box.
|
||||
*/
|
||||
static INT_PTR CALLBACK PassphraseProc(HWND hwnd, UINT msg,
|
||||
WPARAM wParam, LPARAM lParam)
|
||||
WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
static char **passphrase = NULL;
|
||||
struct PassphraseProcStruct *p;
|
||||
@ -483,7 +483,7 @@ static bool prompt_keyfile(HWND hwnd, char *dlgtitle,
|
||||
* Dialog-box function for the Licence box.
|
||||
*/
|
||||
static INT_PTR CALLBACK LicenceProc(HWND hwnd, UINT msg,
|
||||
WPARAM wParam, LPARAM lParam)
|
||||
WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
switch (msg) {
|
||||
case WM_INITDIALOG: {
|
||||
@ -522,7 +522,7 @@ static INT_PTR CALLBACK LicenceProc(HWND hwnd, UINT msg,
|
||||
* Dialog-box function for the About box.
|
||||
*/
|
||||
static INT_PTR CALLBACK AboutProc(HWND hwnd, UINT msg,
|
||||
WPARAM wParam, LPARAM lParam)
|
||||
WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
switch (msg) {
|
||||
case WM_INITDIALOG:
|
||||
@ -1457,7 +1457,7 @@ static INT_PTR CertInfoProc(HWND hwnd, UINT msg, WPARAM wParam,
|
||||
MapDialogRect(hwnd, &r);
|
||||
HWND ctl = GetDlgItem(hwnd, IDOK);
|
||||
SetWindowPos(ctl, NULL, r.left, r.top, 0, 0,
|
||||
SWP_NOSIZE | SWP_NOREDRAW | SWP_NOZORDER);
|
||||
SWP_NOSIZE | SWP_NOREDRAW | SWP_NOZORDER);
|
||||
|
||||
r.left = r.top = r.right = 0;
|
||||
r.bottom = 300;
|
||||
@ -1496,7 +1496,7 @@ static INT_PTR CertInfoProc(HWND hwnd, UINT msg, WPARAM wParam,
|
||||
* Dialog-box function for the main PuTTYgen dialog box.
|
||||
*/
|
||||
static INT_PTR CALLBACK MainDlgProc(HWND hwnd, UINT msg,
|
||||
WPARAM wParam, LPARAM lParam)
|
||||
WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
const int DEMO_SCREENSHOT_TIMER_ID = 1230;
|
||||
static const char entropy_msg[] =
|
||||
|
@ -348,7 +348,7 @@ int check_stored_host_key(const char *hostname, int port,
|
||||
}
|
||||
|
||||
bool have_ssh_host_key(const char *hostname, int port,
|
||||
const char *keytype)
|
||||
const char *keytype)
|
||||
{
|
||||
/*
|
||||
* If we have a host key, check_stored_host_key will return 0 or 2.
|
||||
|
@ -1724,8 +1724,8 @@ static void wintw_request_resize(TermWin *tw, int w, int h)
|
||||
height = extra_height + font_height * h;
|
||||
|
||||
SetWindowPos(wgs.term_hwnd, NULL, 0, 0, width, height,
|
||||
SWP_NOACTIVATE | SWP_NOCOPYBITS |
|
||||
SWP_NOMOVE | SWP_NOZORDER);
|
||||
SWP_NOACTIVATE | SWP_NOCOPYBITS |
|
||||
SWP_NOMOVE | SWP_NOZORDER);
|
||||
} else {
|
||||
/*
|
||||
* If we're resizing by changing the font, we must tell the
|
||||
@ -1864,10 +1864,10 @@ static void reset_window(int reinit) {
|
||||
rect.right += (window_border * 2);
|
||||
rect.bottom += (window_border * 2);
|
||||
OffsetRect(&dpi_info.new_wnd_rect,
|
||||
((dpi_info.new_wnd_rect.right - dpi_info.new_wnd_rect.left) -
|
||||
(rect.right - rect.left)) / 2,
|
||||
((dpi_info.new_wnd_rect.bottom - dpi_info.new_wnd_rect.top) -
|
||||
(rect.bottom - rect.top)) / 2);
|
||||
((dpi_info.new_wnd_rect.right - dpi_info.new_wnd_rect.left) -
|
||||
(rect.right - rect.left)) / 2,
|
||||
((dpi_info.new_wnd_rect.bottom - dpi_info.new_wnd_rect.top) -
|
||||
(rect.bottom - rect.top)) / 2);
|
||||
SetWindowPos(wgs.term_hwnd, NULL,
|
||||
dpi_info.new_wnd_rect.left, dpi_info.new_wnd_rect.top,
|
||||
rect.right - rect.left, rect.bottom - rect.top,
|
||||
@ -1912,7 +1912,7 @@ static void reset_window(int reinit) {
|
||||
*/
|
||||
if ((resize_action == RESIZE_TERM && reinit<=0) ||
|
||||
(resize_action == RESIZE_EITHER && reinit<0) ||
|
||||
reinit>0) {
|
||||
reinit>0) {
|
||||
offset_width = offset_height = window_border;
|
||||
extra_width = wr.right - wr.left - cr.right + cr.left + offset_width*2;
|
||||
extra_height = wr.bottom - wr.top - cr.bottom + cr.top +offset_height*2;
|
||||
@ -4628,8 +4628,8 @@ static int TranslateKey(UINT message, WPARAM wParam, LPARAM lParam,
|
||||
break;
|
||||
|
||||
p += format_small_keypad_key((char *)p, term, sk_key,
|
||||
shift_state & 1, shift_state & 2,
|
||||
left_alt, &consumed_alt);
|
||||
shift_state & 1, shift_state & 2,
|
||||
left_alt, &consumed_alt);
|
||||
if (consumed_alt)
|
||||
left_alt = false; /* supersedes the usual prefixing of Esc */
|
||||
return p - output;
|
||||
@ -5627,7 +5627,7 @@ static void wintw_bell(TermWin *tw, int mode)
|
||||
} else if (mode == BELL_WAVEFILE) {
|
||||
Filename *bell_wavefile = conf_get_filename(conf, CONF_bell_wavefile);
|
||||
if (!p_PlaySound || !p_PlaySound(bell_wavefile->path, NULL,
|
||||
SND_ASYNC | SND_FILENAME)) {
|
||||
SND_ASYNC | SND_FILENAME)) {
|
||||
char *buf, *otherbuf;
|
||||
show_mouseptr(true);
|
||||
buf = dupprintf(
|
||||
|
Reference in New Issue
Block a user