bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 'pr' expands tabs incorrectly?


From: Jim Meyering
Subject: Re: 'pr' expands tabs incorrectly?
Date: Fri, 16 Mar 2007 17:30:27 +0100

"Macomson, Wis" <address@hidden> wrote:
> I don't know, but line 1268 in "pr.c" seem to peremptorily set
> "untabify_input", which could definitely get the spaces in there.
>
>   if (columns > 1)
>     {
>       . . .
>       truncate_lines = true;
>       untabify_input = true;
>       tabify_output = true;
>     }
>   else
>       . . .
>
> This also raises a question about the preceding line "truncate_lines =
> true;" which would could prevent me from freely concatenating long lines
> from multiple files in a merge.  This appears to conflict with "-s",
> which is described under the "-w" option (pr.c, line 282) as:
>
>     ...-s[CHAR] turns off the default page width and any line
> truncation. Lines of full
>         length will be merged, regardless of the column options set. ...

Be aware that GNU pr tries to conform to the POSIX spec:

  http://www.opengroup.org/onlinepubs/009695399/utilities/pr.html

> This has not been tested, though.

If you come up with a patch,
a good test is simply to run "make check".
There is an extensive suite of tests for pr,
so that if everything passes with your change,
then it's almost guaranteed to be fine.

However, the tests may need to be adjusted, too.

If you (or anyone) comes up with a patch, please
include a small test case that can be added to
the list in tests/pr/Test.pm.

> Thanks for looking into this.  How can I be notified when it is fixed?

You should be Cc'd.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]