summaryrefslogtreecommitdiffstats
path: root/generic/tclCmdMZ.c
Commit message (Collapse)AuthorAgeFilesLines
...
* * typo corrections in commentsdgp2001-12-201-3/+3
|
* Tightened up the argument passing for [switch] to promote robuster scripts.dkf2001-11-271-31/+59
|
* * generic/tclBasic.c (Tcl_DeleteCommandFromToken,CallCommandTraces):dgp2001-11-211-2/+2
| | | | | | | * generic/tclCmdMZ>c (Tcl_UntraceCommand): Added Tcl_Preserve and Tcl_Release calls to prevent deletion of CommandTrace structures until all callers are done using them, preventing memory corruption. [Bug 453805]
* added TIP#73 patch #483500 from Kevin Kenny.hobbs2001-11-211-5/+5
| | | | This deprecates TclpGetTime in favor of new Tcl_GetTime.
* Changes due to TIP#68; memory handling in variable traces is now correct!dkf2001-11-191-40/+15
|
* Undo of mistaken commit. Sorry!dgp2001-10-161-5/+5
|
* * Added test to demonstrate memory corruption problems. [Bug 219393].dgp2001-10-161-5/+5
|
* removed unnecessary inclusions of tclCompile.h [Patch 466823]Miguel Sofer2001-10-011-2/+1
|
* * generic/tclCmdMZ.c (Tcl_RegsubObjCmd): had to adjust fix fromhobbs2001-09-131-15/+27
| | | | | | 2001-08-06 to actually duplicate the objects in certain cases. This is really a place where feather would have been essential. [Bug #461322]
* Patch for [TIP 56], [Bug: 219384] and [Bug: 455151]: deprecate the useMiguel Sofer2001-09-131-7/+7
| | | | of Tcl_EvalTokens, replaced by the new Tcl_EvalTokensStandard.
* * generic/tclCmdMZ.c (Tcl_RegexpObjCmd, Tcl_RegsubObjCmd):hobbs2001-08-071-12/+18
| | | | | reordered the retrieval of arguments to avoid shimmering bug when the pattern and string referenced the same object.
* Changes from TIP#17 "Redo Tcl's filesystem"vincentdarley2001-07-311-10/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The following files were impacted. * doc/Access.3: * doc/FileSystem.3: * doc/OpenFileChnl.3: * doc/file.n: * doc/glob.n: * generic/tcl.decls: * generic/tcl.h: * generic/tclCmdAH.c: * generic/tclCmdIL.c: * generic/tclCmdMZ.c: * generic/tclDate.c: * generic/tclDecls.h: * generic/tclEncoding.c: * generic/tclFCmd.c: * generic/tclFileName.c: * generic/tclGetDate.y: * generic/tclIO.c: * generic/tclIOCmd.c: * generic/tclIOUtil.c: * generic/tclInt.decls: * generic/tclInt.h: * generic/tclIntDecls.h: * generic/tclLoad.c: * generic/tclStubInit.c: * generic/tclTest.c: * generic/tclUtil.c: * library/init.tcl: * mac/tclMacFCmd.c: * mac/tclMacFile.c: * mac/tclMacInit.c: * mac/tclMacPort.h: * mac/tclMacResource.c: * mac/tclMacTime.c: * tests/cmdAH.test: * tests/event.test: * tests/fCmd.test: * tests/fileName.test: * tests/io.test: * tests/ioCmd.test: * tests/proc-old.test: * tests/registry.test: * tests/unixFCmd.test: * tests/winDde.test: * tests/winFCmd.test: * unix/mkLinks: * unix/tclUnixFCmd.c: * unix/tclUnixFile.c: * unix/tclUnixInit.c: * unix/tclUnixPipe.c: * win/tclWinFCmd.c: * win/tclWinFile.c: * win/tclWinInit.c: * win/tclWinPipe.c
* * generic/tclCmdMZ.c: Removed extra copy of the SCAN_* macroshobbs2001-07-161-17/+1
| | | | #defined in generic/tclScan.c. (porter) [Bug 441230]
* TIP#36 implementation. Also includes cleanup for subst optiondkf2001-07-121-71/+142
| | | | | handling and improved documentation for the subst command (in my capacity as maintainer of the Commands M-Z functional area.)
* Fix for bug #219232 (submatch errors with regexp -all -inline -indices)dkf2001-06-121-2/+6
|
* generic/tclCmdMZ.c: made use of new Tcl_GetUnicodeFromObjhobbs2001-05-171-62/+60
|
* Negative start index to [string first] caused offset return value (Bug 423581)dkf2001-05-141-1/+7
|
* (TIP #27) Another round of CONST changes, thisKevin B Kenny2001-04-241-5/+5
| | | | | | | | | time adding CONST to the API's exported from tclBasic.c. [Patch #415179] ***POTENTIAL INCOMPATIBILITY*** from 8.4a2, in which Vince Darley's changes to command tracing were added. A const has been added to the type signature of one of the parameters to Tcl_CommandTraceProc.
* Fixed problem with [string compare \x00 \x01] and hopefully sped thedkf2001-04-061-28/+104
| | | | | command up in a few cases too (notably byte arrays and UNICODE objects.) [Bug #219201]
* Fixed so tclCmdMZ.c will compile with K&R compilers [Patch #413844]dkf2001-04-051-3/+3
|
* * tests/regexp.test (regexp-19.1):hobbs2001-03-281-3/+4
| | | | | * generic/tclCmdMZ.c (Tcl_RegsubObjCmd): fixed handling of nulls in subspec value.
* A missing return was causing memory corruption in [string map].dkf2001-03-131-1/+2
|
* [split $string ""] now shares character strings in the resulting list,dkf2001-02-161-2/+21
| | | | | giving better performance for smallish strings, and *much* better performance for large (especially multi-megabyte) ones.
* * generic/tclCmdMZ.c (Tcl_RegexpObjCmd): When using -all, allericm2000-09-201-1/+2
| | | | | | | attempts after the first to match the regexp against the string should include the TCL_REG_NOTBOL flag, to avoid erroneously matching ^ in the middle of the string. Added code to set this flag after the first pass through the matching loop. [Bug: 6284].
* * generic/tclCmdMZ.c (Tcl_StringObjCmd): changed STR_REPEAT tohobbs2000-09-061-5/+30
| | | | | preallocate the full space of the final string, avoided repeated appends.
* * doc/trace.n: Updated documentation for new syntax; flagged oldericm2000-08-251-149/+870
| | | | | | | | | | | | | | | | | | | | | | | | | | syntax as deprecated; added documentation for command rename/delete traces and variable array traces. * tests/trace.test: Updated tests for new trace syntax; new tests for command rename/delete traces; new tests for array traces. * generic/tclVar.c: Support for new trace syntax; support for TCL_TRACE_ARRAY. * generic/tclStubInit.c: * generic/tclDecls.h: * generic/tcl.decls: Stub functions for command rename/delete traces. * generic/tcl.h: * generic/tclInt.h: * generic/tclBasic.c: Support for command traces. * generic/tclCmdMZ.c (TclTraceVariableObjCmd): Patched to support new [trace] syntax: trace {add|remove|list} {variable|command} name ops command Added support for command traces (rename, delete operations). Added support for TCL_TRACE_ARRAY at Tcl level (array operation for variable traces).
* * generic/tclCmdMZ.c (Tcl_RegsubObjCmd): reworked to operate inhobbs2000-05-261-282/+253
| | | | | | | | | | Unicode, tweaked for performance. (Tcl_StringObjCmd) changed STR_FIRST/STR_LAST error message to something more understandable, reworked STR_FIRST, STR_LAST, STR_MAP, STR_MATCH, STR_RANGE, STR_REPLACE to operate in Unicode. Removed inneffectual STR_RANGE "special" ByteArray support. Optimized STR_MAP algorithm, especially optimized for one-pair case. Fixed possible mem overrun in STR_INDEX bytearray case.
* * win/tclWinPipe.c (TclpCreateTempFile): Added conversion ofericm2000-04-101-3/+27
| | | | | | | | contents string from UTF to native encoding [Bug: 4030]. * tests/regexp.test: Added tests for infinite looping in [regexp -all]. * generic/tclCmdMZ.c: Fixed infinite loop bug with [regexp -all] [Bug: 4981].
* *** empty log message ***hobbs2000-02-051-2/+1
|
* * tests/regexp.test: added tests for -all and -inline switcheshobbs2000-02-021-74/+150
| | | | | | * doc/regexp.n: added docs for -all and -inline switches * generic/tclCmdMZ.c (Tcl_RegexpObjCmd): added extra comments for new -all and -inline switches to regexp command
* * tests/var.test:hobbs1999-12-121-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | * generic/tclCompile.c: fixed problem where setting to {} array would intermittently not work. (Fontaine) [Bug: 3339] * generic/tclCmdMZ.c: * generic/tclExecute.c: optimized INST_TRY_CVT_TO_NUMERIC to recognize boolean objects. (Spjuth) [Bug: 2815] * tests/info.test: * tests/parseOld.test: * generic/tclCmdAH.c: * generic/tclProc.c: changed Tcl_UplevelObjCmd (uplevel) and Tcl_EvalObjCmd (eval) to use TCL_EVAL_DIRECT in the single arg case as well, to take advantage of potential pure list input optimization. This means that it won't get byte compiled though, which should be acceptable. * generic/tclBasic.c: made Tcl_EvalObjEx pure list object aware in the TCL_EVAL_DIRECT case for efficiency. * generic/tclUtil.c: made Tcl_ConcatObj pure list object aware, and return a list object in that case [Bug: 2098 2257] * generic/tclMain.c: changed Tcl_Main to not constantly reuse the commandPtr object (interactive case) as it could be shared. (Fellows)
* * generic/tclStringObj.c: fixed Tcl_AppendResultVA so it onlyhobbs1999-10-291-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | iterates once over the va_list (avoiding a memcpy of it, which is not portable). * generic/tclEnv.c: fixed possible ABR error in environ array * tests/scan.test: * generic/tclScan.c: added support for use of inline scan, XPG3 currently not included * tests/incr.test: * tests/set.test: * generic/tclCompCmds.c: fixed improper bytecode handling of 'eval {set array($unknownvar) 5}' (also for incr) * win/tclWinTest.c: added testvolumetype command, as atime is completely ignored for Windows FAT file systems * win/tclWinPort.h: added sys/utime.h to includes * unix/tclUnixPort.h: added utime.h to includes * doc/file.n: * tests/cmdAH.test: * generic/tclCmdAH.c: added time arguments to atime and mtime file command methods (support 'touch' functionality)
* * unix/tclUnixNotfy.c: fixed event/io threading problems byhobbs1999-10-211-2/+2
| | | | | | | | | | | | | | | | | | | | making triggerPipe non-blocking * library/tcltest1.0/tcltest.tcl: * generic/tclThreadTest.c: fixed mem leaks in threads * generic/tclResult.c: fixed Tcl_AppendResultVA so it only iterates once over the va_list (avoiding a memcpy of it, which is not portable). * generic/regc_color.c: fixed mem leak and assertion, from HS * generic/tclCompile.c: removed savedChar trick that appeared to be causing a segv when the literal table was released * tests/string.test: * generic/tclCmdMZ.c: fixed [string index] to return ByteArrayObj when indexing into one (test case string-5.16) [Bug: 2871]
* 1999-09-16 Jeff Hobbs <hobbs@scriptics.com>hobbs1999-09-211-24/+95
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * tests/timer.test: changed after delay in timer test 6.29 from 1 to 10. [Bug: 2796] * tests/pkg.test: * generic/tclPkg.c: fixed package version check to disallow 1.2..3 [Bug: 2539] * unix/Makefile.in: fixed gendate target - this never worked since RCS was intro'd. * generic/tclGetDate.y: updated to reflect previous changes to tclDate.c (leap year calc) and added CEST and UCT time zone recognition. Fixed 4 missing UCHAR() casts. [Bug: 2717, 954, 1245, 1249] * generic/tclCkalloc.c: changed Tcl_DumpActiveMemory to really dump to stderr and close it [Bug: 725] and changed Tcl_Ckrealloc and Tcl_Ckfree to not bomb when NULL was passed in [Bug: 1719] and changed Tcl_Alloc, et al to not panic when a alloc request for zero came through and NULL was returned (valid on AIX, Tru64) [Bug: 2795, etc] * tests/clock.test: * doc/clock.n: * generic/tclClock.c: added -milliseconds switch to clock clicks to guarantee that the return value of clicks is in the millisecs granularity [Bug: 2682, 1332] 1999-09-15 Jeff Hobbs <hobbs@scriptics.com> * generic/tclIOCmd.c: fixed potential core dump in conjunction with stacked channels with result obj manipulation in Tcl_ReadChars [Bug: 2623] * tests/format.test: * generic/tclCmdAH.c: fixed translation of %0#s in format [Bug: 2605] * doc/msgcat.n: fixed \\ bug in example [Bug: 2548] * unix/tcl.m4: * unix/aclocal.m4: added fix for FreeBSD-[1-2] recognition [Bug: 2070] and fix for IRIX SHLIB_LB_LIBS. [Bug: 2610] * doc/array.n: * tests/var.test: * tests/set.test: * generic/tclVar.c: added an array unset operation, with docs and tests. Variation of [Bug: 1775]. Added fix in TclArraySet to check when trying to set in a non-existent namespace. [Bug: 2613] 1999-09-14 Jeff Hobbs <hobbs@scriptics.com> * tests/linsert.test: * doc/linsert.n: * generic/tclCmdIL.c: fixed end-int interpretation of linsert to correctly calculate value for end, added test and docs [Bug: 2693] * doc/regexp.n: * doc/regsub.n: * tests/regexp.test: * generic/tclCmdMZ.c: add -start switch to regexp and regsub with docs and tests * doc/switch.n: added proper use of comments to example. * generic/tclCmdMZ.c: changed switch to complain when an error occurs that seems to be due to a misplaced comment. * generic/tclCmdMZ.c: fixed illegal ref for \[0-9] substitutions in regsub [Bug: 2723] * generic/tclCmdMZ.c: changed [string equal] to return an Int type object (was a Boolean)
* * Changed version to 8.2b2.redman1999-07-221-2/+7
| | | | | | | | | | | | | | | | | | * win/tclWinPort.h: Block out include of sys/*.h in order to build extensions with MetroWerks compiler for Win32. [Bug: 2385] * generic/tclCmdMZ.c: * generic/tclIO.c: Fix ANSI-style prototypes based on patch from Ulrich Ring. [Bug: 2391] * unix/Makefile.in: Need to make install-sh executable before calling (with chmod +x). [Bug: 2413] * tests/var.test: * generic/tclVar.c: Fixed bug that caused a seg. fault when using "array set a(b) {}", which is a bad array name anyway. Now the "array set" command will return an error in this case. Added test case and fixed existing test. [Bug: 2427]
* * tests/string.test:stanton1999-07-091-3/+3
| | | | | * generic/tclCmdMZ.c: Fixed bug in string range bounds checking code.
* Fixed lint found by Jim Inghamwelch1999-07-021-4/+5
|
* * tests/regexp.test:stanton1999-06-171-18/+40
| | | | | | * generic/tclCmdMZ.c: * generic/tclCmdIL.c: Changed to use new regexp interfaces. Added -expanded, -line, -linestop, and -lineanchor switches to regsub.
* Merged String and Unicode object types. Added new functions tohershey1999-06-151-14/+18
| | | | | | | | | the puplic API: Tcl_NewUnicodeObj, Tcl_SetUnicodeObj, Tcl_GetUnicode, Tcl_GetUniChar, Tcl_GetCharLength, Tcl_GetRange, Tcl_AppendUnicodeToObj. Note: some stringObj tests are still failing--the teststringobj command still needs to be updated.
* * generic/tclUnicodeObj.c: Lots of cleanup and simplification.stanton1999-06-101-85/+93
| | | | | | | | | | | | | | | | | | | | | | | Fixed several memory bugs. Added TclAppendUnicodeToObj. * generic/tclInt.h: Added declarations for various Unicode string functions. * generic/tclRegexp.c: * generic/tclCmdMZ.c: Changed to use new Unicode string interfaces for better performance. * generic/tclRegexp.h: * generic/tclRegexp.c: * generic/tcl.h: * generic/tcl.decls: Added Tcl_RegExpMatchObj and Tcl_RegExpGetInfo calls to access lower level regexp API. These features are needed by Expect. This is a preliminary implementation pending final review and cleanup. * generic/tclCmdMZ.c: * tests/string.test: Fixed bug where string map failed on null strings.
* * tests/string.test:hershey1999-06-081-44/+95
| | | | | | | | | | | | | | | | | | | | | | | * generic/tclVar.c (Tcl_SetVar2Ex): * generic/tclStringObj.c (Tcl_AppendObjToObj): * generic/tclCmdMZ.c (Tcl_StringObjCmd): optimized the string index, string length, string range, and append command in cases where the object's internal rep is a bytearray. Objects with other internal reps are converted to have the new unicode internal rep. * unix/Makefile.in: * win/Makefile.in: * win/Makefile.vc: * tests/unicode.test: * generic/tclInt.h: * generic/tclObj.c: * generic/tclUnicodeObj.c: added a new object type to store the unicode representation of a string. * generic/tclTestObj.c: added the objtype option to the testobj command. This option returns the name of the type of internal rep an object has.
* * generic/tclCmdMZ.c (Tcl_StringObjCmd):stanton1999-06-031-1/+12
| | | | | * tests/string.test: Fixed bug where string equal/compare -nocase reported wrong result on null strings. [Bug: 2138]
* * tests/reg.test:stanton1999-06-021-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | * generic/regc_color.c: * generic/regc_cvec.c: * generic/regc_lex.c: * generic/regc_locale.c: * generic/regc_nfa.c: * generic/regcomp.c: * generic/regcustom.h: * generic/rege_dfa.c: * generic/regerror.c: * generic/regerrs.h: * generic/regex.h: * generic/regexec.c: * generic/regfree.c: * generic/regfronts.c: * generic/regguts.h: * generic/tclCmdMZ.c: * generic/tclRegexp.c: * generic/tclRegexp.h: * generic/tclTest.c: Applied Henry Spencer's latest regexp patches that fix an infinite loop bug and add support for testing whether a string could match with additional input. [Bug: 2117]
* * generic/tcl.decls:stanton1999-05-251-3/+3
| | | | | | | | | | | * generic/tclCmdMZ.c: * generic/tclDecls.h: * generic/tclInt.decls: * generic/tclIntDecls.h: * generic/tclPort.h: * generic/tclStubInit.c: * generic/tclStubLib.c: Various header file related changes and other lint to try to get the Mac builds working.
* Merged changes from scriptics-tclpro-1-3-b2 branchstanton1999-05-221-48/+164
|
* * tests/string.test:stanton1999-05-061-3/+3
| | | | | | * generic/tclCmdMZ.c: * doc/string.n: Fixed bug in string equal/compare code when using -length option. Cleaned up docs a bit more.
* lintstanton1999-05-061-8/+8
|
* * doc/string.n:stanton1999-05-061-95/+371
| | | | | | | | | | | | | | | | | | | | * tests/cmdIL.test: * tests/cmdMZ.test: * tests/error.test: * tests/ioCmd.test: * tests/lindex.test: * tests/linsert.test: * tests/lrange.test: * tests/lreplace.test: * tests/string.test: * tests/cmdIL.test: * generic/tclUtil.c: * generic/tclCmdMZ.c: Replaced "string icompare/iequal" with -nocase and -length switches to "string compare/equal". Added a -nocase option to "string map". Changed index syntax to allow integer or end?-integer? instead of a full expression. This is much simpler with safeTcl scripts since it avoids double substitution issues.
* * doc/string.n:stanton1999-05-041-7/+20
| | | | | | | * tests/cmdMZ.test: * tests/string.test: * generic/tclCmdMZ.c (Tcl_StringObjCmd): Changed "string length" to avoid regenerating the string rep of a ByteArray object.
* * tests/cmdIL.test:stanton1999-05-041-54/+300
| | | | | | | | | | | | | * tests/cmdMZ.test: * tests/error.test: * tests/lindex.test: * tests/linsert.test: * tests/lrange.test: * tests/lreplace.test: * tests/string.test: * generic/tclCmdMZ.c (Tcl_StringObjCmd): * generic/tclUtil.c (TclGetIntForIndex): Applied Jeff Hobbs's string patch which includes the following changes [Bug: 1845]: