Commit Graph

48 Commits

Author SHA1 Message Date
Eitan Adler
702a1889cc Fix header guards.
This was ready about the same time as r251862 so just make one final cleanup

Submitted by:	dt71@gmx.com
2013-06-17 20:15:39 +00:00
Sergey Kandaurov
77b2b60dcf Clean up -Wheader-guard warnings.
Submitted by:	<dt71@gmx.com>
MFC after:	3 days
X-MFC with:	r251848
2013-06-17 20:11:04 +00:00
Gabor Kovesdan
c859c6dd54 - Update Oleg Moskalenko's email address
Requested by:	Oleg Moskalenko <mom040267@gmail.com>
2013-06-02 09:43:48 +00:00
Gabor Kovesdan
0c2c94e1b7 - Remove forgotten commented out debug code
Submitted by:	Christoph Mallon <christoph.mallon@gmx.de>
Reviewed by:	Oleg Moskalenko <oleg.moskalenko@citrix.com>
2013-01-27 19:50:24 +00:00
Gabor Kovesdan
f187ff08ef - Simplify and unify diagnostic and error message handling
Submitted by:	Christoph Mallon <christoph.mallon@gmx.de>
Reviewed by:	Oleg Moskalenko <oleg.moskalenko@citrix.com>
2013-01-27 19:49:10 +00:00
Gabor Kovesdan
554442439d - Change the memory heuristics to an actually working one
Submitted by:	Oleg Moskalenko <oleg.moskalenko@citrix.com>
Prodded by:	kib
2012-12-20 22:30:40 +00:00
Gabor Kovesdan
ab28d4d3cf - Use unsigned int for values obtained with sysctlbyname(). This fixes
sparc64 performance problems.

Submitted by:	Oleg Moskalenko <oleg.moskalenko@citrix.com>
Tested by:	trasz
2012-12-17 09:36:43 +00:00
Gabor Kovesdan
e8da8c744b - Portability changes for ARM
- Allow larger sort memory on 64-bit platforms

