bug-coreutils
[Top][All Lists]
Advanced

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

Re: some POSIX-conformance cleanups for GNU tr


From: Jim Meyering
Subject: Re: some POSIX-conformance cleanups for GNU tr
Date: Wed, 02 Jun 2004 10:55:18 +0200

Paul Eggert <address@hidden> wrote:
> I went through the POSIX spec for 'tr' with a fine-toothed come and
> compared it to GNU tr's source.  In some cases GNU 'tr' is too picky;
> it diagnoses constructs for which POSIX does not require a diagnostic.
> I think it's better for POSIXLY_CORRECT to affect the behavior of GNU
> 'tr' as little as possible, so I removed the overly-picky diagnostics.
> In a few other cases GNU tr gives the wrong answer, e.g. "tr 'a\055b'
> def" is treated like "tr a-b def" which isn't right.  Also, POSIX
> requires an option -C which GNU tr currently doesn't support.  Here is
> a patch.
>
> 2004-06-01  Paul Eggert  <address@hidden>
>
>       Some POSIX-conformance cleanups for tr.
>
>       * doc/coreutils.texi (tr invocation): Mention -C.
>       * src/tr.c (posix_pedantic): Remove; no longer needed since
>       we need to test this in just one place now.
>       (usage): Mention -C.
>       (unquote): Note that \055, \n, etc are escaped.
>       Do not worry about POSIXLY_CORRECT when warning about ambiguous
>       escape sequences.
>       \ at end of string stands for itself.
>       Do not diagnose invalid backslash escapes: POSIX says the behavior
>       is unspecified in this case, so we don't need to diagnose it.
>       (main): Add support for -C (currently an alias for -c).
>       Do not diagnose 'tr [:upper:] [:upper:], as POSIX does not require
>       a diagnostic here.
>       * tests/tr/Test.pm: New tests bs-055, bs-at-end, repeat-Compl.
>       Fix comment for range-a-a.

Thanks for all that work!
Applied.




reply via email to

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