mirror of
https://git.savannah.gnu.org/git/coreutils.git
synced 2026-11-17 18:02:09 +03:00
(valid_format): Also accept ' and '' as valid
format flag characters. Do not require that a field width be specified. Do not fail when given a field width of `0'.
This commit is contained in:
1 parent
8fe825b787
commit
0568c4e2d4
1 file changed
+3
-3
@@ -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");
|
||||
|
||||
|
||||
Reference in new issue
Block a user