summaryrefslogtreecommitdiffstats
path: root/generic/tclCmdMZ.c
Commit message (Collapse)AuthorAgeFilesLines
* * generic/tclCmdMZ.c (Tcl_RegexpObjCmd): [Bug 2826551, Patch 2948425]:dkf2010-08-121-19/+27
| | | | Backport of updates to make handling of RE line anchors correct.
* Reverted previous checin as Tcl_ObjSetVar2 (convoluted and undocumented)vasiljevic2010-04-061-2/+1
| | | | | jnterface implicitly decrements refcount of the passed result object when the passed result object refcount was already zero.
* Fixed object leakvasiljevic2010-04-061-1/+2
|
* Only look for the needle when it fits in the haystack. [Bug 2960021]dkf2010-02-271-3/+13
|
* * generic/tclBasic.c (Tcl_CreateInterp, Tcl_EvalTokensStandard,andreas_kupries2009-08-251-7/+19
| | | | | | | | | | | | | | | | | | | | | | | | EvalTokensStandard, Tcl_EvalEx, EvalEx, TclAdvanceContinuations, TclEvalObjEx): * generic/tclCmdMZ.c (Tcl_SwitchObjCmd, TclListLines): * generic/tclCompCmds.c (*): * generic/tclCompile.c (TclSetByteCodeFromAny, TclInitCompileEnv, TclFreeCompileEnv, TclCompileScript): * generic/tclCompile.h (CompileEnv): * generic/tclInt.h (ContLineLoc, Interp): * generic/tclObj.c (ThreadSpecificData, ContLineLocFree, TclThreadFinalizeObjects, TclInitObjSubsystem, TclContinuationsEnter, TclContinuationsEnterDerived, TclContinuationsCopy, TclContinuationsGet, TclFreeObj): * generic/tclParse.c (TclSubstTokens, Tcl_SubstObj): * generic/tclProc.c (TclCreateProc): * generic/tclVar.c (TclPtrSetVar): * tests/info.test (info-30.0-24): Extended parser, compiler, and execution with code and attendant data structures tracking the positions of continuation lines which are not visible in script Tcl_Obj*'s, to properly account for them while counting lines for #280.
* Performance boost for [string is].dkf2009-07-201-37/+68
|
* * generic/tclCmdMZ.c: Improve overflow error message fromdgp2009-05-061-2/+2
| | | | [string repeat]. [Bug 2582327]
* * generic/tclCmdMZ.c: Prevent crashes due to int overflow of thedgp2009-02-041-11/+14
| | | | length of the result of [string repeat]. [Bug 2561746]
* remove outdated commentarydgp2008-09-181-5/+3
|
* 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