summaryrefslogtreecommitdiffstats
path: root/generic
Commit message (Collapse)AuthorAgeFilesLines
* * generic/tclExecute.c (TclExecuteByteCode INST_STR_CMP): addedhobbs2000-06-061-1/+5
| | | | | test of iResult return from memcmp, as memcmp isn't required to return only -1,0,1.
* * generic/tclIndexObj.c (Tcl_GetIndexFromObjStruct): Correctedhobbs2000-06-061-2/+6
| | | | | caching of the index ptr to account for offsets != sizeof(char *). [Bug: 5153]
* Comment typo correction.ericm2000-06-051-2/+2
|
* * tests/set-old.test:hobbs2000-06-011-7/+23
| | | | | | * doc/unset.n: * generic/tclVar.c (Tcl_UnsetObjCmd): added -nocomplain and -- options to unset, to allow for a silent unset operation.
* * generic/tclVar.c (Tcl_ArrayObjCmd): Added support for regexp andericm2000-05-311-6/+37
| | | | | | | | | | exact matching for [array names] command. [RFE: 3684]. * doc/array.n: Added documentation for [array names -exact/-regexp/-glob] [RFE: 3684]. * tests/set-old.test: Added tests for [array names -exact/-regexp/-glob] [RFE: 3684].
* * tests/info.test:hobbs2000-05-272-7/+22
| | | | | | | | * doc/info.n: * generic/tclIOUtil.c (Tcl_EvalFile): * generic/tclCmdIL.c (InfoScriptCmd): added ability to set the info script return value [info script ?newFileName?]. This will be beneficial for virtual file system programs. [Bug: 4225]
* * generic/tclCompExpr.c: changed INST_STREQ -> INST_STR_EQ,hobbs2000-05-265-230/+456
| | | | | | | | | | | | | | | INST_STRNEQ -> INST_STR_NEQ * generic/tclCompile.c: added streq, strneq, strcmp, strlen & strmatch to the compiled stats instructionTable * generic/tclCompile.h: added instructions INST_STR_CMP, INST_STR_INDEX, INST_STR_MATCH * generic/tclCompCmds.c: added byte compiler support for [string compare|match|index]. * generic/tclExecute.c: Changed INST_STR_(N)EQ to return an Int object and not bother trying to reuse the top stack object. Added INST_STR_CMP, INST_STR_INDEX, INST_STR_MATCH bytecode ops. Extended evalstats output info with Tcl_IsShared stat info.
* * generic/tclStringObj.c (Tcl_AppendUnicodeToObj): removed dead code.hobbs2000-05-261-22/+9
| | | | | (AppendUnicodeToUnicodeRep) removed overallocation by extra sizeof(Tcl_UniChar) multiplier.
* * generic/tclInt.h:hobbs2000-05-262-2/+22
| | | | | * generic/tclObj.c (Tcl_DbIsShared): added support for checking result of Tcl_IsShared in evalstats (TCL_COMPILE_STATS).
* * 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.
* * generic/tclInt.h: Added function prototypes forericm2000-05-235-8/+311
| | | | | | | | | | | | | | | | | | | | | | TclCompileStringCmd and TclCompileReturnCmd. * generic/tclCompile.h: Added definition of INST_STRLEN opcode and updated LAST_INST_OPCODE value. * generic/tclBasic.c: Added information about TclCompileStringCmd and TclCompileReturnCmd to BuiltInCmds table. * generic/tclExecute.c (TclExecuteByteCode): Added support for the INST_STRLEN opcode. * generic/tclCompCmds.c (TclCompileStringCmd): Basic implementation of byte-compiled [string] command. Not all subcommands are implemented; those that are not an out-line compiled. (TclCompileReturnCmd): Byte-compiled implementation of [return] command. Only "simple" returns are byte-compiled; in particular, if the -code, -errorinfo or -errorcode flags are used, the command is not byte-compiled.
* * generic/tclEnv.c: cast cleanup [Bug: 5624]hobbs2000-05-221-2/+3
|
* * generic/tclTest.c:hobbs2000-05-196-1192/+1227
| | | | | | | | | | | | | * generic/tclIO.c: moved channel test commands from tclIO.c to tclTest.c. * generic/tclIO.h: new file, split out from tclIO.c to allow test commands to be moved to tclTest.c. * generic/tclStubInit.c: * generic/tclIntDecls.h: * generic/tclInt.decls: removed TclTestChannel*Cmd from internal stubs table and added TclChannelEventScriptInvoker to the internal stubs table so it can be used from the test code.
* * tests/clock.test: Added test for "2 days 2 hours ago" styleericm2000-05-182-78/+85
| | | | | | | | | | specifications. * generic/tclDate.c: Regenerated from tclGetDate.y. * generic/tclGetDate.y: Tweaked grammar to properly handle the "ago" keyword when it follows multiple relative unit specifiers, as in "2 days 2 hours ago". [Bug: 5497].
* * generic/tclClock.c (FormatClock): correct code to handle localehobbs2000-05-181-3/+12
| | | | | | | | specific return values from strftime, if any. [Bug: 3345] * unix/tclUnixInit.c (TclpSetInitialEncodings): attempt to correct setlocale calls for XIM support and locale issues. [BUG: 5422 3345 4236 2522 2521]
* * generic/tclPosixStr.c (Tcl_SignalMsg): clarified #defines forhobbs2000-05-111-3/+3
| | | | Linux on Sparc to compile correctly. [Bug: 5364]
* * doc/namespace.n:hobbs2000-05-111-9/+64
| | | | | | * tests/namespace.test: * generic/tclNamesp.c (Tcl_NamespaceObjCmd): added 'namespace exists' command. [Bug: 4665]
* * doc/source.n:hobbs2000-05-111-1/+7
| | | | | | | | | * doc/Eval.3: * tests/source.test: * generic/tclIOUtil.c (Tcl_EvalFile): added explicit \32 (^Z) eofchar (affects Tcl_EvalFile in C, "source" in Tcl). This was implicit on Windows already, and is now cross-platform to allow for scripted documents.
* * tests/lsearch.test:ericm2000-05-091-31/+218
| | | | | | * doc/lsearch.n: * generic/tclCmdIL.c (Tcl_LsearchObjCmd): Extended [lsearch] to support sorted list searching and typed list searching. [RFE: 4098].
* * doc/expr.n:hobbs2000-05-094-12/+104
| | | | | | | | | | | | * tests/expr.test: * tests/expr-old.test: added tests for 'eq' and 'ne' * generic/tclExecute.c: * generic/tclCompile.h: added INST_STREQ and INST_STRNEQ opcodes that do strict string comparisons. * generic/tclCompExpr.c: added 'eq' and 'ne' string comparison operators. * generic/tclParseExpr.c (GetLexeme): added 'eq' and 'ne' expr parse terms (string (in)equality check).
* * generic/tclCmdIL.c (Tcl_LinsertObjCmd): made use ofhobbs2000-05-081-75/+56
| | | | | | | | Tcl_DuplicateObj where code was otherwise duplicated. Made special case of inserting one element at the end work again (where index == len). (Tcl_LreplaceObjCmd): moved Tcl_DuplicateObj call lower and cleaned up use of other arguments.
* lint chan = NULL inithobbs2000-05-081-2/+2
|
* * generic/tclObj.c (Tcl_DuplicateObj): simplified code to callhobbs2000-05-081-10/+2
| | | | TclInitStringRep, which the code was just duplicating in part.
* minor comment correctionhobbs2000-05-081-2/+2
|
* removed unreferenced varhobbs2000-05-081-2/+1
|
* * doc/Utf.3:hobbs2000-05-085-148/+292
| | | | | | | | | | * generic/tclStubInit.c: * generic/tcl.decls: * generic/tclDecls.h: * generic/tclUtf.c: Added new functions Tcl_UniCharNcasecmp and Tcl_UniCharCaseMatch (unicode parallel to Tcl_StringCaseMatch) * generic/tclUtil.c: rewrote Tcl_StringCaseMatch algorithm for optimization and made Tcl_StringMatch just call Tcl_StringCaseMatch
* * tests/set-old.test:ericm2000-05-081-4/+19
| | | | | * doc/array.n: * generic/tclVar.c: Added [array statistics] command [RFE: 4557]
* 2000-05-06 Andreas Kupries <a.kupries@westend.com>kupries2000-05-061-21/+22
| | | | | | | | operating as proxy for David Gravereaux <davygrvy@pobox.com> * tclThreadJoin.c: Fixed several places with missing a & in arguments to calls of Tcl_Mutex(Un)lock and Tcl_ConditionNotify functions.
* * README:hobbs2000-05-031-7/+7
| | | | | | | | | | | | | | | | | | * generic/tcl.h: * library/init.tcl: * library/reg1.0/pkgIndex.tcl: * library/tcltest1.0/tcltest.tcl: * mac/README: * tools/tcl.hpj.in: * tools/tcl.wse.in: * unix/README: * unix/configure.in: * unix/tcl.spec: * win/README: * win/README.binary: * win/configure.in: * win/makefile.vc: * win/tcl.m4: updated patchlevel to 8.4a1
* * tests/compile.test:hobbs2000-05-031-10/+23
| | | | | | | | | | * tests/init.test: * tests/proc.test: * tests/proc-old.test: * tests/rename.test: * generic/tclProc.c: reworked error return for procedures with incorrect args to be like the C Tcl_WrongNumArgs, where a "wrong # args: ..." message is printed out with the args list.
* 2000-05-02 Andreas Kupries <a.kupries@westend.com>kupries2000-05-027-99/+838
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Overall changes: (1) Implementation of joinable threads for all platforms. (2) Additional API's for channels. Required to allow the thread extension to move channels between threads. * generic/tcl.decls (lines 1360f): Added Tcl_JoinThread, Tcl_IsChannelShared, Tcl_IsChannelRegistered, Tcl_CutChannel, Tcl_SpliceChannel, Tcl_IsChannelExisting and Tcl_ClearChannelHandlers (slots 394 to 400). * generic/tclIO.c: Implemented Tcl_IsChannelRegistered, Tcl_IsChannelShared, Tcl_CutChannel, Tcl_SpliceChannel, Tcl_IsChannelExisting and Tcl_ClearChannelHandlers. Tcl_CutChannel uses code from CloseChannel. Replaced this code by a call to Tcl_CutChannel. Replaced several code fragments adding channels to the channel list with calls to Tcl_SpliceChannel. Removed now unused variables from CloseChannel and Tcl_UnstackChannel. Tcl_ClearChannelHandlers uses code from Tcl_Close. Replaced this code by a call to Tcl_ClearChannelHandlers. Removed now unused variables from Tcl_Close. Added the subcommands 'cut', 'forgetch', 'splice' and 'isshared' to the test code (TclTestChannelCmd). * unix/tclUnixThread.c: Implemented Tcl_JoinThread using the pthread-functionality. * win/tclWinThrd.c: Fixed several small typos in comments. Implemented Tcl_JoinThread using a platform independent emulation layer (see generic/tclThreadJoin.c below). Added 'joinLock' to serialize Tcl_CreateThread and TclpExitThread to prevent a race for joinable threads. * mac/tclMacThrd.c: Implemented Tcl_JoinThread using a platform independent emulation layer (see generic/tclThreadJoin.c below). Due to the cooperative nature of threading on this platform the race mentioned above is not present. * generic/tclThreadJoin.c: New file. Contains a platform independent emulation layer helping in the implementation of joinable threads for the win and mac platforms. * generic/tclInt.h: Added declarations for TclJoinThread, TclRememberJoinableThread and TclSignalExitThread. These procedures define the API of the emulation layer for joinable threads (see generic/tclThreadJoin.c above). * win/Makefile.in: * win/makefile.vc: Added generic/tclTheadJoin.o to the rules. * mac/: I don't know to which file generic/tclTheadJoin.o has to be added to so that it compiles. Sorry. * unix/tclUnixChan.c: #ifdef'd the thread-local list of file channels as it prevents us from transfering channels. To restore this we may need an extended interface to drivers in the future. Target: 9.0. Found while testing the new transfer of channels. The information in this list for a channel was left behind and then crashed the system during finalization. * generic/tclThreadTest.c: Added -joinable flag to 'testthread create'. Added subcommand 'testthread join'. * doc/CrtChannel.3: Added documentation for Tcl_IsChannelRegistered, Tcl_IsChannelShared, Tcl_CutChannel, Tcl_SpliceChannel, Tcl_IsChannelExisting and Tcl_ClearChannelHandlers. * doc/Thread.3: Added documentation for Tcl_JoinThread. * tests/thread.test: Added tests for joining of threads.
* * doc/memory.n: Man page for Tcl "memory" command, which isericm2000-04-271-22/+55
| | | | | | | | | | | | | | | | | | created when TCL_MEM_DEBUG is defined at compile time. * doc/TCL_MEM_DEBUG.3: Man page with overall information about TCL_MEM_DEBUG usage. * doc/DumpActiveMemory.3: Man page for Tcl_DumpActiveMemory, Tcl_InitMemory, and Tcl_ValidateAllMemory [Bug: 1816, 1835]. * generic/tclCkalloc.c: Fixed some function headers. * unix/mkLinks: Regen'd with new mkLinks.tcl. * unix/mkLinks.tcl: Fixed indentation, made link setup more intelligent (only do one existance test per man page, instead of one per function).
* * generic/tclAlloc.c: wrapped caddr_t define to not be done on Unixhobbs2000-04-211-1/+6
| | | | | * unix/tclUnixPort.h: added Tclp*Alloc defines to allow the use of USE_TCLALLOC on Unix. [Bug: 4731]
* * generic/tclFileName.c (SplitUnixPath): added support for QNXhobbs2000-04-191-1/+14
| | | | node ids.
* * README:hobbs2000-04-192-5/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * generic/tcl.h: * tools/tcl.wse.in: * unix/configure.in: * unix/tcl.spec: * win/configure.in: * win/README.binary: bumped version to 8.3.1 * win/tcl.hpj.in: updated copyright date * generic/tclEnv.c: environment support for Mac OS/X * unix/tclUnixPort.h: environment support for Mac OS/X * unix/tclLoadDyld.c: new file for Mac OS/X dl functions * unix/Makefile.in: added install-strip target; bindir, libdir, mandir, includedir vars; tclLoadDyld.c target [Bug: 2527] * unix/tclUnixChan.c (CreateSocket): force a socket back into blocking mode (default state) after a -async connect succeeds. [Bug: 4388] * generic/tclEvent.c (TclInitSubsystems): Moved tclLibraryPath to thread-local storage to prevent thread-related race condition. [Bug: 5033] * unix/tclAppInit.c (main): removed #ifdef TCL_TEST that sets the library path as it was unnecessary and conflicts with move of tclLibraryPath to thread-local storage.
* * generic/tclEvent.c (TclInitSubsystems): Moved tclLibraryPath tohobbs2000-04-181-22/+30
| | | | | thread-local storage to prevent thread-related race condition. [Bug: 5033]
* Added Tcl_CreateThreadType and TCL_RETURN_THREAD_TYPEwelch2000-04-172-15/+27
| | | | macros for declaring the NewThread callback proc.
* * generic/tclBasic.c (Tcl_GetVersion): adjusted use of major/minorhobbs2000-04-151-11/+11
| | | | to not conflict with global decl on some systems [Bug: 2882]
* removed __stdcall decl for WIN32 case on ThreadCreatehobbs2000-04-131-3/+1
|
* Fixed Tcl_CreateThreadProc declarationwelch2000-04-101-1/+3
|
* * 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].
* * generic/tcl.h: removed specific typedef of Tcl_ThreadCreateProchobbs2000-04-101-3/+1
| | | | | for Windows as the build choked. It seems to be OK using the Unix fallback (void).
* * generic/tclBasic.c (Tcl_SetCommandInfo): comment fixhobbs2000-04-101-2/+2
|
* 2000-04-08 Andreas Kupries <a.kupries@westend.com>kupries2000-04-096-15/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Overall change: Definition of a public API for the creation of new threads. * generic/tclInt.h (line 1802f): Removed the definition of 'TclpThreadCreate'. (line 793f) Removed the definition of 'Tcl_ThreadCreateProc'. * generic/tcl.h (line 388f): Readded the definition of 'Tcl_ThreadCreateProc'. Added Win32 stuff send in by David Graveraux <davygrvy@bigfoot.com> to that too (__stdcall, ...). Added macros for the default stacksize and allowed flags. * generic/tcl.decls (line 1356f): Added definition of 'Tcl_CreateThread', slot 393 of the stub table. Two new arguments in the public API, for stacksize and flags. * win/tclWinThrd.c: * mac/tclMacThrd.c: Renamed TclpThreadCreate to Tcl_CreateThread, added handling of the stacksize. Flags are currently ignored. * unix/tclUnixThrd.c: See above, but handles joinable flag. Ignores the specified stacksize if the macro HAVE_PTHREAD_ATTR_SETSTACKSIZE is not defined. * generic/tclThreadTest.c (line 363): See below. * unix/tclUnixNotfy.c (line 210): Adapted to the changes above. Uses default stacksize and no flags now. * unic/tcl.m4 (line 382f): Added a check for 'pthread_attr_setstacksize' to detect platforms not implementing this feature of pthreads. If it is implemented, configure will define the macro HAVE_PTHREAD_ATTR_SETSTACKSIZE (See unix/tclUnixThrd.c too). * doc/Thread.3: Added Tcl_CreateThread and its arguments to the list of described functions. Removed stuff about not providing a public C-API for thread-creation.
* 2000-04-05 Andreas Kupries <a.kupries@westend.com>kupries2000-04-051-1/+2
| | | | | | | | * generic/tclIO.c (Tcl_UnstackChannel, line 1831): Forcing interest mask to the correct value after an unstack and re-initialization of the notifier via the watchProc. Without this the first fileevent after an unstack will come through and be processed, but no more. [Bug: ??].
* Fixed compilation w/out TCL_THREADSwelch2000-04-053-15/+29
|
* 2000-04-03 Andreas Kupries <a.kupries@westend.com>kupries2000-04-048-20/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * Overall change: Definition of public API's for the finalization of conditions and mutexes. [Bug: 4199]. * generic/tclInt.h: Removed definitions of TclFinalizeMutex and TclFinalizeCondition. * generic/tcl.decls: Added declarations of Tcl_MutexFinalize and Tcl_ConditionFinalize. * generic/tclThread.c: Renamed TclFinalizeMutex to Tcl_MutexFinalize. Renamed TclFinalizeCondition to Tcl_ConditionFinalize. * generic/tclNotify.c: Changed usage of TclFinalizeMutex to Tcl_MutexFinalize. * unix/tclUnixNotfy.c: * generic/tclThreadTest.c: Changed usages of TclFinalizeCondition to Tcl_ConditionFinalize. * generic/tcl.h: Added empty macros for Tcl_MutexFinalize and Tcl_ConditionFinalize, to be used when the core is compiled without threads. * doc/Thread.3: Added description the new API's.
* * generic/tclCmdIL.c (InfoVarsCmd): checked for non-NULL procPtrhobbs2000-04-041-2/+2
| | | | to prevent itcl info override crash [Bug: 4064]
* * generic/tclGet.c (Tcl_GetDouble): Added additional conditions toericm2000-03-311-2/+3
| | | | | | | | | | | | | | | | | error test (previously only errno was checked, but the return value of strtod() should be checked as well). [Bug: 4118]. * tests/exec.test: Added test for proper conversion of UTF data when used with "<< $dataWithUTF" on exec's. * unix/tclUnixPipe.c (TclpCreateTempFile): Added Tcl_UtfToExternalDString call, so that if there is UTF content in the string it will be properly converted to the system encoding before being written [Bug: 4030]. (TclpCreateTempFile): Added a check on the return value of tmpnam; some systems (Linux, for example) will start to return NULL after tmpnam has been called TMP_MAX times; not checking for this can have bad results (overwriting temp files, core dumps, etc.)
* * generic/tclBasic.c (Tcl_DeleteCommandFromToken): Added commentshobbs2000-03-315-19/+28
| | | | | | | | | | noting the need to pair ckalloc with ckfree. [Bug: 4262] * generic/tclInt.decls: * generic/tclIntPlatDecls.h: * generic/tclStubInit.c: * win/tclWin32Dll.c: removed TclWinSynchSpawn (vestige of Win32s support).