]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
(print_numbers): Give more precise diagnostic when increment
authorJim Meyering <jim@meyering.net>
Sun, 7 Apr 1996 17:10:21 +0000 (17:10 +0000)
committerJim Meyering <jim@meyering.net>
Sun, 7 Apr 1996 17:10:21 +0000 (17:10 +0000)
is inconsistent with FROM and TO.
(usage): Clean up help message.

src/seq.c

index c8997ce5cb950d888ff66bbbb4e3f00f7342a6e3..8e2a66ed1472cf4a41b7826da185c0079277c7c2 100644 (file)
--- a/src/seq.c
+++ b/src/seq.c
@@ -82,7 +82,7 @@ usage (int status)
   else
     {
       (void) printf (_("\
-Usage: %s [OPTION]... [FIRST [step]] LAST\n\
+Usage: %s [OPTION]... [FROM [INCR]] TO\n\
 "), program_name);
       (void) printf (_("\
 \n\
@@ -92,7 +92,7 @@ Usage: %s [OPTION]... [FIRST [step]] LAST\n\
       --version            output version information and exit\n\
   -w, --equal-width        equalize width by padding with leading zeroes\n\
 \n\
-  FROM, STEP, TO are interpreted as floating point.  STEP should be > 0 if\n\
+  FROM, INCR, TO are interpreted as floating point.  INCR should be > 0 if\n\
   FROM is smaller than TO and vice versa.  When given, the FORMAT argument\n\
   must contain exactly one of the float output formats %%e, %%f, or %%g.\n\
 "));
@@ -394,7 +394,8 @@ print_numbers (const char *format_str)
 
       if (step >= 0)
        {
-         error (0, 0, _("invalid increment: %g"), step);
+         error (0, 0,
+                _("when FROM is larger than TO, INCR must be negative"));
          usage (1);
          /* NOTREACHED */
        }
@@ -417,7 +418,8 @@ print_numbers (const char *format_str)
 
       if (step <= 0)
        {
-         error (0, 0, _("invalid increment: %g"), step);
+         error (0, 0,
+                _("when FROM is smaller than TO, INCR must be positive"));
          usage (1);
          /* NOTREACHED */
        }