aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/sort
Commit message (Collapse)AuthorAgeFilesLines
* MFC r335404: sort(1): Fix -m when only implicit stdin is used for inputKyle Evans2018-06-273-5/+9
| | | | | | | | | | | | | | | | | | | | 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 Notes: svn path=/stable/11/; revision=335742
* MFC r326276:Eitan Adler2018-03-0514-0/+28
| | | | | | | | | | | | | | | | | | | 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 r328995:Mark Johnston2018-02-141-12/+12
| | | | | | | | | Fix the WITH_SORT_THREADS build. PR: 201664 Notes: svn path=/stable/11/; revision=329255
* MFC r312667 (by pfg):Mark Johnston2018-02-141-24/+28
| | | | | | | sort - Don't live-loop threads. Notes: svn path=/stable/11/; revision=329253
* MFC r305613 (gabor):Glen Barber2017-05-221-1/+1
| | | | | | | | | | Fix typo. PR: 211245 Sponsored by: The FreeBSD Foundation Notes: svn path=/stable/11/; revision=318653
* MFC: r310712Marius Strobl2017-05-103-11/+32
| | | | | | | | | | | | | | - Use correct offsets into the keys set array. As the elements of this zero-length array are dynamically sized at run-time based on the use of hints, compilers can't be expected to figure out these offsets on their own. [1] - Fix incorrect comparison in cmp_nans(). [2] PR: 204571 [1], 202301 [2] Submitted by: David Binderman [2] Notes: svn path=/stable/11/; revision=318153
* MFC r309232-309234:Xin LI2016-12-122-14/+2
| | | | | | | | | | | r309232: Fix an obvious typo. r309233: Eliminate variables that are computed, assigned but never used. r309234: pages and psize are always assigned, so there is no need to initialize them as zero. Notes: svn path=/stable/11/; revision=309861
* Cleanup unnecessary semicolons from utilities we all love.Pedro F. Giffuni2016-04-153-3/+3
| | | | Notes: svn path=/head/; revision=298089
* Fix some mdoc(7) issuesBaptiste Daroussin2015-10-241-17/+16
| | | | | | | Obtained from: DragonflyBSD Notes: svn path=/head/; revision=289876
* -C and -c allow at most one input file. Ensure this is the case when theGabor Kovesdan2015-10-221-5/+5
| | | | | | | | | | | input files are specified through --files0-from. Submitted by: tim@OpenBSD Obtained from: OpenBSD MFC after: 1 week Notes: svn path=/head/; revision=289751
* new dependsSimon J. Gerraty2015-06-161-1/+0
| | | | Notes: svn path=/head/; revision=284481
* Add META_MODE support.Simon J. Gerraty2015-06-131-0/+21
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * Merge sync of headSimon J. Gerraty2015-05-279-116/+62
| |\ | |/ |/| | | Notes: svn path=/projects/bmake/; revision=283595
| * Merge from head@274682Simon J. Gerraty2014-11-193-4/+6
| |\ | | | | | | | | | Notes: svn path=/projects/bmake/; revision=274683
| * \ Merge head from 7/28Simon J. Gerraty2014-08-191-0/+1
| |\ \ | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=270164
| * | | 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-2810-22/+22
| |\ \ \ | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=265044
| * \ \ \ Merge from headSimon J. Gerraty2013-09-0515-17/+17
| |\ \ \ \ | | | | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=255263
| * | | | | 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-082-46/+28
| |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=246555
| * | | | | | Updated/new Makefile.dependSimon J. Gerraty2012-11-081-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=242788
| * | | | | | Sync from headSimon J. Gerraty2012-11-0411-115/+109
| |\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=242545
| * | | | | | | Sync FreeBSD's bmake branch with Juniper's internal bmake branch.Marcel Moolenaar2012-08-221-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Requested by: Simon Gerraty <sjg@juniper.net> Notes: svn path=/projects/bmake/; revision=239572
* | | | | | | | Remove custom getdelim(3) and fix a small memory leak.Pedro F. Giffuni2015-04-073-71/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Originally from Andre Smagin. Obtained from: OpenBSD MFC after: 1 week Notes: svn path=/head/; revision=281182
* | | | | | | | sort(1): Cleanups and a small memory leak.Pedro F. Giffuni2015-04-071-16/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove useless check for leading blanks in the month name. The code didn't adjust len after stripping blanks so even if a month *did* start with a blank we'd end up copying garbage at the end. Also convert a malloc + memcpy to strdup and fix a memory leak in the wide char version if mbstowcs() fails. Originally from Andre Smagin. Obtained from: OpenBSD (CVS rev. 1.2, 1.3) MFC after: 1 week Notes: svn path=/head/; revision=281181
* | | | | | | | sort: style knits / cleanups.Pedro F. Giffuni2015-04-062-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Minor cleanups that got accidentally reverted. Obtained from: OpenBSD Notes: svn path=/head/; revision=281133
* | | | | | | | Revert (partial) r281123, r281125:Pedro F. Giffuni2015-04-067-8/+79
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-056-69/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Obtained from: OpenBSD Notes: svn path=/head/; revision=281125
* | | | | | | | sort: Fix a comment.Pedro F. Giffuni2015-04-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Obtained from: OpenBSD Notes: svn path=/head/; revision=281124
* | | | | | | | sort: Cleanup small issues with spaces.Pedro F. Giffuni2015-04-056-24/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Obtained from: OpenBSD Notes: svn path=/head/; revision=281123
* | | | | | | | mdoc: use An macro.Joel Dahl2015-01-041-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Notes: svn path=/head/; revision=276658
* | | | | | | | Convert to usr.bin/ to LIBADDBaptiste Daroussin2014-11-251-4/+2
| |_|_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reduce overlinking Notes: svn path=/head/; revision=275042
* | | | | | | Change LDFLAGS to LDADD in order to allow static builds. This is moreSean Bruno2014-11-151-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | proper way to ensure that the command line compile works the way we intend. Add explicity DPADD statemens on LIBMD and LIBPTHREAD depending on which options are used in the build. Reviewed by: andrew MFC after: 2 weeks Notes: svn path=/head/; revision=274552
* | | | | | | Make sure to not skip any argument when converting from deprecatedBaptiste Daroussin2014-10-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | +POS1, -POS2 to -kPOS1,POS2, so that sort +0n gets translated to sort -k1,1n as it is expected PR: 193994 Submitted by: rodrigo MFC after: 3 days Notes: svn path=/head/; revision=272398
* | | | | | | Remove trailing '.' from See Also section.Glen Barber2014-07-301-1/+1
| |_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MFC after: 3 days Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=269289
* | | | | | 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
* | | | | Fix spelling error.Bryan Drewery2014-04-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MFC after: 3 days Notes: svn path=/head/; revision=264918
* | | | | Various style(9) fixes and typos in grep, sort and patch.Pedro F. Giffuni2014-04-218-15/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MFC after: 3 days Notes: svn path=/head/; revision=264744
* | | | | Convert sort to using newer MK_ convention.Warner Losh2014-04-051-2/+2
| | | | | | | | | | | | | | | | | | | | Notes: svn path=/head/; revision=264159
* | | | | In usr.bin/sort/radixsort.c, pop_ls_mt() is only referenced ifDimitry Andric2013-12-221-4/+4
| |_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SORT_THREADS is defined, so make the whole function conditional, instead of just the pthread calls in it. MFC after: 3 days Notes: svn path=/head/; revision=259740
* | | | Fix header guards.Eitan Adler2013-06-171-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was ready about the same time as r251862 so just make one final cleanup Submitted by: dt71@gmx.com Notes: svn path=/head/; revision=251863
* | | | Clean up -Wheader-guard warnings.Sergey Kandaurov2013-06-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Submitted by: <dt71@gmx.com> MFC after: 3 days X-MFC with: r251848 Notes: svn path=/head/; revision=251862
* | | | - Update Oleg Moskalenko's email addressGabor Kovesdan2013-06-0215-15/+15
| |_|/ |/| | | | | | | | | | | | | | | | | Requested by: Oleg Moskalenko <mom040267@gmail.com> Notes: svn path=/head/; revision=251245
* | | - Remove forgotten commented out debug codeGabor Kovesdan2013-01-271-15/+0
| | | | | | | | | | | | | | | | | | | | | | | | Submitted by: Christoph Mallon <christoph.mallon@gmx.de> Reviewed by: Oleg Moskalenko <oleg.moskalenko@citrix.com> Notes: svn path=/head/; revision=245998
* | | - Simplify and unify diagnostic and error message handlingGabor Kovesdan2013-01-271-12/+8
| | | | | | | | | | | | | | | | | | | | | | | | Submitted by: Christoph Mallon <christoph.mallon@gmx.de> Reviewed by: Oleg Moskalenko <oleg.moskalenko@citrix.com> Notes: svn path=/head/; revision=245997
* | | - Change the memory heuristics to an actually working oneGabor Kovesdan2012-12-201-19/+15
| | | | | | | | | | | | | | | | | | | | | | | | Submitted by: Oleg Moskalenko <oleg.moskalenko@citrix.com> Prodded by: kib Notes: svn path=/head/; revision=244515