projects
/
oweals
/
musl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9d2a15a
)
fix %lf, etc. with printf
author
Rich Felker
<dalias@aerifal.cx>
Tue, 17 Apr 2012 01:50:23 +0000
(21:50 -0400)
committer
Rich Felker
<dalias@aerifal.cx>
Tue, 17 Apr 2012 01:50:23 +0000
(21:50 -0400)
the l prefix is redundant/no-op with printf, since default promotions
always promote floats to double; however, it is valid, and printf was
wrongly rejecting it.
src/stdio/vfprintf.c
patch
|
blob
|
history
diff --git
a/src/stdio/vfprintf.c
b/src/stdio/vfprintf.c
index b5001ff2bd05ab6599ca3763f0be27911f0022b9..928c8c1618bf82350c2e086e2fe005837a56a92d 100644
(file)
--- a/
src/stdio/vfprintf.c
+++ b/
src/stdio/vfprintf.c
@@
-73,6
+73,8
@@
static const unsigned char states[]['z'-'A'+1] = {
}, { /* 1: l-prefixed */
S('d') = LONG, S('i') = LONG,
S('o') = ULONG, S('u') = ULONG, S('x') = ULONG, S('X') = ULONG,
+ S('e') = DBL, S('f') = DBL, S('g') = DBL, S('a') = DBL,
+ S('E') = DBL, S('F') = DBL, S('G') = DBL, S('A') = DBL,
S('c') = INT, S('s') = PTR, S('n') = PTR,
S('l') = LLPRE,
}, { /* 2: ll-prefixed */