Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: src/usr.bin/sort



Module Name:    src
Committed By:   kre
Date:           Wed Jun  1 02:37:55 UTC 2016

Modified Files:
        src/usr.bin/sort: msort.c sort.1 sort.c sort.h

Log Message:
Add the posix -C option (-c but quieter).  Fix -R to work properly when
setting \n as the record delimited using a numeric value rather than literal
\n - and to not incorrectly turn \n into a field separator if -R is used to
make some other char the record separator (\n becomes a field separator in
that case as long as the field separator remains "white space" but should not
be in any other case - unless set explicitly of course.)

Plus more cosmetic changes - the man page and usage are updated to make it
more clear that the 2 (or 1) params to -k are not fields (field1 and field2)
but specifiers of the beginning and end of one key field.   There was an
unused 'x' option in the GETOPTS string.  The usage message is reformatted
to display properly on both 80 col and > 80 col displays (on < 80 it will
still probably look pretty ugly ... perhaps not quite so bad though), and
is also updated to show the different usage for the -c case (and -C) from the
others (only 1 file permitted) - the man page synopsis has a similar update.

Using more than one of -c -C or -m generates a usage message rather than
just ignoring the -m as it did before (there was no -C before of course).

Aside from the bug fix to the interaction between -R and -t, there are no
changes that affect the way anything is sorted (or read, or written).

Discussed on tech-userlevel earlier this week.


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.31 src/usr.bin/sort/msort.c
cvs rdiff -u -r1.34 -r1.35 src/usr.bin/sort/sort.1
cvs rdiff -u -r1.61 -r1.62 src/usr.bin/sort/sort.c
cvs rdiff -u -r1.35 -r1.36 src/usr.bin/sort/sort.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.




Home | Main Index | Thread Index | Old Index