From b1113d0168cec6ae4c0f87072c23d217ed41f7c4 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Fri, 9 Aug 2002 10:03:58 +0000 Subject: (main): Don't ignore -COLUMN if it's the last option. (usage): Clarify help text for the -COLUMN option. --- src/pr.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'src') diff --git a/src/pr.c b/src/pr.c index f5b22cc05..0516e171b 100644 --- a/src/pr.c +++ b/src/pr.c @@ -46,7 +46,7 @@ - With single column output only one POSIX requirement has to be met: The default n-separator should be a TAB. The consequence is a - different width between the number an the text if the output position + different width between the number and the text if the output position of the separator changes, i.e. it depends upon the left margin used. That's not nice but easy-to-use together with the defaults of other utilities, e.g. sort or cut. - Same as SunOS does. @@ -878,16 +878,14 @@ main (int argc, char **argv) if (ISDIGIT (c)) { accum = accum * 10 + c - '0'; - continue; - } - - if (accum > 0) - { columns = accum; explicit_columns = TRUE; - accum = 0; + continue; } + if (accum > 0) /* reset for subsequent params */ + accum = 0; + switch (c) { case 0: /* getopt long option */ @@ -2769,7 +2767,7 @@ Mandatory arguments to long options are mandatory for short options too.\n\ +FIRST_PAGE[:LAST_PAGE], --pages=FIRST_PAGE[:LAST_PAGE]\n\ begin [stop] printing with page FIRST_[LAST_]PAGE\n\ -COLUMN, --columns=COLUMN\n\ - produce COLUMN-column output and print columns down,\n\ + output COLUMN columns and print columns down,\n\ unless -a is used. Balance number of lines in the\n\ columns on each page.\n\ "), stdout); -- cgit v1.2.3-70-g09d2