History log of /freebsd-10.0-release/usr.bin/tr/
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
259065 07-Dec-2013 gjb

- Copy stable/10 (r259064) to releng/10.0 as part of the
10.0-RELEASE cycle.
- Update __FreeBSD_version [1]
- Set branch name to -RC1

[1] 10.0-CURRENT __FreeBSD_version value ended at '55', so
start releng/10.0 at '100' so the branch is started with
a value ending in zero.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

256281 10-Oct-2013 gjb

Copy head (r256279) to stable/10 as part of the 10.0-RELEASE cycle.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation


245767 22-Jan-2013 andrew

When copying the complement of the string loop to WINT_MAX as we are dealing
with a wint_t. WINT_MAX and WCHAR_MAX are the same on most architectures
except ARM EABI where wint_t is signed and wchar_t is unsigned.


233510 26-Mar-2012 joel

mdoc: terminate quoted strings.

Reviewed by: brueffer


233456 25-Mar-2012 joel

Remove superfluous paragraph macro.


229403 03-Jan-2012 ed

Replace index() and rindex() calls with strchr() and strrchr().

The index() and rindex() functions were marked LEGACY in the 2001
revision of POSIX and were subsequently removed from the 2008 revision.
The strchr() and strrchr() functions are part of the C standard.

This makes the source code a lot more consistent, as most of these C
files also call into other str*() routines. In fact, about a dozen
already perform strchr() calls.


227188 06-Nov-2011 ed

Add missing static keywords to tr(1)


226363 14-Oct-2011 ed

Put parentheses in the right place.

Noted by: jilles@
Broken by: me. :-(


226360 14-Oct-2011 ed

Build tr(1) with WARNS=6.


216370 11-Dec-2010 joel

Remove the advertising clause from UCB copyrighted files in usr.bin. This
is in accordance with the information provided at
ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change

Also add $FreeBSD$ to a few files to keep svn happy.

Discussed with: imp, rwatson


213284 29-Sep-2010 jilles

tr: Fix '[=]=]' equivalence class.

A closing bracket immediately after '[=' should not be treated as special.

Different from the submitted patch, a string ending with '[=' does not cause
access beyond the terminating '\0'.

PR: bin/150384
Submitted by: Richard Lowe
MFC after: 2 weeks


201386 02-Jan-2010 ed

Build usr.bin/ with WARNS=6 by default.

Also add some missing $FreeBSD$ to keep svn happy.


200462 13-Dec-2009 delphij

Revert most part of 200420 as requested, as more review and polish is
needed.


200420 11-Dec-2009 delphij

Remove unneeded header includes from usr.bin/ except contributed code.

Tested with: make universe


166134 20-Jan-2007 maxim

o Remove duplicate includes.

Obtained from: Slava Semushin via NetBSD


163315 13-Oct-2006 ru

- Document all character classes our tr(1) supports. [1]
- Mention that some of them are POSIX extensions. [2]

PR: docs/85062 [1]
Submitted by: Toby Peterson [1]
Obtained from: wctype(3) [2]
MFC after: 3 days


144840 09-Apr-2005 stefanf

Remove unused variables.


141851 13-Feb-2005 ru

Expand contractions.


140420 18-Jan-2005 ru

Sort sections.


140368 17-Jan-2005 ru

Added the EXIT STATUS section where appropriate.


140054 11-Jan-2005 ru

Formatting fixes.

(This exposes a bug in mdoc(7) for which a patch has been sent upstream.)


137685 14-Nov-2004 jkh

tr(1) attempts to convert \n[n][n] sequences into octal digits, but doesn't
check to see that a given digit is actually an octal digit. This leads to
unusual consequences if passed in values like \9.

Reported by: Joseph Davison (OpenDarwin project)
MFC after: 1 week


132574 23-Jul-2004 tjr

Tweak markup of quoted strings and characters: use Dq instead of enclosing
strings in ``obsolete quotes''. Use Li and Ql where appropriate.


132572 23-Jul-2004 tjr

Add a lengthy discussion of why "tr a-z A-Z" and "tr A-Z a-z" are not the
right way to perform case-conversion.


132144 14-Jul-2004 tjr

Fix description of cmap_lookup_hard().


132143 14-Jul-2004 tjr

Remove unused member of struct csclass: csc_value.


132142 14-Jul-2004 tjr

Splay the left and right subtrees on min - 1 and max + 1, respectively,
before trying to coalesce. Forgetting to splay caused us to miss many
opportunities for coalescing.


131891 10-Jul-2004 tjr

Initialize cs_invert to "false" in new csets.


131855 09-Jul-2004 tjr

Report input errors instead of ignoring them.


131849 09-Jul-2004 tjr

Update for multibyte character support: remove BUGS and change the
description of the -c option to refer to "values" instead of "byte values".


131846 09-Jul-2004 tjr

Add support for multibyte characters. The challenge here was to use
data structures that scale better with large character sets, instead of
arrays indexed by character value:
- Sets of characters to delete/squeeze are stored in a new "cset" structure,
which is implemented as a splay tree of extents. This structure has the
ability to store character classes (ala wctype(3)), but this is not
currently fully utilized.
- Mappings between characters are stored in a new "cmap" structure, which
is also a splay tree.
- The parser no longer builds arrays containing all the characters in a
particular class; instead, next() determines them on-the-fly using
nextwctype(3).


131491 02-Jul-2004 ru

Mechanically kill hard sentence breaks.


131228 28-Jun-2004 tjr

Document incorrect handling of multibyte characters in input files
and character string arguments.


118475 05-Aug-2003 ache

Back out [:upper:] and [:lower:] classes sorting, it is not required
by POSIX and gains nothing with current code.


118474 05-Aug-2003 ache

Clarify upper/lower conversion description more.


118460 05-Aug-2003 ache

Explain better what happens when [:lower:] <-> [:upper:]


118415 04-Aug-2003 ache

No functional changes, just code reorganization from prev. commit, it
makes one malloc unneeded, removes two bzero's and makes code more readable.

"Bright ideas comes only _after_ commits."


118412 04-Aug-2003 ache

POSIX require complex processing of 'c-c' ranges: if one of the endpoints
is octal sequence, range is taken in the byte values order, for non-octal
endpoints range is taken in the sorted collation order.

Implement it.


118409 04-Aug-2003 ache

Special fix just for
tr -[cC]s '[:upper:]' '[:lower:]'
case (or vice versa):
chars taken from s2 can be different this time
due to lack of complex upper/lower processing,
so fill string2 again to not miss some.


118400 03-Aug-2003 ache

Microoptimization of prev. patch: do strdup() only if (cflag || Cflag)


118399 03-Aug-2003 ache

1) Fix -C - it was broken since introduced, wrong array sorted
2) Fix last (repeated) char after [:class:], it was \0 in original code


