From 7b8e790de028b6cf987186cc6e11b637f0e53af8 Mon Sep 17 00:00:00 2001 From: Andrew Borodin Date: Tue, 20 Nov 2012 13:44:14 +0400 Subject: [PATCH] src/*/*.[ch]: fix indentation. Signed-off-by: Andrew Borodin --- src/editor/edit.c | 2 +- src/editor/editcmd_dialogs.c | 7 ++++--- src/editor/editoptions.c | 2 +- src/editor/editwidget.c | 6 +++--- src/filemanager/achown.c | 2 +- src/filemanager/file.c | 2 +- src/filemanager/find.c | 2 +- src/filemanager/hotlist.c | 6 +++--- src/filemanager/hotlist.h | 3 ++- src/filemanager/info.c | 7 +++---- src/filemanager/layout.c | 2 +- src/filemanager/panel.c | 9 ++++----- src/help.c | 5 +++-- src/learn.c | 4 ++-- 14 files changed, 30 insertions(+), 29 deletions(-) diff --git a/src/editor/edit.c b/src/editor/edit.c index ad28e7aed..3500464d4 100644 --- a/src/editor/edit.c +++ b/src/editor/edit.c @@ -1624,7 +1624,7 @@ edit_get_bracket (WEdit * edit, gboolean in_screen, unsigned long furthest_brack break; /* count lines if searching downward */ if (inc > 0 && a == '\n') - if (n++ >= WIDGET (edit)->lines - edit->curs_row) /* out of screen */ + if (n++ >= WIDGET (edit)->lines - edit->curs_row) /* out of screen */ break; } /* count bracket depth */ diff --git a/src/editor/editcmd_dialogs.c b/src/editor/editcmd_dialogs.c index af1f847e5..77263ca3f 100644 --- a/src/editor/editcmd_dialogs.c +++ b/src/editor/editcmd_dialogs.c @@ -68,7 +68,8 @@ edit_search_options_t edit_search_options = { /* --------------------------------------------------------------------------------------------- */ static cb_ret_t -editcmd_dialog_raw_key_query_cb (Widget * w, Widget * sender, widget_msg_t msg, int parm, void *data) +editcmd_dialog_raw_key_query_cb (Widget * w, Widget * sender, widget_msg_t msg, int parm, + void *data) { WDialog *h = DIALOG (w); @@ -254,10 +255,10 @@ editcmd_dialog_replace_prompt_show (WEdit * edit, char *from_text, char *to_text ypos -= dlg_height; g_snprintf (tmp, sizeof (tmp), "\"%s\"", from_text); - repl_from = g_strdup (str_trunc (tmp, - 7)); + repl_from = g_strdup (str_trunc (tmp, -7)); g_snprintf (tmp, sizeof (tmp), "\"%s\"", to_text); - repl_to = g_strdup (str_trunc (tmp, - 7)); + repl_to = g_strdup (str_trunc (tmp, -7)); { quick_widget_t quick_widgets[] = { diff --git a/src/editor/editoptions.c b/src/editor/editoptions.c index 33d7a3632..1765ddc5b 100644 --- a/src/editor/editoptions.c +++ b/src/editor/editoptions.c @@ -143,8 +143,8 @@ edit_options_dialog (WDialog * h) wrap_mode = 0; { - /* *INDENT-OFF* */ quick_widget_t quick_widgets[] = { + /* *INDENT-OFF* */ QUICK_START_COLUMNS, QUICK_START_GROUPBOX (N_("Wrap mode")), QUICK_RADIO (3, wrap_str, &wrap_mode, NULL), diff --git a/src/editor/editwidget.c b/src/editor/editwidget.c index af8a26c6a..4ed136fd0 100644 --- a/src/editor/editwidget.c +++ b/src/editor/editwidget.c @@ -234,11 +234,11 @@ edit_window_move (WEdit * edit, unsigned long command) switch (command) { case CK_Up: - if (w->y > wh->y + 1) /* menubar */ + if (w->y > wh->y + 1) /* menubar */ w->y--; break; case CK_Down: - if (w->y < wh->y + wh->lines - 2) /* buttonbar */ + if (w->y < wh->y + wh->lines - 2) /* buttonbar */ w->y++; break; case CK_Left: @@ -278,7 +278,7 @@ edit_window_resize (WEdit * edit, unsigned long command) w->lines--; break; case CK_Down: - if (w->y + w->lines < wh->y + wh->lines - 1) /* buttonbar */ + if (w->y + w->lines < wh->y + wh->lines - 1) /* buttonbar */ w->lines++; break; case CK_Left: diff --git a/src/filemanager/achown.c b/src/filemanager/achown.c index 53fa3a64f..5cc8c051d 100644 --- a/src/filemanager/achown.c +++ b/src/filemanager/achown.c @@ -851,7 +851,7 @@ chown_advanced_cmd (void) file_idx = files_on_begin == 1 ? 1 : (files_on_begin - current_panel->marked + 1); g_snprintf (buffer, sizeof (buffer), "%s (%d/%d)", - str_fit_to_term (fname, WIDGET(ch_dlg)->cols - 20, J_LEFT_FIT), + str_fit_to_term (fname, WIDGET (ch_dlg)->cols - 20, J_LEFT_FIT), file_idx, files_on_begin); label_set_text (l_filename, buffer); chown_refresh (); diff --git a/src/filemanager/file.c b/src/filemanager/file.c index db065643b..2586a401c 100644 --- a/src/filemanager/file.c +++ b/src/filemanager/file.c @@ -596,7 +596,7 @@ real_query_recursive (FileOpContext * ctx, enum OperationMode mode, const char * query_set_sel (1); ctx->recursive_result = - (FileCopyMode) query_dialog (op_names [OP_DELETE], text, D_ERROR, 5, + (FileCopyMode) query_dialog (op_names[OP_DELETE], text, D_ERROR, 5, _("&Yes"), _("&No"), _("A&ll"), _("Non&e"), _("&Abort")); g_free (text); diff --git a/src/filemanager/find.c b/src/filemanager/find.c index 90b31d592..2aea14d5f 100644 --- a/src/filemanager/find.c +++ b/src/filemanager/find.c @@ -154,7 +154,7 @@ static int last_pos; static size_t ignore_count = 0; -static WDialog *find_dlg; /* The dialog */ +static WDialog *find_dlg; /* The dialog */ static WLabel *status_label; /* Finished, Searching etc. */ static WLabel *found_num_label; /* Number of found items */ diff --git a/src/filemanager/hotlist.c b/src/filemanager/hotlist.c index 9a5adf44a..6139edd9d 100644 --- a/src/filemanager/hotlist.c +++ b/src/filemanager/hotlist.c @@ -783,7 +783,7 @@ init_hotlist (hotlist_t list_type) button_new (y + hotlist_but[i].y, UX + hotlist_but[i].x, hotlist_but[i].ret_cmd, hotlist_but[i].flags, hotlist_but[i].text, hotlist_button_callback), - hotlist_but[i].pos_flags, NULL); + hotlist_but[i].pos_flags, NULL); dlg_select_widget (l_hotlist); } @@ -791,7 +791,7 @@ init_hotlist (hotlist_t list_type) /* --------------------------------------------------------------------------------------------- */ static void -init_movelist ( struct hotlist *item) +init_movelist (struct hotlist *item) { size_t i; char *hdr; @@ -834,7 +834,7 @@ init_movelist ( struct hotlist *item) button_new (y + hotlist_but[i].y, UX + hotlist_but[i].x, hotlist_but[i].ret_cmd, hotlist_but[i].flags, hotlist_but[i].text, hotlist_button_callback), - hotlist_but[i].pos_flags, NULL); + hotlist_but[i].pos_flags, NULL); dlg_select_widget (l_movelist); } diff --git a/src/filemanager/hotlist.h b/src/filemanager/hotlist.h index 88a3adce2..95ae541af 100644 --- a/src/filemanager/hotlist.h +++ b/src/filemanager/hotlist.h @@ -9,7 +9,8 @@ /*** enums ***************************************************************************************/ -typedef enum { +typedef enum +{ LIST_VFSLIST = 0x01, LIST_HOTLIST = 0x02, LIST_MOVELIST = 0x04 diff --git a/src/filemanager/info.c b/src/filemanager/info.c index 2e891e0d4..780c9b8df 100644 --- a/src/filemanager/info.c +++ b/src/filemanager/info.c @@ -73,7 +73,7 @@ static struct my_statfs myfs_stats; /* --------------------------------------------------------------------------------------------- */ static void -info_box (WInfo *info) +info_box (WInfo * info) { Widget *w = WIDGET (info); @@ -98,7 +98,7 @@ info_box (WInfo *info) /* --------------------------------------------------------------------------------------------- */ static void -info_show_info (WInfo *info) +info_show_info (WInfo * info) { Widget *w = WIDGET (info); static int i18n_adjust = 0; @@ -185,8 +185,7 @@ info_show_info (WInfo *info) case 13: widget_move (w, 13, 3); - str_printf (buff, _("Device: %s"), - str_trunc (myfs_stats.device, w->cols - i18n_adjust)); + str_printf (buff, _("Device: %s"), str_trunc (myfs_stats.device, w->cols - i18n_adjust)); tty_print_string (buff->str); g_string_set_size (buff, 0); case 12: diff --git a/src/filemanager/layout.c b/src/filemanager/layout.c index bf4495fa4..2219ec5de 100644 --- a/src/filemanager/layout.c +++ b/src/filemanager/layout.c @@ -310,7 +310,7 @@ bminus_cback (WButton * button, int action) static cb_ret_t layout_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void *data) { - WDialog * h = DIALOG (w); + WDialog *h = DIALOG (w); switch (msg) { diff --git a/src/filemanager/panel.c b/src/filemanager/panel.c index 42c6891a2..7e426a530 100644 --- a/src/filemanager/panel.c +++ b/src/filemanager/panel.c @@ -1295,8 +1295,7 @@ show_dir (WPanel * panel) tty_setcolor (REVERSE_COLOR); tmp = panel_correct_path_to_show (panel); - tty_printf (" %s ", - str_term_trim (tmp, min (max (w->cols - 12, 0), w->cols))); + tty_printf (" %s ", str_term_trim (tmp, min (max (w->cols - 12, 0), w->cols))); g_free (tmp); if (!panels_options.show_mini_info) @@ -1848,9 +1847,9 @@ use_display_format (WPanel * panel, const char *format, char **error, int isstat /* Status needn't to be split */ usable_columns = ((WIDGET (panel)->cols - 2) / ((isstatus) - ? 1 - : (panel->split + 1))) - (!isstatus - && panel->split); + ? 1 + : (panel->split + 1))) - (!isstatus + && panel->split); /* Look for the expandable fields and set field_len based on the requested field len */ for (darr = home; darr && expand_top < MAX_EXPAND; darr = darr->next) diff --git a/src/help.c b/src/help.c index 8661f7a4a..f3bc1b809 100644 --- a/src/help.c +++ b/src/help.c @@ -563,7 +563,8 @@ help_show (WDialog * h, const char *paint_start) #ifndef HAVE_SLANG tty_print_char (acs_map[c]); #else - SLsmg_draw_object (WIDGET (h)->y + line + 2, WIDGET (h)->x + col + 2, c); + SLsmg_draw_object (WIDGET (h)->y + line + 2, WIDGET (h)->x + col + 2, + c); #endif col++; } @@ -735,7 +736,7 @@ help_back (WDialog * h) if (history_ptr < 0) history_ptr = HISTORY_SIZE - 1; - send_message (h, NULL, MSG_DRAW, 0, NULL); /* FIXME: unneeded? */ + send_message (h, NULL, MSG_DRAW, 0, NULL); /* FIXME: unneeded? */ } /* --------------------------------------------------------------------------------------------- */ diff --git a/src/learn.c b/src/learn.c index 57d2ed698..7020c2e5c 100644 --- a/src/learn.c +++ b/src/learn.c @@ -322,8 +322,8 @@ init_learn (void) "key, or click with the mouse to define it. Move around with Tab."))); add_widget (learn_dlg, hline_new (dlg_height - 4, -1, -1)); /* buttons */ - bl0 = str_term_width1 (b0) + 5; /* default button */ - bl1 = str_term_width1 (b1) + 3; /* normal button */ + bl0 = str_term_width1 (b0) + 5; /* default button */ + bl1 = str_term_width1 (b1) + 3; /* normal button */ bx0 = (dlg_width - (bl0 + bl1 + 1)) / 2; bx1 = bx0 + bl0 + 1; add_widget (learn_dlg, button_new (dlg_height - 3, bx0, B_ENTER, DEFPUSH_BUTTON, b0, NULL)); -- 2.11.4.GIT