From b8a6996e258a2c30de40fb20cab0d17a38c3eff2 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Sun, 1 Jan 2012 01:46:34 +0100 Subject: maint: with split lines, don't leave an operator at end of line * src/copy.c (copy_reg): Split an expression before a binary operator, not after it. * src/cut.c (set_fields): Likewise. * src/id.c (main): Likewise. * src/install.c (setdefaultfilecon): Likewise. * src/join.c (ignore_case): Likewise. * src/pr.c (cols_ready_to_print, init_parameters, print_page): Likewise. * src/stty.c (set_window_size): Likewise. * src/wc.c (SUPPORT_OLD_MBRTOWC): Likewise. * src/who.c (scan_entries): Likewise. * src/test.c (binary_operator): Join a split line. * src/extent-scan.c (extent_scan_read): Move an ">" from end of line to beginning of the following. Likewise for two other expressions. --- src/pr.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'src/pr.c') diff --git a/src/pr.c b/src/pr.c index f1e310f90..2ea586d29 100644 --- a/src/pr.c +++ b/src/pr.c @@ -781,9 +781,9 @@ cols_ready_to_print (void) n = 0; for (q = column_vector, i = 0; i < columns; ++q, ++i) - if (q->status == OPEN || - q->status == FF_FOUND || /* With -b: To print a header only */ - (storing_columns && q->lines_stored > 0 && q->lines_to_print > 0)) + if (q->status == OPEN + || q->status == FF_FOUND /* With -b: To print a header only */ + || (storing_columns && q->lines_stored > 0 && q->lines_to_print > 0)) ++n; return n; } @@ -1275,13 +1275,13 @@ init_parameters (int number_of_files) /* To allow input tab-expansion (-e sensitive) use: if (number_separator == input_tab_char) - number_width = chars_per_number + - TAB_WIDTH (chars_per_input_tab, chars_per_number); */ + number_width = chars_per_number + + TAB_WIDTH (chars_per_input_tab, chars_per_number); */ /* Estimate chars_per_text without any margin and keep it constant. */ if (number_separator == '\t') - number_width = chars_per_number + - TAB_WIDTH (chars_per_default_tab, chars_per_number); + number_width = (chars_per_number + + TAB_WIDTH (chars_per_default_tab, chars_per_number)); else number_width = chars_per_number + 1; @@ -1297,8 +1297,8 @@ init_parameters (int number_of_files) power_10 = 10 * power_10; } - chars_per_column = (chars_per_line - chars_used_by_number - - (columns - 1) * col_sep_length) / columns; + chars_per_column = (chars_per_line - chars_used_by_number + - (columns - 1) * col_sep_length) / columns; if (chars_per_column < 1) error (EXIT_FAILURE, 0, _("page width too narrow")); @@ -1836,8 +1836,8 @@ print_page (void) { if (empty_line) align_empty_cols = true; - else if (p->status == CLOSED || - (p->status == ON_HOLD && FF_only)) + else if (p->status == CLOSED + || (p->status == ON_HOLD && FF_only)) align_column (p); } } -- cgit v1.2.3-54-g00ecf