Paul Eggert <[EMAIL PROTECTED]> 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 <[EMAIL PROTECTED]> > > 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. _______________________________________________ Bug-coreutils mailing list [EMAIL PROTECTED] http://lists.gnu.org/mailman/listinfo/bug-coreutils