summaryrefslogtreecommitdiffstats
path: root/generic/tclUtil.c
Commit message (Collapse)AuthorAgeFilesLines
* Define and use macros that test whether a Tcl list value is canonical.dgp2011-04-181-11/+6
|\
| * Define and use macros that test whether a Tcl list value is canonical.dgp2011-04-181-11/+6
| |
* | More Tcl_Concat* and TclTrim* improvements.dgp2011-04-141-46/+78
|\ \ | |/
| * More Tcl_Concat* and TclTrim* improvements.dgp2011-04-141-47/+79
| |
* | [Bug 3285375]: Rewrite Tcl_Concat*() and [string trim*].dgp2011-04-131-77/+167
|\ \ | |/
| * [Bug 3285375]: Rewrite Tcl_Concat*() and [string trim*].dgp2011-04-131-72/+167
| |
* | [3285375]: Make the crash less mysterious through the judicious use of a panic.dkf2011-04-131-0/+5
| |
* | More generation of error codes ([format], [after], [trace], RE optimizer).dkf2011-04-041-2/+9
| |
* | More generation of errorCode information, notably when lists are mis-parsed.dkf2011-03-291-46/+55
| |
* | Reduce the number of casts used to manage Tcl_Obj internal representations.dkf2011-03-261-1/+1
| |
* | Adjust ckalloc/ckfree macros to greatly reduce number of explicit casts indkf2011-03-121-29/+24
| | | | | | rest of Tcl source code. No ABI change. API change *should* be harmless.
* | MINOR: Formatting fixes, mainly to comments, so code better fits the style indkf2011-03-101-0/+1
| | | | | | the Engineering Manual.
* | * generic/tclInt.h: Remove TclMarkList() routine, an experimentaldgp2011-03-081-111/+0
|\ \ | |/ | | * generic/tclUtil.c: dead-end from the 8.5 alpha days.
| * * generic/tclInt.h: Remove TclMarkList() routine, an experimentaldgp2011-03-081-111/+0
| | | | | | * generic/tclUtil.c: dead-end from the 8.5 alpha days.
* | * generic/tclBasic.c: More replacements of Tcl_UtfBackslash() callsdgp2011-03-061-15/+16
|\ \ | |/ | | | | | | | | * generic/tclCompile.c: with TclParseBackslash() where possible. * generic/tclCompCmdsSZ.c: * generic/tclParse.c: * generic/tclUtil.c:
| * * generic/tclBasic.c: More replacements of Tcl_UtfBackslash() callsdgp2011-03-061-15/+16
| |\ | | | | | | | | | | | | * generic/tclCompile.c: with TclParseBackslash() where possible. * generic/tclParse.c: * generic/tclUtil.c:
| | * * generic/tclBasic.c: More replacements of Tcl_UtfBackslash() callsdgp2011-03-061-14/+15
| | | | | | | | | | | | | | | | | | * generic/tclCmdMZ.c: with TclParseBackslash() where possible. * generic/tclCompExpr.c: * generic/tclCompile.c: * generic/tclUtil.c:
* | | * generic/tclUtil.c (TclFindElement): Guard escape sequence scansdgp2011-03-061-1/+1
|\ \ \ | |/ / | | | to not overrun the string end. [Bug 3192636]
| * | * generic/tclUtil.c (TclFindElement): Guard escape sequence scansdgp2011-03-061-1/+1
| |\ \ | | |/ | | | to not overrun the string end. [Bug 3192636]
| | * * generic/tclUtil.c (TclFindElement): Guard escape sequence scansdgp2011-03-061-1/+1
| | | | | | | | | to not overrun the string end. [Bug 3192636]
* | | 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-2/+0
| |\ \ | | |/ | | | more harm than good. Purged them.
| | * Now that we're no longer using SCM based on RCS, the RCS Keyword lines causedgp2011-03-011-2/+0
| | | | | | | | | more harm than good. Purged them.
| | * [Tcl Bug 1706140]dgp2007-05-101-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * generic/tclCmdMZ.c (Trace*Proc): Update Tcl_VarTraceProcs so * generic/tclLink.c (LinkTraceProc): that they call * generic/tclUtil.c (TclPrecTraceProc): Tcl_InterpDeleted() for themselves, and do not rely on (frequently buggy) setting of the TCL_INTERP_DESTROYED flag by the trace core. * generic/tclVar.c: Update callers of CallVarTraces to not pass in the TCL_INTERP_DESTROYED flag. Also apply filters so that public routines only pass documented flag values down to lower level routines. * generic/tclVar.c (CallVarTraces): The setting of the TCL_INTERP_DESTROYED flag is now done entirely within the CallVarTraces routine, the only place it can be done right.
| | * 2006-09-30 Miguel Sofer <msofer@users.sf.net>Miguel Sofer2006-09-301-5/+16
| | | | | | | | | | | | | | | * generic/tclUtil.c (Tcl_SplitList): optimisation, [Patch 1344747] by dgp.
| | * * generic/tclExecute.c (ExprSrandFunc): Replaced incursions into thedgp2005-04-051-43/+3
| | | | | | | | | | | | | | | | | | | | | * generic/tclUtil.c (TclGetIntForIndex): intreps of numeric types with simpler calls of Tcl_GetIntFromObj and Tcl_GetLongFromObj, now that those routines are better behaved wrt shimmering. [Patch 1177219]
| | * Speed up [info <thing> <simplePattern>]dkf2004-10-141-1/+38
| | |
| | * additinal performance tweak to last commitdgp2003-08-271-3/+14
| | |
| | * * generic/tclUtil.c: Corrected [Bug 411825] and other bugs indgp2003-08-271-25/+36
| | | | | | | | | | | | | | | | | | TclNeedSpace() where non-breaking space (\u00A0) and backslash-escaped spaces were handled incorrectly. * tests/util.test: Added new tests util-8.[2-6].
| | * * generic/tclPreserve.c: In Result and Preserve'd routines, do nothobbs2003-07-161-3/+2
| | | | | | | | | | | | | | | * generic/tclUtil.c: assume that ckfree == free, as that is not * generic/tclResult.c: always true. [Bug 756791] (fuller)
| | * * generic/tcl.h Made changes so that the "wideInt" Tcl_ObjTypedgp2003-04-161-16/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * generic/tclObj.c is defined on all platforms, even those where * generic/tclPort.h TCL_WIDE_INT_IS_LONG is defined. Also made the Tcl_Value struct have a wideValue field on all platforms. This is a ***POTENTIAL INCOMPATIBILITY*** for TCL_WIDE_INT_IS_LONG platforms because that struct changes size. This is the same TIP 72 incompatibility that was seen on other platforms at the 8.4.0 release, when this change should have happened as well. [Bug 713562] * generic/tclInt.h: New internal macros TclGetWide() and TclGetLongFromWide() to deal with both forms of the "wideInt" Tcl_ObjType, so that conditional TCL_WIDE_INT_IS_LONG code is confined to the header file. * generic/tclCmdAH.c: Replaced most coding that was conditional * generic/tclCmdIL.c: on TCL_WIDE_INT_IS_LONG with code that * generic/tclExecute.c: works across platforms, sometimes using * generic/tclTest.c: the new macros above to do it. * generic/tclUtil.c: * generic/tclVar.c:
| * | * doc/tclvars.n:Kevin B Kenny2011-01-151-39/+87
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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/tclUtil.c (TclReToGlob): add extra check for multiplehobbs2010-12-031-2/+14
| | | | | | | | | | | | | | | inner *s that leads to poor recursive glob matching, defer to original RE instead. tclbench RE var backtrack.
| * | * generic/tclInt.decls: Backport of Kevin B. Kenny's work onandreas_kupries2010-11-301-50/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
| * | * generic/tclInt.decls, generic/tclInt.h, generic/tclIntDecls.h:hobbs2010-11-301-1/+87
| | | | | | | | | | | | | | | | | | | | | * generic/tclStubInit.c: TclFormatInt restored at slot 24 * generic/tclUtil.c (TclFormatInt): restore TclFormatInt func from 2005-07-05 macro-ization. Benchmarks indicate it is faster, as a key int->string routine (e.g. int-indexed arrays).
| * | * generic/tclUtil.c (TclByteArrayMatch): patterns may not behobbs2010-08-101-2/+2
| | | | | | | | | | | | null-terminated, so account for that.
| * | * generic/tclUtil.c (TclReToGlob): Added missing set of thedgp2008-08-221-9/+15
| | | | | | | | | | | | | | | *exactPtr value to really fix [Bug 2065115]. Also avoid possible DString overflow.
| * | * generic/tclUtil.c (TclReToGlob): Added missing set of thedgp2008-08-221-1/+4
| | | | | | | | | | | | | | | *exactPtr value to really fix [Bug 2065115]. * tests/regexpComp.test: Correct duplicate test names.
| * | really fix translation to escape glob-sensitive charshobbs2008-08-211-13/+24
| | |
| * | * tests/regexp.test, tests/regexpComp.test: correct re2glob ***=hobbs2008-08-211-4/+3
| | | | | | | | | | | | | | | * generic/tclUtil.c (TclReToGlob): translation from exact to anywhere-in-string match. [Bug 2065115]
| * | * generic/tclTest.c (TestconcatobjCmd):Miguel Sofer2008-08-171-6/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * generic/tclUtil.c (Tcl_ConcatObj): * tests/util.test (util-4.7): fix [Bug 1447328]; the original "fix" turned Tcl_ConcatObj() into a hairy monster. This was exposed by [Bug 2055782]. Additionally, Tcl_ConcatObj could corrupt its input under certain conditions! *** NASTY BUG FIXED ***
* | | * doc/tclvars.n:Kevin B Kenny2011-01-151-3/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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/tclUtil.c (TclReToGlob): add extra check for multiplehobbs2010-12-031-2/+14
| | | | | | | | | | | | | | | inner *s that leads to poor recursive glob matching, defer to original RE instead. tclbench RE var backtrack.
* | | silence gcc warning when using -Wwrite-stringsnijtmans2010-12-031-2/+2
| | | | | | | | | | | | | | | | | | 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/tclInt.decls, generic/tclInt.h, generic/tclIntDecls.h:hobbs2010-11-301-1/+87
| | | | | | | | | | | | | | | | | | | | | * generic/tclStubInit.c: TclFormatInt restored at slot 24 * generic/tclUtil.c (TclFormatInt): restore TclFormatInt func from 2005-07-05 macro-ization. Benchmarks indicate it is faster, as a key int->string routine (e.g. int-indexed arrays).
* | | added missing casts that MSVC complained about and deleted unused variableKevin B Kenny2010-11-291-2/+1
| | |
* | | 2010-11-29 Kevin B. Kenny <kennykb@acm.org>Kevin B Kenny2010-11-281-98/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* | | * generic/tclBasic.c, generic/tclClock.c, generic/tclEncoding.c,dkf2010-10-011-12/+11
| | | | | | | | | | | | | | | | | | | | | | | | * generic/tclEnv.c, generic/tclLoad.c, generic/tclNamesp.c, * generic/tclObj.c, generic/tclRegexp.c, generic/tclResolve.c, * generic/tclResult.c, generic/tclUtil.c, macosx/tclMacOSXFCmd.c: More purging of strcpy() from locations where we already know the length of the data being copied.
* | | Remove many type casts which are no longernecessary as a result of [Patch ↵nijtmans2010-08-221-3/+3
| | | | | | | | | | | | 3009403]: Signature of Tcl_GetHashKey, Tcl_(Create|Find)HashEntry
* | | * generic/tclUtil.c (TclByteArrayMatch): patterns may not behobbs2010-08-101-2/+2
| | | | | | | | | | | | null-terminated, so account for that.