aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/tr
Commit message (Collapse)AuthorAgeFilesLines
* Revert r330897:Eitan Adler2018-03-293-7/+1
| | | | | | | | | | | | | | | | | | | | This was intended to be a non-functional change. It wasn't. The commit message was thus wrong. In addition it broke arm, and merged crypto related code. Revert with prejudice. This revert skips files touched in r316370 since that commit was since MFCed. This revert also skips files that require $FreeBSD$ property changes. Thank you to those who helped me get out of this mess including but not limited to gonzo, kevans, rgrimes. Requested by: gjb (re) Notes: svn path=/stable/11/; revision=331722
* Partial merge of the SPDX changesEitan Adler2018-03-143-1/+7
| | | | | | | | | | These changes are incomplete but are making it difficult to determine what other changes can/should be merged. No objections from: pfg Notes: svn path=/stable/11/; revision=330897
* MFC r326276:Eitan Adler2018-03-054-0/+8
| | | | | | | | | | | | | | | | | | | various: general adoption of SPDX licensing ID tags. Mainly focus on files that use BSD 2-Clause license, however the tool I was using misidentified many licenses so this was mostly a manual - error prone - task. The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensource licenses. We are gradually adopting the specification, noting that the tags are considered only advisory and do not, in any way, superceed or replace the license texts. No functional change intended. Notes: svn path=/stable/11/; revision=330449
* MFC r302827Andrey A. Chernov2016-08-171-3/+4
| | | | | | | | Optimize [Cc]flag case: don't repeatedly add the last character of string2 to squeeze cset when string2 reach its EOS state. Notes: svn path=/stable/11/; revision=304278
* MFC r302826Andrey A. Chernov2016-08-171-0/+4
| | | | | | | Document incomplete support of [=equiv=] and collation for ranges. Notes: svn path=/stable/11/; revision=304277
* Merge ^/user/ngie/release-pkg-fix-tests to unbreak how test files are installedEnji Cooper2016-05-041-21/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | after r298107 Summary of changes: - Replace all instances of FILES/TESTS with ${PACKAGE}FILES. This ensures that namespacing is kept with FILES appropriately, and that this shouldn't need to be repeated if the namespace changes -- only the definition of PACKAGE needs to be changed - Allow PACKAGE to be overridden by callers instead of forcing it to always be `tests`. In the event we get to the point where things can be split up enough in the base system, it would make more sense to group the tests with the blocks they're a part of, e.g. byacc with byacc-tests, etc - Remove PACKAGE definitions where possible, i.e. where FILES wasn't used previously. - Remove unnecessary TESTSPACKAGE definitions; this has been elided into bsd.tests.mk - Remove unnecessary BINDIRs used previously with ${PACKAGE}FILES; ${PACKAGE}FILESDIR is now automatically defined in bsd.test.mk. - Fix installation of files under data/ subdirectories in lib/libc/tests/hash and lib/libc/tests/net/getaddrinfo - Remove unnecessary .include <bsd.own.mk>s (some opportunistic cleanup) Document the proposed changes in share/examples/tests/tests/... via examples so it's clear that ${PACKAGES}FILES is the suggested way forward in terms of replacing FILES. share/mk/bsd.README didn't seem like the appropriate method of communicating that info. MFC after: never probably X-MFC with: r298107 PR: 209114 Relnotes: yes Tested with: buildworld, installworld, checkworld; buildworld, packageworld Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=299094
* MFHGlen Barber2016-03-101-0/+11
|\ | | | | | | | | | | | | Sponsored by: The FreeBSD Foundation Notes: svn path=/projects/release-pkg/; revision=296625
| * DIRDEPS_BUILD: Connect MK_TESTS.Bryan Drewery2016-03-091-0/+11
| | | | | | | | | | | | | | Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=296587
* | First pass to fix the 'tests' packages.Glen Barber2016-02-021-0/+3
|/ | | | | | | Sponsored by: The FreeBSD Foundation Notes: svn path=/projects/release-pkg/; revision=295171
* Add META_MODE support.Simon J. Gerraty2015-06-131-0/+18
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | Off by default, build behaves normally. WITH_META_MODE we get auto objdir creation, the ability to start build from anywhere in the tree. Still need to add real targets under targets/ to build packages. Differential Revision: D2796 Reviewed by: brooks imp Notes: svn path=/head/; revision=284345
| * dirdeps.mk now sets DEP_RELDIRSimon J. Gerraty2015-06-081-2/+0
| | | | | | | | Notes: svn path=/projects/bmake/; revision=284172
| * Updated dependenciesSimon J. Gerraty2014-05-161-1/+0
| | | | | | | | Notes: svn path=/projects/bmake/; revision=266219
| * Updated dependenciesSimon J. Gerraty2014-05-101-0/+2
| | | | | | | | Notes: svn path=/projects/bmake/; revision=265802
| * Merge from headSimon J. Gerraty2014-05-081-1/+1
| |\ | |/ |/| | | Notes: svn path=/projects/bmake/; revision=265720
| * Merge headSimon J. Gerraty2014-04-2820-0/+129
| |\ | | | | | | | | | Notes: svn path=/projects/bmake/; revision=265044
| * | Updated dependenciesSimon J. Gerraty2013-03-111-0/+1
| | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=248169
| * | Updated dependenciesSimon J. Gerraty2013-02-161-2/+0
| | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=246868
| * | Sync with HEAD.David E. O'Brien2013-02-081-1/+2
| |\ \ | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=246555
| * | | Sync FreeBSD's bmake branch with Juniper's internal bmake branch.Marcel Moolenaar2012-08-221-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Requested by: Simon Gerraty <sjg@juniper.net> Notes: svn path=/projects/bmake/; revision=239572
* | | | Use src.opts.mk in preference to bsd.own.mk except where we need stuffWarner Losh2014-05-061-1/+1
| |_|/ |/| | | | | | | | | | | | | | | | | from the latter. Notes: svn path=/head/; revision=265420
* | | Migrate most of tools/regression/usr.bin/ to the new tests layout.Julio Merino2014-03-1620-0/+129
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I'm starting with the easy cases. The leftovers need to be looked at a bit more closely. Note that this change _does_ modify the code of the old tests. This is required in order to allow the code to locate the data files in the source directory instead of the current directory, because Kyua automatically changes the latter to a temporary directory. Also note that at least one test is known to be broken here. Actually, the test is not really broken: it's marked as a TODO but unfortunately Kyua's TAP parser currently does not understand that. Will have to be fixed separately. Notes: svn path=/head/; revision=263227
* | When copying the complement of the string loop to WINT_MAX as we are dealingAndrew Turner2013-01-221-1/+2
|/ | | | | | | | 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. Notes: svn path=/head/; revision=245767
* mdoc: terminate quoted strings.Joel Dahl2012-03-261-23/+23
| | | | | | | Reviewed by: brueffer Notes: svn path=/head/; revision=233510
* Remove superfluous paragraph macro.Joel Dahl2012-03-251-2/+0
| | | | Notes: svn path=/head/; revision=233456
* Replace index() and rindex() calls with strchr() and strrchr().Ed Schouten2012-01-031-1/+1
| | | | | | | | | | | | | 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. Notes: svn path=/head/; revision=229403
* Add missing static keywords to tr(1)Ed Schouten2011-11-061-2/+2
| | | | Notes: svn path=/head/; revision=227188
* Put parentheses in the right place.Ed Schouten2011-10-141-2/+2
| | | | | | | | Noted by: jilles@ Broken by: me. :-( Notes: svn path=/head/; revision=226363
* Build tr(1) with WARNS=6.Ed Schouten2011-10-143-14/+7
| | | | Notes: svn path=/head/; revision=226360
* Remove the advertising clause from UCB copyrighted files in usr.bin. ThisJoel Dahl2010-12-114-16/+0
| | | | | | | | | | | | 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 Notes: svn path=/head/; revision=216370
* tr: Fix '[=]=]' equivalence class.Jilles Tjoelker2010-09-291-1/+1
| | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=213284
* Build usr.bin/ with WARNS=6 by default.Ed Schouten2010-01-021-0/+2
| | | | | | | Also add some missing $FreeBSD$ to keep svn happy. Notes: svn path=/head/; revision=201386
* Revert most part of 200420 as requested, as more review and polish isXin LI2009-12-136-0/+14
| | | | | | | needed. Notes: svn path=/head/; revision=200462
* Remove unneeded header includes from usr.bin/ except contributed code.Xin LI2009-12-116-14/+0
| | | | | | | Tested with: make universe Notes: svn path=/head/; revision=200420
* o Remove duplicate includes.Maxim Konovalov2007-01-201-1/+0
| | | | | | | Obtained from: Slava Semushin via NetBSD Notes: svn path=/head/; revision=166134
* - Document all character classes our tr(1) supports. [1]Ruslan Ermilov2006-10-131-2/+14
| | | | | | | | | | | | - 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 Notes: svn path=/head/; revision=163315
* Remove unused variables.Stefan Farfeleder2005-04-091-1/+1
| | | | Notes: svn path=/head/; revision=144840
* Expand contractions.Ruslan Ermilov2005-02-131-1/+1
| | | | Notes: svn path=/head/; revision=141851
* Sort sections.Ruslan Ermilov2005-01-181-2/+2
| | | | Notes: svn path=/head/; revision=140420
* Added the EXIT STATUS section where appropriate.Ruslan Ermilov2005-01-171-1/+1
| | | | Notes: svn path=/head/; revision=140368
* Formatting fixes.Ruslan Ermilov2005-01-111-9/+11
| | | | | | | (This exposes a bug in mdoc(7) for which a patch has been sent upstream.) Notes: svn path=/head/; revision=140054
* tr(1) attempts to convert \n[n][n] sequences into octal digits, but doesn'tJordan K. Hubbard2004-11-141-1/+1
| | | | | | | | | | | 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 Notes: svn path=/head/; revision=137685
* Tweak markup of quoted strings and characters: use Dq instead of enclosingTim J. Robbins2004-07-231-12/+44
| | | | | | | strings in ``obsolete quotes''. Use Li and Ql where appropriate. Notes: svn path=/head/; revision=132574
* Add a lengthy discussion of why "tr a-z A-Z" and "tr A-Z a-z" are not theTim J. Robbins2004-07-231-1/+41
| | | | | | | right way to perform case-conversion. Notes: svn path=/head/; revision=132572
* Fix description of cmap_lookup_hard().Tim J. Robbins2004-07-141-1/+1
| | | | Notes: svn path=/head/; revision=132144
* Remove unused member of struct csclass: csc_value.Tim J. Robbins2004-07-141-1/+0
| | | | Notes: svn path=/head/; revision=132143
* Splay the left and right subtrees on min - 1 and max + 1, respectively,Tim J. Robbins2004-07-141-34/+20
| | | | | | | | before trying to coalesce. Forgetting to splay caused us to miss many opportunities for coalescing. Notes: svn path=/head/; revision=132142
* Initialize cs_invert to "false" in new csets.Tim J. Robbins2004-07-101-0/+1
| | | | Notes: svn path=/head/; revision=131891
* Report input errors instead of ignoring them.Tim J. Robbins2004-07-091-0/+8
| | | | Notes: svn path=/head/; revision=131855
* Update for multibyte character support: remove BUGS and change theTim J. Robbins2004-07-091-7/+2
| | | | | | | description of the -c option to refer to "values" instead of "byte values". Notes: svn path=/head/; revision=131849
* Add support for multibyte characters. The challenge here was to useTim J. Robbins2004-07-098-199/+879
| | | | | | | | | | | | | | | | | 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). Notes: svn path=/head/; revision=131846