diff options
author | Igor Pashev <pashev.igor@gmail.com> | 2014-09-30 18:22:48 +0400 |
---|---|---|
committer | Igor Pashev <pashev.igor@gmail.com> | 2014-09-30 18:22:48 +0400 |
commit | c18578632fd3c9e513e613a86ba2b7c4ebee6c45 (patch) | |
tree | 377f4d4e3f0a6471a5012126078fcd97f4c67242 /src/seq.c | |
parent | 974ab3dd887985e3aa347f3c6521f819296396a0 (diff) | |
download | coreutils-c18578632fd3c9e513e613a86ba2b7c4ebee6c45.tar.gz |
Imported Upstream version 8.23upstream/8.23
Diffstat (limited to 'src/seq.c')
-rw-r--r-- | src/seq.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -1,5 +1,5 @@ /* seq - print sequence of numbers to standard output. - Copyright (C) 1994-2013 Free Software Foundation, Inc. + Copyright (C) 1994-2014 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -87,6 +87,8 @@ Print numbers from FIRST to LAST, in steps of INCREMENT.\n\ \n\ If FIRST or INCREMENT is omitted, it defaults to 1. That is, an\n\ omitted INCREMENT defaults to 1 even when LAST is smaller than FIRST.\n\ +The sequence of numbers ends when the sum of the current number and\n\ +INCREMENT would become greater than LAST.\n\ FIRST, INCREMENT, and LAST are interpreted as floating point values.\n\ INCREMENT is usually positive if FIRST is smaller than LAST, and\n\ INCREMENT is usually negative if FIRST is greater than LAST.\n\ @@ -602,7 +604,7 @@ main (int argc, char **argv) if (asprintf (&s2, "%0.Lf", last.value) < 0) xalloc_die (); - if (seq_fast (s1, s2)) + if (*s1 != '-' && *s2 != '-' && seq_fast (s1, s2)) { IF_LINT (free (s1)); IF_LINT (free (s2)); |