From: Jim Meyering Date: Mon, 29 Apr 1996 01:35:18 +0000 (+0000) Subject: (main): Give a better diagnostic for `sort -0'. Reported by Karl Berry. X-Git-Tag: TEXTUTILS-1_14d~50 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=30f76e827e230970cba8fbd81ba4a06c14c3add6;p=thirdparty%2Fcoreutils.git (main): Give a better diagnostic for `sort -0'. Reported by Karl Berry. --- diff --git a/src/sort.c b/src/sort.c index 1bd315f6cf..224e7d34b4 100644 --- a/src/sort.c +++ b/src/sort.c @@ -1773,7 +1773,12 @@ main (int argc, char **argv) if (digits[UCHAR (*s)] || (*s == '.' && digits[UCHAR (s[1])])) { if (!key) - usage (SORT_FAILURE); + { + /* Provoke with `sort -9'. */ + error (0, 0, _("when using the old-style +POS and -POS \ +key specifiers,\nthe +POS specifier must come first")); + usage (SORT_FAILURE); + } for (t = 0; digits[UCHAR (*s)]; ++s) t = t * 10 + *s - '0'; t2 = 0;