]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
(valid_format): Also accept ` ' and `'' as valid
authorJim Meyering <jim@meyering.net>
Thu, 20 Mar 2003 13:49:39 +0000 (13:49 +0000)
committerJim Meyering <jim@meyering.net>
Thu, 20 Mar 2003 13:49:39 +0000 (13:49 +0000)
format flag characters.
Do not require that a field width be specified.
Do not fail when given a field width of `0'.

src/seq.c

index 58bb59b4a0f6eb31af9420daea541ad1a15c298e..601f5f13c8c64e58ad330ceb243268b5f7c8a4cd 100644 (file)
--- a/src/seq.c
+++ b/src/seq.c
@@ -1,5 +1,5 @@
 /* seq - print sequence of numbers to standard output.
-   Copyright (C) 1994-2002 Free Software Foundation, Inc.
+   Copyright (C) 1994-2003 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
@@ -143,8 +143,8 @@ valid_format (const char *fmt)
   if (*fmt == '\0')
     return 0;
 
-  fmt += strspn (fmt, "-+#0");
-  if (ISDIGIT (*fmt))
+  fmt += strspn (fmt, "-+#0 '");
+  if (ISDIGIT (*fmt) || *fmt == '.')
     {
       fmt += strspn (fmt, "0123456789");