Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Usually, -width Fl (which is 10n) is too wide and hence ugly. | 2020-01-16 | 1 | -3/+3 | |
| | | | | Change several instances, most of them to the usual -width Ds. | ||||
* | Do not perform top-level sort when -c is used with a -k field. | 2019-12-30 | 1 | -2/+3 | |
| | | | | From Richard Ipsum | ||||
* | More Version 1 AT&T UNIX history. | 2019-09-06 | 1 | -3/+3 | |
| | | | | | | This became possible because copies of the original v1 manuals have shown up on the Internet some time ago. Reminded by Sevan Janiyan <venture37 at geeklan dot co dot uk>. | ||||
* | When system calls indicate an error they return -1, not some arbitrary | 2019-06-28 | 1 | -3/+3 | |
| | | | | | | value < 0. errno is only updated in this case. Change all (most?) callers of syscalls to follow this better, and let's see if this strictness helps us in the future. | ||||
* | In manpages, don't escape apostrophes as \'; it's rarely what you want. | 2019-06-02 | 1 | -5/+9 | |
| | | | | | Most of these are correct just as '. A few benefit from Ql or \(aq. But if in doubt, just use '. | ||||
* | re-indent bwscoll() after previous commit; no binary change | 2019-05-15 | 1 | -79/+79 | |
| | |||||
* | Cleanup: | 2019-05-15 | 5 | -144/+21 | |
| | | | | | | | | | | | | | | | Delete handling of LC_COLLATE (which has no effect) and delete support for non-ASCII single-byte encodings, allowing to replace the condition byte_sort == 1 with sort_mb_cur_max == 1. Since none of our single-byte character and string functions are locale dependent, also zap inspection of LC_CTYPE while here. For know, keep the code supporting multi-byte encodings even though it is very ugly, it cannot be reached right now, and we have no plans to enable it any time soon. OK millert@ tb@ | ||||
* | Delete tentacles of LC_NUMERIC support. | 2019-05-13 | 4 | -106/+9 | |
| | | | | | | Our libc doesn't support that now and won't in the future. Minus ~90 lines of code, no functional change. OK tb@ | ||||
* | short option comes first, followed by the corresponding long option | 2019-02-24 | 1 | -3/+3 | |
| | | | | ok jmc@ | ||||
* | add missing blanks before several delimiters; found with mandoc -Tlint | 2017-06-10 | 1 | -10/+10 | |
| | |||||
* | Fix a crash when "sort -m" is given no files. From Julien Ramseier. | 2017-01-04 | 1 | -2/+5 | |
| | |||||
* | /var/tmp -> /tmp | 2016-10-17 | 2 | -6/+6 | |
| | | | | | From Jan Stary. "POSIX doesn't restrict us here" and ok schwarze@ | ||||
* | missing .Fl macro, from Jan Stary | 2016-10-11 | 1 | -3/+7 | |
| | |||||
* | make several program to use "chown" promise. | 2016-07-14 | 1 | -3/+3 | |
| | | | | | | | | | | | | | | | | it allows chown(2) call to change the user or group on a file. - usr.bin/compress : aka gzip - usr.bin/mg : open a file for writing - usr.bin/sed : inplace editing - usr.bin/sort : if outfile equals one of the input files ok deraadt@ tb@ (and a reminder from Remi Locherer) warning: in order to use it, you must have a recent kernel with the new promise. | ||||
* | No need for sysexits.h here. | 2015-12-31 | 2 | -4/+2 | |
| | |||||
* | Use %zu to print size_t's rather than casting to int. | 2015-12-11 | 1 | -3/+3 | |
| | | | | ok millert@ | ||||
* | The default modifier should be copied for empty keys even if -b is | 2015-10-24 | 1 | -5/+6 | |
| | | | | specified. From Cedric Krier. | ||||
* | Do not warn for sort -o if we can't chown the output temporary file | 2015-10-18 | 1 | -6/+4 | |
| | | | | to match the owner of the output file. | ||||
* | Pledge; OK millert@ tobias@ | 2015-10-17 | 1 | -33/+70 | |
| | |||||
* | Copy permissions AND ownership when -o will override an input file. | 2015-10-14 | 1 | -4/+8 | |
| | | | | with input by and ok deraadt@, millert@, tim@ | ||||
* | Ignore the setuid/setgid/sticky bits when copying the permissions of an input | 2015-10-13 | 1 | -2/+2 | |
| | | | | | | file to the new output file. In preparation for pledge(2). Suggested by and OK millert@ | ||||
* | -C and -c allow at most one input file. Ensure this is the case when the | 2015-10-13 | 1 | -6/+6 | |
| | | | | | | input files are specified through --files0-from. OK millert@ | ||||
* | Document that some sorts uses -b w/o key fields. | 2015-04-05 | 1 | -1/+12 | |
| | |||||
* | For the -g flag, treat non-floating point keys as 0, similar to -n. | 2015-04-05 | 1 | -6/+18 | |
| | | | | | This makes "sort -gu" and "sort -nu" behave similarly and passes our sort regress tests. | ||||
* | The -b flag should only apply when key fields are specified. | 2015-04-05 | 3 | -13/+24 | |
| | | | | If -b follows -k it has no effect. | ||||
* | Do not permute command line arguments but still support the | 2015-04-05 | 2 | -7/+24 | |
| | | | | obsolescent "-o outfile" after input files syntax. | ||||
* | Only one input file is allowed with the -c/-C flags. | 2015-04-03 | 1 | -1/+5 | |
| | |||||
* | The combination of -c and -o is not specified by POSIX. In fact, the call | 2015-04-03 | 2 | -36/+17 | |
| | | | | | | | | | | | | | "sort -o file -c file" has unspecified behavior and would leave an empty file behind if it was sorted, the original file it was not. If -c (or -C) has been specified, only perform that action and ignore -o among other arguments. While at it, clean up check() internals. with input by and ok millert@ | ||||
* | If -S has been supplied multiple times, only take last one into account. | 2015-04-03 | 1 | -4/+7 | |
| | | | | | | Without this patch, multiple -S arguments influence each other. spotted by and ok millert@ | ||||
* | murder excessive whitespace | 2015-04-02 | 3 | -8/+8 | |
| | |||||
* | Prevent integer overflow when parsing -S argument as percentage. | 2015-04-02 | 1 | -1/+7 | |
| | | | | | | | Also make sure that the parsed memory amount, stored in a long long, won't be larger than SIZE_MAX to properly support 32 bit systems. with input by and ok millert@ | ||||
* | Global variable free_memory is only used in sort.c's set_hw_params, | 2015-04-02 | 3 | -6/+7 | |
| | | | | | | so turn it into a local one. ok millert@ | ||||
* | Fixed whitespace issues. | 2015-04-02 | 2 | -5/+5 | |
| | | | | ok millert@ | ||||
* | Zap some more NULL checks in front of free. | 2015-04-02 | 2 | -11/+7 | |
| | | | | ok millert@ | ||||
* | No need to strdup environment variable or command line arguments here. | 2015-04-02 | 1 | -5/+5 | |
| | | | | ok millert@ | ||||
* | Add signal name instead of array index (which is not the signal number) | 2015-04-02 | 1 | -2/+2 | |
| | | | | | | to sigaction error message. with input by and ok millert@ | ||||
* | Don't need to include stdint.h | 2015-04-02 | 1 | -2/+1 | |
| | |||||
* | No need for the umask() dance now that temp files are created | 2015-04-02 | 1 | -30/+19 | |
| | | | | with mkstemp(). Also remove useless else after a return. | ||||
* | Don't install signal handlers for SIGQUIT, SIGVTALRM, SIGPROF. | 2015-04-02 | 1 | -3/+3 | |
| | |||||
* | When using mmap() we don't need to keep the open fd around, closing | 2015-04-02 | 1 | -9/+3 | |
| | | | | the fd does not unmap the region. | ||||
* | closefile() already checks for stdin so no need to check in the caller. | 2015-04-02 | 1 | -3/+2 | |
| | |||||
* | Check for overflow when handling buffer size suffixes. | 2015-04-01 | 1 | -2/+20 | |
| | |||||
* | Block signals during tmp_files insertion, so that the signal handler | 2015-04-01 | 1 | -1/+7 | |
| | | | | | | cannot encounter an incoherent list. It was an absolutely tiny signal race. ok millert | ||||
* | Use reallocarray instead of malloc. | 2015-04-01 | 1 | -2/+3 | |
| | |||||
* | Just use sort_reallocarray() everywhere. | 2015-04-01 | 4 | -19/+7 | |
| | |||||
* | Revert unintentional commit. This will be revisited shortly. | 2015-04-01 | 1 | -3/+1 | |
| | |||||
* | Style nits, remove whitespace at the start of a function. | 2015-04-01 | 2 | -6/+4 | |
| | |||||
* | Remove some unneeded NULL checks that don't really help anything. | 2015-04-01 | 1 | -130/+111 | |
| | | | | | It is better to crash when given bad input rather than producing a wrong result. None of the checks can actually be triggered. | ||||
* | Use exit value 2 for mutually exclusive option errors. | 2015-04-01 | 1 | -5/+11 | |
| | |||||
* | Fix typo in revision 1.55 | 2015-04-01 | 1 | -2/+2 | |
| |