118373 03-Aug-2003 ache

Remove charcoll() stabilization added in 1.16, it gains nothing but conflicts
with ranges.


118372 03-Aug-2003 ache

POSIX requires 'c-c' must conform collate and be in collation order


118371 03-Aug-2003 ache

This patch address two problems.

1st one is relatively minor: according our own manpage, upper and lower
classes must be sorted, but currently not.

2nd one is serious:
tr '[:lower:]' '[:upper:]'
(and vice versa) currently works only if upper and lower classes
have exact the same number of elements. When it is not true, like for
many ISO8859-x locales which have bigger amount of lowercase letters,
tr may do nasty things.

See this page
http://www.opengroup.org/onlinepubs/007908799/xcu/tr.html
for detailed description of desired tr behaviour in such cases.


108470 30-Dec-2002 schweikh

Fix typos, mostly s/ an / a / where appropriate and a few s/an/and/
Add FreeBSD Id tag where missing.


107276 26-Nov-2002 ru

mdoc(7) police: markup polishing.

Approved by: re


105323 17-Oct-2002 charnier

Use .Fl/Ar for flags and arguments.


102944 04-Sep-2002 dwmalone

ANSIify function definitions.
Add some constness to avoid some warnings.
Remove use register keyword.
Deal with missing/unneeded extern/prototypes.
Some minor type changes/casts to avoid warnings.

Reviewed by: md5


100891 29-Jul-2002 tjr

When translating and -C is specified, behave as if the complemented set was
in the locale collating order as required by SUSv3.


100874 29-Jul-2002 tjr

