diff options
author | Martynas Venckus <martynas@cvs.openbsd.org> | 2009-04-05 19:29:29 +0000 |
---|---|---|
committer | Martynas Venckus <martynas@cvs.openbsd.org> | 2009-04-05 19:29:29 +0000 |
commit | 755a6a8404e56cc1044e5a22bc3a4765355142a9 (patch) | |
tree | c9cf9414009184e6a8460b4a760527c0fd20014f | |
parent | e4a6b0b2624611b8238c3166c5a111181f457456 (diff) |
accept %F, which actually behaves the same as %f. per C99
ok millert@
-rw-r--r-- | lib/libc/stdio/scanf.3 | 6 | ||||
-rw-r--r-- | lib/libc/stdio/vfscanf.c | 3 |
2 files changed, 5 insertions, 4 deletions
diff --git a/lib/libc/stdio/scanf.3 b/lib/libc/stdio/scanf.3 index 64e44b883e6..ecda103a926 100644 --- a/lib/libc/stdio/scanf.3 +++ b/lib/libc/stdio/scanf.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: scanf.3,v 1.16 2007/05/31 19:19:31 jmc Exp $ +.\" $OpenBSD: scanf.3,v 1.17 2009/04/05 19:29:28 martynas Exp $ .\" .\" Copyright (c) 1990, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -31,7 +31,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd $Mdocdate: May 31 2007 $ +.Dd $Mdocdate: April 5 2009 $ .Dt SCANF 3 .Os .Sh NAME @@ -276,7 +276,7 @@ the next pointer must be a pointer to .It Cm X Equivalent to .Cm x . -.It Cm f +.It Cm fF Matches an optionally signed floating-point number; the next pointer must be a pointer to .Li float . diff --git a/lib/libc/stdio/vfscanf.c b/lib/libc/stdio/vfscanf.c index 68a0073b985..7e05f1ac567 100644 --- a/lib/libc/stdio/vfscanf.c +++ b/lib/libc/stdio/vfscanf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vfscanf.c,v 1.21 2006/01/13 21:33:28 millert Exp $ */ +/* $OpenBSD: vfscanf.c,v 1.22 2009/04/05 19:29:28 martynas Exp $ */ /*- * Copyright (c) 1990, 1993 * The Regents of the University of California. All rights reserved. @@ -240,6 +240,7 @@ literal: case 'G': case 'e': case 'f': + case 'F': case 'g': c = CT_FLOAT; break; |