diff --git a/pscp.c b/pscp.c index d6cc1250..7e26fa40 100644 --- a/pscp.c +++ b/pscp.c @@ -2189,8 +2189,8 @@ 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"); diff --git a/ssh/sftp.c b/ssh/sftp.c index b92f1fe7..7debf94c 100644 --- a/ssh/sftp.c +++ b/ssh/sftp.c @@ -283,8 +283,8 @@ 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; } diff --git a/ssh/sharing.c b/ssh/sharing.c index fae1d0d2..827830f5 100644 --- a/ssh/sharing.c +++ b/ssh/sharing.c @@ -530,8 +530,8 @@ void sharestate_free(ssh_sharing_state *sharestate) sfree(sharestate); } -static struct share_halfchannel *share_add_halfchannel - (struct ssh_sharing_connstate *cs, unsigned server_id) +static struct share_halfchannel *share_add_halfchannel( + struct ssh_sharing_connstate *cs, unsigned server_id) { struct share_halfchannel *hc = snew(struct share_halfchannel); hc->server_id = server_id; @@ -544,8 +544,8 @@ static struct share_halfchannel *share_add_halfchannel } } -static struct share_halfchannel *share_find_halfchannel - (struct ssh_sharing_connstate *cs, unsigned server_id) +static struct share_halfchannel *share_find_halfchannel( + struct ssh_sharing_connstate *cs, unsigned server_id) { struct share_halfchannel dummyhc; dummyhc.server_id = server_id; @@ -559,9 +559,9 @@ static void share_remove_halfchannel(struct ssh_sharing_connstate *cs, sfree(hc); } -static struct share_channel *share_add_channel - (struct ssh_sharing_connstate *cs, unsigned downstream_id, - unsigned upstream_id, unsigned server_id, int state, int maxpkt) +static struct share_channel *share_add_channel( + struct ssh_sharing_connstate *cs, unsigned downstream_id, + unsigned upstream_id, unsigned server_id, int state, int maxpkt) { struct share_channel *chan = snew(struct share_channel); chan->downstream_id = downstream_id; @@ -598,16 +598,16 @@ static void share_channel_set_server_id(struct ssh_sharing_connstate *cs, add234(cs->channels_by_server, chan); } -static struct share_channel *share_find_channel_by_upstream - (struct ssh_sharing_connstate *cs, unsigned upstream_id) +static struct share_channel *share_find_channel_by_upstream( + struct ssh_sharing_connstate *cs, unsigned upstream_id) { struct share_channel dummychan; dummychan.upstream_id = upstream_id; return find234(cs->channels_by_us, &dummychan, NULL); } -static struct share_channel *share_find_channel_by_server - (struct ssh_sharing_connstate *cs, unsigned server_id) +static struct share_channel *share_find_channel_by_server( + struct ssh_sharing_connstate *cs, unsigned server_id) { struct share_channel dummychan; dummychan.server_id = server_id; @@ -626,9 +626,8 @@ static void share_remove_channel(struct ssh_sharing_connstate *cs, sfree(chan); } -static struct share_xchannel *share_add_xchannel - (struct ssh_sharing_connstate *cs, - unsigned upstream_id, unsigned server_id) +static struct share_xchannel *share_add_xchannel( + struct ssh_sharing_connstate *cs, unsigned upstream_id, unsigned server_id) { struct share_xchannel *xc = snew(struct share_xchannel); xc->upstream_id = upstream_id; @@ -647,16 +646,16 @@ static struct share_xchannel *share_add_xchannel return xc; } -static struct share_xchannel *share_find_xchannel_by_upstream - (struct ssh_sharing_connstate *cs, unsigned upstream_id) +static struct share_xchannel *share_find_xchannel_by_upstream( + struct ssh_sharing_connstate *cs, unsigned upstream_id) { struct share_xchannel dummyxc; dummyxc.upstream_id = upstream_id; return find234(cs->xchannels_by_us, &dummyxc, NULL); } -static struct share_xchannel *share_find_xchannel_by_server - (struct ssh_sharing_connstate *cs, unsigned server_id) +static struct share_xchannel *share_find_xchannel_by_server( + struct ssh_sharing_connstate *cs, unsigned server_id) { struct share_xchannel dummyxc; dummyxc.server_id = server_id; @@ -671,9 +670,8 @@ static void share_remove_xchannel(struct ssh_sharing_connstate *cs, share_xchannel_free(xc); } -static struct share_forwarding *share_add_forwarding - (struct ssh_sharing_connstate *cs, - const char *host, int port) +static struct share_forwarding *share_add_forwarding( + struct ssh_sharing_connstate *cs, const char *host, int port) { struct share_forwarding *fwd = snew(struct share_forwarding); fwd->host = dupstr(host); @@ -687,8 +685,8 @@ static struct share_forwarding *share_add_forwarding return fwd; } -static struct share_forwarding *share_find_forwarding - (struct ssh_sharing_connstate *cs, const char *host, int port) +static struct share_forwarding *share_find_forwarding( + struct ssh_sharing_connstate *cs, const char *host, int port) { struct share_forwarding dummyfwd, *ret; dummyfwd.host = dupstr(host); @@ -1013,10 +1011,10 @@ void share_dead_xchannel_respond(struct ssh_sharing_connstate *cs, if (get_bool(src)) { strbuf *packet = strbuf_new(); put_uint32(packet, xc->server_id); - ssh_send_packet_from_downstream - (cs->parent->cl, cs->id, SSH2_MSG_CHANNEL_FAILURE, - packet->s, packet->len, - "downstream refused X channel open"); + ssh_send_packet_from_downstream( + cs->parent->cl, cs->id, SSH2_MSG_CHANNEL_FAILURE, + packet->s, packet->len, + "downstream refused X channel open"); strbuf_free(packet); } } else if (msg->type == SSH2_MSG_CHANNEL_CLOSE) { @@ -1380,9 +1378,9 @@ static void share_got_pkt_from_downstream(struct ssh_sharing_connstate *cs, * cleaned up if downstream goes away. */ pkt[wantreplypos] = 1; - ssh_send_packet_from_downstream - (cs->parent->cl, cs->id, type, pkt, pktlen, - orig_wantreply ? NULL : "upstream added want_reply flag"); + ssh_send_packet_from_downstream( + cs->parent->cl, cs->id, type, pkt, pktlen, + orig_wantreply ? NULL : "upstream added want_reply flag"); fwd = share_add_forwarding(cs, host, port); ssh_sharing_queue_global_request(cs->parent->cl, cs); @@ -1443,9 +1441,9 @@ static void share_got_pkt_from_downstream(struct ssh_sharing_connstate *cs, * deleted even if downstream doesn't want to know. */ pkt[wantreplypos] = 1; - ssh_send_packet_from_downstream - (cs->parent->cl, cs->id, type, pkt, pktlen, - orig_wantreply ? NULL : "upstream added want_reply flag"); + ssh_send_packet_from_downstream( + cs->parent->cl, cs->id, type, pkt, pktlen, + orig_wantreply ? NULL : "upstream added want_reply flag"); ssh_sharing_queue_global_request(cs->parent->cl, cs); /* diff --git a/ssh/userauth2-client.c b/ssh/userauth2-client.c index de71af7a..a7cb803f 100644 --- a/ssh/userauth2-client.c +++ b/ssh/userauth2-client.c @@ -1208,15 +1208,15 @@ static void ssh2_userauth_process_queue(PacketProtocolLayer *ppl) * When acquire_cred yields no useful expiration, go with * the service ticket expiration. */ - s->gss_stat = s->shgss->lib->init_sec_context - (s->shgss->lib, - &s->shgss->ctx, - s->shgss->srv_name, - s->gssapi_fwd, - &s->gss_rcvtok, - &s->gss_sndtok, - NULL, - NULL); + s->gss_stat = s->shgss->lib->init_sec_context( + s->shgss->lib, + &s->shgss->ctx, + s->shgss->srv_name, + s->gssapi_fwd, + &s->gss_rcvtok, + &s->gss_sndtok, + NULL, + NULL); if (s->gss_stat!=SSH_GSS_S_COMPLETE && s->gss_stat!=SSH_GSS_S_CONTINUE_NEEDED) { diff --git a/unix/askpass.c b/unix/askpass.c index f2cbafac..b45a1c23 100644 --- a/unix/askpass.c +++ b/unix/askpass.c @@ -292,8 +292,8 @@ static gboolean try_grab_keyboard(gpointer vctx) if (!GDK_IS_WINDOW(gdkw) || !gdk_window_is_visible(gdkw)) goto fail; - seat = gdk_display_get_default_seat - (gtk_widget_get_display(ctx->dialog)); + seat = gdk_display_get_default_seat( + gtk_widget_get_display(ctx->dialog)); if (!seat) goto fail; @@ -317,8 +317,8 @@ static gboolean try_grab_keyboard(gpointer vctx) GdkDeviceManager *dm; GdkDevice *pointer, *keyboard; - dm = gdk_display_get_device_manager - (gtk_widget_get_display(ctx->dialog)); + dm = gdk_display_get_device_manager( + gtk_widget_get_display(ctx->dialog)); if (!dm) goto fail; diff --git a/unix/dialog.c b/unix/dialog.c index 602991f1..0d9d9573 100644 --- a/unix/dialog.c +++ b/unix/dialog.c @@ -345,8 +345,8 @@ char *dlg_editbox_get(dlgcontrol *ctrl, dlgparam *dp) #if GTK_CHECK_VERSION(2,4,0) if (uc->combo) { - return dupstr(gtk_entry_get_text - (GTK_ENTRY(gtk_bin_get_child(GTK_BIN(uc->combo))))); + return dupstr(gtk_entry_get_text( + GTK_ENTRY(gtk_bin_get_child(GTK_BIN(uc->combo))))); } #endif @@ -425,9 +425,9 @@ void dlg_listbox_del(dlgcontrol *ctrl, dlgparam *dp, int index) #if !GTK_CHECK_VERSION(2,4,0) if (uc->menu) { - gtk_container_remove - (GTK_CONTAINER(uc->menu), - g_list_nth_data(GTK_MENU_SHELL(uc->menu)->children, index)); + gtk_container_remove( + GTK_CONTAINER(uc->menu), + g_list_nth_data(GTK_MENU_SHELL(uc->menu)->children, index)); return; } if (uc->list) { @@ -1003,8 +1003,8 @@ void dlg_set_focus(dlgcontrol *ctrl, dlgparam *dp) * focus it. */ for (int i = 0; i < ctrl->radio.nbuttons; i++) - if (gtk_toggle_button_get_active - (GTK_TOGGLE_BUTTON(uc->buttons[i]))) { + if (gtk_toggle_button_get_active( + GTK_TOGGLE_BUTTON(uc->buttons[i]))) { gtk_widget_grab_focus(uc->buttons[i]); } break; @@ -1137,8 +1137,8 @@ void dlg_coloursel_start(dlgcontrol *ctrl, dlgparam *dp, int r, int g, int b) GtkWidget *coloursel = gtk_color_selection_dialog_new("Select a colour"); GtkColorSelectionDialog *ccs = GTK_COLOR_SELECTION_DIALOG(coloursel); - GtkColorSelection *cs = GTK_COLOR_SELECTION - (gtk_color_selection_dialog_get_color_selection(ccs)); + GtkColorSelection *cs = GTK_COLOR_SELECTION( + gtk_color_selection_dialog_get_color_selection(ccs)); gtk_color_selection_set_has_opacity_control(cs, false); #endif @@ -1385,10 +1385,10 @@ static gboolean listitem_key(GtkWidget *item, GdkEventKey *event, gtk_list_select_child(GTK_LIST(list), GTK_WIDGET(children->data)); gtk_widget_grab_focus(GTK_WIDGET(children->data)); - gtk_adjustment_clamp_page - (adj, - adj->lower + (adj->upper-adj->lower) * i / n, - adj->lower + (adj->upper-adj->lower) * (i+1) / n); + gtk_adjustment_clamp_page( + adj, + adj->lower + (adj->upper-adj->lower) * i / n, + adj->lower + (adj->upper-adj->lower) * (i+1) / n); } g_list_free(chead); @@ -1620,8 +1620,8 @@ static void filesel_ok(GtkButton *button, gpointer data) struct dlgparam *dp = (struct dlgparam *)data; gpointer filesel = g_object_get_data(G_OBJECT(button), "user-data"); struct uctrl *uc = g_object_get_data(G_OBJECT(filesel), "user-data"); - const char *name = gtk_file_selection_get_filename - (GTK_FILE_SELECTION(filesel)); + const char *name = gtk_file_selection_get_filename( + GTK_FILE_SELECTION(filesel)); filechoose_emit_value(dp, uc, name); } #endif @@ -1634,14 +1634,14 @@ static void fontsel_ok(GtkButton *button, gpointer data) gpointer fontsel = g_object_get_data(G_OBJECT(button), "user-data"); struct uctrl *uc = g_object_get_data(G_OBJECT(fontsel), "user-data"); - const char *name = gtk_font_selection_dialog_get_font_name - (GTK_FONT_SELECTION_DIALOG(fontsel)); + const char *name = gtk_font_selection_dialog_get_font_name( + GTK_FONT_SELECTION_DIALOG(fontsel)); gtk_entry_set_text(GTK_ENTRY(uc->entry), name); #else - unifontsel *fontsel = (unifontsel *)g_object_get_data - (G_OBJECT(button), "user-data"); + unifontsel *fontsel = (unifontsel *)g_object_get_data( + G_OBJECT(button), "user-data"); struct uctrl *uc = (struct uctrl *)fontsel->user_data; char *name = unifontsel_get_name(fontsel); assert(name); /* should always be ok after OK pressed */ @@ -1685,9 +1685,9 @@ static void coloursel_ok(GtkButton *button, gpointer data) #if GTK_CHECK_VERSION(2,0,0) { - GtkColorSelection *cs = GTK_COLOR_SELECTION - (gtk_color_selection_dialog_get_color_selection - (GTK_COLOR_SELECTION_DIALOG(coloursel))); + GtkColorSelection *cs = GTK_COLOR_SELECTION( + gtk_color_selection_dialog_get_color_selection( + GTK_COLOR_SELECTION_DIALOG(coloursel))); GdkColor col; gtk_color_selection_get_current_color(cs, &col); dp->coloursel_result.r = col.red / 0x0100; @@ -1696,9 +1696,9 @@ static void coloursel_ok(GtkButton *button, gpointer data) } #else { - GtkColorSelection *cs = GTK_COLOR_SELECTION - (gtk_color_selection_dialog_get_color_selection - (GTK_COLOR_SELECTION_DIALOG(coloursel))); + GtkColorSelection *cs = GTK_COLOR_SELECTION( + gtk_color_selection_dialog_get_color_selection( + GTK_COLOR_SELECTION_DIALOG(coloursel))); gdouble cvals[4]; gtk_color_selection_get_color(cs, cvals); dp->coloursel_result.r = (int) (255 * cvals[0]); @@ -1728,14 +1728,14 @@ static void filefont_clicked(GtkButton *button, gpointer data) if (uc->ctrl->type == CTRL_FILESELECT) { #ifdef USE_GTK_FILE_CHOOSER_DIALOG - GtkWidget *filechoose = gtk_file_chooser_dialog_new - (uc->ctrl->fileselect.title, GTK_WINDOW(dp->window), - (uc->ctrl->fileselect.for_writing ? - GTK_FILE_CHOOSER_ACTION_SAVE : - GTK_FILE_CHOOSER_ACTION_OPEN), - STANDARD_CANCEL_LABEL, GTK_RESPONSE_CANCEL, - STANDARD_OPEN_LABEL, GTK_RESPONSE_ACCEPT, - (const gchar *)NULL); + GtkWidget *filechoose = gtk_file_chooser_dialog_new( + uc->ctrl->fileselect.title, GTK_WINDOW(dp->window), + (uc->ctrl->fileselect.for_writing ? + GTK_FILE_CHOOSER_ACTION_SAVE : + GTK_FILE_CHOOSER_ACTION_OPEN), + STANDARD_CANCEL_LABEL, GTK_RESPONSE_CANCEL, + STANDARD_OPEN_LABEL, GTK_RESPONSE_ACCEPT, + (const gchar *)NULL); gtk_window_set_modal(GTK_WINDOW(filechoose), true); g_object_set_data(G_OBJECT(filechoose), "user-data", (gpointer)uc); g_signal_connect(G_OBJECT(filechoose), "response", @@ -1745,19 +1745,19 @@ static void filefont_clicked(GtkButton *button, gpointer data) GtkWidget *filesel = gtk_file_selection_new(uc->ctrl->fileselect.title); gtk_window_set_modal(GTK_WINDOW(filesel), true); - g_object_set_data - (G_OBJECT(GTK_FILE_SELECTION(filesel)->ok_button), "user-data", - (gpointer)filesel); + g_object_set_data( + G_OBJECT(GTK_FILE_SELECTION(filesel)->ok_button), "user-data", + (gpointer)filesel); g_object_set_data(G_OBJECT(filesel), "user-data", (gpointer)uc); - g_signal_connect - (G_OBJECT(GTK_FILE_SELECTION(filesel)->ok_button), "clicked", - G_CALLBACK(filesel_ok), (gpointer)dp); - g_signal_connect_swapped - (G_OBJECT(GTK_FILE_SELECTION(filesel)->ok_button), "clicked", - G_CALLBACK(gtk_widget_destroy), (gpointer)filesel); - g_signal_connect_swapped - (G_OBJECT(GTK_FILE_SELECTION(filesel)->cancel_button), "clicked", - G_CALLBACK(gtk_widget_destroy), (gpointer)filesel); + g_signal_connect( + G_OBJECT(GTK_FILE_SELECTION(filesel)->ok_button), "clicked", + G_CALLBACK(filesel_ok), (gpointer)dp); + g_signal_connect_swapped( + G_OBJECT(GTK_FILE_SELECTION(filesel)->ok_button), "clicked", + G_CALLBACK(gtk_widget_destroy), (gpointer)filesel); + g_signal_connect_swapped( + G_OBJECT(GTK_FILE_SELECTION(filesel)->cancel_button), "clicked", + G_CALLBACK(gtk_widget_destroy), (gpointer)filesel); gtk_widget_show(filesel); #endif } @@ -1775,12 +1775,12 @@ static void filefont_clicked(GtkButton *button, gpointer data) GtkWidget *fontsel = gtk_font_selection_dialog_new("Select a font"); gtk_window_set_modal(GTK_WINDOW(fontsel), true); - gtk_font_selection_dialog_set_filter - (GTK_FONT_SELECTION_DIALOG(fontsel), - GTK_FONT_FILTER_BASE, GTK_FONT_ALL, - NULL, NULL, NULL, NULL, spacings, NULL); - if (!gtk_font_selection_dialog_set_font_name - (GTK_FONT_SELECTION_DIALOG(fontsel), fontname)) { + gtk_font_selection_dialog_set_filter( + GTK_FONT_SELECTION_DIALOG(fontsel), + GTK_FONT_FILTER_BASE, GTK_FONT_ALL, + NULL, NULL, NULL, NULL, spacings, NULL); + if (!gtk_font_selection_dialog_set_font_name( + GTK_FONT_SELECTION_DIALOG(fontsel), fontname)) { /* * If the font name wasn't found as it was, try opening * it and extracting its FONT property. This should @@ -1800,27 +1800,27 @@ static void filefont_clicked(GtkButton *button, gpointer data) if (XGetFontProperty(xfs, fontprop, &ret)) { char *name = XGetAtomName(disp, (Atom)ret); if (name) - gtk_font_selection_dialog_set_font_name - (GTK_FONT_SELECTION_DIALOG(fontsel), name); + gtk_font_selection_dialog_set_font_name( + GTK_FONT_SELECTION_DIALOG(fontsel), name); } gdk_font_unref(font); } } - g_object_set_data - (G_OBJECT(GTK_FONT_SELECTION_DIALOG(fontsel)->ok_button), - "user-data", (gpointer)fontsel); + g_object_set_data( + G_OBJECT(GTK_FONT_SELECTION_DIALOG(fontsel)->ok_button), + "user-data", (gpointer)fontsel); g_object_set_data(G_OBJECT(fontsel), "user-data", (gpointer)uc); - g_signal_connect - (G_OBJECT(GTK_FONT_SELECTION_DIALOG(fontsel)->ok_button), - "clicked", G_CALLBACK(fontsel_ok), (gpointer)dp); - g_signal_connect_swapped - (G_OBJECT(GTK_FONT_SELECTION_DIALOG(fontsel)->ok_button), - "clicked", G_CALLBACK(gtk_widget_destroy), - (gpointer)fontsel); - g_signal_connect_swapped - (G_OBJECT(GTK_FONT_SELECTION_DIALOG(fontsel)->cancel_button), - "clicked", G_CALLBACK(gtk_widget_destroy), - (gpointer)fontsel); + g_signal_connect( + G_OBJECT(GTK_FONT_SELECTION_DIALOG(fontsel)->ok_button), + "clicked", G_CALLBACK(fontsel_ok), (gpointer)dp); + g_signal_connect_swapped( + G_OBJECT(GTK_FONT_SELECTION_DIALOG(fontsel)->ok_button), + "clicked", G_CALLBACK(gtk_widget_destroy), + (gpointer)fontsel); + g_signal_connect_swapped( + G_OBJECT(GTK_FONT_SELECTION_DIALOG(fontsel)->cancel_button), + "clicked", G_CALLBACK(gtk_widget_destroy), + (gpointer)fontsel); gtk_widget_show(fontsel); #else /* !GTK_CHECK_VERSION(2,0,0) */ @@ -2018,8 +2018,8 @@ GtkWidget *layout_ctrls( GtkWidget *b; gint colstart; - b = (gtk_radio_button_new_with_label - (group, ctrl->radio.buttons[i])); + b = gtk_radio_button_new_with_label( + group, ctrl->radio.buttons[i]); uc->buttons[i] = b; group = gtk_radio_button_get_group(GTK_RADIO_BUTTON(b)); colstart = i % ctrl->radio.ncolumns; @@ -2059,8 +2059,8 @@ GtkWidget *layout_ctrls( */ uc->listmodel = gtk_list_store_new(2, G_TYPE_INT, G_TYPE_STRING); - w = gtk_combo_box_new_with_model_and_entry - (GTK_TREE_MODEL(uc->listmodel)); + w = gtk_combo_box_new_with_model_and_entry( + GTK_TREE_MODEL(uc->listmodel)); g_object_set(G_OBJECT(w), "entry-text-column", 1, (const char *)NULL); /* We cannot support password combo boxes. */ @@ -2261,8 +2261,8 @@ GtkWidget *layout_ctrls( * Create a non-editable GtkComboBox (that is, not * its subclass GtkComboBoxEntry). */ - w = gtk_combo_box_new_with_model - (GTK_TREE_MODEL(uc->listmodel)); + w = gtk_combo_box_new_with_model( + GTK_TREE_MODEL(uc->listmodel)); uc->combo = w; /* @@ -2306,8 +2306,8 @@ GtkWidget *layout_ctrls( gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(w), GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC); - uc->adj = gtk_scrolled_window_get_vadjustment - (GTK_SCROLLED_WINDOW(w)); + uc->adj = gtk_scrolled_window_get_vadjustment( + GTK_SCROLLED_WINDOW(w)); gtk_widget_show(uc->list); g_signal_connect(G_OBJECT(uc->list), "selection-changed", @@ -2377,15 +2377,15 @@ GtkWidget *layout_ctrls( * Create the list box itself, its columns, and * its containing scrolled window. */ - w = gtk_tree_view_new_with_model - (GTK_TREE_MODEL(uc->listmodel)); + w = gtk_tree_view_new_with_model( + GTK_TREE_MODEL(uc->listmodel)); g_object_set_data(G_OBJECT(uc->listmodel), "user-data", (gpointer)w); gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(w), false); sel = gtk_tree_view_get_selection(GTK_TREE_VIEW(w)); - gtk_tree_selection_set_mode - (sel, ctrl->listbox.multisel ? GTK_SELECTION_MULTIPLE : - GTK_SELECTION_SINGLE); + gtk_tree_selection_set_mode( + sel, ctrl->listbox.multisel ? GTK_SELECTION_MULTIPLE : + GTK_SELECTION_SINGLE); uc->treeview = w; g_signal_connect(G_OBJECT(w), "row-activated", G_CALLBACK(listbox_doubleclick), dp); @@ -2422,10 +2422,10 @@ GtkWidget *layout_ctrls( "ellipsize-set", true, (const char *)NULL); } - column = gtk_tree_view_column_new_with_attributes - ("heading", cellrend, "text", i+1, (char *)NULL); - gtk_tree_view_column_set_sizing - (column, GTK_TREE_VIEW_COLUMN_GROW_ONLY); + column = gtk_tree_view_column_new_with_attributes( + "heading", cellrend, "text", i+1, (char *)NULL); + gtk_tree_view_column_set_sizing( + column, GTK_TREE_VIEW_COLUMN_GROW_ONLY); gtk_tree_view_append_column(GTK_TREE_VIEW(w), column); } } @@ -2434,16 +2434,16 @@ GtkWidget *layout_ctrls( GtkWidget *scroll; scroll = gtk_scrolled_window_new(NULL, NULL); - gtk_scrolled_window_set_shadow_type - (GTK_SCROLLED_WINDOW(scroll), GTK_SHADOW_IN); + gtk_scrolled_window_set_shadow_type( + GTK_SCROLLED_WINDOW(scroll), GTK_SHADOW_IN); gtk_widget_show(w); gtk_container_add(GTK_CONTAINER(scroll), w); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scroll), GTK_POLICY_AUTOMATIC, GTK_POLICY_ALWAYS); - gtk_widget_set_size_request - (scroll, -1, - ctrl->listbox.height * get_listitemheight(w)); + gtk_widget_set_size_request( + scroll, -1, + ctrl->listbox.height * get_listitemheight(w)); w = scroll; } @@ -2737,8 +2737,8 @@ gint win_key_press(GtkWidget *widget, GdkEventKey *event, gpointer data) if (schr == sc->uc->ctrl->radio.shortcut) { int i; for (i = 0; i < sc->uc->ctrl->radio.nbuttons; i++) - if (gtk_toggle_button_get_active - (GTK_TOGGLE_BUTTON(sc->uc->buttons[i]))) { + if (gtk_toggle_button_get_active( + GTK_TOGGLE_BUTTON(sc->uc->buttons[i]))) { gtk_widget_grab_focus(sc->uc->buttons[i]); } } else if (sc->uc->ctrl->radio.shortcuts) { @@ -2746,8 +2746,8 @@ gint win_key_press(GtkWidget *widget, GdkEventKey *event, gpointer data) for (i = 0; i < sc->uc->ctrl->radio.nbuttons; i++) if (schr == sc->uc->ctrl->radio.shortcuts[i]) { gtk_widget_grab_focus(sc->uc->buttons[i]); - g_signal_emit_by_name - (G_OBJECT(sc->uc->buttons[i]), "clicked"); + g_signal_emit_by_name( + G_OBJECT(sc->uc->buttons[i]), "clicked"); } } break; @@ -3036,13 +3036,13 @@ GtkWidget *create_config_box(const char *title, Conf *conf, gtk_widget_show(label); treescroll = gtk_scrolled_window_new(NULL, NULL); #if GTK_CHECK_VERSION(2,0,0) - treestore = gtk_tree_store_new - (TREESTORE_NUM, G_TYPE_STRING, G_TYPE_INT); + treestore = gtk_tree_store_new( + TREESTORE_NUM, G_TYPE_STRING, G_TYPE_INT); tree = gtk_tree_view_new_with_model(GTK_TREE_MODEL(treestore)); gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(tree), false); treerenderer = gtk_cell_renderer_text_new(); - treecolumn = gtk_tree_view_column_new_with_attributes - ("Label", treerenderer, "text", 0, NULL); + treecolumn = gtk_tree_view_column_new_with_attributes( + "Label", treerenderer, "text", 0, NULL); gtk_tree_view_append_column(GTK_TREE_VIEW(tree), treecolumn); treeselection = gtk_tree_view_get_selection(GTK_TREE_VIEW(tree)); gtk_tree_selection_set_mode(treeselection, GTK_SELECTION_BROWSE); @@ -3170,9 +3170,8 @@ GtkWidget *create_config_box(const char *title, Conf *conf, if (j > 0) { if (!treelevels[j-1]) { treelevels[j-1] = GTK_TREE(gtk_tree_new()); - gtk_tree_item_set_subtree - (treeitemlevels[j-1], - GTK_WIDGET(treelevels[j-1])); + gtk_tree_item_set_subtree( + treeitemlevels[j-1], GTK_WIDGET(treelevels[j-1])); if (j < 2) gtk_tree_item_expand(treeitemlevels[j-1]); else @@ -3910,10 +3909,10 @@ void about_box(void *window) { char *buildinfo_text = buildinfo("\n"); - char *label_text = dupprintf - ("%s\n\n%s\n\n%s\n\n%s", - appname, ver, buildinfo_text, - "Copyright " SHORT_COPYRIGHT_DETAILS ". All rights reserved"); + char *label_text = dupprintf( + "%s\n\n%s\n\n%s\n\n%s", + appname, ver, buildinfo_text, + "Copyright " SHORT_COPYRIGHT_DETAILS ". All rights reserved"); w = gtk_label_new(label_text); gtk_label_set_justify(GTK_LABEL(w), GTK_JUSTIFY_CENTER); #if GTK_CHECK_VERSION(2,0,0) @@ -4055,8 +4054,8 @@ gint eventlog_selection_clear(GtkWidget *widget, GdkEventSelection *seldata, gtk_list_unselect_all(GTK_LIST(uc->list)); #else assert(uc->treeview); - gtk_tree_selection_unselect_all - (gtk_tree_view_get_selection(GTK_TREE_VIEW(uc->treeview))); + gtk_tree_selection_unselect_all( + gtk_tree_view_get_selection(GTK_TREE_VIEW(uc->treeview))); #endif es->ignore_selchange = false; @@ -4112,10 +4111,10 @@ void showeventlog(eventlog_stuff *es, void *parentwin) gtk_widget_show(w0); w1 = layout_ctrls(&es->dp, NULL, &es->scs, s1, GTK_WINDOW(window)); gtk_container_set_border_width(GTK_CONTAINER(w1), 10); - gtk_widget_set_size_request(w1, 20 + string_width - ("LINE OF TEXT GIVING WIDTH OF EVENT LOG IS " - "QUITE LONG 'COS SSH LOG ENTRIES ARE WIDE"), - -1); + gtk_widget_set_size_request( + w1, 20 + string_width("LINE OF TEXT GIVING WIDTH OF EVENT LOG IS " + "QUITE LONG 'COS SSH LOG ENTRIES ARE WIDE"), + -1); our_dialog_add_to_content_area(GTK_WINDOW(window), w1, true, true, 0); { struct uctrl *uc = dlg_find_byctrl(&es->dp, es->listctrl); diff --git a/unix/unifont.c b/unix/unifont.c index 144ec87a..e9f8623a 100644 --- a/unix/unifont.c +++ b/unix/unifont.c @@ -574,8 +574,8 @@ static void x11font_destroy(unifont *font) static void x11_alloc_subfont(struct x11font *xfont, int sfid) { Display *disp = xfont->disp; - char *derived_name = x11_guess_derived_font_name - (disp, xfont->fonts[0].xfs, sfid & 1, !!(sfid & 2)); + char *derived_name = x11_guess_derived_font_name( + disp, xfont->fonts[0].xfs, sfid & 1, !!(sfid & 2)); xfont->fonts[sfid].xfs = XLoadQueryFont(disp, derived_name); xfont->fonts[sfid].allocated = true; sfree(derived_name); @@ -691,10 +691,9 @@ static void x11font_cairo_setup( xfi->indexflip = (*((char *) &endianness_test) == 1) ? 0 : 7; } - xfi->pixmap = XCreatePixmap - (disp, - GDK_DRAWABLE_XID(gtk_widget_get_window(ctx->u.cairo.widget)), - xfi->pixwidth, xfi->pixheight, 1); + xfi->pixmap = XCreatePixmap( + disp, GDK_DRAWABLE_XID(gtk_widget_get_window(ctx->u.cairo.widget)), + xfi->pixwidth, xfi->pixheight, 1); gcvals.foreground = WhitePixel(disp, widgetscr); gcvals.background = BlackPixel(disp, widgetscr); gcvals.font = xfi->xfs->fid; @@ -747,8 +746,8 @@ static void x11font_cairo_cache_glyph( } } xfi->glyphcache[glyphindex].bitmap = bitmap; - xfi->glyphcache[glyphindex].surface = cairo_image_surface_create_for_data - (bitmap, CAIRO_FORMAT_A1, xfi->pixwidth, xfi->pixheight, xfi->rowsize); + xfi->glyphcache[glyphindex].surface = cairo_image_surface_create_for_data( + bitmap, CAIRO_FORMAT_A1, xfi->pixwidth, xfi->pixheight, xfi->rowsize); } static void x11font_cairo_draw_glyph(unifont_drawctx *ctx, @@ -2226,9 +2225,9 @@ unifont *multifont_create(GtkWidget *widget, const char *name, if (font->want_fallback) { for (i = 0; i < lenof(unifont_types); i++) { if (unifont_types[i]->create_fallback) { - fallback = unifont_types[i]->create_fallback - (widget, font->height, wide, bold, - shadowoffset, shadowalways); + fallback = unifont_types[i]->create_fallback( + widget, font->height, wide, bold, + shadowoffset, shadowalways); if (fallback) break; } @@ -2663,9 +2662,9 @@ static void unifontsel_set_filter_buttons(unifontsel_internal *fs) int i; for (i = 0; i < fs->n_filter_buttons; i++) { - int flagbit = GPOINTER_TO_INT(g_object_get_data - (G_OBJECT(fs->filter_buttons[i]), - "user-data")); + int flagbit = GPOINTER_TO_INT(g_object_get_data( + G_OBJECT(fs->filter_buttons[i]), + "user-data")); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(fs->filter_buttons[i]), !!(fs->filter_flags & flagbit)); } @@ -2679,8 +2678,8 @@ static void unifontsel_draw_preview_text_inner(unifont_drawctx *dctx, fontinfo *info = fs->selected; if (info) { - sizename = info->fontclass->scale_fontname - (GTK_WIDGET(fs->u.window), info->realname, fs->selsize); + sizename = info->fontclass->scale_fontname( + GTK_WIDGET(fs->u.window), info->realname, fs->selsize); font = info->fontclass->create(GTK_WIDGET(fs->u.window), sizename ? sizename : info->realname, false, false, 0, 0); @@ -2867,9 +2866,9 @@ static void unifontsel_select_font(unifontsel_internal *fs, */ assert(info->familyindex >= 0); treepath = gtk_tree_path_new_from_indices(info->familyindex, -1); - gtk_tree_selection_select_path - (gtk_tree_view_get_selection(GTK_TREE_VIEW(fs->family_list)), - treepath); + gtk_tree_selection_select_path( + gtk_tree_view_get_selection(GTK_TREE_VIEW(fs->family_list)), + treepath); gtk_tree_view_scroll_to_cell(GTK_TREE_VIEW(fs->family_list), treepath, NULL, false, 0.0, 0.0); success = gtk_tree_model_get_iter(GTK_TREE_MODEL(fs->family_model), @@ -2891,9 +2890,9 @@ static void unifontsel_select_font(unifontsel_internal *fs, if (info->style) { assert(info->styleindex >= 0); treepath = gtk_tree_path_new_from_indices(info->styleindex, -1); - gtk_tree_selection_select_path - (gtk_tree_view_get_selection(GTK_TREE_VIEW(fs->style_list)), - treepath); + gtk_tree_selection_select_path( + gtk_tree_view_get_selection(GTK_TREE_VIEW(fs->style_list)), + treepath); gtk_tree_view_scroll_to_cell(GTK_TREE_VIEW(fs->style_list), treepath, NULL, false, 0.0, 0.0); gtk_tree_model_get_iter(GTK_TREE_MODEL(fs->style_model), @@ -2914,9 +2913,9 @@ static void unifontsel_select_font(unifontsel_internal *fs, if (info->size) { assert(info->sizeindex >= 0); treepath = gtk_tree_path_new_from_indices(info->sizeindex, -1); - gtk_tree_selection_select_path - (gtk_tree_view_get_selection(GTK_TREE_VIEW(fs->size_list)), - treepath); + gtk_tree_selection_select_path( + gtk_tree_view_get_selection(GTK_TREE_VIEW(fs->size_list)), + treepath); gtk_tree_view_scroll_to_cell(GTK_TREE_VIEW(fs->size_list), treepath, NULL, false, 0.0, 0.0); gtk_tree_path_free(treepath); @@ -3236,8 +3235,8 @@ static void alias_resolve(GtkTreeView *treeview, GtkTreePath *path, int flags; struct fontinfo_realname_find f; - newname = info->fontclass->canonify_fontname - (GTK_WIDGET(fs->u.window), info->realname, &newsize, &flags, true); + newname = info->fontclass->canonify_fontname( + GTK_WIDGET(fs->u.window), info->realname, &newsize, &flags, true); f.realname = newname; f.flags = flags; @@ -3363,10 +3362,10 @@ unifontsel *unifontsel_new(const char *wintitle) fs->u.user_data = NULL; fs->u.window = GTK_WINDOW(gtk_dialog_new()); gtk_window_set_title(fs->u.window, wintitle); - fs->u.cancel_button = gtk_dialog_add_button - (GTK_DIALOG(fs->u.window), STANDARD_CANCEL_LABEL, GTK_RESPONSE_CANCEL); - fs->u.ok_button = gtk_dialog_add_button - (GTK_DIALOG(fs->u.window), STANDARD_OK_LABEL, GTK_RESPONSE_OK); + fs->u.cancel_button = gtk_dialog_add_button( + GTK_DIALOG(fs->u.window), STANDARD_CANCEL_LABEL, GTK_RESPONSE_CANCEL); + fs->u.ok_button = gtk_dialog_add_button( + GTK_DIALOG(fs->u.window), STANDARD_OK_LABEL, GTK_RESPONSE_OK); gtk_widget_grab_default(fs->u.ok_button); /* @@ -3398,8 +3397,8 @@ unifontsel *unifontsel_new(const char *wintitle) w = table; #endif - gtk_box_pack_start(GTK_BOX(gtk_dialog_get_content_area - (GTK_DIALOG(fs->u.window))), + gtk_box_pack_start(GTK_BOX(gtk_dialog_get_content_area( + GTK_DIALOG(fs->u.window))), w, true, true, 0); label = gtk_label_new_with_mnemonic("_Font:"); @@ -3422,9 +3421,9 @@ unifontsel *unifontsel_new(const char *wintitle) gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(w), false); gtk_label_set_mnemonic_widget(GTK_LABEL(label), w); gtk_widget_show(w); - column = gtk_tree_view_column_new_with_attributes - ("Font", gtk_cell_renderer_text_new(), - "text", 0, (char *)NULL); + column = gtk_tree_view_column_new_with_attributes( + "Font", gtk_cell_renderer_text_new(), + "text", 0, (char *)NULL); gtk_tree_view_column_set_sizing(column, GTK_TREE_VIEW_COLUMN_AUTOSIZE); gtk_tree_view_append_column(GTK_TREE_VIEW(w), column); g_signal_connect(G_OBJECT(gtk_tree_view_get_selection(GTK_TREE_VIEW(w))), @@ -3473,9 +3472,9 @@ unifontsel *unifontsel_new(const char *wintitle) gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(w), false); gtk_label_set_mnemonic_widget(GTK_LABEL(label), w); gtk_widget_show(w); - column = gtk_tree_view_column_new_with_attributes - ("Style", gtk_cell_renderer_text_new(), - "text", 0, "sensitive", 3, "weight", 4, (char *)NULL); + column = gtk_tree_view_column_new_with_attributes( + "Style", gtk_cell_renderer_text_new(), + "text", 0, "sensitive", 3, "weight", 4, (char *)NULL); gtk_tree_view_column_set_sizing(column, GTK_TREE_VIEW_COLUMN_AUTOSIZE); gtk_tree_view_append_column(GTK_TREE_VIEW(w), column); g_signal_connect(G_OBJECT(gtk_tree_view_get_selection(GTK_TREE_VIEW(w))), @@ -3531,9 +3530,9 @@ unifontsel *unifontsel_new(const char *wintitle) w = gtk_tree_view_new_with_model(GTK_TREE_MODEL(model)); gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(w), false); gtk_widget_show(w); - column = gtk_tree_view_column_new_with_attributes - ("Size", gtk_cell_renderer_text_new(), - "text", 0, (char *)NULL); + column = gtk_tree_view_column_new_with_attributes( + "Size", gtk_cell_renderer_text_new(), + "text", 0, (char *)NULL); gtk_tree_view_column_set_sizing(column, GTK_TREE_VIEW_COLUMN_AUTOSIZE); gtk_tree_view_append_column(GTK_TREE_VIEW(w), column); g_signal_connect(G_OBJECT(gtk_tree_view_get_selection(GTK_TREE_VIEW(w))), @@ -3740,8 +3739,8 @@ void unifontsel_set_name(unifontsel *fontsel, const char *fontname) */ fontname = unifont_do_prefix(fontname, &start, &end); for (i = start; i < end; i++) { - fontname2 = unifont_types[i]->canonify_fontname - (GTK_WIDGET(fs->u.window), fontname, &size, &flags, false); + fontname2 = unifont_types[i]->canonify_fontname( + GTK_WIDGET(fs->u.window), fontname, &size, &flags, false); if (fontname2) break; } @@ -3791,8 +3790,8 @@ char *unifontsel_get_name(unifontsel *fontsel) return NULL; if (fs->selected->size == 0) { - name = fs->selected->fontclass->scale_fontname - (GTK_WIDGET(fs->u.window), fs->selected->realname, fs->selsize); + name = fs->selected->fontclass->scale_fontname( + GTK_WIDGET(fs->u.window), fs->selected->realname, fs->selsize); if (name) { char *ret = dupcat(fs->selected->fontclass->prefix, ":", name); sfree(name); diff --git a/unix/utils/our_dialog.c b/unix/utils/our_dialog.c index 5b9995d4..0ca8a7d2 100644 --- a/unix/utils/our_dialog.c +++ b/unix/utils/our_dialog.c @@ -128,8 +128,8 @@ void our_dialog_add_to_content_area(GtkWindow *dlg, GtkWidget *w, gtk_box_pack_start(vbox, w, expand, fill, padding); #else - gtk_box_pack_start - (GTK_BOX(gtk_dialog_get_content_area(GTK_DIALOG(dlg))), - w, expand, fill, padding); + gtk_box_pack_start( + GTK_BOX(gtk_dialog_get_content_area(GTK_DIALOG(dlg))), + w, expand, fill, padding); #endif } diff --git a/unix/window.c b/unix/window.c index d35b1106..624ecc48 100644 --- a/unix/window.c +++ b/unix/window.c @@ -1675,10 +1675,11 @@ gint key_event(GtkWidget *widget, GdkEventKey *event, gpointer data) */ guint new_keyval; GdkModifierType consumed; - if (gdk_keymap_translate_keyboard_state - (gdk_keymap_get_for_display(gdk_display_get_default()), - event->hardware_keycode, event->state & ~META_MANUAL_MASK, - 0, &new_keyval, NULL, NULL, &consumed)) { + if (gdk_keymap_translate_keyboard_state( + gdk_keymap_get_for_display(gdk_display_get_default()), + event->hardware_keycode, + event->state & ~META_MANUAL_MASK, + 0, &new_keyval, NULL, NULL, &consumed)) { ucsoutput[0] = '\033'; ucsoutput[1] = gdk_keyval_to_unicode(new_keyval); #ifdef KEY_EVENT_DIAGNOSTICS diff --git a/windows/agent-client.c b/windows/agent-client.c index 1183bff8..168465e5 100644 --- a/windows/agent-client.c +++ b/windows/agent-client.c @@ -62,8 +62,8 @@ static void wm_copydata_agent_query(strbuf *query, void **out, int *outlen) psd = (PSECURITY_DESCRIPTOR) LocalAlloc(LPTR, SECURITY_DESCRIPTOR_MIN_LENGTH); if (psd) { - if (p_InitializeSecurityDescriptor - (psd, SECURITY_DESCRIPTOR_REVISION) && + if (p_InitializeSecurityDescriptor( + psd, SECURITY_DESCRIPTOR_REVISION) && p_SetSecurityDescriptorOwner(psd, usersid, false)) { sa.nLength = sizeof(sa); sa.bInheritHandle = true; diff --git a/windows/dialog.c b/windows/dialog.c index 48e188a6..98540201 100644 --- a/windows/dialog.c +++ b/windows/dialog.c @@ -385,10 +385,10 @@ static INT_PTR CALLBACK AboutProc(HWND hwnd, UINT msg, SetWindowText(hwnd, str); sfree(str); char *buildinfo_text = buildinfo("\r\n"); - char *text = dupprintf - ("%s\r\n\r\n%s\r\n\r\n%s\r\n\r\n%s", - appname, ver, buildinfo_text, - "\251 " SHORT_COPYRIGHT_DETAILS ". All rights reserved."); + char *text = dupprintf( + "%s\r\n\r\n%s\r\n\r\n%s\r\n\r\n%s", + appname, ver, buildinfo_text, + "\251 " SHORT_COPYRIGHT_DETAILS ". All rights reserved."); sfree(buildinfo_text); SetDlgItemText(hwnd, IDA_TEXT, text); MakeDlgItemBorderless(hwnd, IDA_TEXT); diff --git a/windows/jump-list.c b/windows/jump-list.c index dd3143f9..66df3510 100644 --- a/windows/jump-list.c +++ b/windows/jump-list.c @@ -544,13 +544,13 @@ static void update_jumplist_from_registry(void) */ for (i = 0, found = false; i < nremoved && !found; i++) { IShellLink *rlink; - if (SUCCEEDED(pRemoved->lpVtbl->GetAt - (pRemoved, i, COMPTR(IShellLink, &rlink)))) { + if (SUCCEEDED(pRemoved->lpVtbl->GetAt( + pRemoved, i, COMPTR(IShellLink, &rlink)))) { char desc1[2048], desc2[2048]; - if (SUCCEEDED(link->lpVtbl->GetDescription - (link, desc1, sizeof(desc1)-1)) && - SUCCEEDED(rlink->lpVtbl->GetDescription - (rlink, desc2, sizeof(desc2)-1)) && + if (SUCCEEDED(link->lpVtbl->GetDescription( + link, desc1, sizeof(desc1)-1)) && + SUCCEEDED(rlink->lpVtbl->GetDescription( + rlink, desc2, sizeof(desc2)-1)) && !strcmp(desc1, desc2)) { found = true; } @@ -575,8 +575,8 @@ static void update_jumplist_from_registry(void) * Get the array form of the collection we've just constructed, * and put it in the jump list. */ - if (!SUCCEEDED(collection->lpVtbl->QueryInterface - (collection, COMPTR(IObjectArray, &array)))) + if (!SUCCEEDED(collection->lpVtbl->QueryInterface( + collection, COMPTR(IObjectArray, &array)))) goto cleanup; pCDL->lpVtbl->AppendCategory(pCDL, L"Recent Sessions", array); @@ -608,8 +608,8 @@ static void update_jumplist_from_registry(void) * Get the array form of the collection we've just constructed, * and put it in the jump list. */ - if (!SUCCEEDED(collection->lpVtbl->QueryInterface - (collection, COMPTR(IObjectArray, &array)))) + if (!SUCCEEDED(collection->lpVtbl->QueryInterface( + collection, COMPTR(IObjectArray, &array)))) goto cleanup; pCDL->lpVtbl->AddUserTasks(pCDL, array); @@ -636,8 +636,8 @@ static void update_jumplist_from_registry(void) * Get the array form of the collection we've just constructed, * and put it in the jump list. */ - if (!SUCCEEDED(collection->lpVtbl->QueryInterface - (collection, COMPTR(IObjectArray, &array)))) + if (!SUCCEEDED(collection->lpVtbl->QueryInterface( + collection, COMPTR(IObjectArray, &array)))) goto cleanup; pCDL->lpVtbl->AddUserTasks(pCDL, array); diff --git a/windows/named-pipe-server.c b/windows/named-pipe-server.c index d6d8d1c8..87adb940 100644 --- a/windows/named-pipe-server.c +++ b/windows/named-pipe-server.c @@ -77,33 +77,33 @@ static bool create_named_pipe(NamedPipeServerSocket *ps, bool first_instance) sa.lpSecurityDescriptor = ps->psd; sa.bInheritHandle = false; - ps->pipehandle = CreateNamedPipe - (/* lpName */ - ps->pipename, + ps->pipehandle = CreateNamedPipe( + /* lpName */ + ps->pipename, - /* dwOpenMode */ - PIPE_ACCESS_DUPLEX | - FILE_FLAG_OVERLAPPED | - (first_instance ? FILE_FLAG_FIRST_PIPE_INSTANCE : 0), + /* dwOpenMode */ + PIPE_ACCESS_DUPLEX | + FILE_FLAG_OVERLAPPED | + (first_instance ? FILE_FLAG_FIRST_PIPE_INSTANCE : 0), - /* dwPipeMode */ - PIPE_TYPE_BYTE | PIPE_READMODE_BYTE | PIPE_WAIT + /* dwPipeMode */ + PIPE_TYPE_BYTE | PIPE_READMODE_BYTE | PIPE_WAIT #ifdef PIPE_REJECT_REMOTE_CLIENTS - | PIPE_REJECT_REMOTE_CLIENTS + | PIPE_REJECT_REMOTE_CLIENTS #endif - , + , - /* nMaxInstances */ - PIPE_UNLIMITED_INSTANCES, + /* nMaxInstances */ + PIPE_UNLIMITED_INSTANCES, - /* nOutBufferSize, nInBufferSize */ - 4096, 4096, /* FIXME: think harder about buffer sizes? */ + /* nOutBufferSize, nInBufferSize */ + 4096, 4096, /* FIXME: think harder about buffer sizes? */ - /* nDefaultTimeOut */ - 0 /* default timeout */, + /* nDefaultTimeOut */ + 0 /* default timeout */, - /* lpSecurityAttributes */ - &sa); + /* lpSecurityAttributes */ + &sa); return ps->pipehandle != INVALID_HANDLE_VALUE; } diff --git a/windows/pageant.c b/windows/pageant.c index 077a6812..fb2a1fec 100644 --- a/windows/pageant.c +++ b/windows/pageant.c @@ -133,10 +133,10 @@ static INT_PTR CALLBACK AboutProc(HWND hwnd, UINT msg, switch (msg) { case WM_INITDIALOG: { char *buildinfo_text = buildinfo("\r\n"); - char *text = dupprintf - ("Pageant\r\n\r\n%s\r\n\r\n%s\r\n\r\n%s", - ver, buildinfo_text, - "\251 " SHORT_COPYRIGHT_DETAILS ". All rights reserved."); + char *text = dupprintf( + "Pageant\r\n\r\n%s\r\n\r\n%s\r\n\r\n%s", + ver, buildinfo_text, + "\251 " SHORT_COPYRIGHT_DETAILS ". All rights reserved."); sfree(buildinfo_text); SetDlgItemText(hwnd, IDC_ABOUT_TEXTBOX, text); MakeDlgItemBorderless(hwnd, IDC_ABOUT_TEXTBOX); diff --git a/windows/puttygen.c b/windows/puttygen.c index 74d5a7c2..52b1a9cb 100644 --- a/windows/puttygen.c +++ b/windows/puttygen.c @@ -543,10 +543,10 @@ static INT_PTR CALLBACK AboutProc(HWND hwnd, UINT msg, { char *buildinfo_text = buildinfo("\r\n"); - char *text = dupprintf - ("PuTTYgen\r\n\r\n%s\r\n\r\n%s\r\n\r\n%s", - ver, buildinfo_text, - "\251 " SHORT_COPYRIGHT_DETAILS ". All rights reserved."); + char *text = dupprintf( + "PuTTYgen\r\n\r\n%s\r\n\r\n%s\r\n\r\n%s", + ver, buildinfo_text, + "\251 " SHORT_COPYRIGHT_DETAILS ". All rights reserved."); sfree(buildinfo_text); SetDlgItemText(hwnd, 1000, text); MakeDlgItemBorderless(hwnd, 1000); @@ -1922,10 +1922,10 @@ static INT_PTR CALLBACK MainDlgProc(HWND hwnd, UINT msg, if ((state->keytype == RSA || state->keytype == DSA) && state->key_bits < 256) { - char *message = dupprintf - ("PuTTYgen will not generate a key smaller than 256" - " bits.\nKey length reset to default %d. Continue?", - DEFAULT_KEY_BITS); + char *message = dupprintf( + "PuTTYgen will not generate a key smaller than 256" + " bits.\nKey length reset to default %d. Continue?", + DEFAULT_KEY_BITS); int ret = MessageBox(hwnd, message, "PuTTYgen Warning", MB_ICONWARNING | MB_OKCANCEL); sfree(message); @@ -1935,9 +1935,9 @@ static INT_PTR CALLBACK MainDlgProc(HWND hwnd, UINT msg, SetDlgItemInt(hwnd, IDC_BITS, DEFAULT_KEY_BITS, false); } else if ((state->keytype == RSA || state->keytype == DSA) && state->key_bits < DEFAULT_KEY_BITS) { - char *message = dupprintf - ("Keys shorter than %d bits are not recommended. " - "Really generate this key?", DEFAULT_KEY_BITS); + char *message = dupprintf( + "Keys shorter than %d bits are not recommended. " + "Really generate this key?", DEFAULT_KEY_BITS); int ret = MessageBox(hwnd, message, "PuTTYgen Warning", MB_ICONWARNING | MB_OKCANCEL); sfree(message); diff --git a/windows/storage.c b/windows/storage.c index 7ac299a9..f2c33feb 100644 --- a/windows/storage.c +++ b/windows/storage.c @@ -685,8 +685,8 @@ void write_random_seed(void *data, int len) * returning the resulting concatenated list of strings in 'out' (if * non-null). */ -static int transform_jumplist_registry - (const char *add, const char *rem, char **out) +static int transform_jumplist_registry( + const char *add, const char *rem, char **out) { HKEY rkey = open_regkey(true, HKEY_CURRENT_USER, reg_jumplist_key); if (!rkey) diff --git a/windows/utils/security.c b/windows/utils/security.c index 48330437..52299420 100644 --- a/windows/utils/security.c +++ b/windows/utils/security.c @@ -290,10 +290,10 @@ static bool really_restrict_process_acl(char **error) goto cleanup; } - if (ERROR_SUCCESS != p_SetSecurityInfo - (GetCurrentProcess(), SE_KERNEL_OBJECT, - OWNER_SECURITY_INFORMATION | DACL_SECURITY_INFORMATION, - usersid, NULL, acl, NULL)) { + if (ERROR_SUCCESS != p_SetSecurityInfo( + GetCurrentProcess(), SE_KERNEL_OBJECT, + OWNER_SECURITY_INFORMATION | DACL_SECURITY_INFORMATION, + usersid, NULL, acl, NULL)) { *error = dupprintf("Unable to set process ACL: %s", win_strerror(GetLastError())); goto cleanup;