summaryrefslogtreecommitdiff
path: root/src/sort.c
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2010-12-28 12:28:48 -0800
committerPaul Eggert <eggert@cs.ucla.edu>2010-12-28 12:30:42 -0800
commitb0097f3d2180352896a4434fb8eaeb076f12794c (patch)
treeeb605f5d69d8c346278db1ccbec82d1a594403e1 /src/sort.c
parent01211e9af728a5123b9cced19b7dfdc02b019f5b (diff)
downloadcoreutils-b0097f3d2180352896a4434fb8eaeb076f12794c.tar.xz
coreutils: keep lines within 80-column limits
* cfg.mk (LINE_LEN_MAX, FILTER_LONG_LINES): New macros. (sc_long_lines): New rule. * HACKING: Use shorter URLs to the same material. * doc/Makefile.am, doc/coreutils.texi, m4/boottime.m4: * man/help2man, man/stdbuf.x, src/Makefile.am, src/cat.c, src/copy.c: * src/cp.c, src/dd.c, src/df.c, src/du.c, src/groups.c, src/install.c: * src/ls.c, src/md5sum.c, src/mv.c, src/od.c, src/pinky.c, src/ptx.c: * src/readlink.c, src/remove.c, src/rmdir.c, src/setuidgid.c: * src/sort.c, src/tail.c, src/touch.c, tests/Coreutils.pm: * tests/cp/existing-perm-race, tests/cp/perm, tests/cp/preserve-gid: * tests/du/2g, tests/du/long-from-unreadable, tests/init.sh: * tests/install/basic-1, tests/ls/nameless-uid: * tests/ls/readdir-mountpoint-inode, tests/misc/chroot-credentials: * tests/misc/cut, tests/misc/date, tests/misc/join, tests/misc/md5sum: * tests/misc/sha1sum, tests/misc/sha224sum, tests/misc/sort: * tests/misc/sort-continue, tests/misc/sort-files0-from: * tests/misc/sort-rand, tests/misc/stdbuf, tests/misc/tr: * tests/misc/uniq, tests/mv/atomic, tests/mv/part-fail: * tests/mv/part-symlink, tests/mv/sticky-to-xpart, tests/pr/pr-tests: * tests/rm/fail-2eperm, tests/rm/interactive-always: Reformat to fit within 80 columns. * doc/Makefile.am (BAD_POSIX_PERL): New macro. * doc/coreutils.texi: Reword slightly, to make menus and index lines shorter. * src/md5sum.c: Redo --help output so that it fits within 79 columns, since that's a bit more portable and all the other --help strings fit in 79 columns.
Diffstat (limited to 'src/sort.c')
-rw-r--r--src/sort.c25
1 files changed, 16 insertions, 9 deletions
diff --git a/src/sort.c b/src/sort.c
index 96e06960d..ec925465f 100644
--- a/src/sort.c
+++ b/src/sort.c
@@ -400,7 +400,8 @@ Ordering options:\n\
"), stdout);
fputs (_("\
-b, --ignore-leading-blanks ignore leading blanks\n\
- -d, --dictionary-order consider only blanks and alphanumeric characters\n\
+ -d, --dictionary-order consider only blanks and alphanumeric characters\
+\n\
-f, --ignore-case fold lower case to upper case characters\n\
"), stdout);
fputs (_("\
@@ -419,7 +420,8 @@ Ordering options:\n\
"), stdout);
fputs (_("\
--sort=WORD sort according to WORD:\n\
- general-numeric -g, human-numeric -h, month -M,\n\
+ general-numeric -g, human-numeric -h, month -M,\
+\n\
numeric -n, random -R, version -V\n\
-V, --version-sort natural sort of (version) numbers within text\n\
\n\
@@ -434,7 +436,8 @@ Other options:\n\
"), stdout);
fputs (_("\
-c, --check, --check=diagnose-first check for sorted input; do not sort\n\
- -C, --check=quiet, --check=silent like -c, but do not report first bad line\n\
+ -C, --check=quiet, --check=silent like -c, but do not report first bad line\
+\n\
--compress-program=PROG compress temporaries with PROG;\n\
decompress them with PROG -d\n\
"), stdout);
@@ -452,7 +455,8 @@ Other options:\n\
"), stdout);
fputs (_("\
-o, --output=FILE write result to FILE instead of standard output\n\
- -s, --stable stabilize sort by disabling last-resort comparison\n\
+ -s, --stable stabilize sort by disabling last-resort comparison\
+\n\
-S, --buffer-size=SIZE use SIZE for main memory buffer\n\
"), stdout);
printf (_("\
@@ -461,7 +465,8 @@ Other options:\n\
multiple options specify multiple directories\n\
--parallel=N change the number of sorts run concurrently to N\n\
-u, --unique with -c, check for strict ordering;\n\
- without -c, output only the first of an equal run\n\
+ without -c, output only the first of an equal run\
+\n\
"), DEFAULT_TMPDIR);
fputs (_("\
-z, --zero-terminated end lines with 0 byte, not newline\n\
@@ -471,8 +476,10 @@ Other options:\n\
fputs (_("\
\n\
POS is F[.C][OPTS], where F is the field number and C the character position\n\
-in the field; both are origin 1. If neither -t nor -b is in effect, characters\n\
-in a field are counted from the beginning of the preceding whitespace. OPTS is\n\
+in the field; both are origin 1. If neither -t nor -b is in effect, characters\
+\n\
+in a field are counted from the beginning of the preceding whitespace. OPTS is\
+\n\
one or more single-letter ordering options, which override global ordering\n\
options for that key. If no key is given, use the entire line as the key.\n\
\n\
@@ -4481,8 +4488,8 @@ main (int argc, char **argv)
else if (files[i][0] == '\0')
{
/* Using the standard `filename:line-number:' prefix here is
- not totally appropriate, since NUL is the separator, not NL,
- but it might be better than nothing. */
+ not totally appropriate, since NUL is the separator,
+ not NL, but it might be better than nothing. */
unsigned long int file_number = i + 1;
error (SORT_FAILURE, 0,
_("%s:%lu: invalid zero-length file name"),