diff options
author | Jim Meyering <meyering@redhat.com> | 2012-01-01 01:46:34 +0100 |
---|---|---|
committer | Jim Meyering <meyering@redhat.com> | 2012-05-02 10:31:47 +0200 |
commit | b8a6996e258a2c30de40fb20cab0d17a38c3eff2 (patch) | |
tree | 4c84dc578458441a112a4bc3c874cf27eccb231d /src/pr.c | |
parent | a18ba2f10a739e1f0ef31cf0ebd60c8cf95d74f0 (diff) | |
download | coreutils-b8a6996e258a2c30de40fb20cab0d17a38c3eff2.tar.xz |
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.
Diffstat (limited to 'src/pr.c')
-rw-r--r-- | src/pr.c | 22 |
1 files changed, 11 insertions, 11 deletions
@@ -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); } } |