diff -urN coreutils-5.2.0.orig/src/seq.c coreutils-5.2.0/src/seq.c --- coreutils-5.2.0.orig/src/seq.c 2004-02-07 12:39:17.000000000 -0800 +++ coreutils-5.2.0/src/seq.c 2004-03-03 10:10:17.000000000 -0800 @@ -56,7 +56,7 @@ static double first; /* The increment. */ -static double step = 1.0; +static double step; /* The last number. */ static double last; @@ -298,6 +298,7 @@ main (int argc, char **argv) { int optc; + int step_is_set; /* The printf(3) format used for output. */ char *format_str = NULL; @@ -313,6 +314,7 @@ equal_width = 0; separator = "\n"; first = 1.0; + step_is_set = 0; /* Figure out the locale's idea of a decimal point. */ #if HAVE_LOCALECONV @@ -397,6 +399,7 @@ if (optind < argc) { step = last; + step_is_set = 1; last = scan_double_arg (argv[optind++]); } } @@ -408,6 +411,13 @@ usage (EXIT_FAILURE); } + if (!step_is_set) + { + step = (first <= last) ? 1.0 : -1.0; + if (step < 0) + error (0, 0, _("Please specify step of -1 since this behaviour is obsolete and will be removed in the future")); + } + if (format_str == NULL) { if (equal_width) --- coreutils-5.2.1/tests/seq/basic.orig 2005-01-08 04:29:19.869695048 -0500 +++ coreutils-5.2.1/tests/seq/basic 2005-01-08 04:29:21.095508696 -0500 @@ -24,8 +24,6 @@ my @Tests = ( - ['onearg-1', qw(10), {OUT => [(1..10)]}], - ['onearg-2', qw(-1)], ['neg-1', qw(-10 10 10), {OUT => [qw(-10 0 10)]}], ['neg-2', qw(-.1 .1 .1), {OUT => [qw(-0.1 0 0.1)]}], ['neg-3', qw(1 -1 0), {OUT => [qw(1 0)]}],