bf9cb9e404e7fefb6097db447883940a547fc7ac |
|
11-Dec-2017 |
Elliott Hughes <enh@google.com> |
More scanf cleanup. Merge CT_CCL and CT_STRING handling before we add %m. Also fix an accidental scanf/wscanf difference. Add currently-disabled tests for questionable behavior noticed during code review that isn't a regression, but should be fixed later. Bug: http://b/68672236 Bug: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=202240 Test: ran tests Change-Id: I3eec9b7dfce84f63c68426406224822c52551d64
|
0d3ba1f04701e8ba0f8bd0cd6a0f4c8bb9d558b5 |
|
07-Dec-2017 |
Elliott Hughes <enh@google.com> |
Add sscanf %[ tests and fix the bug that fell out. Strictly, POSIX says "If a '-' is in the scanlist and is not the first wide character, nor the second where the first wide character is a '^', nor the last wide character, the behavior is implementation-defined", but it seems unreasonable for swscanf to interpret `a-c` differently from sscanf. Make ours behave the same as each other by making swscanf work the same as sscanf. Bug: http://b/68672236 Test: ran tests Change-Id: Ia84805897628d7128e901b468e02504373730e61
|
345b727e9606e8e159dd6b56854436168e9e8666 |
|
11-Nov-2017 |
Elliott Hughes <enh@google.com> |
Move public scanf functions away from implementation. Bug: N/A Test: ran tests Change-Id: Ifb8bd91132865f8c6d0b95baf1021af3b3b3c353
|
2f9c8ce38a885791dfa4cefb6370b5025c55ae82 |
|
01-Nov-2017 |
Elliott Hughes <enh@google.com> |
Start de-duplicating the regular and wide printf implementations. This patch switches to C++ (in anticipation of needing it later), removes a little duplication (via a macro for now), and ensures uniform support for %C/%lc and %S/%ls between regular and wide (with new tests). Since it's so hard to debug problems in printf (as the time I've wasted already today will testify), that's all I want to do in this change. The other 500 lines of diff can wait... (Also merge "floatio.h" into "local.h" now all the users are in forked code.) Bug: http://b/67371539 Test: ran tests Change-Id: I083353d89c32b9302d759ca6967cc6d8a62cd8a5
|
c8f2c520fa42a5515ebe4d0d5f1dc1d3ce036236 |
|
31-Oct-2017 |
Elliott Hughes <enh@google.com> |
clang-format the printf/scanf implementation. Bug: N/A Test: builds Change-Id: I490fdc1d568cba901c123b9efe0b9053b0d83b64
|
d9a7de1b77d41aa197a849bb9c97acaebf1c1c83 |
|
31-Oct-2017 |
Elliott Hughes <enh@google.com> |
Remove some always-on #ifdefery. Bug: N/A Test: ran tests Change-Id: I02d3c0a639f48ae9c415fb59f37ade015e6f46a2
|
7f0849fd113691e62af0400989936d3eff151e37 |
|
27-Aug-2016 |
Elliott Hughes <enh@google.com> |
Fix sscanf/wcstod parsing of NaNs. The parsefloat routines -- which let us pass NaNs and infinities on to strto(f|d|ld) -- come from NetBSD. Also fix LP64's strtold to return a NaN, and fix all the architectures to return quiet NaNs. Also fix wcstof/wcstod/wcstold to use parsefloat so they support hex floats. Lots of new tests. Bug: http://b/31101647 Change-Id: Id7d46ac2d8acb8770b5e8c445e87cfabfde6f111
|