Date: Tue, 13 Jul 2004 19:05:20 +0200 From: Oliver Eikemeier <eikemeier@fillmore-labs.com> To: "Tim J. Robbins" <tjr@FreeBSD.org> Cc: cvs-all@FreeBSD.org Subject: Re: cvs commit: src/usr.bin/tr Makefile cmap.c cmap.h cset.c cset.h extern.h str.c tr.c Message-ID: <D2799FD1-D4EE-11D8-A6C6-00039312D914@fillmore-labs.com> In-Reply-To: <200407090208.i69287du035795@repoman.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Tim J. Robbins wrote: > tjr 2004-07-09 02:08:07 UTC > > FreeBSD src repository > > Modified files: > usr.bin/tr Makefile extern.h str.c tr.c > Added files: > usr.bin/tr cmap.c cmap.h cset.c cset.h > Log: > 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). > > Revision Changes Path > 1.2 +2 -1 src/usr.bin/tr/Makefile > 1.1 +212 -0 src/usr.bin/tr/cmap.c (new) > 1.1 +83 -0 src/usr.bin/tr/cmap.h (new) > 1.1 +303 -0 src/usr.bin/tr/cset.c (new) > 1.1 +75 -0 src/usr.bin/tr/cset.h (new) > 1.9 +11 -10 src/usr.bin/tr/extern.h > 1.23 +78 -87 src/usr.bin/tr/str.c > 1.22 +116 -102 src/usr.bin/tr/tr.c I'm not exactly sure, but is > echo "http://wwww.maxmind.com/" | tr -s " " ";" htp:/w.maxmind.com/ the expected result here? -Oliver
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?D2799FD1-D4EE-11D8-A6C6-00039312D914>