aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/sort/file.c
Commit message (Collapse)AuthorAgeFilesLines
* sort(1): Remove duplicate option checkGordon Bergling2020-09-081-1/+1
| | | | | | | | | | | Reviewed by: lwhsu, emaste Approved by: emaste Obtained from: DragonFlyBSD MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D23892 Notes: svn path=/head/; revision=365458
* sort(1): Fix -m when only implicit stdin is used for inputKyle Evans2018-06-201-2/+2
| | | | | | | | | | | | | | | | | | | | | Observe: printf "a\nb\nc\n" > /tmp/foo # Next command results in no output cat /tmp/foo | sort -m # Next command results in proper output cat /tmp/foo | sort -m - # Also works: sort -m /tmp/foo Some const'ification was done to simplify the actual solution of adding "-" explicitly to the file list if we didn't have any file arguments left over. PR: 190099 MFC after: 1 week Notes: svn path=/head/; revision=335404
* various: general adoption of SPDX licensing ID tags.Pedro F. Giffuni2017-11-271-0/+2
| | | | | | | | | | | | | | | | | 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=/head/; revision=326276
* sort(1): Remove unneeded initializations.Pedro F. Giffuni2017-02-171-1/+0
| | | | | | | Found by: Clang static analyzer Notes: svn path=/head/; revision=313891
* Cleanup unnecessary semicolons from utilities we all love.Pedro F. Giffuni2016-04-151-1/+1
| | | | Notes: svn path=/head/; revision=298089
* Remove custom getdelim(3) and fix a small memory leak.Pedro F. Giffuni2015-04-071-36/+0
| | | | | | | | | | Originally from Andre Smagin. Obtained from: OpenBSD MFC after: 1 week Notes: svn path=/head/; revision=281182
* Revert (partial) r281123, r281125:Pedro F. Giffuni2015-04-061-0/+24
| | | | | | | | | | | | sort: style knits / cleanups. Our style guide(9) specifies that in absence of local variables an empty line must be inserted. Pointed out by: eadler Notes: svn path=/head/; revision=281132
* sort: style knits / cleanups.Pedro F. Giffuni2015-04-051-24/+0
| | | | | | | Obtained from: OpenBSD Notes: svn path=/head/; revision=281125
* sort: Cleanup small issues with spaces.Pedro F. Giffuni2015-04-051-1/+1
| | | | | | | Obtained from: OpenBSD Notes: svn path=/head/; revision=281123
* - Update Oleg Moskalenko's email addressGabor Kovesdan2013-06-021-1/+1
| | | | | | | Requested by: Oleg Moskalenko <mom040267@gmail.com> Notes: svn path=/head/; revision=251245
* - Portability changes for ARMGabor Kovesdan2012-11-011-29/+30
| | | | | | | | | - Allow larger sort memory on 64-bit platforms Submitted by: Oleg Moskalenko <oleg.moskalenko@citrix.com> Notes: svn path=/head/; revision=242430
* - Change --nthreads parameter to --parallel for GNU compatibilityGabor Kovesdan2012-07-041-2/+5
| | | | | | | | | | - Change default sort method to mergesort, which has a better worst case performance than qsort Submitted by: Oleg Moskalenko <oleg.moskalenko@citrix.com> Notes: svn path=/head/; revision=238108
* - Only use multi-threading for large filesGabor Kovesdan2012-05-251-17/+31
| | | | | | | | | | | - Do not use mmap() by default; it can be enabled by --mmap - Add some minor optimizations for -u - Update manual page according to the changes Submitted by: Oleg Moskalenko <oleg.moskalenko@citrix.com> Notes: svn path=/head/; revision=235987
* - Eliminate initializations if global variables. Compilers are notGabor Kovesdan2012-05-141-1/+1
| | | | | | | | | required to optimize these so it may result in larger binary size. Pointed out by: kib Notes: svn path=/head/; revision=235435
* - Fix build with clangGabor Kovesdan2012-05-141-4/+4
| | | | Notes: svn path=/head/; revision=235432
* Add a BSD-licensed sort rewrite that was started by me and later completedGabor Kovesdan2012-05-111-0/+1615
with the major functionality and optimizations by Oleg Moskalenko. It is compatible with the latest version of POSIX and the current GNU sort version that we have in base. Beside this, it implements all the functionality introduced in later versions of GNU sort. For now, it will be installed as "bsdsort", keeping GNU sort as the default sort implementation. Notes: svn path=/head/; revision=235267