ruby-changes:7004
From: nobu <ko1@a...>
Date: Tue, 12 Aug 2008 16:06:52 +0900 (JST)
Subject: [ruby-changes:7004] Ruby:r18522 (trunk): * sprintf.c, util.c (quorem, nrv_alloc, dtoa): enabled floating point
nobu 2008-08-12 16:06:33 +0900 (Tue, 12 Aug 2008) New Revision: 18522 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=18522 Log: * sprintf.c, util.c (quorem, nrv_alloc, dtoa): enabled floating point support. Modified files: trunk/ChangeLog trunk/sprintf.c trunk/util.c Index: ChangeLog =================================================================== --- ChangeLog (revision 18521) +++ ChangeLog (revision 18522) @@ -1,3 +1,8 @@ +Tue Aug 12 16:06:28 2008 Nobuyoshi Nakada <nobu@r...> + + * sprintf.c, util.c (quorem, nrv_alloc, dtoa): enabled floating point + support. + Tue Aug 12 15:52:45 2008 Narihiro Nakamura <authorNari@g...> * gc.c (gc_profile_result): use sprintf. Index: sprintf.c =================================================================== --- sprintf.c (revision 18521) +++ sprintf.c (revision 18522) @@ -1034,6 +1034,8 @@ #endif #undef vsnprintf #undef snprintf +#define FLOATING_POINT 1 +#define BSD__dtoa dtoa #include "missing/vsnprintf.c" static int Index: util.c =================================================================== --- util.c (revision 18521) +++ util.c (revision 18522) @@ -1235,9 +1235,14 @@ #endif #endif /* NO_LONG_LONG */ +#define MULTIPLE_THREADS 1 + #ifndef MULTIPLE_THREADS #define ACQUIRE_DTOA_LOCK(n) /*nothing*/ #define FREE_DTOA_LOCK(n) /*nothing*/ +#else +#define ACQUIRE_DTOA_LOCK(n) /*unused right now*/ +#define FREE_DTOA_LOCK(n) /*unused right now*/ #endif #define Kmax 15 @@ -3069,7 +3074,6 @@ return sign ? -dval(rv) : dval(rv); } -#if 0 /* unused right now */ static int quorem(Bigint *b, Bigint *S) { @@ -3180,13 +3184,11 @@ } return q; } -#endif #ifndef MULTIPLE_THREADS static char *dtoa_result; #endif -#if 0 /* unused right now */ static char * rv_alloc(int i) { @@ -3217,7 +3219,6 @@ *rve = t; return rv; } -#endif /* freedtoa(s) must be used to free values s returned by dtoa * when MULTIPLE_THREADS is #defined. It should be used in all cases, @@ -3271,7 +3272,6 @@ * calculation. */ -#if 0 /* unused right now */ char * dtoa(double d, int mode, int ndigits, int *decpt, int *sign, char **rve) { @@ -3941,7 +3941,6 @@ *rve = s; return s0; } -#endif void ruby_each_words(const char *str, void (*func)(const char*, int, void*), void *arg) -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/