summaryrefslogtreecommitdiffstats
path: root/generic/tclCmdMZ.c
Commit message (Collapse)AuthorAgeFilesLines
* merge stable branch onto HEADdgp2007-12-131-1/+1
|
* * generic/tclInt.decls: move TclByteArrayMatch and TclReToGlobhobbs2007-12-111-10/+8
| | | | | | | | | | | | | * generic/tclIntDecls.h: to tclInt.h from stubs. * generic/tclStubInit.c: Add flags var to TclByteArrayMatch for * generic/tclInt.h: future extensibility * generic/tcl.h: define TCL_MATCH_EXACT doc for Tcl_StringCaseMatch. * doc/StrMatch.3: It is compatible with existing usage. * generic/tclExecute.c (INST_STR_MATCH): flag for TclByteArrayMatch * generic/tclUtil.c (TclByteArrayMatch, TclStringMatchObj): * generic/tclRegexp.c (Tcl_RegExpExecObj): * generic/tclCmdMZ.c (StringMatchCmd): Use TclStringMatchObj * tests/string.test (11.9.* 11.10.*): more tests
* Make two-arg switch work reliably (and actually as documented!) [Bug 1836519]dkf2007-12-031-35/+48
|
* Turn the [string] command into a real compiled ensemble.dkf2007-11-231-163/+175
|
* Rewrote the [string] and [dict] implementations to be ready for conversiondkf2007-11-221-1079/+1955
| | | | to ensembles.
* improvements to commentsdkf2007-11-191-2/+18
|
* [Patch 1830038]: Increased usage of macros to detect and take advantage of ↵Miguel Sofer2007-11-111-43/+44
| | | | objTypes.
* \u0000 is ASCII! [Bug 1808258]dkf2007-11-011-13/+11
|
* * generic/tclCmdMZ.c: Correct [string is (wide)integer] failuredgp2007-10-111-78/+39
| | | | | | | | | | | | | | | | | | * tests/string.test: to report correct failindex values for non-decimal integer strings. [Bug 1805887]. * compat/strtoll.c (removed): The routines strtoll() and strtoull() * compat/strtoull.c (removed): are no longer called by the Tcl source * generic/tcl.h: code. (Their functionality has been replaced * unix/Makefile.in: by TclParseNumber().) Remove outdated comments * unix/configure.in: and mountains of configury autogoo that * unix/tclUnixPort.h: allegedly support the mythical systems where * win/Makefile.in: these routines might not have been available. * win/makefile.bc: * win/makefile.vc: * win/tclWinPort.h: * unix/configure: autoconf-2.59
* * generic/tclCmdMZ.c (Tcl_SplitObjCmd): use TclNewStringObj macroMiguel Sofer2007-08-121-5/+5
| | | | instead of calling the function.
* * generic/tclInt.decls: Revised the interfaces of the routinesdgp2007-06-201-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * generic/tclExecute.c: TclStackAlloc and TclStackFree to make them easier for callers to use (or more precisely, harder to misuse). TclStackFree now takes a (void *) argument which is the pointer intended to be freed. TclStackFree will panic if that's not actually the memory the call will free. TSA/TSF also now tolerate receiving (interp == NULL), in which case they simply fall back to be calls to Tcl_Alloc/Tcl_Free. * generic/tclIntDecls.h: make genstubs * generic/tclBasic.c: Updated callers * generic/tclCmdAH.c: * generic/tclCmdIL.c: * generic/tclCompCmds.c: * generic/tclCompExpr.c: * generic/tclCompile.c: * generic/tclFCmd.c: * generic/tclFileName.c: * generic/tclIOCmd.c: * generic/tclIndexObj.c: * generic/tclInterp.c: * generic/tclNamesp.c: * generic/tclProc.c: * generic/tclTrace.c: * unix/tclUnixPipe.c:
* * generic/tclCmdIL.c (InfoFrameCmd):Miguel Sofer2007-06-181-19/+21
| | | | | | | * generic/tclCmdMZ.c (Tcl_SwitchObjCmd): * generic/tclCompile.c (TclInitCompileEnv): * generic/tclProc.c (Tcl_ProcObjCmd, SetLambdaFromAny): Moved the CmdFrame off the C stack and onto the Tcl stack.
* Make [string first] and [string last] clearerdkf2007-06-081-3/+4
|
* * generic/tclCmdMZ.c (STR_MAP): When [string map] has a pure dictdgp2007-05-011-1/+2
| | | | map, a missing Tcl_DictObjDone() call led to a memleak. [Bug 1710709]
* Whitespace policing, replacing commas in varargs with constant string ↵Kevin B Kenny2007-04-201-5/+5
| | | | catenation, and fixed an oversight in the fix for NZA time zones.
* Handle creation of Tcl_Objs from constant strings better (easier to use, moredkf2007-04-101-4/+4
| | | | efficient). After [Patch 1529526] (afredd)
* * generic/tclCmdMZ.c: Revised [string to* $s $first $last]dgp2007-03-301-8/+4
| | | | implementation to reduce number of allocs/copies.
* * generic/tclCmdMZ.c (STR_REVERSE): Implement the actualdgp2007-03-281-36/+2
| | | | | | | | | | | [string reverse] command in terms of the new TclStringObjReverse() routine. * generic/tclInt.h (TclStringObjReverse): New internal routine * generic/tclStringObj.c (TclStringObjReverse): that implements the [string reverse] operation, making use of knowledge/surgery of the String intrep to minimize the number of allocs and copies needed to do the job.
* * generic/tclCmdMZ.c (STR_MAP): Replace ckalloc calls withdgp2007-03-271-12/+14
| | | | TclStackAlloc calls.
* Function header/whitespace police/general format fixesdkf2007-02-061-152/+157
|
* * generic/tclBasic.c: TIP #280 implementation.andreas_kupries2006-11-281-3/+103
| | | | | | | | | | | | | | | | | | | | | * generic/tclCmdAH.c: * generic/tclCmdIL.c: * generic/tclCmdMZ.c: * generic/tclCompCmds.c: * generic/tclCompExpr.c: * generic/tclCompile.c: * generic/tclCompile.h: * generic/tclExecute.c: * generic/tclIOUtil.c: * generic/tclInt.h: * generic/tclInterp.c: * generic/tclNamesp.c: * generic/tclObj.c: * generic/tclProc.c: * tests/compile.test: * tests/info.test: * tests/platform.test: * tests/safe.test:
* TIP#269 implementationdkf2006-11-221-10/+65
|
* TIP#270 IMPLEMENTATIONdgp2006-11-151-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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:
* Optimize for the unshared case.dkf2006-11-091-8/+31
|
* Implemented [string reverse].dkf2006-11-091-5/+25
| | | | Finalizes basic TIP#272 implementation.
* Silence compiler grumbles.dkf2006-11-021-37/+36
|
* * generic/tclBasic.c: Further revised TclAppendPrintToObj() anddgp2006-11-021-4/+4
| | | | | | | | | | | | | | | | | | | | | * generic/tclCkalloc.c: TclObjPrintf() routines to panic when unable * generic/tclCmdAH.c: to complete their formatting operations, rather * generic/tclCmdIL.c: than report an error message. This means an * generic/tclCmdMZ.c: interp argument for error message recording is * generic/tclDictObj.c: no longer needed, further simplifying the * generic/tclExecute.c: interface for callers. * generic/tclIORChan.c: * generic/tclIOUtil.c: * generic/tclInt.h: * generic/tclMain.c: * generic/tclNamesp.c: * generic/tclParseExpr.c: * generic/tclPkg.c: * generic/tclProc.c: * generic/tclStringObj.c: * generic/tclTimer.c: * generic/tclUtil.c: * unix/tclUnixFCmd.c:
* * generic/tclBasic.c: Refactored and renamed the routinesdgp2006-10-311-9/+8
| | | | | | | | | | | | | | | | | | | | | * generic/tclCkalloc.c: TclObjPrintf, TclFormatObj, and * generic/tclCmdAH.c: TclFormatToErrorInfo to a new set of * generic/tclCmdIL.c: routines TclAppendPrintfToObj, * generic/tclCmdMZ.c: TclAppendFormatToObj, TclObjPrintf, and * generic/tclDictObj.c: TclObjFormat, with the intent of making * generic/tclExecute.c: the latter list, plus TclAppendLimitedToObj * generic/tclIORChan.c: and TclAppendObjToErrorInfo, public via * generic/tclIOUtil.c: a revised TIP 270. * generic/tclInt.h: * generic/tclMain.c: * generic/tclNamesp.c: * generic/tclParseExpr.c: * generic/tclPkg.c: * generic/tclProc.c: * generic/tclStringObj.c: * generic/tclTimer.c: * generic/tclUtil.c: * unix/tclUnixFCmd.c:
* * generic/tclClock.c (ClockClicksObjCmd): add support for Darwindas2006-08-211-5/+17
| | | | | | | | | * generic/tclCmdMZ.c (Tcl_TimeObjCmd): nanosecond resolution timer * generic/tclInt.h: to [clock clicks] and [time] * unix/configure.in (Darwin): when TCL_WIDE_CLICKS defined. * unix/tclUnixTime.c (TclpGetWideClicks, TclpWideClicksToNanoseconds): * unix/configure: autoconf-2.59 * unix/tclConfig.h.in: autoheader-2.59
* 2005-12-19 Don Porter <dgp@users.sourceforge.net>dgp2005-12-191-3/+6
| | | | | | | | | | | | | | | * 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/tclBinary.c:Miguel Sofer2005-11-041-10/+1
| | | | | | | | | | | | | | | | * generic/tclCmdAH.c: * generic/tclCmdIL.c: * generic/tclCmdMZ.c: * generic/tclDictObj.c: * generic/tclExecute.c: * generic/tclIOCmd.c: * generic/tclLink.c: * generic/tclTest.c: * generic/tclVar.c: fix for [Bug 1334947]. The functions TclPtrSetVar, Tcl_ObjSetVar2 and Tcl_SetVar2Ex now always consume the newValuePtr argument - i.e., they will free a 0-refCount object if they failed to set the variable. Fixed all callers in the core.
* TIP#237 IMPLEMENTATIONdgp2005-10-081-41/+9
| | | | | | [kennykb-numerics-branch] Resynchronized with the HEAD; at this checkpoint [-rkennykb-numerics-branch-20051008], the HEAD and kennykb-numerics-branch contain identical code.
* * generic/tclBasic.c: More callers of TclObjPrintf anddgp2005-09-151-2/+4
| | | | | | | | | | | | | | * generic/tclCkalloc.c: TclFormatToErrorInfo. * generic/tclCmdMZ.c: * generic/tclExecute.c: * generic/tclIORChan.c: * generic/tclMain.c: * generic/tclProc.c: * generic/tclTimer.c: * generic/tclUtil.c: * unix/tclUnixFCmd.c * unix/configure: autoconf-2.59
* * generic/tclStringObj.c: Bug fixes: ObjPrintfVA needed todgp2005-09-141-11/+5
| | | | | | | | | | | | | | | | | | support "*" fields and needed to interpret precision limits on %s conversions as a maximum number of bytes, not Tcl_UniChars, to take from the (char *) argument. * generic/tclBasic.c: Updated several callers to use * generic/tclCkalloc.c: TclFormatToErrorInfo() and/or * generic/tclCmdAH.c: TclObjPrintf(). * generic/tclCmdIL.c: * generic/tclCmdMZ.c: * generic/tclDictObj.c: * generic/tclExecute.c: * generic/tclIORChan.c: * generic/tclIOUtil.c: * generic/tclNamesp.c: * generic/tclProc.c:
* * generic/tclStringObj.c: Bug fixes: ObjPrintfVA needed todgp2005-09-141-14/+8
| | | | | | | | | | | | | support "*" fields and needed to interpret precision limits on %s conversions as a number of bytes, not Tcl_UniChars, to take from the (char *) argument. * generic/tclBasic.c: Updated several callers to use * generic/tclCmdMZ.c: TclFormatToErrorInfo(). * generic/tclIOUtil.c: * library/init.tcl: Keep [unknown] in sync with errorInfo formatting rules.
* More whitespace cleansing and _ANSI_ARGS_ purgingdkf2005-08-261-145/+146
|
* Getting more systematic about styledkf2005-07-171-1373/+1443
|
* * generic/tclCmdMZ.c (Tcl_SwitchObjCmd): Generatemdejong2005-06-201-2/+15
| | | | | | | | | | | | | | | an error if a mode argument like -exact is passed more than once to the switch command. The previous implementation silently accepted invalid switch invocations like [switch -exact -glob $str ...]. * tests/for.test: Check some error cases when invoking continue and break inside a for loop next script. * tests/switch.test: Add checks for shortened version of a mode argument like -exact. Add test for more than one mode argument. Add test for odd case of passing a variable as a body script.
* Another indentation fixdkf2005-06-071-2/+2
|
* Clean up indentationdkf2005-06-071-9/+9
|
* Implementation of TIP#241 from Joe Mistachkindkf2005-06-011-8/+16
| | | | Also compilation of [switch -glob -nocase] from Donal Fellows
* * generic/tclCmdMZ.c (Tcl_TimeObjCmd): add necessary casthobbs2005-05-251-2/+3
|
* * generic/tclCmdMZ.c (Tcl_TimeObjCmd): change [time] called with adas2005-05-231-5/+11
| | | | | count > 1 to return a string with a float value instead of a rounded off integer. [Bug 1202178]
* * generic/tclBasic.c (Tcl_ExprBoolean): Rewrite as wrapper arounddgp2005-05-181-11/+5
| | | | | | | | | | | | | | | | Tcl_ExprBooleanObj. * generic/tclCmdMZ.c ([string is boolean/true/false]): Rewrite dropping string-based Tcl_GetBoolean call, so that internal reps are kept for subsequent quick boolean operations. * generic/tclExecute.c: Dropped most special handling of the "boolean" Tcl_ObjType, since that type should now be rarely encountered. * doc/BoolObj.3: Rewrite of documentation dropping many details about the internals of Tcl_Objs. Shorter documentation focuses on the function and use of the routines.
* * tests/string.test: string-10.[21-30]hobbs2005-05-111-2/+5
| | | | | * generic/tclCmdMZ.c (Tcl_StringObjCmd): add extra checks to prevent possible UMR in unichar cmp function for string map.
* Merged kennykb-numerics-branch back to the head; TIPs 132 and 232Kevin B Kenny2005-05-101-12/+3
|
* TIP#176 IMPLEMENTATION [Patch 1165695]dgp2005-04-291-16/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * generic/tclUtil.c: Extended TclGetIntForIndex to recognize index formats including end+integer and integer+/-integer. * generic/tclCmdMZ.c: Extended the -start switch of [regexp] and [regsub] to accept all index formats known by TclGetIntForIndex. * doc/lindex.n: Updated docs to note new index formats. * doc/linsert.n: * doc/lrange.n: * doc/lreplace.n: * doc/lsearch.n: * doc/lset.n: * doc/lsort.n: * doc/regexp.n: * doc/regsub.n: * doc/string.n: * tests/cmdIL.test: Updated tests. * tests/compile.test: * tests/lindex.test: * tests/linsert.test: * tests/lrange.test: * tests/lreplace.test: * tests/lsearch.test: * tests/lset.test: * tests/regexp.test: * tests/regexpComp.test: * tests/string.test: * tests/stringComp.test: * tests/util.test:
* Improved [switch] compilation.dkf2005-04-081-1/+6
|
* * generic/tclCmdAH.c (Tcl_CatchObjCmd, Tcl_ErrorObjCmd):dgp2004-10-211-217/+1
| | | | | | | | | | | | | | | | | | | | | | Updated to call the new TclGet/SetReturnOptions routines to do much of their work. * generic/tclInt.h (TclGetReturnOptions,TclSetReturnOptions): * generic/tclResult.c (TclGetReturnOptions,TclSetReturnOptions): New utility routines to get/set the return options of an interp. Intent is that these routines will be converted to public routines after TIP approval. * generic/tclCmdMZ.c (TclProcessReturn,TclMergeReturnOptions): * generic/tclResult.c (TclProcessReturn,TclMergeReturnOptions): Move internal utility routines from tclCmdMZ.c to tclResult.c. * generic/tclBasic.c (Tcl_CreateInterp, Tcl_DeleteInterp): * generic/tclResult.c (TclTransferResult): Rework so that iPtr->returnOpts can be NULL when there are no special options. * generic/tclResult.c (TclRestoreInterpState): Plug potential memory leak.
* * generic/tclBasic.c (Tcl_CreateInterp,Tcl_DeleteInterp):dgp2004-10-181-32/+22
| | | | | | | | | | | | * generic/tclCmdAH.c (Tcl_CatchObjCmd): * generic/tclCmdMZ.c (TclMergeReturnOptions,TclProcessReturn): * generic/tclCompCmds.c (TclCompileReturnCmd): * generic/tclExecute.c (TclCompEvalObj): * generic/tclInt.h (Interp): * generic/tclProc.c (TclUpdateReturnInfo): Place primary storage of the -level and -code information in private fields of the Interp struct, rather than in a DictObj. This should significantly improve performance of TclUpdateReturnInfo.