b6f6e8a258da2b9a156ef44c3c7f0216615f2f22 |
|
24-Feb-2014 |
Nico Weber <nicolasweber@gmx.de> |
Add support for %a to the scanf() family. Partial port from "git clone https://github.com/awong-dev/ndk -b ndk-master" which fixes 19 tests "io.pass.cpp" in the following directories: numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bernoulli numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bin numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.geo numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.negbin numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.cauchy numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.chisq numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.f numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.lognormal numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.normal numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.t numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.exp numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.extreme numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.gamma numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.poisson numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.weibull numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.discrete numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear numerics/rand/rand.dis/rand.dist.uni/rand.dist.uni.real commit a0ed1ffd7a80a0c24b7b7210fb860faaa4e77fb7 Author: Nico Weber <nicolasweber@gmx.de> Date: Wed Nov 27 08:37:41 2013 -0800 Add support for %a to the scanf() family. This was written from scratch (based on the existing hex int parsing code in the same file). The actual string->double conversion work is done by strtod(), which was taught about 0x floats in a previous commit. Change PFXOK, NZDIGITS to not overlap with DPTOK, EXPOK as all four are used when parsing floats now. Change-Id: I79fdfe72099ab5130aaaae57b017750fad1d50cb commit 948f04689e059ad4693b5102e942c85b96e3c4e3 Author: Nico Weber <nicolasweber@gmx.de> Date: Wed Nov 27 08:31:45 2013 -0800 Add support for reading floats starting with 0x to strtod, add hdtoa(). This code is taken from the gdtoa/FreeBSD folder from Apple's Libc, with minimal changes to make it compile standalone. Change-Id: Ia7989ea275618ce2566b1da77c594d969bffb341 commit b4f5bf667b9ddce5b97233f5539d327bab653114 Author: Nico Weber <nicolasweber@gmx.de> Date: Thu Nov 21 11:16:00 2013 +0900 Add Bionic's printf/scanf implementation files to the build. The files were added to sources/android/support/src/stdio in the last commit. This commit adds them to the build. This requires minor changes to three of the c files, to make them build without the rest of Bionic. With this commit, printf() (etc) will run the code in sources/android/support/src/stdio, but the behavior of that function is still identical to its behavior in Bionic. Change-Id: I36800b0546877748d0ac6dcfb96ceb44258a6fa1 commit 21be960dd7134079d53d9ff405009ab59853d54e Author: Nico Weber <nicolasweber@gmx.de> Date: Thu Nov 21 11:00:32 2013 +0900 Copy Bionic's printf/scanf code into sources/android/support. They were copied from Bionic (as of today), with: $ cp ~/src/platform_bionic/libc/stdio/{fprintf,fscanf,fvwrite,printf,\ scanf,snprintf,sprintf,sscanf,vasprintf,vfprintf,vfscanf,vprintf,vscanf,\ vsnprintf,vsprintf,vsscanf}.c sources/android/support/src/stdio/ $ cp ~/src/platform_bionic/libc/stdio/{fileext,floatio,fvwrite,local,wcio}.h \ sources/android/support/src/stdio/ $ cp ~/src/platform_bionic/libc/stdlib/strtod.c \ sources/android/support/src/stdio/ As of this commit, these files are unmodified and not built yet. Change-Id: Ied1d1e4b055df83245a0f0af5635b5950172adab Change-Id: Iee69812967e7c9f8f05762638d464494fbc5c42b
|