Commit graph

4 commits

Author SHA1 Message Date
Corinna Vinschen 51bf1b81f3 Make match function globally available to stdlib functions.
* libc/stdlib/strtod.c (match): Move from here...
	* libc/stdlib/gdtoa-hexnan.c (match): ...to here.
	* libc/stdlib/mprec.h (match): Declare and add __match define.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2015-11-20 18:03:05 +01:00
Corinna Vinschen e9c0122ec0 * libc/stdlib/gdtoa-gethex.c (__hexdig): Constify.
(hexdig_init): Remove.
	(__hexdig_fun): New function.
	hexdig_init, added __hexdig_fun
	(gethex): Call __get_hexdig macro rather than hexdig.
	* libc/stdlib/gdtoa-hexnan.c (hexnan): Constify fpi argument.
	Call __get_hexdig macro rather than hexdig.
	* libc/stdlib/ldtoa.c: Throughout constify functions arguments where
	required by constifying the following arrays.
	(ezero): Constify.
	(eone): Constify.
	(ermsg): Constify.
	(etens): Constify.
	(emtens): Constify.
	(nan113): Constify.
	(nan64): Constify.
	(nan53): Constify.
	(nan24): Constify.
	* libc/stdlib/mprec.h (__get_hexdig): Define.
	(gethex): Constify args in declaration where appropriate.
	(hexnan): Ditto.
	(hexdig_init): Remove declaration.
	(__hexdig_fun): Declare.
	* libc/stdlib/strtod.c (fpi): Constify.
	(fpinan): Constify.
2013-06-10 15:27:43 +00:00
Eric Blake beb0ab6466 Fix strtod("nan()", ptr).
* libc/stdlib/gdtoa-hexnan.c (hexnan): When the optional
n-char-sequence is omitted, still parse the ().
-------------------------------------------------------------------
2008-03-04 18:27:01 +00:00
Jeff Johnston f489b5943c 2006-06-22 Jeff Johnston <jjohnstn@redhat.com>
* libc/stdlib/Makefile.am: Add new gdtoa routines.
        * libc/stdlib/Makefile.in: Regenerated.
        * libc/stdlib/gd_qnan.h: New file.
        * libc/stdlib/gdtoa-gethex.c: Ditto.
        * libc/stdlib/gdtoa-hexnan.c: Ditto.
        * libc/stdlib/gdtoa.h: Ditto.
        * libc/stdlib/mprec.c: Add new helper routines needed by
        the new gdtoa code.
        * libc/stdlib/mprec.h: Integrate some defines and prototypes
        used by gdtoa routines here.
        * libc/stdlib/strtod.c: Rebased on David M. Gay's gdtoa-strtod.c
        which adds C99 support such as nan, inf, and hexadecimal input
        format.
2006-06-22 17:59:52 +00:00