Submitted by:	Oleg Moskalenko <oleg.moskalenko@citrix.com>
2012-11-01 11:38:34 +00:00
Ed Schouten
bf70becee6 More -Wmissing-variable-declarations fixes.
In addition to adding `static' where possible:

- bin/date: Move `retval' into extern.h to make it visible to date.c.
- bin/ed: Move globally used variables into ed.h.
- sbin/camcontrol: Move `verbose' into camcontrol.h and fix shadow warnings.
- usr.bin/calendar: Remove unneeded variables.
- usr.bin/chat: Make `line' local instead of global.
- usr.bin/elfdump: Comment out unneeded function.
- usr.bin/rlogin: Use _Noreturn instead of __dead2.
- usr.bin/tset: Pull `Ospeed' into extern.h.
- usr.sbin/mfiutil: Put global variables in mfiutil.h.
- usr.sbin/pkg: Remove unused `os_corres'.
- usr.sbin/quotaon, usr.sbin/repquota: Remove unused `qfname'.
2012-10-19 14:49:42 +00:00
Ed Schouten
9a41df2a0e Remove WARNS=6 lines.
WARNS=6 is already implied at this point.
2012-10-18 15:39:29 +00:00
Gabor Kovesdan
d38ae94bce - Remove GNU sort and the WITH_GNU_SORT knob 2012-10-13 18:40:39 +00:00
Joel Dahl
e037c73138 Remove trailing whitespace. 2012-09-09 06:54:42 +00:00
Gabor Kovesdan
5d5151ae7e - Change --nthreads parameter to --parallel for GNU compatibility
- Change default sort method to mergesort, which has a better worst case
  performance than qsort

Submitted by:	Oleg Moskalenko <oleg.moskalenko@citrix.com>
2012-07-04 16:25:11 +00:00
Gabor Kovesdan
7d26b3ee33 - Switch to BSD sort as default sort. GNU sort will still be installed as
"gnusort".  Most of the BSD sort development work was done by
  Oleg Moskalenko <oleg.moskalenko@citrix.com>.
- GNU grep can be set to default by setting WITH_GNU_GREP.  It will cause
  BSD sort to be installed as "bsdsort".

Portbuild tested by:    linimon
2012-06-27 05:59:01 +00:00
Gabor Kovesdan
d826ccd66d - Disable threaded sort by default
- Fix typo in the NLS support
2012-06-27 05:50:15 +00:00
Gabor Kovesdan
89b7a5879e - Remove the UNUSED_ARG macro and use __unused in argument lists
Reviewed by:	dim
MFC after:	3 days
2012-06-08 19:21:49 +00:00
Dimitry Andric
2ac58c1d79 In usr.bin/sort, use another method of silencing warnings about unused
arguments, which does not trigger self-assignment warnings in certain
circumstances (for example, using clang with ccache).

MFC after:	3 days
2012-06-08 17:08:27 +00:00
Joel Dahl
2dbc3019d0 mdoc: sort sections into conventional order. 2012-05-26 06:31:54 +00:00
Gabor Kovesdan
5ca724dc59 - Only use multi-threading for large files
- 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>
2012-05-25 09:30:16 +00:00
Gabor Kovesdan
f50d9b2ffb - Fix -o option that was broken by my clang compile fix
Submitted by:	Oleg Moskalenko <oleg.moskalenko@citrix.com>
2012-05-17 13:08:30 +00:00
Gabor Kovesdan
ce1e997f54 - Eliminate initializations if global variables. Compilers are not
required to optimize these so it may result in larger binary size.

Pointed out by:	kib
2012-05-14 10:06:49 +00:00
Gabor Kovesdan
131a228a6d - Update catalogs 2012-05-14 09:55:23 +00:00
Gabor Kovesdan
8818aa392a - Fix build with clang 2012-05-14 09:53:54 +00:00
Gabor Kovesdan
c66bbc9143 Add a BSD-licensed sort rewrite that was started by me and later completed
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.
2012-05-11 12:37:16 +00:00
Andrey A. Chernov
9af48ddfd9 Remove it in favour of GNU sort 2002-04-08 20:50:12 +00:00
David E. O'Brien
12b1cc8f72 Use the new features of cdefs.h. 2002-04-06 21:09:31 +00:00
David E. O'Brien
528b02ffd0 Fix style. 2002-04-06 21:03:33 +00:00
Andrey A. Chernov
50cd73c1a7 Remove old sort files to _actually_ build it from contrib sources
Forgotten by: des
2002-04-06 20:22:06 +00:00
Dag-Erling Smørgrav
aa5619ca9e Build a working version of sort(1) from contrib. Use netbsd.h as a hack
to avoid bringing the sources off the vendor branch just to #ifdef out
the RCS and SCCS IDs.
2002-04-06 13:59:43 +00:00
Andrey A. Chernov
f04106fa13 style(9) cosmetique of my changes 2002-04-06 00:40:19 +00:00
Andrey A. Chernov
11bb39259c Add note about double-character letters like "ss" into BUGS section
Reviewed by:	Mike DeGraw-Bertsch <mbertsch@radioactivedata.org>
2002-04-05 19:29:05 +00:00
Andrey A. Chernov
9a0cf5fedb Cast ctype macros char arg to u_char to prevent sign extension 2002-04-04 21:55:44 +00:00
Andrey A. Chernov
4b97a93ad9 For -n use decimal point from locale 2002-04-04 20:54:44 +00:00
Andrey A. Chernov
b412ae253b Remove __P 2002-04-04 19:18:58 +00:00
Andrey A. Chernov
bdc1a7c486 Implement collating sort 2002-04-04 14:10:02 +00:00
Andrey A. Chernov
a27495e795 Fix to handle REC_D > 127 and fold case sorting of high letters
(linear sorting still assumed, no collating support yet).
2002-04-03 01:39:26 +00:00
Andrey A. Chernov
f23d8c713d Uncomment now implemented part of -d description 2002-03-31 20:18:35 +00:00
Andrey A. Chernov
cac2ce40ff Remove \n from __COPYRIGHT to shut assembler warning 2002-03-31 20:11:10 +00:00
Andrey A. Chernov
903163a139 Remove double SINGL_FLD and SEP_FLAG initialization 2002-03-27 22:41:01 +00:00
Andrey A. Chernov
565d58edd2 Fix the case when high letters becomes missing from fold tables
for some locales
2002-03-25 16:06:12 +00:00
Andrey A. Chernov
d0708a4e88 Fix the case when record separator is 'Z' letter
Sense high spaces for -d option too
2002-03-25 15:49:07 +00:00
Andrey A. Chernov
3c1a6de57e Remove double REC_D assignment
Cast REC_D optarg assignment to (u_char) to prevent out of bounds indexing
2002-03-25 14:22:31 +00:00
Mark Murray
e58067e0f2 Make this compile on FreeBSD. Sort out VCS tags, fix warnings. 2002-03-24 15:59:17 +00:00
Mark Murray
363a07cc69 Null one-line entry to resurrect this from the Attic. The real commit
will follow.
2002-03-22 14:51:51 +00:00
Mark Murray
3c3f11563a This commit was generated by cvs2svn to compensate for changes in r92948,
which included commits to RCS files with non-trunk default branches.
2002-03-22 13:54:24 +00:00
Mark Murray
7a0a395027 Vendor import NETBSD's sort(1). This will be a replacement for
our GNU sort, as discussed 6 months or more ago.
2002-03-22 13:54:24 +00:00
Peter Wemm
65b3003d2d kill the undead 1997-07-13 14:26:00 +00:00
Bruce Evans
c44252b6e8 Finish importing Lite2's src/usr.bin, except for ex, diff, grep, mail,
pascal and vmstat.sparc.  All changed files on the vendor branch should
already have been imported.
1997-07-06 06:54:14 +00:00