]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
(main): Give a better diagnostic for `sort -0'. Reported by Karl Berry.
authorJim Meyering <jim@meyering.net>
Mon, 29 Apr 1996 01:35:18 +0000 (01:35 +0000)
committerJim Meyering <jim@meyering.net>
Mon, 29 Apr 1996 01:35:18 +0000 (01:35 +0000)
src/sort.c

index 1bd315f6cf1dcfc105e8dd7e518a7f1706724e46..224e7d34b4ff8f93e0fa82bea145d05f5ec8a75b 100644 (file)
@@ -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;