summaryrefslogtreecommitdiffstats
path: root/generic/tclIntDecls.h
diff options
context:
space:
mode:
authorKevin B Kenny <kennykb@acm.org>2010-11-28 23:20:10 (GMT)
committerKevin B Kenny <kennykb@acm.org>2010-11-28 23:20:10 (GMT)
commita5a72404b019601daeadb7184189dd40ef6ac90c (patch)
tree87833950b8671a111d7d2e3d6ba8194c7359cb36 /generic/tclIntDecls.h
parentabe7eadae6ebae4c2827f9314f7d81af9dfff916 (diff)
downloadtcl-a5a72404b019601daeadb7184189dd40ef6ac90c.zip
tcl-a5a72404b019601daeadb7184189dd40ef6ac90c.tar.gz
tcl-a5a72404b019601daeadb7184189dd40ef6ac90c.tar.bz2
2010-11-29 Kevin B. Kenny <kennykb@acm.org>
* generic/tclInt.decls: * generic/tclInt.h: * generic/tclStrToD.c: * generic/tclTest.c: * generic/tclTomMath.decls: * generic/tclUtil.c: * tests/util.test: * unix/Makefile.in: * win/Makefile.in: * win/makefile.vc: Rewrite of Tcl_PrintDouble and TclDoubleDigits that (a) fixes a severe performance problem with floating point shimmering reported by Karl Lehenbauer, (b) allows TclDoubleDigits to generate the digit strings for 'e' and 'f' format, so that it can be used for tcl_precision != 0 (and possibly later for [format]), (c) fixes [Bug 3120139] by making TclPrintDouble inherently locale-independent, (d) adds test cases to util.test for correct rounding in difficult cases of TclDoubleDigits where fixed- precision results are requested. (e) adds test cases to util.test for the controversial aspects of [Bug 3105247]. As a side effect, two more modules from libtommath (bn_mp_set_int.c and bn_mp_init_set_int.c) are brought into the build, since the new code uses them.
Diffstat (limited to 'generic/tclIntDecls.h')
-rw-r--r--generic/tclIntDecls.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/generic/tclIntDecls.h b/generic/tclIntDecls.h
index 259229b..ae4046d 100644
--- a/generic/tclIntDecls.h
+++ b/generic/tclIntDecls.h
@@ -11,7 +11,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclIntDecls.h,v 1.144 2010/10/02 00:23:45 hobbs Exp $
+ * RCS: @(#) $Id: tclIntDecls.h,v 1.145 2010/11/28 23:20:11 kennykb Exp $
*/
#ifndef _TCLINTDECLS
@@ -596,6 +596,9 @@ EXTERN void TclResetRewriteEnsemble(Tcl_Interp *interp,
EXTERN int TclCopyChannel(Tcl_Interp *interp,
Tcl_Channel inChan, Tcl_Channel outChan,
Tcl_WideInt toRead, Tcl_Obj *cmdPtr);
+/* 249 */
+EXTERN char* TclDoubleDigits(double dv, int ndigits, int flags,
+ int*decpt, int*signum, char**endPtr);
typedef struct TclIntStubs {
int magic;
@@ -850,6 +853,7 @@ typedef struct TclIntStubs {
int (*tclInitRewriteEnsemble) (Tcl_Interp *interp, int numRemoved, int numInserted, Tcl_Obj *const *objv); /* 246 */
void (*tclResetRewriteEnsemble) (Tcl_Interp *interp, int isRootEnsemble); /* 247 */
int (*tclCopyChannel) (Tcl_Interp *interp, Tcl_Channel inChan, Tcl_Channel outChan, Tcl_WideInt toRead, Tcl_Obj *cmdPtr); /* 248 */
+ char* (*tclDoubleDigits) (double dv, int ndigits, int flags, int*decpt, int*signum, char**endPtr); /* 249 */
} TclIntStubs;
#ifdef __cplusplus
@@ -1269,6 +1273,8 @@ extern const TclIntStubs *tclIntStubsPtr;
(tclIntStubsPtr->tclResetRewriteEnsemble) /* 247 */
#define TclCopyChannel \
(tclIntStubsPtr->tclCopyChannel) /* 248 */
+#define TclDoubleDigits \
+ (tclIntStubsPtr->tclDoubleDigits) /* 249 */
#endif /* defined(USE_TCL_STUBS) */