summaryrefslogtreecommitdiffstats
path: root/generic/tclStrToD.c
Commit message (Collapse)AuthorAgeFilesLines
* Adjust ckalloc/ckfree macros to greatly reduce number of explicit casts indkf2011-03-121-3/+2
| | | rest of Tcl source code. No ABI change. API change *should* be harmless.
* Now that we're no longer using SCM based on RCS, the RCS Keyword linesdgp2011-03-021-2/+0
|\ | | | | cause more harm than good. Purged them (except in zlib files).
| * Now that we're no longer using SCM based on RCS, the RCS Keyword lines causedgp2011-03-021-3/+0
| | | | | | more harm than good. Purged them.
| * * doc/tclvars.n:Kevin B Kenny2011-01-151-7/+23
| | | | | | | | | | | | | | | | | | | | * generic/tclStrToD.c: * generic/tclUtil.c (Tcl_PrintDouble): * tests/util.test (util-16.*): Restored full Tcl 8.4 compatibility for the formatting of floating point numbers when $::tcl_precision is not zero. Added compatibility tests to make sure that excess trailing zeroes are suppressed for all eight major code paths. [Bug 3157475]
| * Whitespace, and fix broken backport of ilimi* initialization.andreas_kupries2010-12-011-66/+66
| |
| * * generic/tclStrToD.c (SetPrecisionLimits, TclDoubleDigits):Kevin B Kenny2010-12-011-4/+11
| | | | | | | | | | | | | | | | Added meaningless initialization of 'i', 'ilim' and 'ilim1' to silence warnings from the C compiler about possible use of uninitialized variables, Added a panic to the 'switch' that assigns them, to assert that the 'default' case is impossible. [Bug 3124675]
| * * generic/tclInt.decls: Backport of Kevin B. Kenny's work onandreas_kupries2010-11-301-320/+2495
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * generic/tclInt.h: the Tcl Head, with help from Jeff Hobbs. * 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. * generic/tclIntDecls.h: * generic/tclStubInit.c: * generic/tclTomMathDecls.h: Regenerated.
| * [Bug #3005233] fix for build on OpenBSD vaxnijtmans2010-05-211-6/+8
| |
| * * generic/tclStrToD.c: Correct conditional compile directives todgp2009-12-071-4/+5
| | | | | | | | | | better detect the toolchain that needs extra work for proper underflow treatment instead of merely detecting the mips platform. [Bug 2902010].
| * * generic/tclCmdIL.c: Removed unused variables.dgp2009-07-161-1/+17
| | | | | | | | | | | | | | | | | | | | | | | | * generic/tclCompile.c: * generic/tclVar.c: * unix/tclUnixChan.c: * generic/tclScan.c: Typo in ACCEPT_NAN configuration. * generic/tclStrToD.c: Set floating point control register on MIPS systems so that the gradual underflow expected by Tcl is in effect. [Bug 2819200]
| * * generic/tclStrToD.c: Applied patch for [Bug 1839067] (fpandreas_kupries2008-04-011-1/+20
| | | | | | | | | | * unix/tcl.m4: rounding setup on solaris x86, native cc), provided * unix/configure: by Michael Schlenker. configure regen'd.
* | Removed code that suppressed zeroes in a context where zeroes cannot appear.Kevin B Kenny2011-01-151-6/+1
| |
* | * doc/tclvars.n:Kevin B Kenny2011-01-151-6/+26
| | | | | | | | | | | | | | | | | | | | * generic/tclStrToD.c: * generic/tclUtil.c (Tcl_PrintDouble): * tests/util.test (util-16.*): Restored full Tcl 8.4 compatibility for the formatting of floating point numbers when $::tcl_precision is not zero. Added compatibility tests to make sure that excess trailing zeroes are suppressed for all eight major code paths. [Bug 3157475]
* | * generic/tclStrToD.c: Tidy up code so that more #ifdef-fery isdkf2010-12-071-1115/+1127
| | | | | | | | | | quarantined at the front of the file and function headers follow the modern Tcl style.
* | silence gcc warning when using -Wwrite-stringsnijtmans2010-12-031-2/+7
| | | | | | | | | | | | silence gcc warning for non-IEEE platforms [Patch #3116490] cross-compile Tcl mingw32 on unix. This makes it possible to cross-compile Tcl/Tk for Windows (either 32-bit or 64-bit) out-of-the-box on UNIX, using mingw-w64 build tools.
* | * generic/tclStrToD.c (SetPrecisionLimits, TclDoubleDigits):Kevin B Kenny2010-12-011-4/+11
| | | | | | | | | | | | | | | | Added meaningless initialization of 'i', 'ilim' and 'ilim1' to silence warnings from the C compiler about possible use of uninitialized variables, Added a panic to the 'switch' that assigns them, to assert that the 'default' case is impossible. [Bug 3124675]
* | fix gcc 64-bit warnings: cast from pointer to integer of different sizenijtmans2010-12-011-2/+2
| | | | | | | | fix gcc(-4.5.2) warning: 'static' is not at beginning of declaration
* | added missing casts that MSVC complained about and deleted unused variableKevin B Kenny2010-11-291-5/+5
| |
* | 2010-11-29 Kevin B. Kenny <kennykb@acm.org>Kevin B Kenny2010-11-281-298/+2474
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* | [Bug #3005233] fix for build on OpenBSD vaxnijtmans2010-05-211-3/+5
| |
* | Fix [Bug 2996549]: Failure in expr.test on Win32nijtmans2010-05-171-3/+7
| |
* | CONSTify various useful internal functionsnijtmans2010-05-031-6/+6
| | | | | | | | | | (TclBignumToDouble, TclCeil, TclFloor), and related tommath functions.
* | If tclInt.h or tclPort.h is alreadynijtmans2010-04-271-8/+3
| | | | | | | | | | | | | | included, don't include <limits.h> again. Follow-up to [Bug 2991415]: tclport.h #included before limits.h See comments in [Bug 2991415]
* | * generic/tclStrToD.c: [Bug 2952904]: Defer creation of the smallestKevin B Kenny2010-04-021-5/+3
| | | | | | | | | | | | floating point number until it is actually used. (This change avoids a bogus syslog message regarding a 'floating point software assist fault' on SGI systems.)
* | Code Audit results:dkf2010-03-051-18/+18
| | | | | | | | | | | | | | | | * use do { ... } while (0) in macros * avoid shadowing one local variable with another * use clearer 'foo.bar++;' instead of '++foo.bar;' where result not required (i.e., semantically equivalent) * follow Engineering Manual rules on spacing and declarations
* | Pure whitespace changes, changing to follow Engineering Manual style.dkf2010-02-241-8/+8
| |
* | * generic/tclStrToD.c: Correct conditional compile directives todgp2009-12-071-4/+5
| | | | | | | | | | better detect the toolchain that needs extra work for proper underflow treatment instead of merely detecting the mips platform. [Bug 2902010].
* | * generic/tclBinary.c: Removed unused variables.dgp2009-07-161-1/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * generic/tclCmdIL.c: * generic/tclCompile.c: * generic/tclExecute.c: * generic/tclHash.c: * generic/tclIOUtil.c: * generic/tclVar.c: * generic/tclBasic.c: Silence compiler warnings about ClientData. * generic/tclProc.c: * generic/tclScan.c: Typo in ACCEPT_NAN configuration. * generic/tclStrToD.c: Set floating point control register on MIPS systems so that the gradual underflow expected by Tcl is in effect. [Bug 2819200]
* | Style fixes (unfouling whitespace, sorting comments, removing useless casts, ↵dkf2009-01-091-4/+4
| | | | | | | | etc.)
* | Generate errorcodes for more cases.dkf2009-01-081-3/+5
| |
* | TIP #343 IMPLEMENTATION - A Binary Specifier for [format/scan]ferrieux2008-12-101-3/+9
| |
* | * generic/tclStrToD.c: Applied patch for [Bug 1839067] (fpandreas_kupries2008-04-011-1/+20
|/ | | | | * unix/tcl.m4: rounding setup on solaris x86, native cc), provided by Michael Schlenker.
* * generic/tclStrToD.c: Resolve identifier conflict over "pow10"dgp2008-03-131-9/+9
| | | | | with libm in Cygwin and DJGPP. Thanks to Gordon Schumacher and Philip Moore. [Patch 1800636]
* merge stable branch onto HEADdgp2007-12-131-1/+1
|
* More minor cleanupdkf2007-11-181-111/+124
|
* * generic/tclEnv.c (ReplaceString): Clear memory correctly whenKevin B Kenny2007-04-231-19/+29
| | | | | | | | | growing the cache to avoid reads of uninitialised data. * generic/tclStrToD.c (AccumulateDecimalDigit): Fixed a mistake where we'd run beyond the end of the 'pow10_wide' array if a number begins with a string of more than 'maxpow10_wide' zeroes. Both these issues reported under [Bug 1705778] - detected with the existing test suite, no new regression tests required.
* Complete the purge of K&R function definitions from manually-written code.dkf2007-04-161-9/+9
|
* Handle creation of Tcl_Objs from constant strings better (easier to use, moredkf2007-04-101-2/+4
| | | | efficient). After [Patch 1529526] (afredd)
* various "const" additions, in line with TIP #27nijtmans2007-02-201-8/+8
|
* TIP#270 IMPLEMENTATIONdgp2006-11-151-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * generic/tcl.decls: New public routines Tcl_ObjPrintf, * generic/tclStringObj.c: Tcl_AppendObjToErrorInfo, Tcl_Format, * generic/tclInt.h: Tcl_AppendLimitedToObj, Tcl_AppendFormatToObj and Tcl_AppendPrintfToObj. Former internal versions removed. * generic/tclDecls.h: make genstubs * generic/tclStubInit.c: * generic/tclBasic.c: Updated callers. * generic/tclCkalloc.c: * generic/tclCmdAH.c: * generic/tclCmdIL.c: * generic/tclCmdMZ.c: * generic/tclCompExpr.c: * generic/tclCompile.c: * generic/tclDictObj.c: * generic/tclExecute.c: * generic/tclIORChan.c: * generic/tclIOUtil.c: * generic/tclMain.c: * generic/tclNamesp.c: * generic/tclObj.c: * generic/tclPkg.c: * generic/tclProc.c: * generic/tclStrToD.c: * generic/tclTimer.c: * generic/tclUtil.c: * unix/tclUnixFCmd.c:
* Various minor object file size efficiency fixes. [Bug 1530474]dkf2006-08-101-2/+2
|
* * generic/regc_locale.c (cclass):das2006-07-201-7/+7
| | | | | | | | | | | | | * generic/tclExecute.c (TclExecuteByteCode): * generic/tclIOCmd.c (Tcl_ExecObjCmd): * generic/tclListObj.c (NewListIntRep): * generic/tclObj.c (Tcl_GetLongFromObj, Tcl_GetWideIntFromObj, FreeBignum, Tcl_SetBignumObj): * generic/tclParseExpr.c (Tcl_ParseExpr): * generic/tclStrToD.c (TclParseNumber): * generic/tclStringObj.c (TclAppendFormattedObjs): * unix/tclUnixPipe.c (TclpCreateProcess): fix signed-with-unsigned comparison and other warnings from gcc4 -Wextra.
* * generic/tclIOUtil.c: Changed default configuration todgp2006-06-211-26/+3
| | | | | | | | | | | | | | | | | | | | * generic/tclInt.decls: #undef USE_OBSOLETE_FS_HOOKS which disables * generic/tclTest.c: access to the Tcl 8.3 internal routines for hooking into filesystem operations. Everyone ought to have migrated to Tcl_Filesystems by now. ***POTENTIAL INCOMPATIBILITY*** for any code still stuck in the pre-Tcl_Filesystem era. * generic/tclIntDecls.h: make genstubs * generic/tclStubInit.c: * generic/tclStrToD.c: Removed dead code that permitted disabling of recognition of the new 0b and 0o numeric formats. * generic/tclExecute.c: Removed dead code that implemented alternative * generic/tclObj.c: design where numeric values did not automatically narrow to the smallest Tcl_ObjType required to hold them.
* * generic/tclBinary.c: Revised the handling of the Q and q formatdgp2006-04-261-1/+17
| | | | | | * generic/tclInt.h: specifiers for [binary] to account for the * generic/tclStrToD.c: "middle endian" floating point format used in Nokia N770.
* fix for Martin Lemburg's DST conversion bug.Kevin B Kenny2006-04-191-2/+65
| | | | http://groups.google.com/group/comp.lang.tcl/browse_thread/thread/9a8b15a4dfc0b7a0
* * generic/tclStrToD.c: One of the branches of AccumulateDecimalDigitdgp2006-03-211-1/+2
| | | | * tests/parseExpr.test: did not. [Bug 1451233]
* Export Tcl_InitBignumFromDoubleKevin B Kenny2005-12-271-5/+5
|
* 2005-12-19 Don Porter <dgp@users.sourceforge.net>dgp2005-12-191-13/+16
| | | | | | | | | | | | | | | * generic/tclCmdMZ.c: Modified [string is double] to use * tests/string.test: TclParseNumber() to parse trailing whitespace. Ensures consistency, and makes it easier to cleanup after invalid internal reps left behind by parsing [Bugs 1360432 1382287]. * generic/tclParseExpr.c: Added TCL_PARSE_NO_WHITESPACE to * generic/tclScan.c: TclParseNumber() calls since [scan] and * tests/scan.test: [expr] parsing don't want spaces in parsed numbers. * generic/tclInt.h: Added TCL_PARSE_NO_WHITESPACE flag to the * generic/tclStrToD.c: TclParseNumber() interface.
* * generic/tclStrToD.c: More data in the "can't happen" Tcl_Panicdgp2005-11-141-2/+3
| | | | to aid debugging.
* * generic/tclInt.h: Revised TclParseNumber interface to enabledgp2005-11-121-101/+134
| | | | | | * generic/tclScan.c: revision to the [scan] command implementation * generic/tclStrToD.c: to permit tests scan-4.44,55 to pass again. [Bug 1348067].