When translating and the -c option is specified, handle the case where the
second string argument is more than one character in length in the way
required by SUSv3 (and the way GNU textutils and SVR4 do it).


99433 05-Jul-2002 tjr

Use err instead of errx when malloc fails. "malloc" is not a helpful
error message.


98242 15-Jun-2002 tjr

Improve parsing of character and equivalence classes:
[:*] and [=*] are parsed as `infinitely many repetitions of :' (or *)
instead of literal characters (SUSv3)


98222 14-Jun-2002 tjr

Move the #include and #define's to the top of the file.


98221 14-Jun-2002 tjr

Bump the size of the equivalence set to NCHARS; this file was left out
of a previous commit implementing equivalence classes.


98217 14-Jun-2002 tjr

Sort sections. Avoid using "The -? option" at the start of option descriptions.


98215 14-Jun-2002 tjr

Don't treat the trailing ']' of an equivalence class expression as a
character in the set. tr -d '[=a=]' was deleting ]'s as well as a's.
Noticed by the textutils test suite.


98214 14-Jun-2002 tjr

Add the P1003.1-2001 -C option which complements the set of characters
(not byte values) specified by the first string argument.


98210 14-Jun-2002 tjr

Implement support for equivalence classes ([=e=]) when the mapping is
one-to-one (SUSv3)


92922 22-Mar-2002 imp

remove __P


91562 02-Mar-2002 alfred

properly handle zero length first string when doing -c

PR: 34663
MFC After: 3 days


87705 11-Dec-2001 markm

WARNS=2 fixes, use __FBSDID(), kill register keyword.


81687 15-Aug-2001 ru

mdoc(7) police: utilize the new .Ex macro.


81622 14-Aug-2001 ru

mdoc(7) police: s/BSD/.Bx/ where appropriate.


79755 15-Jul-2001 dd

Remove whitespace at EOL.


79361 06-Jul-2001 ru

mdoc(7) police: -column lists require column width specifiers.


71895 01-Feb-2001 ru

mdoc(7) police: split punctuation characters + misc fixes.


70197 19-Dec-2000 ru

Prepare for mdoc(7)NG.


68963 20-Nov-2000 ru

mdoc(7) police: use the new features of the Nm macro.


68575 10-Nov-2000 ru

Avoid use of direct troff requests in mdoc(7) manual pages.


58628 26-Mar-2000 charnier

Add DIAGNOSTICS section name


50477 28-Aug-1999 peter

$Id$ -> $FreeBSD$


48792 12-Jul-1999 nik

Add $Id$, to make it simpler for members of the translation teams to
track.

The $Id$ line is normally at the bottom of the main comment block in the
man page, separated from the rest of the manpage by an empty comment,
like so;

.\" $Id$
.\"

If the immediately preceding comment is a @(#) format ID marker than the
the $Id$ will line up underneath it with no intervening blank lines.
Otherwise, an additional blank line is inserted.

Approved by: bde


30322 12-Oct-1997 helbig

Submitted by: Joachim Kuebart, thanks.
Add -u option to force unbuffered output


28368 18-Aug-1997 charnier

Use err(3) instead of local redefinition. Cosmetic in usage().


24360 29-Mar-1997 imp

compare return value from getopt against -1 rather than EOF, per the final
posix standard on the topic.


23693 11-Mar-1997 peter

Merge from Lite2


14720 19-Mar-1996 joerg

Cast char's to (u_char) before passing them to isctype() functions.


14648 17-Mar-1996 joerg

Fix a couple of sign-extension bugs.

Submitted by: serg@bcs1.bcs.zaporizhzhe.ua (Sergey Shkonda)


12505 28-Nov-1995 bde

Updated to BSD4.4lite2. Fixes PR836. `echo abcd | tr a-d A-BC-D' now
works.


11895 28-Oct-1995 ache

Fix broken charclass handling
Add setlocale LC_CTYPE


11630 21-Oct-1995 phk

Remove declamations which <ctype.h> already does for us.


11629 21-Oct-1995 phk

Added #include <ctype.h>


8874 30-May-1995 rgrimes

Remove trailing whitespace.


3983 28-Oct-1994 ache

Fix print class mistype


1591 27-May-1994 rgrimes

This commit was generated by cvs2svn to compensate for changes in r1590,
which included commits to RCS files with non-trunk default branches.