2004-07-21 Kevin Kenny * generic/tclBasic.c (DeleteInterpProc): * generic/tclLiteral.c (TclCleanupLiteralTable): * generic/tclInt.h: added a TclCleanupLiteralTable function, called from DeleteInterpProc, that frees internal representations of shared literals early when an interpreter is being deleted. This change corrects a number of memory mismanagement issues in the cases where the internal representation of one literal contains a reference to another, and avoids conditions such as resolved variable names referring to procedure and namespace contexts that no longer exist. [Bug 994838] 2004-07-20 Daniel Steffen * unix/Makefile.in: * win/Makefile.in: added 'install-private-headers' makefile target to allow optionally installing private tcl headers. [FR 922727] * macosx/Makefile: use new 'install-private-headers' target to install private headers into framework. [FR 922727] * unix/tclUnixFile.c (NativeMatchType): added support for readonly matching of user immutable files (where available). * macosx/tclMacOSXBundle.c: dynamically acquire address for CFBundleOpenBundleResourceMap symbol, since it is only present in full CoreFoundation on Mac OS X and not in CFLite on pure Darwin. 2004-07-19 Zoran Vasiljevic * win/tclwinThrd.c: redefined MASTER_LOCK to call TclpMasterLock. Fixes Bug #987967 2004-07-17 Vince Darley * generic/tclIOUtil.c: fix to rare 'cd' infinite loop in normalization with vfs [Bug 991420]. * tests/fileSystem.test: added test for above bug. * doc/FileSystem.3: clarified documentation of posix error codes in 'remove directory' FS proc - 'EEXIST' is used to signify a non-empty directory error (bug reported against tclvfs). 2004-07-16 Jeff Hobbs * unix/Makefile.in, unix/tcl.m4: move (C|LD)FLAGS after their * unix/configure.in, unix/configure: _DEFAULT to allow for env setting to override m4 switches. Move SC_MISSING_POSIX_HEADERS up and consolidate calls to limit redundancy in configure. (CFLAGS_WARNING): Remove -Wconversion (SC_ENABLE_THREADS): Set m4 to force threaded build when built against a threaded Tcl core. 2004-07-16 Andreas Kupries * generic/tclIOCmd.c (Tcl_FcopyObjCmd): Corrected a typo in the generation of error messages and simplified by reusing data in a variable instead of retrieving the string again. Fixes [Tcl SF Bug 835289]. * doc/OpenFileChnl.3: Added description of the behaviour of Tcl_ReadChars when its 'charsToRead' argument is set to -1. Fixes [Tcl SF Bug 934511]. * doc/CrtCommand.3: Added note that the arguments given to the command proc of a Tcl_CreateCommand are in utf8 since Tcl 8.1. Closing [Tcl SF Patch 414778]. * doc/ChnlStack.3: Removed the declaration that the interp argument to Tcl_(un)StackChannel can be NULL. This fixes [Tcl SF Bug 881220], reported by Marco Maggi . * tests/socket.test: Accepted two new testcases by Stuart Casoff checking that -server and -async don't go together [Tcl SF Bug 796534]. * unix/tclUnixNotfy.c (NotifierThreadProc): Accepted Joe Mistachkin's patch for [Tcl SF Bug 990500], properly closing the notifier thread when its exits. 2004-07-15 Andreas Kupries * unix/tclUnixThrd.c (TclpFinalizeMutex): Accepted Joe Mistachkin's patch for [Tcl SF Bug 990453], closing leakage of mutexes. They were not destroyed properly upon finalization. 2004-07-15 Andreas Kupries * generic/tclIO.h (CHANNEL_INCLOSE): New flag. Set in * generic/tclIO.c (Tcl_UnregisterChannel): 'Tcl_Close' while the * generic/tclIO.c (Tcl_Close): close callbacks are run. Checked in 'Tcl_Close' and 'Tcl_Unregister' to prevent recursive call of 'close' in the close-callbacks. This is a possible error made by implementors of virtual filesystems based on 'tclvfs', thinking that they have to close the channel in the close handler for the filesystem. 2004-06-14 Andreas Kupries * generic/tclIO.c: * generic/tclIO.h: * Not reverting, but #ifdef'ing the changes from May 19, 2004 out of the core. This removes the ***POTENTIAL INCOMPATIBILITY*** for channel drivers it introduced. This has become possible due to Expect gaining a BlockModeProc and now handling blockingg and non-blocking modes correctly. Thus [SF Tcl Bug 943274] is still fixed if a recent enough version of Expect is used. * doc/CrtChannel.3: Added warning about usage of a channel without a BlockModeProc. 2004-07-15 Andreas Kupries * generic/tclIOCmd.c (Tcl_PutsObjCmd): Added length check to the old depreceated newline syntax, to ensure that only "nonewline" is accepted. [Tcl SF Bug 985869], reported by Joe Mistachkin . 2004-07-15 Zoran Vasiljevic * generic/tclEvent.c (Tcl_Finalize): stuffed memory leak incurred by re-initializing of TSD slots after the last call to TclFinalizeThreadData (done from within Tcl_FinalizeThread()). We basically just repeat the TclFinalizeThreadData() once more before tearing down TSD keys in TclFinalizeSynchronization(). There should be more elaborate mechanism in place for handling such issues, based on thread cleanup handlers registered on the OS level. Such change requires much more work and would also require TIP because some visible parts of Tcl API would have to be modified. In the meantime, this will do. * generic/tclNotify.c (TclFinalizeNotifier): Added conditional notifier finalization based on the fact that an TclInitNotifier has been called for the current thread. This fixes the Tcl Bug #770053 again. Hopefully this time w/o unwanted side-effects. 2004-07-15 Kevin Kenny * generic/tclLiteral.c (TclReleaseLiteral): Removed unused variable 'codePtr' to silence a message from VC++. 2004-07-15 Miguel Sofer * generic/tclCompile.c (TclCompileScript): * generic/tclLiteral.c (TclReleaseLiteral): fix for [Bug 467523], which resurfaced with the latest changes. The previous strategy was to have special code in TclReleaseLiteral to handle the self-references generated by empty scripts. The new approach avoids the self-reference altogether, by having empty scripts return an unshared literal. 2004-07-15 Zoran Vasiljevic * generic/tclEvent.c (NewThreadProc): Backout of changes to fix the Tcl Bug #770053. See SF bugreport for more info. 2004-07-11 Miguel Sofer * generic/tclBasic.c (Tcl_EvalEx): leak fix by dgp, release objv[objectsUsed] on error. 2004-07-11 Miguel Sofer * generic/tclParse.c (Tcl_SubstObj): leak fix by dgp, release result on error. 2004-07-11 Donal K. Fellows * generic/tclNamesp.c (BuildEnsembleConfig): Don't forget to clean out references when deleting the hash table. * generic/tclDictObj.c (Tcl_DictObjRemoveKeyList): Oops, forgot to delete value object when removing the hash entry. [Bug 989093 in part] 2004-07-11 Miguel Sofer * generic/tclExecute.c (TEBC): fixed leak of expandNestList objs when there is an error while an expansion is in progress (code added at checkForCatch). 2004-07-11 Vince Darley * generic/tclIOUtil.c: fix to 'cd' bug when vfs is active [Bug 986944 in tclvfs project] - this bug recently introduced by some threading fixes. Need to work out how to add tests for this. 2004-07-10 Kevin Kenny * tests/clock.test (clock-2.11): Changed the test so that it isn't an infinite loop when run under valgrind on a slow virtual machine. Thanks to Miguel Sofer for the bug report. Also put in code to restore env(LC_TIME) after tests complete, silencing a warning from 'make TESTFLAGS="-debug 1" test'. 2004-07-08 Miguel Sofer * generic/tclBasic.c (DeleteInterpProc): reverted the modification of 3 days ago, as the leak of [Bug 983660] is now handled by the change in TclCleanupByteCode. * generic/tclCompile.c (TclCleanupByteCode): let each bytecode remove its references to literals at interp deletion, without updating the dying literal table. * generic/tclLiteral.c (TclDeleteLiteralTable): with the above change to TclCleanupByteCode, this function now removes a single reference to the literal object and cleans up its own structures. 2004-07-08 Kevin Kenny * win/tclWinInit.c (AppendEnvironment): Silenced a compilation warning about a type mismatch. 2004-07-07 Miguel Sofer * generic/tclCompile.c (TclCompileScript): fix for [Bug 458361]. Single-word scripts are compiled with an unshared cmdName to avoid shimmering between bytecode and cmdName reps. 2004-07-07 Don Porter * generic/tclCmdMZ.c (TclMergeReturnOptions): Simplified logic and removed potential memory leak. [Bug 986257]. 2004-07-07 Donal K. Fellows * tools/man2help2.tcl (setTabs, IPmacro): Added support for the more advanced *roff macros used in Tk's doc/bind.n * generic/tclObj.c (TclInitObjSubsystem): Declare all current object types. 2004-07-06 Don Porter * tests/cmdMZ.test (cmdMZ-return-2.17): Added a test that a word containing backslash-quoted value is treated correctly. * generic/tclCompile.c (TclWordKnownAtCompileTime): [Bug 986196] Corrected flaw above and the flaw that caused TCL_TOKEN_SIMPLE_WORDs to have their original word value copied ( "{a b}" ) rather than the actual value ( "a b" ). Thanks to Kevin Kenny for report and tests. 2004-07-06 Kevin B. Kenny * tests/cmdMZ.test (cmdMZ-return-2.15,cmdMZ-return-2.16): Added a test that a return code containing spaces is correctly returned. 2004-07-06 Donal K. Fellows * tools/man2html2.tcl (IPmacro, setTabs): Added support for the more advanced *roff macros used in Tk's doc/bind.n 2004-07-05 Miguel Sofer * generic/tclBasic.c (DeleteInterpProc): fix for [Bug 983660], found by pspjuth. Tear down the global namespace before freeing the interp handle, to allow the bytecodes to free their non-shared literals. * generic/tclLiteral.c (TclReleaseLiteral): moved special code for self-ref so that it is also used for non-shared literals. Possible bug found by inspection. 2004-07-03 Miguel Sofer * generic/tclExecute.c (ExprRoundFunc): * tests/expr-old.test (39.1): added support for wide integers to round(); [Bug 908375], reported by Hemang Lavana. 2004-07-03 Miguel Sofer * generic/tclCompile.h: * generic/tclInt.decls: * generic/tclIntDecls.h: * generic/tclStubInit.c: Moved declaration of TclCompEvalObj() from tclCompile.h to the internal stubs table, for compiler experimentation. 2004-07-02 Jeff Hobbs * generic/regcomp.c (stid): correct minor pointer size error * generic/tclPipe.c (TclCreatePipeline): applied TIP #202 patch * doc/exec.n, tests/exec.test: that adds 2>@1 as a special case redirection of stderr to the result output. 2004-07-02 Kevin B. Kenny * tests/io.test: Changed several tests to run the event loop rather than just calling [update] periodically, avoiding intermittent failures (usually in io-29.32) that stemmed from unreaped processes on Windows. * tests/winPipe.test (winpipe-1.11): Fixed a bug that caused test to fail if the path name of the working directory contained whitespace [Bug 678430] 2004-07-01 Vince Darley * tests/fileSystem.test: Added test for [Bug 970529] 2004-07-01 Donal K. Fellows * win/README.binary, win/README: Updated references to Tcl and Tk 8.4 to point to 8.5 instead. Thanks to Theo Verelst for spotting this. * generic/tcl.h: Added note to help prevent those changes from getting missed in the future. * doc/Namespace.3, doc/load.n, doc/Limit.3: Typo fixes and remove duplicate documentation. [Bug 983146] 2004-06-30 Don Porter * tests/fileSystem.test: Minor correction to new fileSystem-9.X tests so that they clean up temporary directories correctly. 2004-06-30 Vince Darley * doc/filename.n: clarified behaviour concerning trailing slashes in filenames [Bug 971976] * win/tclWinFile.c: * tests/fileSystem.test: fix and tests for [Bug 979879] 2004-06-30 Donal K. Fellows TIP#188 IMPLEMENTATION * doc/string.n, tests/string.test: Add 'wideinteger' to things * generic/tclCmdMZ.c (Tcl_StringObjCmd): that can be tested for with the [string is] subcommand. [Patch 940915, by Kevin Kenny] 2004-06-29 Don Porter * win/tclWinInit.c: Corrected reference counting flaw in recent changes. Thanks to Pat Thoyts. [Bug 981893]. 2004-06-29 Vince Darley * win/tclWin32Dll.c: fix to compilation with VC++ 5.2 2004-06-29 Donal K. Fellows * library/safe.tcl: Make sure that the temporary variable is local to the namespace and not inadvertently global. [Bug 981733] 2004-06-24 Donal K. Fellows * tests/unixNotfy.test: Modified constraints so that testing with a threaded tclsh (not tcltest) will not hang. 2004-06-23 Don Porter * generic/tclThreadStorage.c: Corrected type casting errors that led to calculation of a negative index value, thus accesses outside the threadStorageCache array, thus memory corruption. Crash observed on Mac OS X platform. 2004-06-23 Joe Mistachkin * generic/tclThread.c: Implements platform independent thread storage * generic/tclThreadStorage.c: mechanism and fixes associated bugs on platforms where there is limited thread local storage space (Win98/WinNT4). [Patch 976496] * generic/tclInt.decls: * generic/tclIntDecls.h: Added thread storage functions to the * generic/tclStubInit.c: internal stubs table. * unix/Makefile.in: * unix/configure: * unix/tcl.m4: * win/makefile.vc: * win/rules.vc: * win/Makefile.in: Modified the unix, VC++, and Cygwin build systems * win/configure: to include the new "tclThreadStorage.c" and the new * win/tcl.m4: USE_THREAD_STORAGE define. 2004-06-23 Pat Thoyts * tests/io.test: Added -force to 18.1 and 18.2. This was failing on WinXP. * tests/winFCmd.test: Added a cleanup to winFCmd-16.11 to avoid a failure in 16.12. * tests/eofchar.data: Added -kb option to ensure a binary checkout to win32 systems. This fixes a failure in io-61.1 * win/makefile.vc: fix for bug #977369 about launching tclsh to generate a tclConfig.sh with the nmake build system 2004-06-23 Kevin B. Kenny * tests/winDde.test (createChildProcess): Added a 200-ms delay (with the event loop live) when shutting down the test DDE server process, With the delay in place, nuisance failures of tests winDde-4.2, -6.5, and -6.6 appear to be much less frequent. [Bug #957449] 2004-06-23 Donal K. Fellows * tests/*.test: Standardize use of platform constraints. * unix/tclUnixInit.c (GetStackSize, TclpCheckStackSpace): * unix/tclUnixThrd.c (TclpThreadGetStackSize): Added code to check whether the C stack is about to be exceeded, from [Patch 746378] by Joe Mistachkin but with substantial revisions. 2004-06-22 Kevin Kenny * generic/tclEvent.c (NewThreadProc): Fixed broken build on Windows caused by missing TCL_THREAD_CREATE_RETURN. * tests/stack.test (stack-3.1): Corrected nuisance error in threaded builds. 2004-06-22 Zoran Vasiljevic * generic/tclEvent.c: * generic/tclInt.h: * unix/tclUnixNotfy.c: * unix/tclUnixThrd.c: * win/tclWinThrd.c: [Bug #770053]. See bug report for more information about what it does. * tests/unixNotfy.test: rewritten to use tcltest::threadReap to gracefully wait for the test thread to exit. Otherwise we got a race condition with main thread exiting before the test thread. This exposed the long-standing Tcl lib issue with resource garbage-collection on application exit. 2004-06-21 Mo DeJong * win/tclWin32Dll.c (DllMain, _except_dllmain_detach_handler, TclpCheckStackSpace, _except_checkstackspace_handler, TclWinCPUID, _except_TclWinCPUID_detach_handler): * win/tclWinChan.c (Tcl_MakeFileChannel, _except_makefilechannel_handler): * win/tclWinFCmd.c (DoRenameFile, _except_dorenamefile_handler, DoCopyFile, _except_docopyfile_handler): Rework pushing of exception handler function pointer so that compiling with gcc -O3 works. Remove empty function call to avoid compiler warning. Mark the DllMain function as noinline to avoid compiler error from duplicated asm labels in generated code. 2004-06-21 Donal K. Fellows * generic/tclThreadAlloc.c (Ptr2Block): Rewrote so as to maximize the chance of detecting and reporting a memory inconsistency without relying on things being consistent. [Bug 975895] 2004-06-18 Don Porter * tests/load.test: Relaxed strictness of error message matching for test load-2.3 so that it will pass on Mac OSX. * generic/tclEncoding.c: Static TclFindEncodings -> FindEncodings. * generic/tclInt.h: Updated TclpFindExecutable() so that failed * generic/tclUtil.c: attempts to find the executable are saved * unix/tclUnixFile.c: just as successful finds are. [Patch 966053] * unix/tclUnixTest.c: 2004-06-18 Kevin B. Kenny * tests/winFCmd.test (winFCmd-16.12): Changed test to compute the target directory, so as not to fail if the user's HOME isn't the root. 2004-06-19 Daniel Steffen * unix/tcl.m4: autoconf 2.5 fixes in Darwin section. * unix/configure: autoconf-2.57 2004-06-18 Donal K. Fellows * unix/tclUnixInit.c (localeTable): Added some more locale to encoding mapping info from Jim Huang * generic/tclInt.h (PendingObjData,TclFreeObjMacro,etc): * generic/tclObj.c (TclFreeObj): Added scheme for making TclFreeObj() avoid blowing up the C stack when freeing up very large object trees. [Bug 886231] * win/tclWinInit.c (SetDefaultLibraryDir): Fix logic, simplify and add comments. 2004-06-17 Don Porter * generic/tclObj.c: Added missing space in panic message. * win/tclWinInit.c: Inform [tclInit] about the default library directory via the ::tclDefaultLibrary variable. This should correct a problem with my 2004-06-11 commit. Better solutions still in the works. Thanks to Joe Mistachkin for pointing out the breakage. 2004-06-16 Don Porter * doc/library.n: Moved variables ::auto_oldpath and * library/auto.tcl: ::unknown_pending into ::tcl namespace. * library/init.tcl: [Bugs 808319, 948794] 2004-06-15 Donal K. Fellows * doc/binary.n: Added some notes to the documentation of the 'a' format to address the point raised in [RFE 768852]. 2004-06-15 Jeff Hobbs * unix/tclConfig.sh.in (TCL_EXTRA_CFLAGS): set to @CFLAGS@, which is the configure-time CFLAGS. Addendum to m4 change on 2004-05-26. 2004-06-14 Kevin Kenny * win/Makefile.in: Corrected compilation flags for tclPkgConfig.c so that it doesn't require Stubs. * generic/tclBasic.c (Tcl_CreateInterp): Removed comment stating that TclInitEmbeddedConfigurationInformation needs Stubs; with the change above, the comment is now erroneous. 2004-06-11 Don Porter * doc/Encoding.3: Removed bogus claims about tcl_libPath. * generic/tclInterp.c (Tcl_Init): Stopped setting the tcl_libPath variable. [tclInit] can get all its directories without it. * tests/unixInit.test: Modified test code that made use of tcl_libPath variable. * unix/tclUnixInit.c: Stopped setting the tclDefaultLibrary variable, execept on the Mac OS X platform with HAVE_CFBUNDLE. In that configuration we should seek some way to make use of the TIP 59 facilities and get rid of that usage of tclDefaultLibrary as well. * generic/tclInterp.c: Updated [tclInit] to make $env(TCL_LIBRARY) an absolute path, and to include the scriptdir,runtime configuration value on the search path for init.tcl. * unix/tclUnixInit.c: The routines Tcl_Init() and TclSourceRCFile() * win/tclWinInit.c: had identical implementations for both win and * generic/tclInterp.c: unix. Moved to a single generic implementation. * generic/tclMain.c: * library/init.tcl: * generic/tclInitScript.h (removed): * unix/Makefile.in: * win/tcl.dsp: * unix/configure.in: Updated TCL_PACKAGE_PATH value to * win/configure.in: handle --libdir configuration. * unix/configure.in: autoconf-2.57 * win/configure.in: * generic/tclBasic.c (Tcl_CreateInterp): Moved call to TclInitEmbeddedConfigurationInformation() earlier in Tcl_CreateInterp() so that other parts of interp creation and initialization may access and use the config values. 2004-06-11 Kevin Kenny * win/tclAppInit.c: Restored the 'setargv' procedure when compiling with mingw. Apparently, the command line parsing in mingw doesn't work as well as that in vc++, and the result was (1) that winPipe-8.19 failed, and (2) that 'make test' would work at all only with TESTFLAGS='-singleproc 1'. [Bug 967195] 2004-06-10 Zoran Vasiljevic * generic/tclIOUtil.c: removed forceful setting of the private cached current working directory rep from within the Tcl_FSChdir(). We delegate this task to the Tcl_FSGetCwd() which does this task anyway. The relevant code is still present but disabled temporarily until the change proves correct. The Tcl test suite passes all test with the given change so I suppose it is good enough. 2004-06-10 Don Porter * unix/tclUnixInit.c (TclpInitLibraryPath): Disabled addition of * win/tclWinInit.c (TclpInitLibraryPath): relative-to-executable directories to the library search path. A first step in reform of Tcl's startup process. ***POTENTIAL INCOMPATIBILITY*** Attempts to directly run ./tclsh or ./tcltest out of a build directory will either fail, or will make use of an installed script library in preference to the one in the source tree. Use `make shell` or `make runtest` instead. * tests/unixInit.test: Modified tests to suit above changes. * generic/tclPathObj.c: Corrected [file tail] results when operating on a path produced by TclNewFSPathObj(). [Bug 970529] 2004-06-09 Zoran Vasiljevic * generic/tclIOUtil.c: partially corrected [Bug 932314]. Also, corrected return values of Tcl_FSChdir() to reflect those of the underlying platform-specific call. Originally, return codes were mixed with those of Tcl. 2004-06-08 Miguel Sofer * generic/tclCompile.c: * generic/tclExecute.c: handle warning [Bug 969066] 2004-06-08 Donal K. Fellows * generic/tclHash.c (RebuildTable): Move declaration of variable so it is only declared when it is used. [Bug 969068] 2004-06-07 Donal K. Fellows * doc/lsearch.n: Added correct option to example. [Bug 968219] 2004-06-05 Kevin B. Kenny * generic/tcl.h: Corrected Tcl_WideInt declarations so that the mingw build works again. * generic/tclDecls.h: Changes to the tests for * generic/tclInt.decls: clock frequency in * generic/tclIntDecls.h: Tcl_WinTime * generic/tclIntPlatDecls.h: so that any clock frequency * generic/tclPlatDecls.h: is accepted provided that * generic/tclStubInit.c: all CPU's in the system share * tests/platform.test (platform-1.3): a common chip, and hence, * win/tclWin32Dll.c (TclWinCPUID): presumably, a common clock. * win/tclWinTest.c (TestwincpuidCmd) This change necessitated a * win/tclWinTime.c (Tcl_GetTime): small burst of assembly code to read CPU ID information, which was added as TclWinCPUID in the internal Stubs. To test this code in the common case of a single-processor machine, a 'testwincpuid' command was added to tclWinTest.c, and a test case in platform.test. Thanks to Jeff Godfrey and Richard Suchenwirth for reporting this bug. [Bug #976722] 2004-06-04 Don Porter * generic/tcl.h: Restored #include to tcl.h, rejecting the "fix" for "Bug" 945570. Tcl_FSSeek() needs the values of SEEK_SET, etc. and too many extensions rely on tcl.h providing stdio.h for them. 2004-06-02 Jeff Hobbs * win/tclWinFile.c (TclpFindExecutable): when using GetModuleFileNameA (Win9x), convert from CP_ACP to WCHAR then convert back to utf8. Adjunct to 2004-04-07 fix. 2004-06-02 David Gravereaux * tests/winPipe.test (winpipe-6.1): blocking set to 1 before closing to ensure we get an exitcode. The windows pipe channel driver doesn't differentiate between a blocking and non-blocking close just yet, but will soon. Part of [Bug 947693] 2004-06-02 Vince Darley * doc/file.n: fix to documentation of 'file volumes' (Bug 962435) 2004-06-01 David Gravereaux * win/makefile.vc: check for either MSDEVDIR or MSVCDIR being in the environment, for VC7. [Bug 942214] * generic/tclIO.c (Tcl_SetChannelOption): -buffersize wasn't understanding hexidecimal notation nor was reporting number conversion errors. The behavior to silently ignore settings outside the acceptable range of Tcl_SetChannelBufferSize (<10 or >1M) is unchanged. This silent ignoring behavior might be up for review soon.. 2004-05-30 David Gravereaux * win/tclWinPipe.c: * win/tclWinPort.h: Reworked the win implementation of Tcl_WaitPid to support exitcodes in the 'signed short' range. Even though this range is non-portable, it is valid on windows. Detection of exception codes are now more accurate. Previously, an application that exited with ExitProcess((DWORD)-1); was improperly reported as exiting with SIGABRT. 2004-05-30 Donal K. Fellows * generic/tclInterp.c: Added comments describing the purposes of each function in the limit implementation and rewrote the names of some non-public functions for greater clarity of purpose. * doc/interp.n: Added note about what happens when a limited interpreter creates a slave interpreter. * doc/Limit.3: Added manual page for the resource limit subsystem's C API. [Bug 953903] 2004-05-29 Joe English * doc/global.n, doc/interp.n, doc/lrange.n: Fix minor markup errors. 2004-05-28 Donal K. Fellows * doc/*.n: Added examples to many (too many to list) more man pages. 2004-05-25 Miguel Sofer * generic/tclExecute.c: * generic/tclVar.c: using (ptrdiff_t) instead of (int) casting to correct compiler warnings [Bug 961657], reported by Bob Techentin. 2004-05-27 Kevin B. Kenny * tests/clock.test: Added a single test for the presence of %G in [clock format], and conditioned out the clock-10.x series if they're all going to fail because of a broken strftime() call. [Bug 961714] 2004-05-27 Donal K. Fellows * generic/tclHash.c (CompareStringKeys): Added #ifdef to allow people to instruct this function to use strcmp(). [FRQ 951168] * generic/tclVar.c: Moved declarations into #if guards so they only happen when required. * unix/tclUnixPort.h: Guard declaration of strtod() so it is only enabled when we don't have a declaration in stdlib.h * unix/tclUnixThrd.c (Tcl_CreateThread): Added declarations * unix/tclUnixTest.c (AlarmHandler): and casts so that * unix/tclUnixChan.c (TtyModemStatusStr): all functions are * generic/tclScan.c (Tcl_ScanObjCmd): defined before use * generic/tclDictObj.c (InvalidateDictChain): and no cross-type * generic/tclCmdMZ.c (Tcl_StringObjCmd): uses are performed. The overall effect is to make building with gcc with the additional flags -Wstrict-prototypes -Wmissing-prototypes produce no increase in the total number of warnings (except for main(), which is undeclared for traditional reasons.) 2004-05-26 Jeff Hobbs * unix/Makefile.in: Rework configure ordering to TCL_LINK_LIBS, * unix/tcl.m4: ENABLE_SHARED, CONFIG_CFLAGS, & ENABLE_SYMBOLS * unix/configure: before TCL_EARLY_FLAGS and TCL_64BIT_FLAGS * unix/configure.in: (about 400 lines earlier) in configure.in. This forces CFLAGS configuration to be done before many tests, which is needed for 64-bit builds and may affect other builds. Also make CONFIG_CFLAGS append to CFLAGS directly instead of using EXTRA_CFLAGS, and have LDFLAGS append to any existing value. [Bug #874058] * unix/dltest/Makefile.in: change EXTRA_CFLAGS to DEFS 2004-05-26 Don Porter * library/tcltest/tcltest.tcl: Correction to debug prints and testing * library/tcltest/pkgIndex.tcl: if TCLTEST_OPTIONS value. Corrected * tests/tcltest.test: double increment of numTestFiles in -singleproc 1 configurations. Updated tcltest-19.1 to tcltest 2.1 behavior. Corrected tcltest-25.3 to not falsely report a failure in tcltest.test. Bumped to tcltest 2.2.6. [Bugs 960560, 960926] 2004-05-25 Jeff Hobbs * doc/http.n (http::config): add -urlencoding option (default utf-8) * library/http/http.tcl: that specifies encoding conversion of * library/http/pkgIndex.tcl: args for http::formatQuery. Previously * tests/http.test: undefined, RFC 2718 says it should be utf-8. 'http::config -urlencoding {}' returns previous behavior, which will throw errors processing non-latin-1 chars. Bumped http package to 2.5.0. 2004-05-25 Donal K. Fellows * generic/tclInterp.c (DeleteScriptLimitCallback): Move all deletion of script callback hash table entries to happen here so the entries are correctly removed at the right time. [Bug 960410] 2004-05-25 Miguel Sofer * docs/global.n: added details for qualified variable names [Bug 959831] 2004-05-25 Miguel Sofer * generic/tclNamesp.c (Tcl_FindNamespaceVar): * tests/namespace.test (namespace-17.10-12): reverted commit of 2004-05-23 and removed the tests, as it interferes with the varname resolver and there are apps that break (AlphaTk). A fix will have to wait for Tcl9. * generic/tclVar.c: Caching of namespace variables disabled: no simple way was found to avoid interfering with the resolver's idea of variable existence. A cached varName may keep a variable's name in the namespace's hash table, which is the resolver's criterion for existence. * tests/namespace.c (namespace-17.10): testing for interference between varname caching and name resolver. 2004-05-25 Kevin Kenny * tests/winFCmd.test: Correct test for the presence of a CD-ROM so that it doesn't misdetect some other sort of filesystem with a write-protected root as being a CD-ROM drive. [Bug 918267] 2004-05-25 Don Porter * tests/winPipe.test: Protect against path being set * tests/unixInit.test: Unset path when done. * tests/unload.test (unload-3.1): Verify [pkgb_sub] does not exist. Delete interps when done. * tests/stringComp.test: stop re-use of string.test test names * tests/regexpComp.test: stop re-use of regexp.test test names * tests/namespace.test (namespace-46.3): Verify [p] does not exist. * tests/http.test: Clear away the custom [bgerror] when done. * tests/io.test: Take care to use namespace variables. * tests/autoMkindex.test (autoMkindex-5.2): Use variable "result" that gets cleaned up. * tests/exec.test: Clean up the "path" array. * tests/interp.test (interp-9.3): Initialize res, so prior values cannot make the test fail. * tests/execute.test (execute-8.1): Updated to remove the trace set on ::errorInfo . When left in place, that trace can cause later tests to fail. 2004-05-25 Donal K. Fellows * generic/tclBasic.c: Removed references to Tcl_RenameCommand from * generic/tcl.h: comments. [Bug 848440, second part] * tests/fCmd.test: Rewrote tests that failed consistently on NFS so they either succeed (through slightly more liberal matching of the results) or are constrained to not run. [Bug 931312] * doc/bgerror.n: Use idiomatic open flags for working with log files. [Bug 959602] 2004-05-24 Jeff Hobbs * generic/tclExecute.c (VerifyExprObjType): use GET_WIDE_OR_INT to properly have tclIntType used for smaller values. This corrects TclX bug 896727 and any other 3rd party extension that created math functions but was not yet WIDE_INT aware in them. 2004-05-24 Donal K. Fellows * generic/tclInterp.c (TclInitLimitSupport): Made limits work on platforms where sizeof(void*)!=sizeof(int). [Bug 959193] 2004-05-24 Miguel Sofer * doc/set.n: accurate description of name resolution process, referring to namespace.n for details [Bug 959180] 2004-05-23 Miguel Sofer * generic/tclNamesp.c (Tcl_FindNamespaceVar): [Bug 959052] fixed, insuring that no "zombie" variables are found. * generic/tclVar.c (TclLookupSimpleVar): comments re [Bug 736729] (predecessor of [Bug 959052]) removed. * tests/namespace.test: added tests 17.10-12 The patch modifies non-documented behaviour, and passes every test in the testsuite. However, scripts relying on the old behaviour may break. Note that the only behaviour change concerns the creative writing of unset variables. More precisely, which variable will be created when neither a namespace variable nor a global variable by that name exists, as defined by [info vars]. The new behaviour is that the namespace resolution process deems a variable to exist exactly when [info vars] finds it - ie, either it has value, or else it was "fixed" by a call to [variable]. Note: this patch was removed on 2002-05-25. 2004-05-22 Miguel Sofer * generic/tclVar.c (TclObjLookupVar, TclObjUnsetVar2): fix for new (in tcl8.4) exteriorisations of [Bug 736729] due to the use of tclNsVarNameType obj types. Reenabling the use of this objType ("VAR ref absolute" benchmark down to 66 ms, from 230). Added comments in TclLookupSimpleVar explaining my current understanding of [Bug 736729]. 2004-05-22 Miguel Sofer * generic/tclVar.c: fix for [Bug 735335]. The use of tclNsVarNameType objs is still disabled, pending resolution of [Bug 736729]. 2004-05-21 Miguel Sofer * tests/namespace.test (namespace-41.3): removed the {knownBug} constraint: [Bug 231259] is closed since nov 2001, and the fix of [Bug 729692] (INST_START_CMD) makes the test succeed. 2004-05-21 Donal K. Fellows * generic/tclExecute.c (TclExecuteByteCode): Move a few declarations a short distance so pre-C99 compilers can cope. Also fix so TCL_COMPILE_DEBUG path compiles... 2004-05-21 Miguel Sofer * generic/tclExecute.c (TclExecuteByteCode): reorganised TEBC automatic variables, defining them in tight blocks instead of at the function level. This has three purposes: - it simplifies the analysis of individual instructions - it is preliminary work to the non-recursive engine - it allows a better register allocation by the optimiser; under gcc3.3, this results in up to 10% runtime in some tests 2004-05-20 Donal K. Fellows * generic/tclInterp.c (TclLimitRemoveAllHandlers): * generic/tclBasic.c (DeleteInterpProc): * tests/interp.test (interp-34.7): Ensure that all limit callbacks are deleted when their interpreters are deleted. [Bug 956083] 2004-05-19 Kevin B. Kenny * win/tclWinFile.c (TclpMatchInDirectory): fix for an issue where there was a sneak path from Tcl_DStringFree to SetErrorCode(0). The result was that the error code could be reset between a call to FindFirstFileEx and the check of its status return, leading to a bizarre error return of {POSIX unknown {No error}}. (Found in unplanned test - no incident logged at SourceForge.) 2004-05-19 Donal K. Fellows * tests/interp.test (interp-34.3): Rewrite this test to see if a time limit can catch a tight bytecode loop, a maximally aggressive denial-of-service attack. * generic/tclInterp.c (Tcl_LimitCheck): Fix the sense of checks to see whether a time limit has been extended. * tests/*.test: Many minor fixes, including ensuring that every test is run (so constraints control whether the test is doing anything) and making sure that constraints are always set using the API instead of poking around inside tcltest's internal datastructures. Also got rid of all trailing whitespace lines from the test suite! 2004-05-19 Andreas Kupries * generic/tclIO.c: Fixed [SF Tcl Bug 943274]. This is the same problem as * generic/tclIO.h: [SF Tcl Bug 462317], see ChangeLog entry 2001-09-26. The fix done at that time is incomplete. It is possible to get around it if the actual read operation is defered and not executed in the event handler itself. Instead of tracking if we are in an read caused by a synthesized fileevent we now track if the OS has delivered a true event = actual data and bypass the driver if a read finds that there is no actual data waiting. The flag is cleared by a short or full read. ***POTENTIAL INCOMPATIBILITY*** for channel drivers. 2004-05-17 Vince Darley * generic/tclPathObj.c: fix to (Bug 956063) in 'file dirname'. * tests/cmdAH.test: added test for this bug. * doc/FileSystem.3: better documentation of refCount requirements of some FS functions (Bug 956126) 2004-05-19 Donal K. Fellows * generic/tclTest.c (TestgetintCmd): Made the tests in get.test check * tests/get.test: Tcl_GetInt() since the core now avoids that function. 2004-05-18 Kevin B. Kenny * compat/strftime.c (_fmt, ISO8601Week): * doc/clock.n: * tests/clock.test: Major rework to the handling of ISO8601 week numbers. Now passes all the %G and %V test cases on Windows, Linux and Solaris [Bugs #500285, #500389, and #852944] 2004-05-18 Donal K. Fellows * doc/append.n, doc/upvar.n: Added example. 2004-05-18 David Gravereaux * win/makefile.vc: now generates a tclConfig.sh from Pat Thoyts [Patch 909911] 2004-05-18 Donal K. Fellows * doc/lsearch.n: Improve clarity (based on [Patch 955361] by Peter Spjuth) * tools/man2help2.tcl (macro,SHmacro): Added support for subsection (.SS) header macros. * doc/interp.n: Added user documentation for the TIP#143 resource limits and some examples. * generic/tclInterp.c (Tcl_LimitCheck, Tcl_LimitTypeReset): Reset the limit-exceeded flag when removing a limit. 2004-05-18 Miguel Sofer * generic/tclExecute.c (TclExecuteByteCode): added comments to classify the variables according to their use in TEBC. 2004-05-17 Donal K. Fellows * doc/global.n, doc/uplevel.n: Added an example. * tests/info.test (info-3.1): Corrected test result back to what it used to be in Tcl 7.* now that command counts are being correctly kept. * generic/tclExecute.c (TEBC:INST_START_CMD): Make sure that the command-count is always advanced. Allows TIP#143 limits to tell that work is being done. * doc/list.n: Updated example to fit with the unified format. * doc/seek.n: Added some examples. 2004-05-17 Vince Darley * win/tclWinFile.c: * tests/cmdAH.test: fix to (Bug 954263) where 'file executable' was case-sensitive. 2004-05-17 Donal K. Fellows * doc/OpenFileChnl.3: Documented type of 'offset' argument to Tcl_Seek was wrong. [Bug 953374] 2004-05-16 Miguel Sofer * generic/tclExecute.c (TclExecuteByteCode): remove one level of indirection for compiledLocals addressing. 2004-05-16 Miguel Sofer * generic/tclExecute.c (INST_CALL_FUNC1): bugfix; restored (DE)CACHE_STACK_INFO pair around the call - the user defined math function could cause a recursive call to TEBC. 2004-05-16 Miguel Sofer * generic/tclBasic.c (Tcl_DeleteInterp): * generic/tclExecute.c (INST_START_CMD): interp deletion now modifies the compileEpoch, eliminating the need for the check for interp deletion in INST_START_CMD. 2004-05-16 Miguel Sofer * generic/tclCompile.h: * generic/tclCompile.c: * generic/tclExecute.c: changed implementation of {expand}, last chance while in alpha as ... ***POTENTIAL INCOMPATIBILITY*** Scripts precompiled with ProComp under previous tcl8.5a versions may malfunction due to changed instruction numbers for INST_LIST_INDEX_IMM, INST_LIST_RANGE_IMM and INST_START_CMD. 2004-05-14 Kevin B. Kenny * generic/tclInt.decls: Promoted TclpLocaltime and TclpGmtime * generic/tclIntDecls.h: from Unix-specific stubs to the generic * generic/tclIntPlatDecls.h: internal Stubs table. Reran 'genstubs' * generic/tclStubInit.c: * unix/tclUnixPort.h: * generic/tclClock.c: Changed a buggy 'GMT' timezone specification to the correct 'GMT0'. [Bug #922848] * unix/tclUnixThrd.c: Moved TclpGmtime and TclpLocaltime to unix/tclUnixTime.c where they belong. * unix/tclUnixTime.c (TclpGmtime, TclpLocaltime, TclpGetTimeZone, ThreadSafeGMTime [removed], ThreadSafeLocalTime [removed], SetTZIfNecessary, CleanupMemory): Restructured to make sure that the same mutex protects all calls to localtime, gmtime, and tzset. Added a check in front of those calls to make sure that the TZ env var hasn't changed since the last call to tzset, and repeat tzset if necessary. [Bug #942078] Removed a buggy test of the Daylight Saving Time information in 'gettimeofday' in favor of applying 'localtime' to a known value. [Bug #922848] * tests/clock.test (clock-3.14): Added test to make sure that changes to $env(TZ) take effect immediately. * win/tclWinTime.c (TclpLocaltime, TclpGmtime): Added porting layer for 'localtime' and 'gmtime' calls. 2004-05-14 Miguel Sofer * generic/tclExecute.c: * generic/tclCompile.h: the math functions receive a pointer to top of the stack (tosPtr) instead of the execution environment (eePtr). First step towards a change in the execution stack management - it is now only used within TEBC. 2004-05-13 Donal K. Fellows TIP#143 IMPLEMENTATION * generic/tclExecute.c (TclCompEvalObj, TclExecuteByteCode): * generic/tclBasic.c (TclEvalObjvInternal): Enable limit checking. * generic/tclInterp.c (Tcl_Limit*): Public limit API. * generic/tcl.decls: * tests/interp.test: Basic tests of command limits. * doc/binary.n: TIP#129 IMPLEMENTATION [Patch 858211] * generic/tclBinary.c: Note that the test suite probably has many more * tests/binary.test: failures now due to alterations in constraints. 2004-05-12 Miguel Sofer Optimisations for INST_START_CMD [Bug 926164]. * generic/tclCompile.c (TclCompileScript): avoid emitting INST_START_CMD as the first instruction in a bytecoded Tcl_Obj. It is not needed, as the checks are done before calling TEBC. * generic/tclExecute.c (TclExecuteByteCode): runtime peephole optimisation: check at INST_POP if the next instruction is INST_START_CMD, in which case we fall through. 2004-05-11 Donal K. Fellows * doc/split.n, doc/join.n: Updated examples and added more. 2004-05-11 Vince Darley * doc/glob.n: documented behaviour of symbolic links with 'glob -types d' (Bug 951489) 2004-05-11 Donal K. Fellows * doc/scan.n: Updated the examples to be clearer about their relevance to the scan command. 2004-05-10 Donal K. Fellows * doc/scan.n: Added examples. 2004-05-10 David Gravereaux * win/tclWinPipe.c (BuildCommandLine): Moved non-obvious appending logic to outside the loop and added commentary for its purpose. Also use the existence of contents in the linePtr rather than the scratch DString post the append, as this more clear. (TclpCreateProcess): When under NT, with no console, and executing a DOS application, the path priming does not need an ending space as BuildCommandLine() will do this for us. 2004-05-08 Vince Darley * generic/tclFileName.c: * generic/tclIOUtil.c: remove some compiler warnings on MacOS X. 2004-05-07 Chengye Mao * win/tclWinPipe.c: refixed bug 789040 re-entered in rev 1.41. Let's be careful and don't re-enter previously fixed bugs. 2004-05-08 Donal K. Fellows * doc/format.n: Added examples. 2004-05-07 Miguel Sofer * doc/unset.n: added upvar.n to the "see also" list 2004-05-07 Reinhard Max * generic/tclEncoding.c: * tests/encoding.test: added support and tests for translating embedded null characters between real nullbytes and the internal representation on input/output (Bug #949905). 2004-05-07 Vince Darley * generic/tclFileName.c: * generic/tclIOUtil.c: * generic/tclFileSystem.h: * tests/fileSystem.test: fix for [Bug 943995], in which vfs- registered root volumes were not handled correctly as glob patterns in all circumstances. 2004-05-06 Miguel Sofer * generic/tclInt.h: * generic/tclObj.c (TclFreeObj): made TclFreeObj use the new macro TclFreeObjMacro(), so that the allocation and freeing of Tcl_Obj is defined in a single spot (the macros in tclInt.h), with the exception of the TCL_MEM_DEBUG case. The #ifdef logic for the corresponding macros has been reformulated to make it clearer. 2004-05-05 Donal K. Fellows * doc/break.n, doc/continue.n, doc/for.n, doc/while.n: More examples. 2004-05-05 Don Porter * tests/unixInit.test (unixInit-2.10): Test correction for Mac OSX. Be sure to consistently compare normalized path names. Thanks to Steven Abner (tauvan). [Bug 948177] 2004-05-05 Donal K. Fellows * doc/CrtObjCmd.3: Remove reference to Tcl_RenameCommand; there is no such API. [Bug 848440] 2004-05-05 David Gravereaux * win/tclWinSock.c (SocketEventProc) : connect errors should fire both the readable and writable handlers because this is how it works on UNIX [Bug 794839] * generic/tclEncoding.c (TclFinalizeEncodingSubsystem): FreeEncoding(systemEncoding); moved to before the hash table itereation as it was causing a double free attempt under some conditions. * win/coffbase.txt: Added the tls extension to the list of preferred load addresses. 2004-05-04 Jeff Hobbs * tests/fileSystem.test (filesystem-1.39): replace 'file volumes' * tests/fileName.test (filename-12.9,10): lindex with direct C:/ hard-coded because A:/ was being used and that is empty for most. * tests/winFCmd.test (winFCmd-16.12): test volumerelative $HOME 2004-05-04 Don Porter * generic/tclAlloc.c: Make sure Tclp*Alloc* routines get * generic/tclInt.h: declared in the TCL_MEM_DEBUG and * generic/tclThreadAlloc.c: TCL_THREADS configuration. [Bug 947564] * tests/tcltest.test: Test corrections for Mac OSX. Thanks to Steven Abner (tauvan). [Bug 947440] 2004-05-04 Donal K. Fellows * generic/tclEvent.c (TclSetLibraryPath): Suppress a warning. 2004-05-03 Andreas Kupries * Applied [SF Tcl Patch 868853], fixing a mem leak in TtySetOptionProc. Report and Patch provided by Stuart Cassoff . 2004-05-03 Miguel Sofer * generic/tclProc.c (TclCreateProc): comments corrected. 2004-05-03 Miguel Sofer * generic/tclCompile.c (TclCompileScript): setting the compilation namespace outside of the loop. 2004-05-03 Miguel Sofer * generic/tclCompile.c: * generic/tclInt.h: reverted fix for [Bug 926445] of 2004-04-02, restoring TCL_ALIGN to the header file. Todd Helfter reported that the macro is required by tbcload. 2004-05-03 Kevin Kenny * win/tclWin32Dll.c (TclpCheckStackSpace): * tests/stack.test (stack-3.1): Fix for undetected stack overflow in TclReExec on Windows. [Bug 947070] 2004-05-03 Don Porter * library/init.tcl: Corrected unique prefix matching of interactive command completion in [unknown]. [Bug 946952] 2004-05-02 Miguel Sofer * generic/tclProc.c (TclObjInvokeProc): * tests/proc.test (proc-3.6): fix for bad quoting of multi-word proc names in error messages [Bug 942757] 2004-04-30 Donal K. Fellows * doc/glob.n, doc/incr.n, doc/set.n: More examples. * doc/if.n, doc/rename.n, doc/time.n: 2004-04-30 Don Porter * generic/tclInt.h: Replaced Kevin Kenny's temporary * generic/tclThreadAlloc.c: fix for Bug 945447 with a cleaner, more permanent replacement. 2004-04-30 Kevin B. Kenny * generic/tclThreadAlloc.c: Added a temporary (or so I hope!) inclusion of "tclWinInt.h" to avoid problems when compiling on Win32-VC++ with --enable-threads. [Bug 945447] 2004-04-30 Donal K. Fellows * doc/puts.n: Added a few examples. 2004-04-29 Don Porter * tests/execute.test (execute-8.2): Avoid crashes when there is limited system stack space (threads-enabled). 2004-04-28 Miguel Sofer * doc/global.n: * doc/upvar.n: * generic/tclVar.c (ObjMakeUpvar): * tests/upvar.test (upvar-8.11): * tests/var.test (var-3.11): Avoid creation of unusable variables: [Bug 600812] [TIP 184]. 2004-04-28 Donal K. Fellows * doc/lsearch.n: Fixed fault in documentation of -index option [943448] 2004-04-26 Don Porter * unix/tclUnixFCmd.c (TclpObjNormalizePath): Corrected improper positioning of returned checkpoint. [Bug 941108] 2004-04-26 Donal K. Fellows * doc/open.n, doc/close.n: Updated (thanks to David Welton) to be clearer about pipeline errors and added example to open(n) that shows simple pipeline use. [Patches 941377,941380] * doc/DictObj.3: Added warning about the use of Tcl_DictObjDone and an example of use of iteration. [Bug 940843] * doc/Thread.3: Reworked to remove references to testing interfaces and instead promote the use of the Thread package. [Patch 932527] Also reworked and reordered the page for better readability. 2004-04-25 Don Porter * generic/tcl.h: Removed obsolete declarations and #include's. * generic/tclInt.h: [Bugs 926459, 926486] 2004-04-24 David Gravereaux * win/tclWin32Dll.c (DllMain): Added DisableThreadLibraryCalls() for the DLL_PROCESS_ATTACH case. We're not interested in knowing about DLL_THREAD_ATTACH, so disable the notices. 2004-04-24 Daniel Steffen * generic/tclPort.h: * macosx/Makefile: * unix/Makefile.in: followup on tcl header reform [FR 922727]: removed use of relative #include paths in tclPort.h to allow installation of private headers outside of tcl source tree; added 'unix' dir to compiler header search path; add newly required tcl private headers to Tcl.framework on Mac OSX. 2004-04-23 Andreas Kupries * generic/tclIO.c (Tcl_SetChannelOption): Fixed [SF Tcl Bug 930851]. When changing the eofchar we have to zap the related flags to prevent them from prematurely aborting the next read. 2004-04-25 Vince Darley * generic/tclPathObj.c: fix to [Bug 940281]. Tcl_FSJoinPath will now always return a valid Tcl_Obj when the input is valid. * generic/tclIOUtil.c: fix to [Bug 931823] for a more consistent Tcl_FSPathSeparator() implementation which allows filesystems not to implement their Tcl_FSFilesystemSeparatorProc if they wish to use the default '/'. Also fixed associated memory leak seen with, e.g., tclvfs package. * doc/FileSystem.3: documented Tcl_FSJoinPath return values more clearly, and Tcl_FSFilesystemSeparatorProc requirements. 2004-04-23 David Gravereaux * win/tclWin32Dll.c: Removed my mistake from 4/19 of adding an exit handler to TclWinInit. TclWinEncodingsCleanup called from TclFinalizeFilesystem does the Tcl_FreeEncoding for us. * win/tclWinChan.c (Tcl_MakeFileChannel) : Case for CloseHandle returning zero and not throwing a RaiseException(EXCEPTION_INVALID_HANDLE) now being done. 2004-04-22 David Gravereaux * generic/tclEvent.c: TclSetLibraryPath's use of caching the stringrep of the pathPtr object to TclGetLibraryPath called from another thread was ineffective if the original's stringrep had been invalidated as what happens when it gets muted to a list. * win/tclWinTime.c: If the Tcl_ExitProc (StopCalibration) is called from the stack frame of DllMain's PROCESS_DETACH, the wait operation should timeout and continue. * generic/tclInt.h: * generic/tclThread.c: * generic/tclEvent.c: * unix/tclUnixThrd.c: * win/tclWinThrd.c: Provisions made so masterLock, initLock, allocLock and joinLock mutexes can be recovered during Tcl_Finalize. 2004-04-22 Donal K. Fellows * doc/switch.n: Reworked the examples to be more systematically named and to cover some TIP#75 capabilities. * doc/cd.n: Documentation clarification from David Welton. * doc/exec.n: Added some examples, Windows ones from Arjen Markus and Unix ones by myself. 2004-04-21 Donal K. Fellows * doc/Hash.3: Added note to Tcl_{First,Next}HashEntry docs that deleting the element they return is supported (and is in fact the only safe update you can do to the structure of a hashtable while an iteration is going over it.) * doc/bgerror.n: Added example from David Welton. [Patch 939473] * doc/after.n: Added examples from David Welton. [Patch 938820] 2004-04-19 David Gravereaux * win/tclWin32Dll.c: Added an exit handler in TclWinInit() so tclWinTCharEncoding could be freed during Tcl_Finalize(). * generic/tclEncoding.c: Added FreeEncoding(systemEncoding) in TclFinalizeEncodingSubsystem because its ref count was incremented in TclInitEncodingSubsystem. 2004-04-19 Donal K. Fellows * doc/read.n: Added example from David Welton. [Patch 938056] 2004-04-19 Kevin B. Kenny * generic/tclObj.c (Tcl_GetDoubleFromObj) Corrected "short circuit" conversion of int to double. Reported by Jeff Hobbs on the Tcl'ers Chat. 2004-04-16 Donal K. Fellows * doc/lreplace.n, doc/lrange.n, doc/llength.n: More examples for * doc/linsert.n, doc/lappend.n: the documentation. 2004-04-16 Vince Darley * doc/FileSystem.3: Corrected documentation of Tcl_FSUtime, and the corresponding filesystem driver Tcl_FSUtimeProc. [Bug 935838] 2004-04-16 Donal K. Fellows * doc/socket.n: Added example from [Patch 936245]. * doc/gets.n: Added example based on [Patch 935911]. 2004-04-15 Donal K. Fellows * generic/tclClock.c (Tcl_ClockObjCmd): Minor fault in a [clock clicks] error message. 2004-04-07 Jeff Hobbs * win/tclWinInit.c (TclpSetInitialEncodings): note that WIN32_CE is also a unicode platform. * generic/tclEncoding.c (TclFindEncodings, Tcl_FindExecutable): * generic/tclInt.h: Correct handling of UTF * unix/tclUnixInit.c (TclpInitLibraryPath): data that is actually * win/tclWinFile.c (TclpFindExecutable): "clean", allowing the * win/tclWinInit.c (TclpInitLibraryPath): loading of Tcl from paths that contain multi-byte chars on Windows [Bug 920667] * win/configure: define TCL_LIB_FLAG, TCL_BUILD_LIB_SPEC, * win/configure.in: TCL_LIB_SPEC, TCL_PACKAGE_PATH in tclConfig.sh. 2004-04-06 Don Porter Patch 922727 committed. Implements three changes: * generic/tclInt.h: Reworked the Tcl header files into a clean * unix/tclUnixPort.h: hierarchy where tcl.h < tclPort.h < tclInt.h * win/tclWinInt.h: and every C source file should #include * win/tclWinPort.h: at most one of those files to satisfy its declaration needs. tclWinInt.h and tclWinPort.h also better organized so that tclWinPort.h includes the Windows implementation of cross-platform declarations, while tclWinInt.h makes declarations that are available on Windows only. * generic/tclBinary.c (TCL_NO_MATH): Deleted the generic/tclMath.h * generic/tclMath.h (removed): header file. The internal Tcl * macosx/Makefile (PRIVATE_HEADERS): header, tclInt.h, has a * win/tcl.dsp: #include directly, and file external to Tcl needing libm should do the same. * win/Makefile.in (WIN_OBJS): Deleted the win/tclWinMtherr.c file. * win/makefile.bc (TCLOBJS): It's a vestige from matherr() days * win/makefile.vc (TCLOBJS): gone by. * win/tcl.dsp: * win/tclWinMtherr.c (removed): End Patch 922727. * tests/unixInit.test (unixInit-3.1): Default encoding on Darwin systems is utf-8. Thanks to Steven Abner (tauvan). [Bug 928808] 2004-04-06 Donal K. Fellows * tests/cmdAH.test (cmdAH-18.2): Added constraint because access(...,X_OK) is defined to be permitted to be meaningless when running as root, and OSX exhibits this. [Bug 929892] 2004-04-02 Miguel Sofer * generic/tclCompile.c: * generic/tclInt.h: removed the macro TCL_ALIGN() from tclInt.h, replaced by the static macro ALIGN() in tclCompile.c [Bug 926445] 2004-04-02 Miguel Sofer * generic/tclCompile.h: removed redundant #ifdef _TCLINT [Bug 928415], reported by tauvan. 2004-04-02 Don Porter * tests/tcltest.test: Corrected constraint typos: "nonRoot" -> "notRoot". Thanks to Steven Abner (tauvan). [Bug 928353] 2004-04-01 Don Porter * generic/tclInt.h: Removed obsolete tclBlockTime* declarations. [Bug 926454] 2004-04-01 Vince Darley * generic/tclIOUtil.c: Fix to privately reported vfs bug with 'glob -type d -dir . *' across a vfs boundary. No tests for this are currently possible without effectively moving tclvfs into Tcl's test suite. 2004-03-31 Don Porter * doc/msgcat.n: Clarified message catalog file encodings. [Bug 811457] * library/msgcat/msgcat.tcl: Updated internals to make use of [dict]s to store message catalog data and to use [source -encoding utf-8] to access catalog files. Thanks to Michael Sclenker. [Patch 875055, RFE 811459] Corrected [mcset] to be able to successfully set a translation to the empty string. [mcset $loc $src {}] was incorrectly set the $loc translation of $src back to $src. Also changed [ConvertLocale] to minimally require a non-empty "language" part in the locale value. If not, an error raised prompts [Init] to keep looking for a valid locale value, or ultimately fall back on the "C" locale. [Bug 811461]. * library/msgcat/pkgIndex.tcl: Bump to msgcat 1.4.1. 2004-03-30 Donal K. Fellows * generic/tclHash.c (HashStringKey): Cleaned up. This function is not faster, but it is a little bit clearer. * generic/tclLiteral.c (HashString): Applied logic from HashObjKey. * generic/tclObj.c (HashObjKey): Rewrote to fix fault which hashed every single-character object to the same hash bucket. The new code is shorter, simpler, clearer, and (happily) faster. 2004-03-30 Miguel Sofer * generic/tclExecute.c (TEBC): reverting to the previous method for async tests in TEBC, as the new method turned out to be too costly. Async tests now run every 64 instructions. 2004-03-30 Miguel Sofer * generic/tclCompile.c: New instruction code INST_START_CMD * generic/tclCompile.h: that allows checking the bytecode's * generic/tclExecute.c: validity [Bug 729692] and the interp's * tests/interp.test (18.9): readyness [Bug 495830] before running * tests/proc.test (7.1): the command. It also changes the * tests/rename.test (6.1): mechanics of the async tests in TEBC, doing it now at command start instead of every 16 instructions. 2004-03-30 Vince Darley * generic/tclFileName.c: Fix to Windows glob where the pattern is * generic/tclIOUtil.c: a volume relative path or a network * tests/fileName.test: share [Bug 898238]. On windows 'glob' * tests/fileSystem.test: will now return the results of 'glob /foo/bar' and 'glob \\foo\\bar' as 'C:/foo/bar', i.e. a correct absolute path (rather than a volume relative path). Note that the test suite does not test commands like 'glob //Machine/Shared/*' (on a network share). 2004-03-30 Vince Darley * generic/tclPathObj.c: Fix to filename bugs recently * tests/fileName.test: introduced [Bug 918320]. 2004-03-29 Don Porter * generic/tclMain.c (Tcl_Main, StdinProc): Append newline only * tests/basic.test (basic-46.1): to incomplete scripts as part of multi-line script construction. Do not add an extra trailing newline to the complete script. [Bug 833150] 2004-03-28 Miguel Sofer * generic/tclCompile.c (TclCompileScript): corrected possible segfault when a compilation returns TCL_OUTLINE_COMPILE after having grown the compile environment [Bug 925121]. 2004-03-27 Miguel Sofer * doc/array.n: added documentation for trace-realted behaviour of 'array get' [Bug 449893] 2004-03-26 Don Porter * README: Bumped version number to 8.5a2 to * tools/tcl.wse.in: distinguish HEAD of CVS development * unix/configure.in: from the recent 8.5a1 release. * unix/tcl.spec: * win/README.binary: * win/configure.in: * unix/configure: autoconf-2.57 * win/configure: 2004-03-26 Vince Darley * generic/tclPathObj.c: Fix to Windows-only volume relative * tests/fileSystem.test: path normalization. [Bug 923586]. Also fixed another volume relative bug found while testing. 2004-03-24 Donal K. Fellows * generic/tclNamesp.c (NsEnsembleImplementationCmd): Fix messed up handling of strncmp result which just happened to work in some libc implementations. [Bug 922752] 2004-03-23 Donal K. Fellows * doc/StringObj.3: Inverted the sense of the documentation of how the bytes parameter is documented to match behaviour. [Bug 921464] 2004-03-19 Kevin B. Kenny * compat/strtoll.c: * compat/strtoull.c: * generic/tclIntDecls.h: * generic/tclMain.c: * generic/tclObj.c: * win/tclWinDde.c: * win/tclWinReg.c: * win/tclWinTime.c: Made HEAD build on Windows VC++ again. 2004-03-19 Donal K. Fellows * generic/tclIntDecls.h: Made HEAD build on Solaris again by applying fix recommended by Don Porter. 2004-03-18 Reinhard Max * generic/tclIntDecls.h: Removed TclpTime_t. It wasn't really needed, * generic/tclInt.h: but caused warnings related to * generic/tclInt.decls: strict aliasing with GCC 3.3. * generic/tclClock.c: * generic/tclDate.c: * generic/tclGetDate.y: * win/tclWinTime.c: * unix/tclUnixTime.c: * generic/tclNamesp.c: Added temporary pointer variables to work * generic/tclStubLib.c: around warnings related to * unix/tclUnixChan.c: strict aliasing with GCC 3.3. * unix/tcl.m4: Removed -Wno-strict-aliasing. 2004-03-18 Daniel Steffen Removed support for Mac OS Classic platform [Patch 918142] * README: * compat/string.h: * doc/Encoding.3: * doc/FileSystem.3: * doc/Init.3: * doc/Macintosh.3 (removed): * doc/OpenFileChnl.3: * doc/OpenTcp.3: * doc/SourceRCFile.3: * doc/Thread.3: * doc/clock.n: * doc/exec.n: * doc/fconfigure.n: * doc/file.n: * doc/filename.n: * doc/glob.n: * doc/open.n: * doc/puts.n: * doc/resource.n (removed): * doc/safe.n: * doc/source.n: * doc/tclvars.n: * doc/unload.n: * generic/README: * generic/tcl.decls: * generic/tcl.h: * generic/tclAlloc.c: * generic/tclBasic.c: * generic/tclCmdAH.c: * generic/tclDate.c: * generic/tclDecls.h: * generic/tclFCmd.c: * generic/tclFileName.c: * generic/tclGetDate.y: * generic/tclIOCmd.c: * generic/tclIOUtil.c: * generic/tclInitScript.h: * generic/tclInt.decls: * generic/tclInt.h: * generic/tclIntDecls.h: * generic/tclIntPlatDecls.h: * generic/tclMain.c: * generic/tclMath.h: * generic/tclNotify.c: * generic/tclPathObj.c: * generic/tclPlatDecls.h: * generic/tclPort.h: * generic/tclStubInit.c: * generic/tclTest.c: * generic/tclThreadJoin.c: * library/auto.tcl: * library/init.tcl: * library/package.tcl: * library/safe.tcl: * library/tclIndex: * mac/AppleScript.html (removed): * mac/Background.doc (removed): * mac/MW_TclAppleScriptHeader.h (removed): * mac/MW_TclAppleScriptHeader.pch (removed): * mac/MW_TclBuildLibHeader.h (removed): * mac/MW_TclBuildLibHeader.pch (removed): * mac/MW_TclHeader.h (removed): * mac/MW_TclHeader.pch (removed): * mac/MW_TclHeaderCommon.h (removed): * mac/MW_TclStaticHeader.h (removed): * mac/MW_TclStaticHeader.pch (removed): * mac/MW_TclTestHeader.h (removed): * mac/MW_TclTestHeader.pch (removed): * mac/README (removed): * mac/bugs.doc (removed): * mac/libmoto.doc (removed): * mac/morefiles.doc (removed): * mac/porting.notes (removed): * mac/tclMac.h (removed): * mac/tclMacAETE.r (removed): * mac/tclMacAlloc.c (removed): * mac/tclMacAppInit.c (removed): * mac/tclMacApplication.r (removed): * mac/tclMacBOAAppInit.c (removed): * mac/tclMacBOAMain.c (removed): * mac/tclMacChan.c (removed): * mac/tclMacCommonPch.h (removed): * mac/tclMacDNR.c (removed): * mac/tclMacEnv.c (removed): * mac/tclMacExit.c (removed): * mac/tclMacFCmd.c (removed): * mac/tclMacFile.c (removed): * mac/tclMacInit.c (removed): * mac/tclMacInt.h (removed): * mac/tclMacInterupt.c (removed): * mac/tclMacLibrary.c (removed): * mac/tclMacLibrary.r (removed): * mac/tclMacLoad.c (removed): * mac/tclMacMath.h (removed): * mac/tclMacNotify.c (removed): * mac/tclMacOSA.c (removed): * mac/tclMacOSA.r (removed): * mac/tclMacPanic.c (removed): * mac/tclMacPkgConfig.c (removed): * mac/tclMacPort.h (removed): * mac/tclMacProjects.sea.hqx (removed): * mac/tclMacResource.c (removed): * mac/tclMacResource.r (removed): * mac/tclMacSock.c (removed): * mac/tclMacTclCode.r (removed): * mac/tclMacTest.c (removed): * mac/tclMacThrd.c (removed): * mac/tclMacThrd.h (removed): * mac/tclMacTime.c (removed): * mac/tclMacUnix.c (removed): * mac/tclMacUtil.c (removed): * mac/tcltkMacBuildSupport.sea.hqx (removed): * tests/all.tcl: * tests/binary.test: * tests/cmdAH.test: * tests/cmdMZ.test: * tests/fCmd.test: * tests/fileName.test: * tests/fileSystem.test: * tests/interp.test: * tests/io.test: * tests/ioCmd.test: * tests/load.test: * tests/macFCmd.test (removed): * tests/osa.test (removed): * tests/resource.test (removed): * tests/socket.test: * tests/source.test: * tests/unload.test: * tools/cvtEOL.tcl (removed): * tools/genStubs.tcl: * unix/Makefile.in: * unix/README: * unix/mkLinks: * unix/tcl.spec: * win/README.binary: * win/tcl.dsp: 2004-03-17 Donal K. Fellows * doc/lsearch.n: Improved examples on the advanced capabilities of lsearch (with the right options, set element removal can be done) following discussion on tkchat. 2004-03-16 Don Porter * doc/catch.n: Compiled [catch] no longer fails to catch syntax errors. Removed the claims in the documentation that it does. * doc/return.n: Updated example to use [dict merge]. 2004-03-16 Jeff Hobbs * unix/configure, unix/tcl.m4: add -Wno-strict-aliasing for GCC to suppress useless type puning warnings. 2004-03-16 Donal K. Fellows * doc/file.n: *roff formatting fix. [Bug 917171] 2004-03-15 David Gravereaux * win/tclWinNotify.c: Fixed a mistake where the return value of MsgWaitForMultipleObjectsEx for "a message is in the queue" wasn't accurate. I removed the check on the case result==(WAIT_OBJECT_0 + 1) This was having the error of falling into GetMessage and waiting there by accident, which wasn't alertable through Tcl_AlertNotifier. I'll do some more study on this and try to find-out why. 2004-03-12 Donal K. Fellows IMPLEMENTATION OF TIP#163 * generic/tclDictObj.c (DictMergeCmd): This is based on work by Joe * tests/dict.test (dict-20.*): English in Tcl [FRQ 745851] * doc/dict.n: but not exactly. 2004-03-10 Kevin B. Kenny * generic/tclGetDate.y (TclGetDate): Fix so that [clock scan -gmt true] uses the GMT base date instead of the local one. [Bug 913513] * tests/clock.test: Added test cases for wrong ISO8601 week number [Bug 500285] and wrong GMT base date [Bug 913513]. Several tests still fail on Windows, and these are actual faults in [clock scan]. Fix is still pending. * generic/tclDate.c: Regenerated. 2004-03-08 Vince Darley * generic/tclFileName.c: Fix to 'glob -path' near the root * tests/fileName.test: of the filesystem. [Bug 910525] 2004-03-08 Don Porter * generic/tclParse.c (TclParseInit): Modified TclParseInit so * generic/tclTest.c ([testexprparser]): that Tcl_Parse initialization conforms to documented promised about what fields will not be modified by what Tcl_Parse* routines. [Bug 910595] 2004-03-05 Mo DeJong * win/configure: Regen. * win/configure.in: Check for define of MWMO_ALERTABLE in winuser.h. * win/tclWinPort.h: If MWMO_ALERTABLE is not defined in winuser.h then define it. This is needed for Mingw. 2004-03-05 Kevin B. Kenny * generic/tclTest.c: Modified TesteventObjCmd to use a Tcl_QueuePosition in place of an 'int' for the enumerated queue position, to avoid a compiler warning on SGI. (Bug #771960). 2004-03-05 Kevin B. Kenny * tests/registry.test: Applied fix from Patch #910174 to make the test for an English-language system include any country code, rather than just English-United States.1252. Thanks to Pat Thoyts for the changes. 2004-03-04 Pat Thoyts * tests/registry.test: Applied fixed from #766159 to skip two tests on Win98 that depend on a Unicode registry (NT specific). 2004-03-04 Don Porter * generic/tclInt.h (TclParseInit): Factored the common code * generic/tclParse.c (TclParseInit): for initializing a Tcl_Parse * generic/tclParseExpr.c: struct into one routine. 2004-03-04 Pat Thoyts * library/reg/pkgIndex.tcl: Added TIP #100 support to the * win/tclWinReg.c: registry package (patch #903831) This provides a Windows test of the TIP #100 mechanism and a sample to show how unloading an extension can be done. 2004-03-04 Donal K. Fellows * unix/dltest/pkgua.c: Fix minor syntax problems. [Bug 909288] 2004-03-03 Jeff Hobbs *** 8.5a1 TAGGED FOR RELEASE *** * changes: updated for 8.5a1 2004-03-03 David Gravereaux * win/makefile.vc: default environment variable for VC++ is %MSDevDir% not %MSVCDir%, although vcvars32.bat sets both. * win/tclWinNotify.c (Tcl_WaitForEvent) : Allows an idling notifier to service "Asynchronous Procedure Calls" from its wait state. Only useful for extension authors who decide they might want to try "completion routines" with WriteFileEx(), as an example. From experience, I recommend that "completion ports" should be used instead as the execution of the callbacks are more managable. 2004-03-01 Jeff Hobbs * README: update patchlevel to 8.5a1 * generic/tcl.h: * tools/tcl.wse.in, tools/tclSplash.bmp: * unix/configure, unix/configure.in, unix/tcl.spec: * win/README.binary, win/configure, win/configure.in: * unix/tcl.m4: update HP-11 build libs setup 2004-03-01 Don Porter * unix/tcl.m4 (SC_CONFIG_CFLAGS): Allow 64-bit enabling on IRIX64-6.5* systems. [Bug 218561] * unix/configure: autoconf-2.57 * generic/tclTrace.c (TclCheckInterpTraces): The TIP 62 * generic/tclTest.c (TestcmdtraceCmd): implementation introduced a * tests/trace.test (trace-29.10): bug by testing the CallFrame level instead of the iPtr->numLevels level when deciding what traces created by Tcl_Create(Obj)Trace to call. Added test to expose the error, and made fix. [Request 462580] 2004-02-28 Vince Darley * tests/fileSystem.test: fix to Tcl Bug 905163. * tests/fileName.test: fix to Tcl Bug 904705. * doc/{various}.n: removed 'the the' typos. 2004-02-26 Daniel Steffen * macosx/Makefile: fixed copyright year in Tcl.framework Info.plist 2004-02-25 Don Porter * tests/basic.test: Made several tests more robust to the * tests/cmdMZ.test: list-quoting of path names that might * tests/exec.test: contain Tcl-special chars like { or [. * tests/io.test: Should help us sort out Tcl Bug 554068. * tests/pid.test: * tests/socket.test: * tests/source.test: * tests/unixInit.test: 2004-02-25 Donal K. Fellows * generic/tclLoad.c (Tcl_LoadObjCmd): Missing dereference caused segfault with non-loadable extension. [Bug 904307] * unix/tclUnixChan.c (TcpGetOptionProc): Stop memory leak with very long hostnames. [Bug 888777] 2004-02-25 Pat Thoyts * win/tclWinDde.c: Removed some gcc warnings - except for the -Wconversion warning for GetGlobalAtomName. gcc is just wrong about this. 2004-02-24 Donal K. Fellows IMPLEMENTATION OF TIP#100 FROM GEORGIOS PETASIS * generic/tclLoad.c (Tcl_UnloadObjCmd): Implementation. * tests/unload.test: Test suite. * unix/dltest/pkgua.c: Helper for test suite. * doc/unload.n: Documentation. Also assorted changes (mostly small) to several other files. 2004-02-23 Donal K. Fellows * generic/regc_locale.c (cclass): Buffer was having its size reset instead of being released => memleak. [Bug 902562] 2004-02-21 Donal K. Fellows * generic/tclLoad.c (Tcl_LoadObjCmd): Fixed memory leak due to an improper error exit route. 2004-02-20 David Gravereaux * win/tclWinSock.c (SocketThreadExitHandler): Don't call TerminateThread when WaitForSingleObject returns a timeout. Tcl_Finalize called from DllMain will pause all threads. Trust that the thread will get the close notice at a later time if it does ever wake up before being cleaned up by the system anyway. 2004-02-17 Don Porter * doc/tcltest.n: * library/tcltest/tcltest.tcl: Changed -verbose default value to {body error} so that detailed information on unexpected errors in tests is provided by default, even after the fix for [Bug 725253] 2004-02-17 Jeff Hobbs * tests/unixInit.test (unixInit-7.1): * unix/tclUnixInit.c (TclpInitPlatform): ensure the std fds exist to prevent crash condition [Bug #772288] 2004-02-17 Donal K. Fellows * generic/tclCompCmds.c (TclCompileSwitchCmd): Bozo mistake in memory releasing order when in an error case. [Bug 898910] 2004-02-16 Jeff Hobbs * generic/tclTrace.c (TclTraceExecutionObjCmd) (TclTraceCommandObjCmd): fix possible mem leak in trace info. 2004-02-12 Mo DeJong * win/tclWinInit.c (AppendEnvironment): Use the tail component of the passed in lib path instead of just blindly using lib+4. That worked when lib was "lib/..." but fails for other values. Thanks go to Patrick Samson for pointing this out. 2004-02-10 David Gravereaux * win/nmakehlp.c: better macro grepping logic. 2004-02-07 David Gravereaux * win/makefile.vc: * win/rules.vc: * win/tcl.rc: * win/tclsh.rc: Added an 'unchecked' option to the OPTS macro so a core built with symbols can be linked to the non-debug enabled C run-time. As per discussion with Kevin Kenny. Called like this: nmake -af makefile.vc OPTS=unchecked,symbols This clarifies the meaning of the 'g' naming suffix to mean only that the binary requires the debug enabled C run-time. Whether the binary contains symbols or not is a different condition. 2004-02-06 Don Porter * doc/clock.n: Removed reference to non-existent [file ctime]. 2004-02-05 David Gravereaux * docs/tclvars.n: Added clarification of the tcl_platform(debug) var that it only refers to the flavor of the C run-time, and not whether the core contains symbols. 2004-02-05 Don Porter * generic/tclFileName.c (SkipToChar): Corrected CONST and type-casting issues that caused compiler warnings. 2004-02-04 Don Porter * generic/tclCmdAH.c (StoreStatData): Removed improper refcount decrement of the varName parameter. This error was causing segfaults following test cmdAH-28.7. * library/tcltest/tcltest.tcl: Corrected references to non-existent $name variable in [cleanupTests]. [Bug 833637] 2004-02-03 Don Porter * library/tcltest/tcltest.tcl: Corrected parsing of single command line argument (option with missing value) [Bug 833910] * library/tcltest/pkgIndex.tcl: Bump to version 2.2.5. 2004-02-02 David Gravereaux * generic/tclIO.c (Tcl_Ungets): Fixes improper filling of the channel buffer. This is the buffer before the splice. [Bug 405995] 2004-02-01 David Gravereaux * tests/winPipe.test: more pass-thru commandline verifications. * win/tclWinPipe.c (BuildCommandLine): Special case quoting for '{' not required by the c-runtimes's parse_cmdline(). * win/tclAppInit.c: Removed our custom setargv() in favor of the work provided by the c-runtime. [Bug 672938] * win/nmakehlp.c: defensive techniques to avoid static buffer overflows and a couple envars upsetting invokations of cl.exe and link.exe. [Bug 885537] -------- * tests/winPipe.test: Added proof that BuildCommandLine() is not doing the "N backslashes followed a quote -> insert N * 2 + 1 backslashes then a quote" rule needed for the crt's parse_cmdline(). * win/tclWinPipe.c: Fixed BuildCommandLine() to pass the new cases. 2004-01-30 David Gravereaux * win/makefile.vc: Use the -GZ compiler switch when building for symbols. This is supposed to emulate the release build better to avoid hiding problems that only show themselves in a release build. 2004-01-29 Vince Darley * generic/tclPathObj.c: fix to [Bug 883143] in file normalization 2004-01-29 Vince Darley * doc/file.n: * generic/tclFCmd.c * generic/tclTest.c * library/init.tcl * mac/tclMacFile.c * tests/fileSystem.test: fix to [Bug 886352] where 'file copy -force' had inconsistent behaviour wrt target files with insufficient permissions, particular from vfs->native fs. Behaviour of '-force' is now always consistent (and now consistent with behaviour of 'file delete -force'). Added new tests and documentation and cleaned up the 'simplefs' test filesystem. * generic/tclIOUtil.c * unix/tclUnixFCmd.c * unix/tclUnixFile.c * win/tclWinFile.c: made native filesystems more robust to C code which asks for mount lists. * generic/tclPathObj.c: fix to [Bug 886607] removing warning/error with some compilers. 2004-01-28 Donal K. Fellows * generic/tclObj.c (SetBooleanFromAny): Rewrite to do more efficient string->bool conversion. Many other minor whitespace/style fixes to this file too. 2004-01-27 David Gravereaux * win/nmakehlp.c: Use '.\nul' as the sourcefile name instead of 'nul' so VC 5.2 doesn't try searching the path for it and failing with a possible dialogbox popping up about having to add a CD to an empty drive. Also added a SetErrorMode() call to disable any dialogs that cl.exe or link.exe might create. [Bug 885537] 2004-01-22 Vince Darley * doc/file.n: clarified documentation of 'file system' [Bug 883825] * tests/fCmd.test: improved test result in failure case. 2004-01-22 Vince Darley * tests/fileSystem.test: 3 new tests * generic/tclPathObj.c: fix to [Bug 879555] in file normalization. * doc/filename.n: small clarification to Windows behaviour with filenames like '.....', 'a.....', '.....a'. * generic/tclIOUtil.c: slight improvement to native cwd caching on Windows. 2004-01-21 David Gravereaux * doc/Panic.3: Mentions of 'panic' and 'panicVA' removed from the documentation. 2004-01-21 Vince Darley * doc/FileSystem.3: * generic/tcl.decls: * generic/tclCmdAH.c * generic/tclDecls.h * generic/tclFCmd.c * generic/tclFileName.c * generic/tclFileSystem.h * generic/tclIOUtil.c * generic/tclInt.decls * generic/tclInt.h * generic/tclIntDecls.h * generic/tclPathObj.c * generic/tclStubInit.c * generic/tclTest.c * mac/tclMacFile.c * tests/fileName.test * tests/fileSystem.test * tests/winFCmd.test * unix/tclUnixFile.c * win/tclWin32Dll.c * win/tclWinFCmd.c * win/tclWinFile.c * win/tclWinInt.h Three main issues accomplished: (1) cleaned up variable names in the filesystem code so that 'pathPtr' is used throughout. (2) applied a round of filesystem optimisation with better handling and caching of relative and absolute paths, requiring fewer conversions. (3) clarifications to the documentation, particularly regarding the acceptable refCounts of objects. Some new tests added. Tcl benchmarks show a significant improvement over 8.4.5, and on Windows typically a small improvement over 8.3.5 (Unix still appears to require optimisation). TCL_FILESYSTEM_VERSION_2 introduced, but for internal use only. There should be no public incompatibilities from these changes. Thanks to dgp for extensive testing. 2004-01-19 David Gravereaux * win/tclWinPipe.c (Tcl_WaitPid): Fixed a thread-safety problem with the process list. The delayed cut operation after the wait was going stale by being outside the list lock. It now cuts within the lock and does a locked splice for when it needs to instead. [Bug 859820] 2004-01-18 Donal K. Fellows * generic/tclCompile.c, generic/tclCompile.h: Two new opcodes, INST_LIST_INDEX_IMM and INST_LIST_RANGE_IMM, that have operand(s) of new type OPERAND_IDX4 which represents indexes into things like lists (and perhaps other things eventually.) * generic/tclExecute.c (TclExecuteByteCode): Implementation of the new opcodes. INST_LIST_INDEX_IMM does a simple [lindex] with either front- or end-based simple indexing. INST_LIST_RANGE_IMM does an [lrange] with front- or end-based simple indexing for both the reference to the first and last items in the range. * generic/tclCompCmds.c (TclCompileLassignCmd): Generate bytecode for the [lassign] command. 2004-01-17 David Gravereaux * win/tclWinInit.c: added #pragma comment(lib, "advapi32.lib") when compiling under VC++ so we don't need to specify it when linking. 2004-01-17 Donal K. Fellows * generic/tclCmdIL.c (Tcl_LassignObjCmd): Add more shimmering protection for when the list is also one of the variables. BASIC IMPLEMENTATION OF TIP#57 * generic/tclCmdIL.c (Tcl_LassignObjCmd): Implementation of the [lassign] command that takes full advantage of Tcl's object API. * doc/lassign.n: New file documenting the command. * tests/cmdIL.test (cmdIL-6.*): Test suite for the command. 2004-01-15 David Gravereaux * win/tclWinReg.c: Placed the requirement for advapi.lib into the object file itself with #paragma comment (lib, ...) when built with VC++. This will simplify linking for users of the static library. * win/rules.vc: Added new 'fullwarn' to the CHECKS commandline macro; sets $(FULLWARNINGS). * win/makefile.vc: Removed 'advapi.lib' from $(baselibs). Added new logic to crank-up the warning levels for both compile and link when $(FULLWARNINGS) is set. Some clean-up with how the resource files are built and how -DTCL_USE_STATIC_PACKAGES is sent when compiling the shells. * win/tclAppInit.c: Small change in how TCL_USE_STATIC_PACKAGES is used. * win/tcl.rc: * win/tclsh.rc: Some clean-up with how the resource files are built. Fixed 'OriginalFilename' problem that still thought a debug suffix was still 'd', now is 'g'. 2004-01-14 Donal K. Fellows * generic/tclDictObj.c (TraceDictPath, DictExistsCmd): Adjusted behaviour of [dict exists] so a failure to look up a dictionary along the path of dicts doesn't trigger an error. This is how it was documented to behave previously... [Bug 871387] * generic/tclDictObj.c: Assorted dict fixes from Peter Spjuth relating to [Bug 876170]. (SetDictFromAny): Make sure that lists retain their ordering even when converted to dictionaries and back. (TraceDictPath): Correct object reference count handling! (DictReplaceCmd, DictRemoveCmd): Stop object leak. (DictIncrCmd,DictLappendCmd,DictAppendCmd,DictSetCmd,DictUnsetCmd): Simpler handling of reference counts when assigning to variables. * tests/dict.test (dict-19.2): Memory leak stress test 2004-01-13 Don Porter * generic/tclCmdMZ.c (Tcl_SwitchObjCmd): Silence compiler warnings. Patch 876451: restores performance of [return]. Also allows forms such as [return -code error $msg] to be bytecompiled. * generic/tclInt.h: Factored Tcl_ReturnObjCmd() into two pieces: * generic/tclCmdMZ.c: TclMergeReturnOptions(), which can parse the options to [return], check their validity, and create the corresponding return options dictionary, and TclProcessReturn(), which takes that return options dictionary and performs the [return] operation. * generic/tclCompCmds.c: Rewrote TclCompileReturnCmd() to call TclMergeReturnOptions() at compile time so the return options dictionary is computed at compile time (when it is fully known). The dictionary is pushed on the stack along with the result, and the code and level values are included in the bytecode as operands. Also supports optimized compilation of un-[catch]ed [return]s from procs with default options into the INST_DONE instruction. * generic/tclExecute.c: Rewrote INST_RETURN instruction to retrieve the code and level operands, pop the return options from the stack, and call TclProcessReturn() to perform the [return] operation. * generic/tclCompile.h: New utilities include TclEmitInt4 macro * generic/tclCompile.c: and TclWordKnownAtCompileTime(). End Patch 876451. * generic/tclFileName.c (Tcl_GlobObjCmd): Latest changes to management of the interp result by Tcl_GetIndexFromObj() exposed improper interp result management in the [glob] command procedure. Corrected by adopting the Tcl_SetObjResult(Tcl_NewStringObj) pattern. This stopped a segfault in test filename-11.36. [Bug 877677] 2004-01-13 Donal K. Fellows * generic/tclIndexObj.c (Tcl_GetIndexFromObjStruct, Tcl_WrongNumArgs): Create fresh objects instead of using the one currently in the interpreter, which isn't guaranteed to be fresh and unshared. The cost for the core will be minimal because of the object cache, and this fixes [Bug 875395]. 2004-01-12 Miguel Sofer * generic/tclCompExpr.c (CompileLandOrLorExpr): cosmetic changes. 2004-01-12 Miguel Sofer * generic/tclCompExpr.c (CompileLandOrLorExpr): new logic, fewer instructions. As a side effect, the instructions INST_LOR and INST_LAND are now never used. * generic/tclExecute.c (INST_JUMP*): small optimisation; fix a bug in debug code. 2004-01-11 David Gravereaux * win/tclWinThrd.c (Tcl_ConditionNotify): condPtr must be dereferenced to see if there are waiters else uninitialized datum is manipulated. [Bug 849007 789338 745068] 2004-01-09 David Gravereaux * generic/tcl.h: Renamed and deprecated #defines moved to within the #ifndef TCL_NO_DEPRECATED block. This allows us to build Tcl to check for deprecated functions in use, such as panic() and Tcl_Ckalloc(). By request from DKF. Extensions that build with -DTCL_NO_DEPRECATED now have these macros as restricted. ***POTENTIAL INCOMPATIBILITY*** * win/makefile.vc: * win/rules.vc: Added -DTCL_NO_DEPRECATED usage to makefile.vc. Called like this: nmake -af makefile.vc CHECKS=nodep 2004-01-09 Vince Darley * generic/tclIOUtil.c: fix to infinite loop in TclFinalizeFilesystem [Bug 873311] 2003-12-25 Mo DeJong * win/tclWin32Dll.c (DllMain): Add HAVE_NO_SEH blocks in place of __try and __except statements to support gcc builds. This is needed after David's changes on 2003-12-21. [Tcl patch 858493] 2003-12-23 David Gravereaux * generic/tclAlloc.c: All uses of 'panic' (the macro) changed * generic/tclBasic.c: to 'Tcl_Panic' (the function). The * generic/tclBinary.c: #define of panic in tcl.h clearly states * generic/tclCkalloc.c: it is deprecated in the comments. * generic/tclCmdAH.c: [Patch 865264] * generic/tclCmdIL.c: * generic/tclCmdMZ.c: * generic/tclCompCmds.c: * generic/tclCompExpr.c: * generic/tclCompile.c: * generic/tclConfig.c: * generic/tclDictObj.c: * generic/tclEncoding.c: * generic/tclEvent.c: * generic/tclExecute.c: * generic/tclHash.c: * generic/tclInterp.c: * generic/tclIO.c: * generic/tclIOCmd.c: * generic/tclIOUtil.c: * generic/tclListObj.c: * generic/tclLiteral.c: * generic/tclNamesp.c: * generic/tclObj.c: * generic/tclParse.c: * generic/tclPathObj.c: * generic/tclPkg.c: * generic/tclPreserve.c: * generic/tclProc.c: * generic/tclStringObj.c: * generic/tclTest.c: * generic/tclThreadAlloc.c: * generic/tclTimer.c: * generic/tclTrace.c: * generic/tclVar.c: * mac/tclMacChan.c: * mac/tclMacOSA.c: * mac/tclMacResource.c: * mac/tclMacSock.c * mac/tclMacThrd.c: * unix/tclUnixChan.c: * unix/tclUnixNotfy.c: * unix/tclUnixThrd.c: * unix/tclXtNotify.c: * win/tclWin32Dll.c: * win/tclWinChan.c: * win/tclWinFCmd.c: * win/tclWinNotify.c: * win/tclWinPipe.c: * win/tclWinSock.c: * win/tclWinThrd.c: * generic/tclInt.h: Deprecated use of Tcl_Ckalloc changed to Tcl_Alloc in the TclAllocObjStorage macro. 2003-12-22 David Gravereaux * win/nmakehlp.c: * win/rules.vc: New feature for extensions that use rules.vc. Now reads header files for version strings. No more hard coding TCL_VERSION = 8.5 and having to edit it when you swap cores. * win/makefile.vc: VERSION macro now set by reading tcl.h for it. * generic/tcl.h: Removed note that makefile.vc needs to have a version number changed. 2003-12-21 David Gravereaux * win/tclWin32Dll.c: Structured Exception Handling added around Tcl_Finalize called from DllMain's DLL_PROCESS_DETACH. We can't be 100% assured that Tcl is being unloaded by the OS in a stable condition and we need to protect the exit handlers should the stack be in a hosed state. AT&T style assembly for SEH under MinGW has not been added yet. This is a first part change for [Patch 858493] 2003-12-17 Daniel Steffen * generic/tclBinary.c (DeleteScanNumberCache): fixed crashing bug when numeric scan-value cache contains NULL value. 2003-12-17 Vince Darley * generic/tclCmdAH.c: * unix/tclUnixFile.c: * win/tclWinFCmd.c: * tests/fCmd.test: * tests/fileSystem.test: * doc/file.n: final fix to support for relative links and its implications on normalization and other parts of the filesystem code. Fixes [Bug 859251] and some Windows problems with recursive file delete/copy and symbolic links. 2003-12-17 Vince Darley * generic/tclPathObj.c: * tests/fileSystem.test: fix and tests for [Bug 860402] in new file normalization code. 2003-12-17 Zoran Vasiljevic * generic/tclIOUtil.c: fixed 2 memory (object) leaks. This fixes Tcl Bug #839519. * generic/tclPathObj.c: fixed Tcl_FSGetTranslatedPath to always return properly refcounted path object. This fixes Tcl Bug #861515. 2003-12-16 Vince Darley * tests/fCmd.test: marking fCmd-9.14.2, as nonPortable, since on Solaris one can change the name of the current directory with 'file rename'. * doc/FileSystem.3: clarified documentation on ownership of return objects/strings of some Tcl_FS* calls. 2003-12-16 Donal K. Fellows * generic/tclThreadAlloc.c (binfo): Made variable file-local. 2003-12-15 David Gravereaux * win/tcl.rc: * win/tclsh.rc: Slight modification to the STRINGIFY macro to support Borland's rc tool. * win/tclWinFile.c (TclpUtime) : utimbuf struct not a problem with Borland. * win/tclWinTime.c (TclpGetDate) : Borland's localtime() has a slight behavioral difference. From Helmut Giese [Patch 758097]. 2003-12-14 David Gravereaux * generic/tclInt.decls: commented-out entry for TclpCheckStackSpace, removing it from the Stubs table. It's already declared in tclInt.h and labeled as a function that is not to be exported. Regened tables. 2003-12-14 Donal K. Fellows * generic/tclCmdMZ.c (Tcl_SwitchObjCmd): TIP#75 Implementation * tests/switch.test: Can now get submatch information when * doc/switch.n: using -regexp matching in [switch]. 2003-12-14 Vince Darley * generic/tclPathObj.c: complete rewrite of generic file normalization code to cope with links followed by '..'. [Bug 849514], and parts of [859251] 2003-12-12 David Gravereaux * win/tclWinChan.c: Win32's SetFilePointer() takes LONGs not DWORDs (a signed/unsigned mismatch). Redid local vars to avoid all casting except where truly required. 2003-12-12 Vince Darley * generic/tclCmdAH.c: fix to normalization of non-existent user name ('file normalize ~nobody') [Bug 858937] * doc/file.n: clarify behaviour of 'file link' when the target is not an absolute path. * doc/filename.n: correct documentation to say that Windows Tcl does handle '~user', for recent Windows releases, and clarified distinction between MacOS 'classic' and MacOS X. * doc/glob.n: clarification of glob's behaviour when returning filenames starting with a '~'. * tests/fileSystem.test: * tests/fileName.test: new tests added for the normalization problem above and other recentlt reported issues. * win/tclWinFile.c: corrected unclear comments * unix/tclUnixFile.c: allow creation of relative links [Bug 833713] 2003-12-11 David Gravereaux * win/tclWinSock.c (SocketThreadExitHandler) : added a TerminateThread fallback just in case the socket handler thread is really in a paused state. This can happen when Tcl is being unloaded by the OS from an exception handler. See MSDN docs on DllMain, it states this behavior. 2003-12-09 Jeff Hobbs * unix/configure: * unix/tcl.m4: updated OpenBSD build configuration based on [Patch #775246] (cassoff) 2003-12-09 Donal K. Fellows * unix/tclUnixPort.h: #ifdef'd out declarations of errno which * tools/man2tcl.c: are known to cause problems with recent glibc. [Bug 852369] 2003-12-09 Vince Darley * win/tclWinFile.c: fix to NT file permissions code [Bug 855923] * tests/winFile.test: added tests for NT file permissions - patch and test scripts supplied by Benny. * tests/winFCmd.test: fixed one test for when not running in C:/ 2003-12-02 Donal K. Fellows * generic/tclBinary.c (DeleteScanNumberCache, ScanNumber): Made the numeric scan-value cache have proper references to the objects within it so strange patterns of writes won't cause references to freed objects. Thanks to Paul Obermeir for the report. [Bug 851747] 2003-12-01 Miguel Sofer * doc/lset.n: fix typo [Bug 852224] 2003-11-24 Don Porter * generic/tclParse.c: Corrected faulty check for trailing white space in {expand} parsing. Thanks Andreas Leitgeb. [Bug 848262]. * tests/parse.test: New tests for the bug. 2003-11-24 Vince Darley * generic/tclPathObj.c: fix to [Bug 845778] - Infinite recursion on [cd] (Windows only bug), for which new tests have just been added. 2003-11-21 Don Porter * tests/winFCmd.test (winFCmd-16.10,11): Merged new tests from core-8-4-branch. 2003-11-20 Miguel Sofer * generic/tclVar.c: fix flag bit collision between LOOKUP_FOR_UPVAR and TCL_PARSE_PART1 (deprecated) [Bug 835020] 2003-11-19 Don Porter * tests/compile.test (compile-16.22.0): Improved test for the recent fix for Bug 845412. 2003-11-19 Donal K. Fellows * generic/tclCompile.c (TclCompileScript): Added a guard for the expansion code so that long non-expanding commands don't get expansion infrastructure inserted in them, especially when that infrastructure isn't initialised. [Bug 845412] 2003-11-18 David Gravereaux * contrib/djgpp/Makefile: Changes from Victor Wagner * contrib/djgpp/langinfo.c (new): for better * contrib/djgpp/langinfo.h (new): DJGPP support. * unix/tclUnixInit.c: . * unix/tclUnixChan.c: . * unix/tclUnixFCmd.c: . 2003-11-17 Don Porter * tests/reg.test: Added tests for [Bugs 230589, 504785, 505048, 840258] recently fixed by 2003-11-15 commit to regcomp.c by Pavel Goran. His notes on the fix: This bug results from an error in code that splits states into "progress" and "no-progress" ones. This error causes an interesting situation with the pre-collected single-linked list of states to be splitted: many items were added to the list, but only several of them are accessible from the list beginning, since the "tmp" member of struct state (which is used here to hold a pointer to the next list item) gets overwritten, which results in a "looped" chain. As a result, not all of states are splitted, and one state is splitted two times, causing incorrect "no-progress" flag values. 2003-11-16 Donal K. Fellows * generic/tclExecute.c (TclExecuteByteCode): Make sure that Tcl_AsyncInvoke is called regularly when processing bytecodes. * generic/tclTest.c (AsyncThreadProc, TestasyncCmd): Extended testing harness to send an asynchronous marking without relying on UNIX signals. * tests/async.test (async-4.*): Tests to check that async events are handled by the bytecode core. [Bug 746722] 2003-11-15 Donal K. Fellows * generic/tclTest.c (TestHashSystemHashCmd): Removed 'const' modifier from hash type structure; it should be const and the hash code assumes it behaves like const, but that's not how the API is defined. Like this, we are following in the same footsteps as Tcl_RegisterObjType() which has the same conditions on its argument. Stops VC++5.2 warning. [Bug 842511] 2003-11-14 Donal K. Fellows * generic/tclHash.c (Tcl_DeleteHashTable,Tcl_HashStats,RebuildTable): * generic/tclTest.c (TestHashSystemHashCmd): TIP#138 implementation, * tests/misc.test: plus a new chunk of stuff to test the hash functions more thoroughly in the test suite. [Patch 731356, modified] * doc/Tcl.n: Updated Tcl version number and changebars. 2003-11-14 Don Porter * doc/ParseCmd.3: Implementation of TIP 157. Adds recognition * doc/Tcl.n: of the new leading {expand} syntax on words. * generic/tcl.h: Parses such words as the new Tcl_Token type * generic/tclBasic.c: TCL_TOKEN_EXPAND_WORD. Updated Tcl_EvalEx * generic/tclCompile.c: and the bytecode compiler/execution engine * generic/tclCompile.h: to recognize the new token type. New opcodes * generic/tclExecute.c: INST_LIST_VERIFY and INST_INVOKE_EXP and a new * generic/tclParse.c: operand type OPERAND_ULIST1 are defined. Docs * generic/tclTest.c: and tests are included. * tests/basic.test: * tests/compile.test: * tests/parse.test: * library/auto.tcl: Replaced several [eval]s used to perform * library/package.tcl: argument expansion with the new syntax. * library/safe.tcl: In the test files lindex.test and lset.test, * tests/cmdInfo.test: replaced use of [eval] to force direct * tests/encoding.test: string evaluation with use of [testevalex] * tests/execute.test: which more directly and robustly serves the * tests/fCmd.test: same purpose. * tests/http.test: * tests/init.test: * tests/interp.test: * tests/io.test: * tests/ioUtil.test: * tests/iogt.test: * tests/lindex.test: * tests/lset.test: * tests/namespace-old.test: * tests/namespace.test: * tests/pkg.test: * tests/pkgMkIndex.test: * tests/proc.test: * tests/reg.test: * tests/trace.test: * tests/upvar.test: * tests/winConsole.test: * tests/winFCmd.test: 2003-11-12 Jeff Hobbs * tests/cmdMZ.test (cmdMZ-1.4): change to nonPortable as more systems are using permissions caching, and this isn't really a Tcl controlled issue. 2003-11-11 Jeff Hobbs * unix/configure: * unix/tcl.m4: improve AIX --enable-64bit handling remove -D__NO_STRING_INLINES -D__NO_MATH_INLINES from CFLAGS_OPTIMIZE on Linux. Make default opt -O2 (was -O). 2003-11-11 David Gravereaux * contrib/djgpp/Makefile: Suggested changes from vitus@45.free.net (Victor Wagner) * unix/tclUnixPort.h: added socklen_t typedef for DJGPP 2003-11-10 Don Porter * unix/tclUnixInit.c (TclpInitLibraryPath): * win/tclWinInit.c (TclpInitLibraryPath): Fix for [Bug 832657] that should not run afoul of startup constraints. * library/dde/pkgIndex.tcl: Added safeguards so that registry * library/reg/pkgIndex.tcl: and dde packages are not offered * win/tclWinDde.c: on non-Windows platforms. Bumped to * win/tclWinReg.c: registry 1.1.3 and dde 1.3. * win/Makefile.in: * win/configure.in: * win/makefile.bc: * win/makefile.vc: * win/configure: autoconf (2.57) 2003-11-10 Donal K. Fellows * tests/cmdIL.test: Stopped cmdIL-5.5 from stomping over the test command, and updated the tests to use some tcltest2 features in relation to cleanup. [Bug 838384] 2003-11-10 Vince Darley * generic/tclCmdAH.c: * tests/fCmd.test: fix to misleading error message in 'file link' [Bug 836208] 2003-11-07 Vince Darley * generic/tclIOUtil.c: fix to compiler warning/error with some compilers [Bug 835918] 2003-11-07 Daniel Steffen * macosx/Makefile: optimized builds define NDEBUG to turn off ThreadAlloc range checking. 2003-11-05 Don Porter * tests/unixInit.test (unixInit-2.10): New test to expose [Bug 832657] failure of TclpInitLibraryPath() to properly handle .. in the path of the executable. 2003-11-04 Daniel Steffen * macosx/Makefile: added 'test' target. 2003-11-03 Vince Darley * generic/tclIOUtil.c * generic/tclInt.h: added comments and re-arranged code to clarify distinction between Tcl_LoadHandle, ClientData for 'load'ed code, and point out limitations of the design introduced with Tcl 8.4. * unix/tclUnixFile.c: fix to memory leak * generic/tclCmdIL.c: removed warning on Windows. 2003-11-01 Donal K. Fellows * generic/tclCmdIL.c (Tcl_LrepeatObjCmd): Check for sensible list lengths and allow for soft failure of the memory subsystem in the [lconcat] command [Bug 829027]. Uses direct list creation to avoid extra copies when working near the limit of available memory. Also reorganized to encourage optimizing compilers to optimize heavily. * generic/tclListObj.c (TclNewListObjDirect): New list constructor that does not copy the array of objects. Useful for creating potentially very large lists or where you are about to throw away the array argument which is being used in its entirety. 2003-10-28 Miguel Sofer * generic/tclExecute.c (NEXT_INST macros): replaced macro variable "result" by "resultHandling" to avoid confusion. 2003-10-23 Andreas Kupries * unix/tclUnixChan.c (Tcl_MakeFileChannel): Applied [Patch 813606] fixing [Bug 813087]. Detection of sockets was off for Mac OS X which implements pipes as local sockets. The new code ensures that only IP sockets are detected as such. * win/tclWinSock.c (TcpWatchProc): Watch for FD_CLOSE too when asked for writable events by the generic layer. (SocketEventProc): Generate a writable event too when a close is detected. Together the changes fix [Bug 599468]. 2003-10-23 Vince Darley * tests/resource.test: * mac/tclMacResource.c: fix to resource freeing problem in 'resource' command reported by Bernard Desgraupes. * doc/FileSystem.3: updated documentation for 'glob' fix on 2003-10-13 below 2003-10-22 Donal K. Fellows * generic/tclCmdAH.c (Tcl_FileObjCmd): Changed FILE_ prefix to FCMD_ to stop symbol/#def clashes on Cygwin/Mingw32 on NT. [Bug 822528] 2003-10-21 Daniel Steffen * tools/tcltk-man2html.tcl: fixed incorrect html generated for .IP/.TP lists, now use
...
...

...
...
instead of illegal

...
...

...
...
. Added skipping of directives directly after .TP to avoid them being used as item descriptions, e.g. .TP\n.VS in clock.n. 2003-10-21 Andreas Kupries * win/tclWinPipe.c (BuildCommandLine): Applied the patch coming with [Bug 805605] to the code, fixing the incorrect use of ispace noted by Ronald Dauster . 2003-10-20 Kevin B. Kenny * doc/msgcat.n: * library/msgcat/msgcat.tcl (mclocale,mcload): * tools/tcl.wse.in: * unix/Makefile.in: Implementation of TIP#156 * win/makefile.bc: adding a "root locale" to * win/Makefile.in: the 'msgcat' package. Advanced * win/Makefile.vc: msgcat version number to 1.4. 2003-10-15 Donal K. Fellows * generic/tclCmdIL.c (SortInfo,etc): Reorganized so that SortInfo carries an array of integer indices instead of a Tcl list. This nips shimmering problems in the bud and simplifies SelectObjFromSublist at the cost of making setup slightly more complex. [Bug 823768] 2003-10-14 David Gravereaux * win/tclAppInit.c (sigHandler): Punt gracefully if exitToken has already been destroyed. 2003-10-14 Vince Darley * generic/tclCmdMZ.c: * tests/regexp.test: fix to [Bug 823524] in regsub; added three new tests. 2003-10-14 Don Porter * generic/tclBasic.c (TclAppendObjToErrorInfo): New internal routine that appends a Tcl_Obj to the errorInfo, saving the caller the trouble of extracting the string rep. * generic/tclStringObj.c (TclAppendLimitedToObj): New internal routine that supports truncated appends with optional ellipsis marking. This single routine supports UTF-8-safe truncated appends needed in several places throughout the Tcl source code, mostly for error and stack messages. Clean fix for [Bug 760872]. * generic/tclInt.h: Declarations for new internal routines. * generic/tclCmdMZ.c: Updated callers to use the new routines. * generic/tclCompExpr.c: * generic/tclCompile.c: * generic/tclExecute.c: * generic/tclIOUtil.c: * generic/tclNamesp.c: * generic/tclObj.c: * generic/tclParseExpr.c: * generic/tclProc.c: * generic/tclStringObj.c: * mac/tclMacResource.c: * library/init.tcl: Updated ::errorInfo cleanup in [unknown] to reflect slight modifications to Tcl_LogCommandInfo(). Corrects failing init-4.* tests. 2003-10-14 Donal K. Fellows TIP#127 IMPLEMENTATION FROM JOE MICHAEL SCHLENKER * generic/tclCmdIL.c (SelectObjFromSublist): Element selection engine. * generic/tclCmdIL.c (Tcl_LsearchObjCmd, Tcl_LsortObjCmd): * tests/lsearch.test: Set up and use of element selection engine, * tests/cmdIL.test: plus tests and documentation. * doc/lsearch.n: Based on [Patch 693836] * doc/lsort.n: 2003-10-13 Vince Darley * generic/tcl.h: * generic/tclFileName.c: * generic/tclIOUtil.c: * generic/tclPathObj.c: * generic/tclTest.c: * mac/tclMacFile.c: * tests/fileName.test: better tests for [Bug 813273] * unix/tclUnixFCmd.c: * unix/tclUnixFile.c: * win/tclWin32Dll.c: * win/tclWinFCmd.c: * win/tclWinFile.c: * win/tclFileInt.h: Fixed [Bug 800106] in which 'glob' was incapable of merging the results of a directory listing (real or virtual) and any virtual filesystem mountpoints in that directory (the latter were ignored). This meant boundaries between different filesystems were not seamless (e.g. 'glob */*' across a filesystem boundary was wrong). Added new entry to Tcl_GlobTypeData in a totally backwards compatible way. To allow listing of mounts, registered filesystems must support the 'TCL_GLOB_TYPE_MOUNT' flag. If this is not supported (e.g. in tclvfs 1.2) then mounts will simply not be listed for that filesystem. Fixed [Bug 749876] 'file writable/readable/etc' (NativeAccess) using correct permission checking code for Windows NT/2000/XP where more complex user-based security/access priveleges are available, particularly on shared volumes. The performance impact of this extra checking will need further investigation. Note: Win 95,98,ME have no support for this. Also made better use of normalized rather than translated paths in the platform specific code. 2003-10-12 Jeff Hobbs * unix/tclUnixTest.c (TestalarmCmd): don't bother checking return value of alarm. [Bug #664755] (english) 2003-10-09 Pat Thoyts * win/makefile.vc: Applied patches for bug #801467 by Joe Mistachkin * win/tclAppInit.c: to fix incompatible TCL_MEM_DEBUG handling in * generic/tclObj.c: Win32 VC builds. 2003-10-08 Don Porter * generic/tclBasic.c: Save and restore the iPtr->flag bits that control the state of errorCode and errorInfo management when calling "leave" execution traces, so that all error information of the traced command is still available whether traced or not. [Bug 760947] Thanks to Yahalom Emet. 2003-10-08 Donal K. Fellows * generic/tclTest.c (TestNumUtfCharsCmd): Command to allow finer access to Tcl_NumUtfChars for testing. * generic/tclUtf.c (Tcl_NumUtfChars): Corrected string length determining when the length parameter is negative; the terminator is a zero byte, not (necessarily) a \u0000 character. [Bug 769812] 2003-10-07 Don Porter * tests/cmdAH.test: * tests/exec.test: Corrected temporary file management * tests/fileSystem.test: issues uncovered by -debug 1 test * tests/io.test: operations. Also backported some * tests/ioCmd.test: other fixes from the HEAD. * tests/main.test: * tests/pid.test: [Bugs 675605, 675655, 675659] * tests/socket.test: * tests/source.test: * tests/fCmd.test: Run tests with the [temporaryDirectory] as the current directory, so that tests can depend on ability to write files. [Bug 575837] * doc/OpenFileChnl.3: Updated Tcl_Tell and Tcl_Seek documentation to reflect that they now return Tcl_WideInt (TIP 72) [Bug 787537] * tests/io.test: Corrected several tests that failed when paths * tests/ioCmd.test: included regexp-special chars. [Bug 775394] 2003-10-06 Jeff Hobbs * win/configure: * win/tcl.m4: removed incorrect checks for existence of optimization. TCL_CFG_OPTIMIZED is now defined whenever the user does not build with --enable-symbols. 2003-10-06 Don Porter * tests/regexp.test: Matched [makeFile] with [removeFile]. * tests/regexpComp.test: [Bug 675652] * tests/fCmd.test (fCmd-8.2): Test only that tilde-substitution happens, not for any particular result. [Bug 685991] * unix/tcl.m4 (SC_PATH_TCLCONFIG): Corrected search path so that alpha and beta releases of Tcl are not favored. [Bug 608698] * tests/reg.test: Corrected duplicate test names. * tests/resource.test: [Bugs 710370, 710358] * tests/dict.test: * tests/dict.test: Updated [package require tcltest] lines to * tests/fileSystem.test: indiciate that these test files * tests/lrepeat.test: use features of tcltest 2. [Bug 706114] * tests/notify.test: * tests/parseExpr.test: * tests/unixNotfy.test: * tests/winDde.test: 2003-10-04 Miguel Sofer * generic/tclExecute.c (TEBC): * tests/execute.test (execute-8.2): fix for [Bug 816641] - faulty execution and catch stack management. 2003-10-03 Don Porter * generic/tclBasic.c: Fixed error in ref count management of command * generic/tclCmdMZ.c: and execution traces that caused access to freed memory in trace-32.1. [Bug 811483]. 2003-10-02 Don Porter * generic/tclTrace.c: Corrected comingling of introspection results of [trace info command] and [trace info execution]. [Bug 807243] Thanks to Mark Saye. 2003-10-01 Daniel Steffen * macosx/Makefile: fixed redo prebinding bug when DESTDIR="". * mac/tclMacResource.c: fixed possible NULL dereference (bdesgraupes). 2003-09-29 Vince Darley * generic/tclPathObj.c: * tests/fileName.test: fix to inconsistent handling of backslash path separators on Windows in 'file join' [Bug 813273] 2003-09-29 Donal K. Fellows * generic/tclPathObj.c (TclNativePathInFilesystem,TclFSGetPathType): * generic/tclIOUtil.c (TclNativeDupInternalRep,TclGetPathType): Rename to make sure function names won't interfere with other non-Tcl code (reported by George Staplin) TIP#121 IMPLEMENTATION FROM JOE MISTACHKIN * generic/tclEvent.c (Tcl_SetExitProc,Tcl_Exit): Implementation of application exit handler scheme. * generic/tcl.decls (Tcl_SetExitProc): Public declaration. * doc/Exit.3: Documentation of new API function. TIP#112 IMPLEMENTATION * generic/tclNamesp.c: Core of implementation. * generic/tclInt.h (Namespace,TclInvalidateNsCmdLookup): Add command list epoch counter and list of ensembles to namespace structure, and define a macro to ease update of the epoch counter. * generic/tclBasic.c (Tcl_CreateObjCommand,etc.): Update epoch counter when list of commands in a namespace changes. * generic/tclObj.c (TclInitObjSubsystem): Register ensemble subcommand type. * tests/namespace.test (42.1-47.6): Tests. * doc/namespace.n: Documentation. * library/http/http.tcl (geturl): Correctly check the type of boolean-valued options. [Bug 811170] * unix/tcl.m4 (SC_ENABLE_FRAMEWORK): Added note to make it clearer that this is an OSX feature, not a general Unix feature. [Bug 619440] 2003-09-28 David Gravereaux * win/tclWinPipe.c: The windows port of expect can call TclWinAddProcess before any of the other pipe functions. Added a missing PipeInit() call to make sure the initialization happens. 2003-09-25 Daniel Steffen * macosx/Makefile: ensure SYMROOT exists if OBJROOT is overridden on command line. Replaced explict use of /usr/bin by ${BINDIR}. 2003-09-24 Vince Darley * library/package.tcl (tcl::MacPkgUnknown, tcl::MacOSXPkgUnknown): Minor performance tweaks to reduce the number of [file] invocations. Meant to improve startup times, at least a little bit. (The generic equivalent patch was applied on 2003-02-21). 2003-09-24 Vince Darley * trace.test: removed 'knownBug' from a test which doesn't illustrate a bug, just a bad test. 2003-09-23 Miguel Sofer * generic/tclExecute.c: * generic/tclInt.h: changed the evaluation-stack addressing mode, from array-style to pointer-style; the catch stack and evaluation stack are now contiguous in memory. [Patch 457449] 2003-09-23 Don Porter * tests/trace.test (trace-31,32-*): Added tests for [Bug 807243] and [Bug 811483]. * library/init.tcl (auto_load, auto_import): Expanded Eric Melski's 2000-01-28 fix for [Bug 218871] to all potentially troubled uses of [info commands] on input data, where glob-special characters could cause problems. 2003-09-20 Donal K. Fellows * tests/expr.test (expr-23.4): Prevented accidental wrapping round of exponential operation; it isn't portable, and not what I intended to test either. [Bug 808244] 2003-09-19 Miguel Sofer * generic/tclExecute.c: adding (DE)CACHE_STACK_INFO() pairs to protect all calls that may cause traces on ::errorInfo or ::errorCode to corrupt the stack [Bug 804681] 2003-09-17 Vince Darley * tclPathObj.c: fix to test-suite problem introduced by the bug fix below. No problem in ordinary code, just test suite code which manually adjusts tclPlatform. [Bug 808247] 2003-09-16 Vince Darley * doc/filename.n: documentation of Windows-specific feature as discussed in [Bug 541989] * generic/tclPathObj.c: fix for normalization of volume-relative paths [Bug 767834] * tests/winFCmd.test: new tests for both of the above. * tests/cmdAH.test: fix for AFS problem in test suite [Bug 748960] 2003-09-13 Donal K. Fellows TIP#123 IMPLEMENTATION BASED ON WORK BY ARJEN MARKUS * generic/tclCompile.h (INST_EXPON): Implementation of * generic/tclCompile.c (tclInstructionTable): exponential operator. * generic/tclCompExpr.c (operatorTable): * generic/tclParseExpr.c (ParseExponentialExpr, GetLexeme): * generic/tclExecute.c (TclExecuteByteCode, ExponWide, ExponLong): (IllegalExprOperandType): * tests/expr.test: * tests/compExpr-old.test: * doc/expr.n: 2003-09-10 Don Porter * library/opt/optparse.tcl: Latest revisions caused [OptGuessType] to guess "int" instead of "string" for empty strings. Missed the required "-strict" option to [string is]. Thanks to Revar Desmera. [Bug 803968] 2003-09-08 David Gravereaux * win/tclWinLoad.c (TclpDlopen): Changed the error message for ERROR_PROC_NOT_FOUND to be a bit more helpful in giving us clues. "can't find specified procedure" means a function in the import table, for implicit loading, couldn't be resolved and that's why the load failed. 2003-09-04 Don Porter * doc/Tcl_Main.3: * doc/FileSystem.3: Implementation of * doc/source.n: TIPs 137/151. Adds * doc/tclsh.1: a -encoding option to * generic/tcl.decls: the [source] command * generic/tclCmdMZ.c (Tcl_SourceObjCmd): and a new C routine, * generic/tclIOUtil.c (Tcl_FSEvalFileEx): Tcl_FSEvalFileEx(), * generic/tclMain.c (Tcl_Main): that provides C access * mac/tclMacResource.c (Tcl_MacSourceObjCmd): to the same function. * tests/cmdMZ.test: Also adds command line * tests/main.test: option handling in Tcl_Main() so that tclsh * tests/source.test: and other apps built on Tcl_Main() respect a -encoding command line option before a script filename. Docs and tests updated as well. [Patch 742683] This is a ***POTENTIAL INCOMPATIBILITY*** only for those C programs that embed Tcl, build on Tcl_Main(), and make use of Tcl_Main's former ability to pass a leading "-encoding" option to interactive shell operations. * generic/tclInt.decls: Added internal stub * generic/tclMain.c (Tcl*StartupScript*): table entries for two new functions Tcl_SetStartupScript() and Tcl_GetStartupScript() that set/get the path and encoding for the startup script to be evaluated by either Tcl_Main() or Tk_Main(). Given public names in anticipation of their exposure by a followup TIP. * generic/tclDecls.h: make genstubs * generic/tclIntDecls.h: * generic/tclStubInit.c: 2003-09-04 Don Porter * doc/SplitList.3: Implementation of TIP 148. Fixes [Bug 489537]. * generic/tcl.h: Updated Tcl_ConvertCountedElement() to quote * generic/tclUtil.c: the leading "#" character of all list elements unless the TCL_DONT_QUOTE_HASH flag is passed in. * generic/tclDictObj.c: Updated Tcl_ConvertCountedElement() callers * generic/tclListObj.c: to pass in the TCL_DONT_QUOTE_HASH flags * generic/tclResult.c: when appropriate. 2003-08-31 Don Porter * doc/return.n: Updated [return] docs to cover new TIP 90 features. * doc/break.n: Added SEE ALSO references to return.n * doc/continue.n: 2003-09-01 Donal K. Fellows * doc/Namespace.3: Basic documentation for the TIP#139 functions. This will need improving, but the basic bits are there at least. 2003-08-31 Don Porter * doc/catch.n: Updated [catch] docs to cover new TIP 90 features. 2003-08-29 Don Porter * generic/tclCmdAH.c: Corrected bug in TIP 90 implementation * tests/cmdMZ.test: where the default -errorcode NONE value was not copied into the return options dictionary. This correction modified one test result. 2003-08-27 David Gravereaux * compat/strftime.c (_fmt): Removed syst array intializer that couldn't take variables within it under the watcom compiler: 'Initializers must be constant'. I believe Borland has this strictness as well. VC++ must be non-standard about this. Changed Win32 platform #ifdef from 'WIN32' to '__WIN32__' as this is the correct one to use across the Tcl sources. Even though we do force it in tcl.h, the true parent one is __WIN32__. Added missing CONST'ification usage to match prototype listed in tclInt.decls. * win/tclWinPort.h: Added a block for OpenWatcom adjustments that fixes 1) the same issue Mo did for MinGW lack of missing LPFN_* typedefs in their WINE derived and 2) The need to be strict about how the char type needs to be signed by default. * win/tclWinSock.c: Added OpenWatcom to the commentary about the #ifdef HAVE_NO_LPFN_DECLS block. * win/tclWinTime.c: Changed use of '_timezone' to 'timezone' as this difference is already adjusted for in tclWinPort.h. Removed unreferenced posixEpoch file-scope global. * win/tclWinFile.c (WinReadLinkDirectory): Fix for 'Initializers must be constant' with the driveSpec array using OpenWatcom. 2003-08-27 Don Porter * generic/tclUtil.c: Corrected [Bug 411825] and other bugs in TclNeedSpace() where non-breaking space (\u00A0) and backslash-escaped spaces were handled incorrectly. * tests/util.test: Added new tests util-8.[2-6]. 2003-08-26 David Gravereaux * generic/tcl.h: Added some support for the LCC-Win32 compiler. Unfortunetly, this compiler has a bug in its preprocessor and can't build Tcl even with this minor patch. Also added some support for the OpenWatcom compiler. A new win/makefile.wc to follow soon. 2003-08-25 Donal K. Fellows * tools/genStubs.tcl (genStubs::makeDecl): A more subtle way of generating stubbed declarations allows us to have declarations of a function in multiple interfaces simultaneously. * generic/tcl.decls: Duplicated some namespace declarations from tclInt.decls here, as mandated by TIP #139. This is OK since the declarations match and will end up using the declarations in the public code from now on because of #include ordering. Keeping the old declarations in tclInt.decls; there's no need to gratuitously break compatability for those extensions which are already clients of the namespace code. 2003-08-23 Zoran Vasiljevic * generic/tclIOUtil.c: merged fixes for thread-unsafe handling of filesystem records [Bug #753315]. This also fixed the Bug #788780 * generic/tclPathObj.c: merged fixes for thread-unsafe handling of filesystem records [Bug #753315]. * generic/tclFileSystem.h: merged fixes for thread-unsafe handling of filesystem records [Bug #753315]. 2003-08-19 Pat Thoyts * win/tclWinSerial.c (SerialErrorStr): Fixed a syntax error created in the previous code cleanup. 2003-08-19 Donal K. Fellows * win/tclWinSerial.c: Adjusted commenting and spacing usage to follow the principles of the Style Guide better. 2003-08-18 Mo DeJong * win/configure: Regen. * win/tcl.m4 (SC_ENABLE_SYMBOLS): Use test instead of -eq, which does not work. [Bug 781109] 2003-08-13 Chengye Mao * win/tclWinPipe.c: fixed a bug in BuildCommandLine. This bug built a command line with a missing space between tclpipe.dll and the following arguments. It caused error in Windows 98 when exec command.com (e.g. dir) [Bug 789040] 2003-08-11 Donal K. Fellows TIP #136 IMPLEMENTATION from Simon Geard * generic/tclCmdIL.c (Tcl_LrepeatObjCmd): Adapted version of Simon's * doc/lrepeat.n: patch, updated to the HEAD * tests/lrepeat.test: and matching the core style. * generic/tclBasic.c (buildIntCmds): Splice into core. * generic/tclInt.h: * doc/list.n: Cross-reference. 2003-08-06 Jeff Hobbs * win/tclWinInit.c: recognize amd64 and ia32_on_win64 cpus. 2003-08-06 Don Porter * library/msgcat/msgcat.tcl: Added escape so that non-Windows * library/msgcat/pkgIndex.tcl: platforms do not try to use the registry package. This can save a costly and pointless package search. Bumped to 1.3.1. Thanks to Dave Bodenstab. [Bug 781609]. 2003-08-05 Miguel Sofer * generic/tclExecute.c (INST_INVOKE, INST_EVAL, INST_PUSH_RESULT): added a Tcl_ResetResult(interp) at each point where the interp's result is pushed onto the stack, to avoid keeping an extra reference that may cause costly Tcl_Obj duplication [Bug 781585] Detected by Franco Violi, analyzed by Peter Spjuth and Donal Fellows. 2003-07-28 Vince Darley * doc/FileSystem.3: * doc/Translate.3: better documentation of Tcl_TranslateFileName and related functions [Bug 775220] 2003-07-24 Mo DeJong * generic/tcl.h: Revert change made on 2003-07-21 since it made the sizeof(Tcl_Obj) different for regular vs mem debug builds. * generic/tclInt.h: Define TclDecrRefCount in terms of Tcl_DbDecrRefCount which removes one layer of inderection. * generic/tclObj.c (TclDbInitNewObj, Tcl_DbIncrRefCount, Tcl_DbDecrRefCount, Tcl_DbIsShared): Define ThreadSpecificData that contains a hashtable. The table is used to ensure that a Tcl_Obj is only acted upon in the thread that allocated it. This checking code is enabled only when mem debug and threads are enabled. 2003-07-24 Don Porter * tests/async.test: Added several tests that demonstrate Tcl * tests/basic.test: Bug 489537, Tcl's longstanding failure to * tests/dict.test: properly quote any leading '#' character * tests/dstring.test: when generating the string rep of a list * tests/list.test: so that the comment-power of that character * tests/parse.test: is hidden from any [eval], in order to * tests/util.test: satisfy the documentation that [list] does [eval]-safe quoting. 2003-07-24 Reinhard Max * library/package.tcl: Fixed a typo that broke pkg_mkIndex -verbose. * tests/pkgMkIndex.test: Added a test for [pkg_mkIndex -verbose]. * ChangeLog.2002 (new file): * ChangeLog: broke changes from 2002 into ChangeLog.2002 to reduce size of the main ChangeLog. 2003-07-23 Daniel Steffen * unix/Makefile.in: changes to html-tcl & html-tk targets for compatibility with non-gnu makes. * unix/Makefile.in: added macosx/README to dist target. 2003-07-23 Pat Thoyts * win/tclWinReg.c (OpenSubKey): Fixed bug 775976 which causes the registry set command to fail when built with VC7. * library/reg/pkgIndex.tcl: Incremented the version to 1.1.2. 2003-07-21 Mo DeJong Check that the thread incrementing or decrementing the ref count of a Tcl_Obj is the thread that originally allocated the thread. This fail fast behavior will catch programming errors that allow a single Tcl_Obj to be accessed from multiple threads. * generic/tcl.h (Tcl_Obj): Add allocThread member to Tcl_Obj. This member records the thread id the Tcl_Obj was allocated. It is used to check that any future ref count incr or decr is done from the same thread that allocated the Tcl_Obj. This member is defined only when threads and mem debug are enabled. * generic/tclInt.h (TclNewObj, TclDbNewObj, TclDecrRefCount): Define TclNewObj and TclDbNewObj using TclDbInitNewObj when mem debug is enabled. This fixes a problem where TclNewObj calls did not work the same as TclDbNewObj when mem debug was enabled. * generic/tclObj.c (TclDbInitNewObj, Tcl_DbIncrRefCount, Tcl_DbDecrRefCount): Add new helper to init Tcl_Obj members when mem debug is enabled. Init the allocThread member in TclDbInitNewObj and check it in Tcl_DbIncrRefCount and Tcl_DbDecrRefCount to make sure a Tcl_Obj allocated in one thread is not being acted upon in another thread. 2003-07-21 Vince Darley * test/cmdAH.test: ensure certain tests run in local filesystem [Bug 748960] 2003-07-18 Daniel Steffen * macosx/Makefile: added option to allow installing manpages in addition to default html help. 2003-07-18 Donal K. Fellows * doc/Utf.3: Tightened up documentation of Tcl_UtfNext and Tcl_UtfPrev to better match the behaviour. [Bug 769895] 2003-07-18 Jeff Hobbs * library/http/pkgIndex.tcl: upped to http v2.4.4 * library/http/http.tcl: add support for user:pass info in URL. * tests/http.test: [Bug 759888] (shiobara) 2003-07-18 Don Porter * doc/tcltest.n: Restored the [Eval] proc to replace * library/tcltest/tcltest.tcl: the [::puts] command when either the -output or -error option for [test] is in use, in order to capture data written to the output or error channels for comparison against what is expected. This is easier to document and agrees better with most user expectations than the previous attempt to replace [puts] only in the caller's namespace. Documentation made more precise on the subject. [Bug 706359] * doc/AddErrInfo.3: Improved consistency of documentation * doc/CrtTrace.3: by using "null" everywhere to refer to * doc/Encoding.3: the character '\0', and using "NULL" * doc/Eval.3: everywhere to refer to the value of a * doc/GetIndex.3: pointer that points to nowhere. * doc/Hash.3: Also dropped references to ASCII that * doc/LinkVar.3: are no longer true, and standardized on * doc/Macintosh.3: the hyphenated spelling of "null-terminated". * doc/OpenFileChnl.3: * doc/SetVar.3: * doc/StringObj.3: * doc/Utf.3: * doc/CrtSlave.3 (Tcl_MakeSafe): Removed warning about possible deprecation (no TIP on that). 2003-07-17 Daniel Steffen * unix/tclUnixFCmd.c: fix for compilation errors on platforms where configure detects non-functional chflags(). [Bug 748946] * macosx/Makefile: Rewrote buildsystem for Mac OS X framework build to be purely make driven; in order to become independent of Apple's closed-source IDE and build tool. The changes are intended to be transparent to the Makefile user, all existing make targets and cmd line variable overrides should continue to work. Changed build to only include tcl specific html help in Tcl.framework, the tk specific html help is now included in Tk.framework. Added var to allow overriding of tclsh used during html help building (Landon Fuller). * macosx/Tcl.pbproj/project.pbxproj: * macosx/Tcl.pbproj/jingham.pbxuser: Changed to purely call through to the make driven buildsystem; Tcl.framework is no longer assembled by ProjectBuilder. Set default SYMROOT in target options to simplify setting up PB (manually setting common build folder for tcl & tk no longer needed). * tools/tcltk-man2html.tcl: Added options to allow building only the tcl or tk html help files; the default behaviour with none of the new options is to build both, as before. * unix/Makefile.in: Added targets for building only the tcl or tk help. * macosx/README (new): Tcl specific excerpts of tk/macosx/README. * generic/tcl.h: Updated reminder comment about editing macosx/Tcl.pbproj/project.pbxproj when version number changes. 2003-07-16 Mumit Khan * generic/tclPathObj.c (SetFsPathFromAny): Add Cygwin specific code to convert POSIX filename to native format. * generic/tclFileName.c (Tcl_TranslateFileName): And remove from here. (TclDoGlob): Adjust for cygwin and append / for dirs instead of \ * win/tclWinFile.c (TclpObjChdir): Use chdir on Cygwin. [Patch 679315] 2003-07-16 Jeff Hobbs * library/safe.tcl (FileInAccessPath): normalize paths before comparison. [Bug 759607] (myers) * unix/tclUnixNotfy.c (NotifierThreadProc): correct size of found and word vars from int to long. [Bug 767578] (hgo) * generic/tcl.h: add recognition of -DTCL_UTF_MAX=6 on the * generic/regcustom.h: make line to support UCS-4 mode. No config arg at this time, as it is not the recommended build mode. * generic/tclPreserve.c: In Result and Preserve'd routines, do not * generic/tclUtil.c: assume that ckfree == free, as that is not * generic/tclResult.c: always true. [Bug 756791] (fuller) 2003-07-16 Donal K. Fellows * doc/CrtSlave.3 (Tcl_MakeSafe): Updated documentation to strongly discourage use. IMHO code outside the core that uses this function is a bug... [Bug 655300] 2003-07-16 Don Porter * generic/tclFileName.c (Tcl_GlobObjCmd): [Bug 771840] * generic/tclPathObj.c (Tcl_FSConvertToPathType):[Bug 771947] * unix/tclUnixFCmd.c (GetModeFromPermString): [Bug 771949] Silence compiler warnings about unreached lines. * library/tcltest/tcltest.tcl (ProcessFlags): Corrected broken call * library/tcltest/pkgIndex.tcl: to [lrange]. Bumped to version 2.2.4. [Bug 772333] 2003-07-15 Mo DeJong * unix/dltest/pkga.c (Pkga_EqObjCmd): Fix typo that was causing a crash in load.test. 2003-07-15 Donal K. Fellows * doc/array.n: Make sure docs are synched with the 8.4 release. 2003-07-15 Don Porter * doc/http.n: Updated SYNOPSIS to match actual syntax of commands. [Bug 756112] * unix/dltest/pkga.c: Updated to not use Tcl_UtfNcmp and counted strings instead of strcmp (not defined in any #include'd header) and presumed NULL-terminated strings. * generic/tclCompCmds.c (TclCompileIfCmd): Prior fix of Bug 711371 on 2003-04-07 introduced a buffer overflow. Corrected. [Bug 771613] 2003-07-15 Kevin B. Kenny * win/rules.vc: Added a missing $(OPTDEFINES) which broke the build if STATS=memdbg was specified. 2003-07-15 Donal K. Fellows * generic/tclCmdIL.c (SortCompare): Cleared up confusing error message. [Bug 771539] 2003-07-11 Donal K. Fellows * tests/binary.test (binary-46.*): Tests to help enforce the current behaviour. * doc/binary.n: Documented that [binary format a] and [binary scan a] do encoding conversion by dropping high bytes, unlike the rest of the core. [Bug 735364] 2003-07-11 Don Porter * library/package.tcl: Corrected [pkg_mkIndex] bug reported on comp.lang.tcl. The indexer was searching for newly indexed packages instead of newly provided packages. 2003-07-08 Vince Darley * tests/winFCmd.test: fix for five tests under win98 [Bug 767679] 2003-07-07 Jeff Hobbs * doc/array.n: add examples from Welton 2003-06-23 Vince Darley * doc/file.n: clarification of 'file tail' behaviour [Bug 737977] 2003-07-04 Donal K. Fellows * doc/expr.n: Tighten up the wording of some operations. [Bug 758488] * tests/cmdAH.test: Made tests of [file mtime] work better on FAT filesystems. [Patch 760768] Also a little general cleanup. * generic/tclCmdMZ.c (Tcl_StringObjCmd): Made [string map] accept dictionaries for maps. This is much trickier than it looks, since map entry ordering is significant. [Bug 759936] * generic/tclVar.c (Tcl_ArrayObjCmd, TclArraySet): Made [array get] and [array set] work with dictionaries, producing them and consuming them. Note that for compatability reasons, you will never get a dict from feeding a string literal to [array set] since that alters the trace behaviour of "multi-key" sets. [Bug 759935] 2003-06-23 Vince Darley * generic/tclTrace.c: fix to Window debug build compilation error. 2003-06-27 Don Porter * tests/init.test: Added [cleanupTests] to report results of tests * tests/pkg.test: that run in slave interps. [Bugs 761334,761344] * tests/http.test: Used more reliable path to find httpd script. 2003-06-25 Don Porter * tests/init.test: Added tests init-4.6.* to illustrate [Bug 760872] 2003-06-25 Donal K. Fellows * generic/tclTrace.c: New file, factoring out of virtually all the various trace-related things from tclBasic.c and tclCmdMZ.c with the goal of making this a separate maintenance area. 2003-06-25 Mo DeJong * unix/configure: Regen. * unix/tcl.m4 (SC_CONFIG_CFLAGS): Add -ieee when compiling with cc and add -mieee when compiling with gcc under OSF1-V5 "Tru64" systems. [Bug 748957] 2003-06-24 Donal K. Fellows * doc/encoding.n: Corrected the docs to say that [source] uses the system encoding, which it always did anyway (since 8.1) [Bug 742100] 2003-06-24 Donal K. Fellows * generic/tclHash.c (Tcl_HashStats): Prevented occurrence of division-by-zero problems. [Bug 759749] 2003-06-24 Mo DeJong * unix/tclUnixPort.h: #undef inet_ntoa before #define to avoid compiler warning under freebsd. [Bug 745844] 2003-06-23 Pat Thoyts * doc/dde.n: Committed TIP #135 which changes the * win/tclWinDde.c: -exact option to -force. Also cleaned * tests/winDde.test: a bug in the tests. * library/dde/pkgIndex.tcl: Incremented version to 1.2.5 * doc/dde.n: Committed TIP #120 which provides the * win/tclWinDde.c: dde package for safe interpreters. * tests/winDde.test: Incremented package version to 1.2.4 * library/dde/pkgIndex.tcl: 2003-06-23 Vince Darley * generic/tclFCmd.c: fix to bad error message when trying to do 'file copy foo ""'. [Bug 756951] * tests/fCmd.test: added two new tests for the bug. * win/tclWinFile.c: * win/tclWin32Dll.c: recommitted some filesystem globbing speed-ups, but disabled some on the older Win 95/98/ME where they don't seem to work. * doc/FileSystem.3: documentation fix [Bug 720634] 2003-06-18 Miguel Sofer * generic/tclNamesp.c (Tcl_Export): removed erroneous comments [Bug 756744] 2003-06-17 Vince Darley * win/makefile.vc: fixes to check-in below so compilation now works again on Windows. * generic/tclCmdMZ.c: * tests/regexp.test: fixing of bugs related to regexp and regsub matching of empty strings. Addition of a number of new tests. [Bug 755335] 2003-06-16 Andreas Kupries * win/Makefile.in: Haven't heard back from David for a week. * win/configure: Now committing the remaining changes. * win/configure.in: Note: In active contact with Helmut Giese * win/makefile.vc: about the borland relatedchanges. This part * win/rules.vc: will see future updates. * win/tcl.m4: * win/makefile.bc: 2003-06-10 Andreas Kupries * generic/tclConfig.c (ASSOC_KEY): Changed the key to "tclPackageAboutDict" (tcl prefix) to make collisions with the keys of other packages more unlikely. 2003-06-10 Miguel Sofer * generic/tclBasic.c: * generic/tclExecute.c: let TclExecuteObjvInternal call TclInterpReady instead of relying on its callers to do so; fix for the part of [Bug 495830] that is new in 8.4. * tests/interp.test: Added tests 18.9 (knownbug) and 18.10 2003-06-09 Andreas Kupries * generic/tcl.decls: Ported the changes from the * generic/tcl.h: 'tip-59-implementation' branch into the CVS * generic/tclBasic.c: head. Regenerated stub table. Regenerated * generic/tclInt.h: the configure's scripts, with help from Joe * generic/tclDecls.h English. * generic/tclStubInit.c: * generic/tclConfig.c: * generic/tclPkgConfig.c: * unix/Makefile.in: * unix/configure.in: The changes in the windows section are not * unix/tcl.m4: yet committed, they await feedback from * unix/mkLinks: David Gravereaux. * doc/RegConfig.3: * mac/tclMacPkgConfig.c: * tests/config.test: 2003-06-09 Don Porter * string.test (string-4.15): Added test for [string first] bug reported in Tcl 8.3, where test for all-single-byte-encoded strings was not reliable. 2003-06-04 Joe Mistachkin * tools/man2help.tcl: Added duplicate help section checking * tools/index.tcl: and corrected a comment typo for the getTopics proc in index.tcl [Bug #748700]. 2003-06-02 Vince Darley * win/tclWinFCmd.c: * tests/fCmd.test: fix to [Bug #747575] in which a bad error message is given when trying to rename a busy directory to one with the same prefix, but not the same name. Added three new tests. 2003-05-23 D. Richard Hipp * win/tclWinTime.c: Add tests to detect and avoid a division by zero in the windows precision timer calibration logic. 2003-05-23 Don Porter * generic/tclObj.c (tclCmdNameType): Converted internal rep management of the cmdName Tcl_ObjType the opposite way, to always use the twoPtrValue instead of always using the otherValuePtr. Previous fix on 2003-05-12 broke several extensions that wanted to poke around with the twoPtrValue.ptr2 value of a cmdName Tcl_Obj, like TclBlend and e4graph. [Bug 726018] Thanks to George Petasis for the bug report and Jacob Levy for testing assistance. 2003-05-23 Mo DeJong * unix/mkLinks: Set the var S to "" at the top of the file to avoid error when user has set S to something. [Tk Bug #739833] 2003-05-22 Daniel Steffen * macosx/Tcl.pbproj/project.pbxproj: added missing references to new source files tclPathObj.c and tclMacOSXFCmd.c. * macosx/tclMacOSXBundle.c: fixed a problem that caused only the first call to Tcl_MacOSXOpenVersionedBundleResources() for a given bundle identifier to succeed. This caused the tcl runtime library not to be found in all interps created after the inital one. 2003-05-19 Kevin B. Kenny * unix/tclUnixTime.c: Corrected a bug in conversion of non-ASCII chars in the format string. 2003-05-19 Daniel Steffen * macosx/Tcl.pbproj/project.pbxproj: changed tclConfig.sh location in versioned framework subdirectories to be identical to location in framework toplevel; fixed stub library symbolic links to be tcl version specific. * unix/tclUnixTime.c: fixed typo. 2003-05-18 Kevin Kenny * compat/strftime.c: Modified TclpStrftime to return its * generic/tclClock.c: result in UTF-8 encoding, and removed * mac/tclMacTime.c: the conversion from system encoding to * unix/tclUnixTime.c: UTF-8 from [clock format]. Needed to * win/tclWinTime.c: avoid double conversion of the timezone name on Windows systems. [Bug 624408] 2003-05-16 Pat Thoyts * library/dde/pkgIndex.tcl: Applied TIP #130 which provides * tests/winDde.test: for unique dde server names. Added * win/tclWinDde.c: some more tests. Fixes [Bug 219293] * doc/dde.n: Updated documentation re TIP #130. * tests/winDde.test: Applied patch for [Bug 738929] by KKB and changed to new-style tests. 2003-05-16 Kevin B. Kenny * unix/Makefile.in: Removed one excess source file tclDToA.c 2003-05-16 Daniel Steffen * macosx/Tcl.pbproj/project.pbxproj: updated copyright year. 2003-05-15 Kevin B. Kenny * generic/tclGetDate.y: added further hackery to the yacc * generic/tclDate.c: post-processing to arrange for the * unix/Makefile.in: code to set up exit handlers to free the stacks [Bug 736425]. 2003-05-15 Jeff Hobbs * win/tclWinFile.c (TclpMatchInDirectory): revert glob code to r1.44 as 2003-04-11 optimizations broke Windows98 glob'ing. * doc/socket.n: nroff font handling correction * library/encoding/gb2312-raw.enc (new): This is the original gb2312.enc renamed to allow for it to still be used. This is needed by Tk (unix) because X fonts with gb2312* charsets really do want the original gb2312 encoding. [Bug 557030] 2003-05-14 Donal K. Fellows * generic/tclCmdAH.c (Tcl_FormatObjCmd): Stop unwarranted demotion of wide values to longs by formatting of int values. [Bug 699060] 2003-05-14 Jeff Hobbs * library/encoding/gb2312.enc: copy euc-cn.enc over original gb2312.enc. gb2312.enc appeared to not work as expected, and most uses of gb2312 really mean euc-cn (which may be the cause of the problem). [Bug 557030] 2003-05-14 Daniel Steffen Implementation of TIP 118: * generic/tclFCmd.c (TclFileAttrsCmd): return the list of attributes that can be retrieved without error for a given file, instead of aborting the whole command when any error occurs. * unix/tclUnixFCmd.c: added support for new file attributes and for copying Mac OS X file attributes & resource fork during [file copy]. * generic/tclInt.decls: added declarations of new external commands needed by new file attributes support in tclUnixFCmd.c. * macosx/tclMacOSXFCmd.c (new): Mac OS X specific implementation of new file attributes and of attribute & resource fork copying. * mac/tclMacFCmd.c: added implementation of -rsrclength attribute & fixes to other attributes for consistency with OSX implementation. * mac/tclMacResource.c: fixes to OSType handling. * doc/file.n: documentation of [file attributes] changes. * unix/configure.in: check for APIs needed by new file attributes. * unix/Makefile.in: * unix/tcl.m4: added new platform specifc tclMacOSXFCmd.c source. * unix/configure: * generic/tclStubInit.c: * generic/tclIntPlatDecls.h: regen. * tools/genStubs.tcl: fixes to completely broken code trying to prevent overlap of "aqua", "macosx", "x11" and "unix" stub entries. * tests/unixFCmd.test: added tests of -readonly attribute. * tests/macOSXFCmd.test (new): tests of macosx file attributes and of preservation of attributes & resource fork during [file copy]. * tests/macFCmd.test: restore -readonly attribute of test dir, as otherwise its removal can fail on unices supporting -readonly. 2003-05-13 David Gravereaux * generic/tclEnv.c: Another putenv() copy behavior problem repaired when compiling on windows and using microsoft's runtime. [Bug 736421] 2003-05-13 Jeff Hobbs * generic/tclIOUtil.c: ensure cd is thread-safe. [Bug #710642] (vasiljevic) 2003-05-13 Donal K. Fellows * generic/tclEvent.c (Tcl_Finalize): Removed unused variable to reduce compiler warnings. [Bug 664745] 2003-05-13 Joe Mistachkin * generic/tcl.decls: Changed Tcl_JoinThread parameter name from * generic/tclDecls.h: "id" to "threadId". [Bug 732477] * unix/tclUnixThrd.c: * win/tclWinThrd.c: * mac/tclMacThrd.c: 2003-05-13 Daniel Steffen * generic/tcl.decls: * macosx/tclMacOSXBundle.c: added extended version of the Tcl_MacOSXOpenBundleResources() API taking an extra version number argument: Tcl_MacOSXOpenVersionedBundleResources(). This is needed to be able to access bundle resources in versioned frameworks such as Tcl and Tk, otherwise if multiple versions were installed, only the latest version's resources could be accessed. [Bug 736774] * unix/tclUnixInit.c (Tcl_MacOSXGetLibraryPath): use new versioned bundle resource API to get tcl runtime library for TCL_VERSION. [Bug 736774] * generic/tclPlatDecls.h: * generic/tclStubInit.c: regen. * unix/tclUnixPort.h: worked around the issue of realpath() not being thread-safe on Mac OS X by defining NO_REALPATH for threaded builds on Mac OS X. [Bug 711232] 2003-05-12 Donal K. Fellows * tests/cmdAH.test: General clean-up of tests so that all tcltest-specific commands are protected by constraints and all platforms see the same number of tests. [Bug 736431] 2003-05-12 Don Porter * generic/tclInterp.c: (AliasObjCmd): Added refCounting of the words * tests/interp.test (interp-33.1): of the target of an interp alias during its execution. Also added test. [Bug 730244]. * generic/tclBasic.c (TclInvokeObjectCommand): objv[argc] is no longer set to NULL (Tcl_CreateObjCommand docs already say that it should not be accessed). * tests/cmdMZ.test: Forgot to import [temporaryDirectory]. * generic/tclObj.c (tclCmdNameType): Corrected variable use of the otherValuePtr or the twoPtrValue.ptr1 fields to store a (ResolvedCmdName *) as the internal rep. [Bug 726018]. * doc/Eval.3: Corrected prototype for Tcl_GlobalEvalObj [Bug 727622]. 2003-05-12 Miguel Sofer * generic/tclVar.c (TclObjLookupVar): [Bug 735335] temporary fix, disabling usage of tclNsVarNameType. * tests/var.test (var-15.1): test for [Bug 735335] 2003-05-10 Jeff Hobbs * win/tclWinSerial.c (SerialCloseProc): correct mem leak on closing a Windows serial port [Bug #718002] (schroedter) * generic/tclCmdMZ.c (Tcl_StringObjCmd): prevent string repeat crash when overflow sizes were given (throws error). [Bug #714106] 2003-05-09 Joe Mistachkin * generic/tclThreadAlloc.c (TclFreeAllocCache): Fixed memory leak caused by treating cachePtr as a TLS index [Bug 731754]. * win/tclAppInit.c (Tcl_AppInit): Fixed memory leaks caused by not freeing the memory allocated by setargv and the async handler created by Tcl_AppInit. An exit handler has been created that takes care of both leaks. In addition, Tcl_AppInit now uses ckalloc instead of Tcl_Alloc to allow for easier leak tracking and to be more consistent with the rest of the Tcl core [Bugs 733156, 733221]. * tools/encoding/txt2enc.c (main): Fixed memory leak caused by failing to free the memory used by the toUnicode array of strings [Bug 733221]. 2003-05-09 Miguel Sofer * generic/tclCompile.c (TclCompileScript): * tests/compile.test (compile-3.5): corrected wrong test and behaviour in the earlier fix for [Bug 705406]; Don Porter reported this as [Bug 735055], and provided the solution. 2003-05-09 Donal K. Fellows * generic/tclCmdMZ.c (Tcl_ReturnObjCmd): The array of strings passed to Tcl_GetIndexFromObj must be NULL terminated. [Bug 735186] Thanks to Joe Mistachkin for spotting this. 2003-05-07 Donal K. Fellows * doc/trace.n: Fixed very strange language in the documentation for 'trace add execution'. [Bug 729821] * generic/tclCmdMZ.c (Tcl_TraceObjCmd): Made error message for 'trace info' more consistent with documentation. [Bug 706961] * generic/tclDictObj.c (DictInfoCmd): Fixed memory leak caused by confusion about string ownership. [Bug 731706] 2003-05-05 Don Porter * generic/tclBasic.c: Implementation of TIP 90, which * generic/tclCmdAH.c: extends the [catch] and [return] * generic/tclCompCmds.c: commands to enable creation of a * generic/tclExecute.c: proc that is a replacement for * generic/tclInt.h: [return]. [Patch 531640] * generic/tclProc.c: * generic/tclResult.c: * tests/cmdAH.test: * tests/cmdMZ.test: * tests/error.test: * tests/proc-old.test: * library/tcltest/tcltest.tcl: The -returnCodes option to [test] failed to recognize the symbolic name "ok" for return code 0. 2003-05-05 Donal K. Fellows * generic/tclBasic.c (Tcl_HideCommand): Fixed error message for grammar and spelling. 2003-04-28 Donal K. Fellows * generic/tclDictObj.c (DictIncrCmd): Updated to reflect the behaviour with wide increments of the normal [incr] command. * generic/tclInt.decls: Added TclIncrWideVar2 to internal stub table and cleaned up. * tests/incr.test (incr-3.*): * generic/tclVar.c (TclIncrWideVar2, TclPtrIncrWideVar): * generic/tclExecute.c (TclExecuteByteCode): * generic/tclCmdIL.c (Tcl_IncrObjCmd): Make [incr] work when trying to increment by wide values. [Bug 728838] * generic/tclCompCmds.c (TclCompileSwitchCmd): Default mode of operation of [switch] is exact matching. [Bug 727563] 2003-04-25 Don Porter * generic/tclBasic.c: Tcl_EvalObjv() failed to honor the TCL_EVAL_GLOBAL flag when resolving command names. Tcl_EvalEx passed a string rep including leading whitespace and comments to TclEvalObjvInternal(). 2003-04-25 Andreas Kupries * win/tclWinThrd.c: Applied SF patch #727271. This patch changes the code to catch any errors returned by the windows functions handling TLS ASAP instead of waiting to get some mysterious crash later on due to bogus pointers. Patch provided by Joe Mistachkin. This is a stop-gap measure to deal with the low number of ?TLS slots provided by some of the variants of Windows (60-80). 2003-04-24 Vince Darley * generic/tclFileName.c: fix to bug reported privately by Jeff where, for example, 'glob -path {[tcl]} *' gets confused by the leading special character (which is escaped internally), and instead lists files in '/'. Bug only occurs on Windows where '\' is also a directory separator. * tests/fileName.test: added test for the above bug. 2003-04-22 Andreas Kupries * The changes below fix SF bugs [593810], and [718045]. * generic/tclIO.c (Tcl_CutChannel, Tcl_SpliceChannel): Invoke TclpCutSockChannel and TclpSpliceSockChannel. * generic/tclInt.h: Declare TclpCutSockChannel and TclpSpliceSockChannel. * unix/tclUnixSock.c (TclpCutSockChannel, TclpSpliceSockChannel): Dummy functions, on unix the sockets are _not_ handled specially. * mac/tclMacSock.c (TclpCutSockChannel, TclpSpliceSockChannel): * win/tclWinSock.c (TclpCutSockChannel, TclpSpliceSockChannel): New functions to handle socket specific cut/splice operations: auto-initi of socket system for thread on splice, management of the module internal per-thread list of sockets, management of association of sockets with HWNDs for event notification. * win/tclWinSock.c (NewSocketInfo): Extended initialization assignments to cover all items of the structure. During debugging of the new code mentioned above I found that two fileds could contain bogus data. * win/tclWinFile.c: Added #undef HAVE_NO_FINDEX_ENUMS before definition because when compiling in debug mode the compiler complains about a redefinition, and this warning is also treated as an error. 2003-04-21 Don Porter * library/tcltest/tcltest.tcl: When the return code of a test does not meet expectations, report that as the reason for test failure, and do not attempt to check the test result for correctness. [Bug 725253] 2003-04-18 Jeff Hobbs * win/tclWinInt.h (VER_PLATFORM_WIN32_CE): conditionally define. * win/tclWinInit.c: recognize Windows CE as a Win platform. This just recognizes CE - full support will come later. * win/configure: regen * win/configure.in (SHELL): force it to /bin/sh as autoconf 2.5x uses /bin/bash, which can fail to find exes in the path (ie: lib). * generic/tclExecute.c (ExprCallMathFunc): remove incorrect extraneous cast from Tcl_WideAsDouble. 2003-04-18 Donal K. Fellows * doc/open.n: Moved serial port options from [fconfigure] * doc/fconfigure.n: to [open] as it is up to the creator of a channel to describe the channel's special config options. [Bug 679010] 2003-04-16 Don Porter * generic/tcl.h: Made changes so that the "wideInt" Tcl_ObjType * 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: 2003-04-17 Donal K. Fellows * doc/socket.n: Added a paragraph to remind people to specify their encodings when using sockets. [Bug 630621] 2003-04-16 Donal K. Fellows * doc/CrtMathFnc.3: Functions also have to deal with wide ints, but this was not documented. [Bug 709720] 2003-04-16 Vince Darley * generic/tclPathObj.c: removed undesired 'static' for function which is now shared (previously it was duplicated). 2003-04-15 Joe English * doc/namespace.n: added example section "SCOPED SCRIPTS", supplied by Kevin Kenny. (Fixes [Bug 219183]) 2003-04-15 Kevin Kenny * makefile.vc: Updated makefile.vc to conform with Mo DeJong's changes to Makefile.in and tclWinPipe.c on 2003-04-14. Now passes TCL_PIPE_DLL in place of TCL_DBGX. * win/tclWinTime.c: Corrected use of types to make compilation compatible with VC++5. 2003-04-15 Vince Darley * generic/tclIOUtil.c: finished check-in from yesterday, removing duplicate function definition. 2003-04-14 Don Porter * generic/tclClock.c: Corrected compiler warnings. * generic/tclTest.c: 2003-04-14 Mo DeJong * win/Makefile.in: Don't define TCL_DBGX symbol for every compile. Instead, define TCL_PIPE_DLL only when compiling tclWinPipe.c. This will break other build systems, so they will need to remove the TCL_DBGX define and replace it with a define for TCL_PIPE_DLL. * win/tclWinPipe.c (TclpCreateProcess): Remove PREFIX_IDENT and DEBUG_IDENT from top of file. Use TCL_PIPE_DLL passed in from build env instead of trying to construct the dll name from already defined symbols. This approach is more flexible and better in the long run. 2003-04-14 Kevin Kenny * win/tclWinFile.c: added conditionals to restore compilation on VC++6, which was broken by recent changes. 2003-04-14 Vince Darley * generic/tclIOUtil.c: * generic/tclPathObj.c: * generic/tclFileSystem.h: overlooked one function which was duplicated, so this is now shared between modules. * win/tclWinFile.c: allow this file to compile with VC++ 5.2 again since Mingw build fixes broke that. 2003-04-13 Mo DeJong * win/configure: Regen. * win/configure.in: Add check for FINDEX_INFO_LEVELS from winbase.h, known to be a problem in VC++ 5.2. Define HAVE_NO_FINDEX_ENUMS if the define does not exist. * win/tclWinFile.c: Put declarations for FINDEX_INFO_LEVELS and FINDEX_SEARCH_OPS inside a check for HAVE_NO_FINDEX_ENUMS so that these are not declared twice. This fixes the Mingw build. * win/tclWinTime.c: Rework the init of timeInfo so that the number or initializers matches the declaration. This was broken under Mingw. Add cast to avoid compile warning when calling the AccumulateSample function. 2003-04-12 Jeff Hobbs * win/Makefile.in (GENERIC_OBJS): add missing tclPathObj.c 2003-04-12 Kevin Kenny * doc/clock.n: * generic/tclClock.c (Tcl_ClockObjCmd): * tests/clock.test: Implementation of TIP #124. Also renumbered test cases to avoid duplicates [Bug 710310]. * tests/winTime.test: * win/tclWinTest.c (TestwinclockCmd, TestwinsleepCmd): * win/tclWinTime.c (Tcl_WinTime, UpdateTimeEachSecond, ResetCounterSamples, AccumulateSample, SAMPLES, TimeInfo): Made substantial changes to the phase-locked loop (replaced an IIR filter with an FIR one) in a quest for improved loop stability (Bug not logged at SF, but cited in private communication from Jeff Hobbs). 2003-04-11 Don Porter * generic/tclCmdMZ.c (Tcl_StringObjCmd,STR_IS_INT): Corrected inconsistent results of [string is integer] observed on systems where sizeof(long) != sizeof(int). [Bug 718878] * tests/string.test: Added tests for Bug 718878. * doc/string.n: Clarified that [string is integer] accepts 32-bit integers. 2003-04-11 Andreas Kupries * generic/tclIO.c (UpdateInterest): When dropping interest in TCL_READABLE now dropping interest in TCL_EXCEPTION too. This fixes a bug where Expect detects eof on a file prematurely on solaris 2.6 and higher. A much more complete explanation is in the code itself (40 lines of comments for a one-line change :) 2003-04-11 Vince Darley * tests/cmdAH.test: fix test suite problem if /home is a symlink [Bug #703264] * generic/tclIOUtil.c: fix bad error message with 'cd ""' [Bug #704917] * win/tclWinFile.c: * win/tclWin32Dll.c: * win/tclWinInt.h: allow Tcl to differentiate between reparse points which are symlinks and mounted volumes, and correctly handle the latter. This involves some elaborate code to find the actual drive letter (if possible) corresponding to a mounted volume. [Bug #697862] * tests/fileSystem.test: add constraints to stop tests running in ordinary tcl interpreter. [Bug #705675] * generic/tclIOUtil.c: * generic/tclPathObj.c: (new file) * generic/tclFileSystem.h: (new file) * win/makefile.vc: Split path object handling out of the virtual filesystem layer, into tclPathObj.c. This refactoring cleans up the internal filesystem code, and will make any future optimisations and forthcoming better thread-safety much easier. * generic/tclTest.c: * tests/reg.test: added some 'knownBug' tests for problems in Tcl's regexp code with the TCL_REG_CAN_MATCH flag (see Bug #703709). Code too impenetrable to fix right now, but a fix is needed for tip113 to work correctly. * tests/fCmd.test * win/tclWinFile.c: added some filesystem optimisation to the 'glob' implementation, and some new tests. * generic/tclCmdMZ.c: fix typo in comment * tests/winFile.test: * tests/ioUtil.test: * tests/unixFCmd.test: renumbered tests with duplicate numbers. (Bug #710361) 2003-04-10 Donal K. Fellows * doc/binary.n: Fixed typo in [binary format w] desc. [Bug 718543] 2003-04-08 Donal K. Fellows * generic/tclCmdAH.c (Tcl_ErrorObjCmd): Strings are only empty if they have zero length, not if their first byte is zero, so fix test guarding Tcl_AddObjErrorInfo to take this into account. [Bug reported by Don Porter; no bug-id.] 2003-04-07 Don Porter * generic/tclCompCmds.c (TclCompileIfCmd): Corrected string limits of arguments interpolated in error messages. [Bug 711371] * generic/tclCmdMZ.c (TraceExecutionProc): Added missing Tcl_DiscardResult() call to avoid memory leak. 2003-04-07 Donal K. Fellows * generic/tclDictObj.c (Tcl_DictObjCmd): Stopped compilers from moaning about switch fall-through. [Bug 716327] (DictFilterCmd): Yet more warning killing, this time reported by Miguel Sofer by private chat. 2003-04-07 Donal K. Fellows * tests/dict.test (dict-2.6): * generic/tclDictObj.c (Tcl_NewDictObj, Tcl_DbNewDictObj): Oops! Failed to fully initialise the Dict structure. (DictIncrCmd): Moved valueAlreadyInDictionary label to stop compiler complaints. [Bug 715751] * generic/tclDictObj.c (DictIncrCmd): Followed style in the rest of the core by commenting out wide-specific operations on platforms where wides are longs, and used longs more thoroughly than ints through [dict incr] anyway to forestall further bugs. * generic/tclObj.c: Made sure there's always a tclWideIntType implementation available, not that it is always useful. [Bug 713562] 2003-04-05 Donal K. Fellows * generic/tclDictObj.c: Removed commented out notes on declarations to be moved to elsewhere in the Tcl core. * generic/tclInt.h: Final stages of plumbing in. * generic/tclBasic.c: * generic/tclObj.c (TclInitObjSubsystem): * unix/Makefile.in, win/Makefile.in, win/makefile.[bv]c: Build support. * generic/tcl.decls: Added dict public API to stubs table. * generic/tcl.h (Tcl_DictSearch): Added declaration of structure to allow user code to iterate over dictionaries. * doc/DictObj.3: New files containing dictionary * doc/dict.n: implementation, documentation and tests * generic/tclDictObj.c: as mandated by TIP #111. * tests/dict.test: 2003-04-03 Mo DeJong * unix/configure: * unix/tcl.m4 (SC_CONFIG_CFLAGS): Don't set TCL_LIBS if it is already set to support use of TCL_LIBS var from tclConfig.sh in the Tk configure script. 2003-04-03 Mo DeJong * unix/Makefile.in: Don't subst MATH_LIBS, LIBS, and DL_LIBS separately. Instead, just subst TCL_LIBS since it includes the others. * unix/configure: Regen. * unix/tcl.m4 (SC_CONFIG_CFLAGS, SC_TCL_LINK_LIBS): Set and subst TCL_LIBS in SC_CONFIG_CFLAGS instead of SC_TCL_LINK_LIBS. Don't subst MATH_LIBS since it is now covered by TCL_LIBS. * unix/tclConfig.sh.in: Use TCL_LIBS instead of DL_LIBS, LIBS, and MATH_LIBS. * unix/dltest/Makefile.in: Ditto. 2003-04-03 Don Porter * generic/tclCompCmds.c (TclCompileReturnCmd): Now that [return] compiles to INST_RETURN, it is safe to compile even outside a proc. 2003-04-02 Mo DeJong * win/configure: Regen. * win/configure.in: Set stub lib flag based on new LIBFLAGSUFFIX variable. * win/tcl.m4 (SC_CONFIG_CFLAGS): Set new LIBFLAGSUFFIX that works like LIBSUFFIX, it is used when creating library names. The previous implementation would generate -ltclstub85 instead of -ltclstub85s when configured with --disable-shared. 2003-04-02 Don Porter * generic/tclParse.c (TclSubstTokens): Moved declaration of utfCharBytes to beginning of procedure so that it does not go out of scope (get free()d) while append is still pointing to it. [Bugs 703167, 713754] 2003-04-01 Mo DeJong * unix/configure: Regen. * unix/tcl.m4 (SC_CONFIG_CFLAGS): Check for inet_ntoa in -lbind inside the BeOS block since doing it later broke the build under SuSE 7.3. [Bug 713128] 2003-04-01 Don Porter * tests/README: Direct [source] of *.test files is no longer recommended. The tests/*.test files should only be evaluated under the control of the [runAllTests] command in tests/all.tcl. * generic/tclExecute.c (INST_RETURN): Bytecompiled [return] failed to reset iPtr->returnCode, causing tests parse-18.17 and parse-18.21 to fail strangely. * tests/parse.test (parse-18.21): Corrected now functioning test. Added further coverage tests. 2003-03-31 Don Porter * tests/parse.test (parse-18.*): Coverage tests for the new implementation of Tcl_SubstObj(). Note that tests parse-18.17 and parse-18.21 demonstrate some bugs left to fix in the current code. 2003-03-27 Mo DeJong * unix/configure: Regen. * unix/tcl.m4 (SC_CONFIG_CFLAGS): Use -Wl,--export-dynamic instead of -rdynamic for LDFLAGS. The -rdynamic is not documented so it seems better to pass the --export-dynamic flag to the linker. [Patch 573395] 2003-03-27 Miguel Sofer * tests/encoding.test: * tests/proc-old.test: * tests/set-old.test: Altered test numers to eliminate duplicates, [Bugs 710313, 710320, 710352] 2003-03-27 Donal K. Fellows * tests/parseOld.test: Altered test numers to eliminate duplicates. * tests/parse.test: [Bugs 710365, 710369] * tests/expr-old.test: * tests/expr.test: * tests/utf.test: Altered test numers to eliminate duplicates. * tests/trace.test: [Bugs 710322, 710327, 710349, 710363] * tests/lsearch.test: * tests/list.test: * tests/info.test: * tests/incr-old.test: * tests/if-old.test: * tests/format.test: * tests/foreach.test: 2003-03-26 Mo DeJong * unix/configure: Regen. * unix/tcl.m4 (SC_CONFIG_CFLAGS, SC_TCL_LINK_LIBS): Add BeOS system to SC_CONFIG_CFLAGS. Check for inet_ntoa in -lbind, needed for BeOS. 2003-03-26 Don Porter * doc/tcltest.n: * library/tcltest/tcltest.tcl: Added reporting during [configure -debug 1] operations to warn about multiple uses of the same test name. [FR 576693] * tests/msgcat.test (msgcat-2.2.1): changed test name to avoid duplication. [Bug 710356] * unix/dltest/pkg?.c: Changed all Tcl_InitStubs calls to pass argument exact = 0, so that rebuilds are not required when Tcl bumps to a new version. [Bug 701926] 2003-03-24 Miguel Sofer * generic/tclVar.c: * tests/var.test: fixing ObjMakeUpvar's lookup algorithm for the created local variable, bugs #631741 (Chris Darroch) and #696893 (David Hilker). 2003-03-24 Pat Thoyts * library/dde/pkgIndex.tcl: bumped version to 1.2.2 in tclWinDde.c, now adding here too. 2003-03-22 Kevin Kenny * library/dde/pkgIndex.tcl: * library/reg/pkgIndex.tcl: Fixed a bug where [package require dde] or [package require registry] attempted to load the release version of the DLL into a debug build. [Bug 708218] Thanks to Joe Mistachkin for the patch. * win/makefile.vc: Added quoting around the script name in the 'test' target; Joe Mistachkin insists that he has a configuration that fails to launch tcltest without it, and it appears harmless otherwise. 2003-03-22 Pat Thoyts * win/tclWinDde.c: Make dde services conform the the documentation such that giving only a topic name really returns all services with that topic. [Bug 219155] Prevent hangup caused by dde server applications failing to process messages [Bug 707822] * tests/winDde.test: Corrected labels and added a test for search by topic name. 2003-03-20 Don Porter * generic/tclInt.h (tclOriginalNotifier): * generic/tclStubInit.c (tclOriginalNotifier): * mac/tclMacNotify.c (Tcl_SetTimer,Tcl_WaitForEvent): * unix/tclUnixNotfy.c (Tcl_SetTimer,Tcl_WaitForEvent, Tcl_CreateFileHandler,Tcl_DeleteFileHandler): * win/tclWinNotify.c (Tcl_SetTimer,Tcl_WaitForEvent): Some linkers apparently use a different representation for a pointer to a function within the same compilation unit and a pointer to a function in a different compilation unit. This causes checks like those in the original notifier procedures to fall into infinite loops. The fix is to store pointers to the original notifier procedures in a struct defined in the same compilation unit as the stubs tables, and compare against those values. [Bug 707174] * generic/tclInt.h: Removed definition of ParseValue struct that is no longer used. 2003-03-19 Miguel Sofer * generic/tclCompile.c: * tests/compile.test: bad command count on TCL_OUT_LINE_COMPILE [Bug 705406] (Don Porter). 2003-03-19 Don Porter * library/auto.tcl: Replaced [regexp] and [regsub] with * library/history.tcl: [string map] where possible. Thanks * library/ldAout.tcl: to David Welton. [Bugs 667456,667558] * library/safe.tcl: Bumped to http 2.4.3, opt 0.4.5, and * library/http/http.tcl: tcltest 2.2.3. * library/http/pkgIndex.tcl: * library/opt/optparse.tcl: * library/opt/pkgIndex.tcl: * library/tcltest/tcltest.tcl: * library/tcltest/pkgIndex.tcl: * tools/genStubs.tcl: * tools/tcltk-man2html.tcl: * unix/mkLinks.tcl: * doc/Eval.3 (Tcl_EvalObjEx): Corrected CONST and * doc/ParseCmd.3 (Tcl_EvalTokensStandard): return type errors in documentation. [Bug 683994] * generic/tclCompCmds.c (TclCompileReturnCmd): Alternative fix for * generic/tclCompile.c (INST_RETURN): [Bug 633204] that uses a new * generic/tclCompile.h (INST_RETURN): bytecode INST_RETURN to * generic/tclExecute.c (INST_RETURN): properly bytecode the [return] command to something that returns TCL_RETURN. 2003-03-18 Mo DeJong * win/configure: Regen. * win/configure.in: Don't run the AC_CYGWIN macro since it uses AC_CANONICAL_HOST under autoconf 2.5X. Just check to see if __CYGWIN__ is defined by the compiler and set the ac_cv_cygwin variable based on that. [Bug 705912] 2003-03-18 Kevin Kenny * tests/registry.test: Changed the conditionals to avoid an abort if [testlocale] is missing, as when running the test in tclsh rather than tcltest. [Bug #705677] 2003-03-18 Daniel Steffen * tools/tcltk-man2html.tcl: added support for building 'make html' from inside distribution directories named with 8.x.x version numbers. tcltk-man2html now uses the latest tcl8.x.x resp. tk8.x.x directories found inside its --srcdir argument. 2003-03-17 Mo DeJong * tests/format.test: Renumber tests, a bunch of tests all had the same id. 2003-03-17 Donal K. Fellows * doc/lsearch.n: Altered documentation of -ascii options so * doc/lsort.n: they don't specify that they operate on ASCII strings, which they never did anyway. [Bug #703807] 2003-03-14 Donal K. Fellows * generic/tclCmdAH.c (Tcl_FormatObjCmd): Only add the modifier that indicates we've got a wide int when we're formatting in an integer style. Stops some libc's from going mad. [Bug #702622] Also tidied whitespace. 2003-03-13 Mo DeJong * win/tcl.m4 (SC_WITH_TCL): Port version number fix that was made in tk instead of tcl sources. 2003-03-13 Mo DeJong Require autoconf 2.57 or newer, see TIP 34 for a detailed explanation of why this is good. This will no doubt break the build on some platforms, let the flaming begin. * tools/configure: Regen with autoconf 2.57. * tools/configure.in: Require autoconf 2.57. * unix/configure: Regen with autoconf 2.57. * unix/configure.in: Require autoconf 2.57. Apply AC_LIBOBJ changes from patch 529884. * unix/tcl.m4: Ditto. * win/configure: Regen with autoconf 2.57. * win/configure.in: Require autoconf 2.57. Don't subst LIBOBJS since this happens by default, this avoids an autoconf error. 2003-03-12 Don Porter * generic/tclBasic.c (Tcl_EvalTokensStandard): * generic/tclCmdMZ.c (Tcl_SubstObj): * generic/tclCompCmds.c (TclCompileSwitchCmd): * generic/tclCompExpr.c (CompileSubExpr): * generic/tclCompile.c (TclSetByteCodeFromAny,TclCompileScript, TclCompileTokens,TclCompileCmdWord): * generic/tclCompile.h (TclCompileScript): * generic/tclExecute.c (TclCompEvalObj): * generic/tclInt.h (Interp,TCL_BRACKET_TERM,TclSubstTokens): * generic/tclParse.c (ParseTokens,Tcl_SubstObj,TclSubstTokens): * tests/subst.test (2.4, 8.7, 8.8, 11.4, 11.5): Substantial refactoring of Tcl_SubstObj to make use of the same parsing and substitution procedures as normal script evaluation. Tcl_SubstObj() moved to tclParse.c. New routine TclSubstTokens() created in tclParse.c which implements all substantial functioning of Tcl_EvalTokensStandard(). TclCompileScript() loses its "nested" argument, the Tcl_Interp struct loses its termOffset field and the TCL_BRACKET_TERM flag in the evalFlags field, all of which were only used (indirectly) by Tcl_SubstObj(). Tests subst-8.7,8.8,11.4,11.5 modified to accomodate the only behavior change: reporting of parse errors now takes precedence over [return] and [continue] exceptions. All other behavior should remain compatible. [RFE 536831,684982] [Bug 685106] * generic/tcl.h: Removed TCL_PREFIX_IDENT and TCL_DEBUG_IDENT * win/tclWinPipe.c: from tcl.h -- they are not part of Tcl's public interface. Put them in win/tclWinPipe.c where they are used. * generic/tclInterp.c (Tcl_InterpObjCmd): Corrected and added * tests/interp.test (interp-2.13): test for option parsing beyond objc for [interp create --]. Thanks to Marco Maggi. [Bug 702383] 2003-03-11 Kevin Kenny * win/makefile.vc: Added two missing uses of $(DBGX) so that tclpip8x.dll loads without panicking on Win9x. 2003-03-09 Kevin Kenny * generic/tclTest.c (TestChannelCmd): Removed an unused local variable that caused compilation problems on some platforms. 2003-03-08 Don Porter * doc/tcltest.n: Added missing "-body" to example. Thanks to Helmut Giese. [Bug 700011] 2003-03-07 Mo DeJong * tests/io.test: * tests/ioCmd.test: Define a fcopy constraint and add it to the constraint list of any test that depends on the fcopy command. This is only useful to Jacl which does not support fcopy. 2003-03-07 Mo DeJong * tests/encoding.test: Name temp files *.tcltestout instead of *.out so that when they are removed later, we don't accidently toast any files named *.out that the user has created in the build directory. 2003-03-07 Donal K. Fellows * generic/tclCmdAH.c (Tcl_FileObjCmd): Fix the setting of a file's mtime and atime on 64-bit platforms. [Bug #698146] 2003-03-06 Mo DeJong * tests/io.test: Doh! Undo accidental commenting out of a couple of tests. 2003-03-06 Mo DeJong * tests/io.test: Define a fileevent constraint and add it to the constraint list of any test that depends on the fileevent command. This is only useful to Jacl which does not support fileevent. 2003-03-06 Mo DeJong * tests/io.test: Define an openpipe constraint and add it to the constraint list of any test that creates a pipe using the open command. This is only useful to Jacl which does not support pipes. 2003-03-06 Don Porter * generic/TclUtf.c (Tcl_UniCharNcasecmp): Corrected failure to * tests/utf.test (utf-25.*): properly compare Unicode strings of different case in a case insensitive manner. [Bug 699042] 2003-03-06 Kevin Kenny * generic/tclCompCmds.c (TclCompileSwitchCmd): Replaced a non-portable 'bzero' with a portable 'memset'. [Bug 698442]. 2003-03-06 Mo DeJong * generic/tclIO.c (Tcl_Seek, Tcl_OutputBuffered): If there is data buffered in the statePtr->curOutPtr member then set the BUFFER_READY flag in Tcl_Seek. This is needed so that the next call to FlushChannel will write any buffered bytes before doing the seek. The existing code would set the BUFFER_READY flag inside the Tcl_OutputBuffered function. This was a programming error made when Tcl_OutputBuffered was originally created in CVS revision 1.35. The setting of the BUFFER_READY flag should not have been included in the Tcl_OutputBuffered function. * generic/tclTest.c (TestChannelCmd): Use the Tcl_InputBuffered and Tcl_OutputBuffered util methods to query the amount of buffered input and output. 2003-03-06 Mo DeJong * generic/tclIO.c (Tcl_Flush): Compare the nextAdded member of the ChannelBuffer to the nextRemoved member to determine if any output has been buffered. The previous check against the value 0 seems to have just been a coding error. See other methods like Tcl_OutputBuffered for examples where nextAdded is compared to nextRemoved to find the number of bytes buffered. 2003-03-06 Mo DeJong * generic/tclIO.c (Tcl_GetsObj): Check that the eol pointer has not gone past the end of the string when in auto translation mode and the INPUT_SAW_CR flag is set. The previous code worked because the end of string value \0 was being compared to \n, this patch just skips that pointless check. 2003-03-06 Mo DeJong * generic/tclIO.c (WriteBytes, WriteChars, Tcl_GetsObj, ReadBytes): Rework calls to TranslateOutputEOL to make it clear that a boolean value is being returned. Add some comments in an effort to make the code more clear. This patch makes no functional changes. 2003-03-06 Mo DeJong * generic/tclIO.c (Tcl_SetChannelOption): Invoke the Tcl_SetChannelBufferSize method as a result of changing the -buffersize option to fconfigure. The previous implementation used some inlined code that reset the buffer size to the default size instead of ignoring the request as implemented in Tcl_SetChannelBufferSize. * tests/io.test: Update test case so that it actually checks the implementation of Tcl_SetChannelBufferSize. 2003-03-05 David Gravereaux * win/rules.vc: updated default tcl version to 8.5. 2003-03-05 Donal K. Fellows * generic/tclCompCmds.c (TclCompileSwitchCmd): First attempt at a bytecode-compiled switch command. It only handles the most common case of switching, but that should be enough for this to speed up a lot of people's code. It is expected that the speed gains come from two things: better handling of the switch itself, and integrated compilation of the arms instead of embedding separate bytecode sequences (i.e. better local variable handling.) * tests/switch.test (switch-10.*): Tests of both uncompiled and compiled switch behaviour. [Patch #644819] * generic/tclCompile.h (TclFixupForwardJumpToHere): Additional macro to make the most common kind of jump fixup a bit easier. 2003-03-04 Don Porter * README: Bumped version number of * generic/tcl.h: Tcl to 8.5a0. * library/init.tcl: * mac/README: * macosx/Tcl.pbproj/project.pbxproj: * tests/basic.test: * tools/configure.in: * tools/tcl.hpj.in: * tools/tcl.wse.in: * unix/configure.in: * unix/tcl.spec: * win/README: * win/README.binary: * win/configure.in: * win/makefile.bc: * win/makefile.vc: * win/tcl.m4: * tools/configure: autoconf * unix/configure: * win/configure: 2003-03-03 Jeff Hobbs *** 8.4.2 TAGGED FOR RELEASE *** 2003-03-03 Daniel Steffen Mac OS Classic specific fixes: * generic/tclIOUtil.c (TclNewFSPathObj): on TCL_PLATFORM_MAC, skip potential directory separator at the beginning of addStrRep. * mac/tclMacChan.c (OpenFileChannel, CommonWatch): followup fixes to cut and splice implementation for file channels. * mac/tclMacFile.c (TclpUtime): pass native path to utime(). * mac/tclMacFile.c (TclpObjLink): correctly implemented creation of alias files via new static proc CreateAliasFile(). * mac/tclMacPort.h: define S_ISLNK macro to fix stat'ing of links. * mac/tclMacUtil.c (FSpLocationFromPathAlias): fix to enable stat'ing of broken links. 2003-03-03 Kevin Kenny * win/Makefile.vc: corrected bug introduced by 'g' for debug builds. 2003-03-03 Don Porter * library/dde/pkgIndex.tcl: dde bumped to version 1.2.1 for * win/tclWinDde.c: bundled release with Tcl 8.4.2 * library/reg/pkgIndex.tcl: registry bumped to version 1.1.1 for * win/tclWinReg.c: bundled release with Tcl 8.4.2 * library/opt/pkgIndex.tcl: updated package index to version 0.4.4 2003-02-28 Jeff Hobbs * win/configure: * win/configure.in: check for 'g' for debug build type, not 'd'. * win/rules.vc (DBGX): correct to use 'g' for nmake win makefile to match the cygwin makefile for debug builds. [Bug #635107] 2003-02-28 Vince Darley * doc/file.n: subcommand is 'file volumes' not 'file volume' 2003-02-27 Jeff Hobbs * generic/tclIOUtil.c (MakeFsPathFromRelative): removed dead code check of typePtr (darley). * tests/winTime.test: added note about PCI hardware dependency issues with high performance clock. 2003-02-27 Donal K. Fellows * tests/lsearch.test (lsearch-10.7): * generic/tclCmdIL.c (Tcl_LsearchObjCmd): Stopped -start option from causing an option when used with an empty list. [Bug #694232] 2003-02-26 Chengye Mao * win/tclWinInit.c: fixed a bug in TclpSetVariables by initializing dwUserNameLen with the sizeof(szUserName) before calling GetUserName. Don't know if this bug has been recorded: it caused crash in starting Tcl or wish in Windows. 2003-02-26 Jeff Hobbs * generic/tclCmdMZ.c (TraceCommandProc): Fix mem leak when deleting a command that had trace on it. [Bug #693564] (sofer) 2003-02-25 Don Porter * doc/pkgMkIndex.n: Modified [pkg_mkIndex] to use -nocase matching * library/package.tcl: of -load patterns, to better accomodate common user errors due to confusion between [package names] names and [info loaded] names. 2003-02-25 Andreas Kupries * tests/pid.test: See below [Bug #678412]. * tests/io.test: Made more robust against spaces in paths [Bug #678400]. 2003-02-25 Miguel Sofer * tests/execute.test: cleaning up testobj's at the end, to avoid leak warning by valgrind. 2003-02-22 Zoran Vasiljevic * generic/tclEvent.c (Tcl_FinalizeThread): Fix [Bug #571002] 2003-02-21 Donal K. Fellows * tests/binary.test (binary-44.[34]): * generic/tclBinary.c (ScanNumber): Fixed problem with unwanted sign-bit propagation when scanning wide ints. [Bug #690774] 2003-02-21 Daniel Steffen * mac/tclMacChan.c (TclpCutFileChannel, TclpSpliceFileChannel): Implemented missing cut and splice procs for file channels. 2003-02-21 Don Porter * library/package.tcl (tclPkgUnknown): Minor performance tweaks to reduce the number of [file] invocations. Meant to improve startup times, at least a little bit. [Patch 687906] 2003-02-20 Daniel Steffen * unix/tcl.m4: * unix/tclUnixPipe.c: (macosx) use vfork() instead of fork() to create new processes, as recommended by Apple (vfork can be up to 100 times faster thank fork on macosx). * unix/configure: regen. 2003-02-20 Jeff Hobbs * generic/tclEncoding.c (LoadTableEncoding): * library/encoding/cp932.enc: Correct jis round-trip encoding * library/encoding/euc-jp.enc: by adding 'R' type to .enc files. * library/encoding/iso2022-jp.enc: [Patch #689341] (koboyasi, taguchi) * library/encoding/jis0208.enc: * library/encoding/shiftjis.enc: * tests/encoding.test: * unix/tclUnixChan.c (Tcl_MakeTcpClientChannel): add MakeTcpClientChannelMode that takes actual mode flags to avoid hang on OS X (may be OS X bug, but patch works x-plat). [Bug #689835] (steffen) 2003-02-20 Donal K. Fellows * doc/regsub.n: Typo fix [Bug #688943] 2003-02-19 Jeff Hobbs * unix/tclUnixThrd.c (TclpReaddir): * unix/tclUnixPort.h: update to Bug 689100 patch to ensure that there is a defined value of MAXNAMLEN (aka NAME_MAX in POSIX) and that we have some buffer allocated. 2003-02-19 Daniel Steffen * generic/tclStringObj.c: restored Tcl_SetObjLength() side-effect of always invalidating unicode rep (if the obj has a string rep). Added hasUnicode flag to String struct, allows decoupling of validity of unicode rep from buffer size allocated to it (improves memory allocation efficiency). [Bugs #686782, #671138, #635200] * macosx/Tcl.pbproj/project.pbxproj: * macosx/Makefile: reworked embedded build to no longer require relinking but to use install_name_tool instead to change the install_names for embedded frameworks. [Bug #644510] * macosx/Tcl.pbproj/project.pbxproj: preserve mod dates when running 'make install' to build framework (avoids bogus rebuilds of dependent frameworks because tcl headers appear changed). * tests/ioCmd.test (iocmd-1.8): fix failure when system encoding is utf-8: use iso8859-1 encoding explicitly. 2003-02-18 Miguel Sofer * generic/tclCompile.c (TclCompileExprWords): remove unused variable "range" [Bug 664743] * generic/tclExecute.c (ExprSrandFunc): remove unused variable "result" [Bug 664743] * generic/tclStringObj.c (UpdateStringOfString): remove unused variable "length" [Bug 664751] * tests/execute.test (execute-7.30): fix for [Bug 664775] 2003-02-18 Andreas Kupries * unix/tcl.m4: [Bug #651811] Added definition of _XOPEN_SOURCE and linkage of 'xnet' library to HP 11 branch. This kills a lot of socket-related failures in the testsuite when Tcl was compiled in 64 bit mode (both PA-RISC 2.0W, and IA 64). * unix/configure: Regenerated. 2003-02-18 Jeff Hobbs * generic/tclIO.c (HaveVersion): correctly decl static * unix/tclUnixThrd.c (TclpReaddir): reduce size of name string in tsd to NAME_MAX instead of PATH_MAX. [Bug #689100] (waters) 2003-02-18 Mo DeJong * unix/configure: Regen. * unix/tcl.m4 (SC_ENABLE_THREADS): Make sure -lpthread gets passed on the link line when checking for the pthread_attr_setstacksize symbol. 2003-02-18 Vince Darley * generic/tclTest.c: cleanup of new 'simplefs' test code, and better documentation. 2003-02-17 Miguel Sofer * generic/tclBasic.c (TclRenameCommand): fixing error in previous commit. 2003-02-17 Jeff Hobbs * generic/tclExecute.c (TclExecuteByteCode INST_STR_MATCH): * generic/tclCmdMZ.c (Tcl_StringObjCmd STR_MATCH): * generic/tclUtf.c (TclUniCharMatch): * generic/tclInt.decls: add private TclUniCharMatch function that * generic/tclIntDecls.h: does string match on counted unicode * generic/tclStubInit.c: strings. Tcl_UniCharCaseMatch has the * tests/string.test: failing that it can't handle strings or * tests/stringComp.test: patterns with embedded NULLs. Added tests that actually try strings/pats with NULLs. TclUniCharMatch should be TIPed and made public in the next minor version rev. 2003-02-17 Miguel Sofer * generic/tclBasic.c (TclRenameCommand): 'oldFullName' object was not being freed on all function exits, causing a memory leak [Bug 684756] 2003-02-17 Mo DeJong * generic/tclIO.c (Tcl_GetsObj): Minor change so that eol is only assigned at the top of the TCL_TRANSLATE_AUTO case block. The other cases assign eol so this does not change any functionality. 2003-02-17 Kevin Kenny * tests/notify.test: Removed Windows line terminators. [Bug 687913]. 2003-02-15 Miguel Sofer * generic/tclBasic.c (Tcl_EvalEx): * generic/tclCompExpr.c (CompileSubExpr): * generic/tclCompile.c (TclCompileScript): * generic/tclParse.c (Tcl_ParseCommand, ParseTokens): * generic/tclParseExpr.c (ParsePrimaryExpr): * tests/basic.test (47.1): * tests/main.test (3.4): * tests/misc.test (1.2): * tests/parse.test (6.18): * tests/parseExpr.test (15.35): * tests/subst.test (8.6): Don Porter's fix for bad parsing of nested scripts [Bug 681841]. 2003-02-15 Kevin Kenny * tests/notify.test (new-file): * generic/tclTest.c (TclTest_Init, EventtestObjCmd, EventtestProc, EventTestDeleteProc): * generic/tclNotify.c (Tcl_DeleteEvents): Fixed Tcl_DeleteEvents not to get a pointer smash when deleting the last event in the queue. Added test code in 'tcltest' and a new file of test cases 'notify.test' to exercise this functionality; several of the new test cases fail for the original code and pass for the corrected code. [Bug 673714] * unix/tclUnixTest.c (TestfilehandlerCmd): Corrected a couple of typos in error messages. [Bug 596027] 2003-02-14 Jeff Hobbs * README: Bumped to version 8.4.2. * generic/tcl.h: * tools/tcl.wse.in: * unix/configure: * unix/configure.in: * unix/tcl.m4: * unix/tcl.spec: * win/README.binary: * win/configure: * win/configure.in: * macosx/Tcl.pbproj/project.pbxproj: * generic/tclStringObj.c (Tcl_GetCharLength): perf tweak * unix/tcl.m4: correct HP-UX ia64 --enable-64bit build flags 2003-02-14 Kevin Kenny * win/tclWinTime.c: Added code to test and compensate for forward leaps of the performance counter. See the MSDN Knowledge Base article Q274323 for the hardware problem that makes this necessary on certain machines. * tests/winTime.test: Revised winTime-2.1 - it had a tolerance of thousands of seconds, rather than milliseconds. (What's six orders of magnitude among friends? Both the above changes are triggered by a problem reported at http://aspn.activestate.com/ASPN/Mail/Message/ActiveTcl/1536811 although the developers find it difficult to believe that it accounts for the observed behavior and suspect a fault in the RTC chip. 2003-02-13 Kevin Kenny * win/tclWinInit.c: Added conversion from the system encoding to tcl_platform(user), so that it works with non-ASCII7 user names. [Bug 685926] * doc/tclsh.1: Added language to describe the handling of the end-of-file character \u001a embedded in a script file. [Bug 685485] 2003-02-11 Vince Darley * tests/fileName.test: * unix/tclUnixFile.c: fix for [Bug 685445] when using 'glob -l' on broken symbolic links. Added two new tests for this bug. 2003-02-11 Kevin Kenny * tests/http.test: Corrected a problem where http-4.14 would fail when run in an environment with a proxy server. Replaced references to scriptics.com by tcl.tk. 2003-02-11 Jeff Hobbs * tests/lsearch.test: * generic/tclCmdIL.c (Tcl_LsearchObjCmd): protect against the case that lsearch -regepx list and pattern objects are equal. * tests/stringObj.test: * generic/tclStringObj.c (Tcl_GetCharLength): correct ascii char opt of 2002-11-11 to not stop early on \x00. [Bug #684699] * tests.parse.test: remove excess EOF whitespace * generic/tclParse.c (CommandComplete): more paranoid check to break on (p >= end) instead of just (p == end). 2003-02-11 Miguel Sofer * generic/tclParse.c (CommandComplete): * tests/parse.test: fix for [Bug 684744], by Don Porter. 2003-02-11 Jeff Hobbs * generic/tclIOUtil.c (Tcl_FSJoinPath, Tcl_FSGetNormalizedPath): (UpdateStringOfFsPath): revert the cwdLen == 0 check and instead follow a different code path in Tcl_FSJoinPath. (Tcl_FSConvertToPathType, Tcl_FSGetNormalizedPath): (Tcl_FSGetFileSystemForPath): Update string rep of path objects before freeing the internal object. (darley) * tests/fileSystem.test: added test 8.3 * generic/tclIOUtil.c (Tcl_FSGetNormalizedPath): (UpdateStringOfFsPath): handle the cwdLen == 0 case * unix/tclUnixFile.c (TclpMatchInDirectory): simplify the hidden file match check. 2003-02-10 Mo DeJong * win/configure: * win/configure.in: Generate error when attempting to build under Cygwin. The Cygwin port of Tcl/Tk does not build and people are filing bug reports under the mistaken impression that someone is actually maintaining the Cygwin port. A post to comp.lang.tcl asking someone to volunteer as an area maintainer has generated no results. Closing bugs 680840, 630199, and 634772 and marking as "Won't fix". 2003-02-10 Donal K. Fellows * doc/append.n: Return value was not documented. [Bug 683188] 2003-02-10 Vince Darley * doc/FileSystem.3: * generic/tclIOUtil.c: * generic/tclInt.h: * tests/fileSystem.test: * unix/tclUnixFCmd.c: * unix/tclUnixFile.c: * win/tclWinFile.c: further filesystem optimization, applying [Patch 682500]. In particular, these code examples are faster now: foreach f $flist { if {[file exists $f]} {file stat $f arr;...}} foreach f [glob -dir $dir *] { # action and/or recursion on $f } cd $dir foreach f [glob *] { # action and/or recursion on $f } cd .. * generic/tclTest.c: Fix for [Bug 683181] where test suite left files in 'tmp'. 2003-02-08 Jeff Hobbs * library/safe.tcl: code cleanup of eval and string comp use. 2003-02-07 Vince Darley * win/tclWinFCmd.c: cleanup long lines * win/tclWinFile.c: sped up pure 'glob' by a factor of 2.5 ('foreach f [glob *] { file exists $f }' is still slow) * tests/fileSystem.text: * tests/fileName.test: added new tests to ensure correct behaviour in optimized filesystem code. 2003-02-07 Vince Darley * generic/tclTest.c: * tests/fileSystem.text: fixed test 7.2 to avoid a possible crash, and not change the pwd. * tests/http.text: added comment to test 4.15, that it may fail if you use a proxy server. 2003-02-06 Mo DeJong * generic/tclCompCmds.c (TclCompileIncrCmd): * tests/incr.test: Don't include the text "(increment expression)" in the errorInfo generated by the compiled version of the incr command since it does not match the message generated by the non-compiled version of incr. It is also not possible to match this error output under Jacl, which does not support a compiler. 2003-02-06 Mo DeJong * generic/tclExecute.c (TclExecuteByteCode): When an error is encountered reading the increment value during a compiled call to incr, add a "(reading increment)" error string to the errorInfo variable. This makes the errorInfo variable set by the compiled incr command match the value set by the non-compiled version. * tests/incr-old.test: Change errorInfo result for the compiled incr command case to match the modified implementation. * tests/incr.test: Add tests to make sure the compiled and non-compiled errorInfo messages are the same. 2003-02-06 Don Porter * library/tcltest/tcltest.tcl: Filename arguments to [outputChannel] and [errorChannel] (also -outfile and -errfile) were [open]ed but never [closed]. Also, [cleanupTests] could remove output or error files. [Bug 676978]. * library/tcltest/pkgIndex.tcl: Bumped to version 2.2.2. 2003-02-05 Mo DeJong * tests/interp.test: * tests/set-old.test: Run test cases that depend on hash order through lsort so that the tests also pass under Jacl. Does not change test results under Tcl. 2003-02-04 Vince Darley * generic/tclIOUtil.c: * generic/tclEvent.c: * generic/tclInt.h: * mac/tclMacFCmd.c: * unix/tclUnixFCmd.c: * win/tclWin32Dll.c: * win/tclWinFCmd.c: * win/tclWinInit.c: * win/tclWinInt.h: * tests/fileSystem.test: fix to finalization/unloading/encoding issues to make filesystem much less dependent on encodings for its cleanup, and therefore allow it to be finalized later in the exit process. This fixes fileSystem.test-7.1. Also fixed one more bug in setting of modification dates of files which have undergone cross-platform copies. [Patch 676271] * tests/basic.test: * tests/exec.test: * tests/fileName.test: * tests/io.test: fixed some test failures when tests are run from a directory containing spaces. * tests/fileSystem.test: * generic/tclTest.c: added regression test for the modification date setting of cross-platform file copies. 2003-02-03 Kevin Kenny * generic/tclBasic.c: Changed [trace add command] so that 'rename' callbacks get fully qualified names of the command. [Bug 651271]. ***POTENTIAL INCOMPATIBILITY*** * tests/trace.test: Modified the test cases for [trace add command] to expect fully qualified names on the 'rename' callbacks. Added a case for renaming a proc within a namespace. * doc/trace.n: Added language about use of fully qualified names in trace callbacks. 2003-02-01 Kevin Kenny * generic/tclCompCmds.c: Removed an unused variable that caused compiler warnings on SGI. [Bug 664379] * generic/tclLoad.c: Changed the code so that if Tcl_StaticPackage is called to report the same package as being loaded in two interps, it shows up in [info loaded {}] in both of them (previously, it didn't appear in the static package list in the second. * tests/load.test Added regression test for the above bug. [Bug 670042] * generic/tclClock.c: Fixed a bug that incorrectly allowed [clock clicks {}] and [clock clicks -] to be accepted as if they were [clock clicks -milliseconds]. * tests/clock.test: Added regression tests for the above bug. [Bug 675356] * tests/unixNotfy.test: Added cleanup of working files [Bug 675609] * doc/Tcl.n: Added headings to the eleven paragraphs, to improve formatting in the tools that attempt to extract tables of contents from the manual pages. [Bug 627455] * generic/tclClock.c: Expanded mutex protection around the setting of env(TZ) and the thread-unsafe call to tzset(). [Bug 656660] 2003-01-31 Don Porter * tests/tcltest.test: Cleaned up management of file/directory creation/deletion to improve "-debug 1" output. [Bug 675614] The utility [slave] command failed to properly [list]-quote a constructed [open] command, causing failure when the pathname contained whitespace. [Bug 678415] * tests/main.test: Stopped main.test from deleting existing file. Test suite should not delete files that already exist. [Bug 675660] 2003-01-28 Don Porter * tests/main.test: Constrain tests that do not work on Windows. [Bug 674387] 2003-01-28 Vince Darley * generic/tclIOUtil.c: fix to setting modification date in TclCrossFilesystemCopy. Also added 'panic' in Tcl_FSGetFileSystemForPath under illegal calling circumstances which lead to hard-to-track-down bugs. * generic/tclTest.c: added test suite code to allow exercising a vfs-crash-on-exit bug in Tcl's finalization caused by the encodings being cleaned up before unloading occurs. * tests/fileSystem.test: added new 'knownBug' test 7.1 to demonstrate the crash on exit. 2003-01-28 Mo DeJong * generic/tcl.h: Add TCL_PREFIX_IDENT and TCL_DEBUG_IDENT, used only by TclpCreateProcess. * unix/Makefile.in: Define TCL_DBGX. * win/Makefile.in: Define TCL_DBGX. * win/tclWinPipe.c (TclpCreateProcess): Check that the Tcl pipe dll actually exists in the Tcl bin directory and panic if it is not found. Incorporate TCL_DBGX into the Tcl pipe dll name. This fixes a really mysterious error that would show up when exec'ing a 16 bit application under Win95 or Win98 when Tcl was compiled with symbols. The error seemed to indicate that the executable could not be found, but it was actually the Tcl pipe dll that could not be found. 2003-01-26 Mo DeJong * win/README: Update msys+mingw URL to release 6. This version bundles gcc 3. 2003-01-26 Mo DeJong * win/configure: Regen. * win/configure.in: Add test that checks to see if the compiler can cast to a union type. * win/tclWinTime.c: Squelch compiler warning about union initializer by casting to union type when compiling with gcc. 2003-01-25 Mo DeJong * generic/tclIO.c (Tcl_CutChannel, Tcl_SpliceChannel): Invoke TclpCutFileChannel and TclpSpliceFileChannel. * generic/tclInt.h: Declare TclpCutFileChannel and TclpSpliceFileChannel. * unix/tclUnixChan.c (FileCloseProc, TclpOpenFileChannel, Tcl_MakeFileChannel, TclpCutFileChannel, TclpSpliceFileChannel): Implement thread load data cut and splice for file channels. This avoids an invalid memory ref when compiled with -DDEPRECATED. * win/tclWinChan.c (FileCloseProc, TclpCutFileChannel, TclpSpliceFileChannel): Implement thread load data cut and splice for file channels. This avoids an invalid memory ref that was showing up in the thread extension. 2003-01-25 Mo DeJong * win/tclWin32Dll.c (TclpCheckStackSpace, squelch_warnings): * win/tclWinChan.c (Tcl_MakeFileChannel, squelch_warnings): * win/tclWinFCmd.c (DoRenameFile, DoCopyFile, squelch_warnings): Re-implement inline ASM SEH handlers for gcc. The esp and ebp registers are now saved on the stack instead of in global variables so that the code is thread safe. Add additional checks when TCL_MEM_DEBUG is defined to be sure the values were recovered from the stack properly. Remove squelch_warnings functions and add a dummy call in the handler methods to squelch compiler warnings. 2003-01-25 Mo DeJong * win/configure: * win/configure.in: Define HAVE_ALLOCA_GCC_INLINE when we detect that no alloca function is found in malloc.h and we are compiling with GCC. Remove HAVE_NO_ALLOC_DECL define. * win/tclWin32Dll.c (TclpCheckStackSpace): Don't define alloca as a cdecl function. Doing this caused a tricky runtime bug because the _alloca function expects the size argument to be passed in a register and not on the stack. To fix this problem, we use inline ASM when compiling with gcc to invoke _alloca with the size argument loaded into a register. 2003-01-24 Jeff Hobbs * win/tclWinDde.c (Dde_Init): clarified use of tsdPtr. (DdeServerProc): better refcount handling of returnPackagePtr. * generic/tclEvent.c (Tcl_Finalize): revert finalize change on 2002-12-04 to correct the issue with extensions that have TSD needing to finalize that before they are unloaded. This issue needs further clarification. * tests/unixFCmd.test: only do groups check on unix 2003-01-24 Vince Darley * generic/tclStringObj.c: proper fixes for Tcl_SetObjLength and Tcl_AttemptSetObjectLength dealing with string objects with both pure-unicode and normal internal representations. Previous fix didn't handle all cases correctly. * generic/tclIO.c: Add 'Tcl_GetString()' to ensure the object has a valid 'objPtr->bytes' field before manipulating it directly. This fixes [Bug 635200] and [Bug 671138], but may reduce performance of Unicode string handling in some cases. A further patch will be applied to address this, once the code is known to be correct. 2003-01-24 Mo DeJong * win/configure: Regen. * win/configure.in: Add test to see if alloca is undefined in malloc.h. * win/tclWin32Dll.c (TclpCheckStackSpace): Rework the SEH exception handler logic to avoid using the stack since alloca will modify the stack. This was causing a nasty bug that would set the exception handler to 0 because it tried to pop the previous exception handler off the top of the stack. 2003-01-23 Donal K. Fellows * doc/lset.n: Fixed fault in return values from lset in documentation examples [SF Bug #658463] and tidied up a bit at the same time. 2003-01-21 Joe English * doc/namespace.n (namespace inscope): Clarified documentation [SF Patch #670110] 2003-01-21 Mo DeJong * win/configure: Regen. * win/tcl.m4 (SC_CONFIG_CFLAGS): Set SHLIB_SUFFIX so that TCL_SHLIB_SUFFIX will be set to a useful value in the generated tclConfig.sh. Set SHLIB_LD_LIBS to "" or '${LIBS}' based on the --enable-shared flag. This matches the UNIX implementation. 2003-01-18 Jeff Hobbs * generic/tclCkalloc.c: change %ud to %u as appropriate. 2003-01-17 Mo DeJong * win/tclWinDde.c (DdeServerProc): Deallocate the Tcl_Obj returned by ExecuteRemoteObject if it was not saved in a connection object. 2003-01-17 Mo DeJong * generic/tcl.h: Revert earlier change that defined TCL_WIDE_INT_TYPE as long long and TCL_LL_MODIFIER as L when compiling with mingw. This change ended up causing some test case failures when compiling with mingw. * generic/tclObj.c (UpdateStringOfWideInt): Describe the warning generated by mingw and why it needs to be ignored so that someone is not tempted to "fix" this problem again in the future. 2003-01-16 Vince Darley * generic/tclStringObj.c: Tcl_SetObjLength fix for when the object has a unicode string rep. Fixes [Bug 635200] * tests/stringObj.test: removed 'knownBug' constraint from test 14.1 now that this bug is fixed. * generic/tclInt.h: * generic/tclBasic.c: * generic/tclCmdMZ.z: * tests/trace.test: execution and command tracing bug fixes and cleanup. In particular fixed [Bug 655645], [Bug 615043], [Bug 571385] - fixed some subtle cleanup problems with tracing. This required replacing Tcl_Preserve/Tcl_Release with a more robust refCount approach. Solves at least one known crash caused by memory corruption. - fixed some confusion in the code between new style traces (Tcl 8.4) and the very limited 'Tcl_CreateTrace' which existed before. - made behaviour consistent with documentation (several tests even contradicted the documentation before). - fixed some minor error message details - added a number of new tests 2003-01-16 Jeff Hobbs * win/tclWinSerial.c (SerialOutputProc): add casts for bytesWritten to allow strict compilation (no warnings). * tests/winDde.test: * win/tclWinDde.c (Tcl_DdeObjCmd): Prevent crash when empty service name is passed to 'dde eval' and goto errorNoResult in request and poke error cases to free up any allocated data. 2003-01-16 Mo DeJong * win/tclWin32Dll.c (squelch_warnings): Squelch compiler warnings from SEH ASM code. * win/tclWinChan.c (squelch_warnings): Squelch compiler warnings from SEH ASM code. * win/tclWinDde.c: Add casts to avoid compiler warnings. Pass pointer to DWORD instead of int to avoid compiler warnings. * win/tclWinFCmd.c (squelch_warnings): Add casts and fixup decls to avoid compiler warnings. Squelch compiler warnings from SEH ASM code. * win/tclWinFile.c: Add casts and fixup decls to avoid compiler warnings. Remove unused variable. * win/tclWinNotify.c: Declare as DWORD instead of int to avoid compiler warning. * win/tclWinReg.c: Add casts to avoid compiler warning. Fix assignment in if expression bug. * win/tclWinSerial.c: Add casts to avoid compiler warnings. Remove unused variable. * win/tclWinSock.c: Add casts and fixup decls to avoid compiler warnings. 2003-01-14 Jeff Hobbs * generic/tclClock.c (FormatClock): corrected typo that incorrectly conditionally defined savedTZEnv and savedTimeZone. 2003-01-13 Mo DeJong Fix mingw build problems and compiler warnings. * generic/tcl.h: Add if defined(__MINGW32__) check to code that sets the TCL_WIDE_INT_TYPE and TCL_LL_MODIFIER. * generic/tclClock.c (FormatClock): Don't define savedTimeZone and savedTZEnv if we are not going to use them. * generic/tclEnv.c: Add cast to avoid warning. * win/tclWinChan.c: Use DWORD instead of int to avoid compiler warning. * win/tclWinThrd.c: Only define allocLock, allocLockPtr, and dataKey when TCL_THREADS is defined. This avoid a compiler warning about unused variables. 2003-01-12 Mo DeJong * win/README: Update msys + mingw URL, the new release includes the released 1.0.8 version of msys which includes a number of bug fixes. 2003-01-12 Mo DeJong * win/configure: Regen. * win/tcl.m4 (SC_CONFIG_CFLAGS): Pull in addition of shell32.lib to LIBS_GUI that was added to the Tk tcl.m4 but never made it back into the Tcl version. 2003-01-12 Mo DeJong * generic/tcl.h: Skip Tcl's define of CHAR, SHORT, and LONG when HAVE_WINNT_IGNORE_VOID is defined. This avoids a bunch of compiler warnings when building with Cygwin or Mingw. * win/configure: Regen. * win/configure.in: Define HAVE_WINNT_IGNORE_VOID when we detect a winnt.h that still defines CHAR, SHORT, and LONG when VOID has already been defined. * win/tcl.m4 (SC_LOAD_TCLCONFIG): Subst the TCL_DEFS loaded from tclConfig.sh so that Tcl defines can make it into the Tk Makefile. 2003-01-12 Mo DeJong * win/configure: Regen. * win/configure.in: Check for typedefs like LPFN_ACCEPT in winsock2.h and define HAVE_NO_LPFN_DECLS if not found. * win/tclWinSock.c: Define LPFN_* typedefs if HAVE_NO_LPFN_DECLS is defined. This fixes the build under Mingw and Cygwin, it was broken by the changes made on 2002-11-26. 2003-01-10 Vince Darley * generic/tclIOUtil.c: * win/tclWinInt.h: * win/tclWinInit.c: fix to new WinTcl crash on exit with vfs, introduced on 2002-12-06. Encodings must be cleaned up after the filesystem. * win/makefile.vc: fix to minor VC++ 5.2 syntax problem 2003-01-09 Don Porter * generic/tclCompCmds.c (TclCompileReturnCmd): Corrected off-by-one problem with recent commit. [Bug 633204] 2003-01-09 Vince Darley * generic/tclFileName.c: remove unused variable 'macSpecialCase' [Bug 664749] * generic/tclIOUtil.c: * generic/tclInt.h: * unix/tclUnixFile.c: * mac/tclMacFile.c: * win/tclWinFile.c: * win/tclWinInt.h: * win/tclWin32Dll.c: * tests/cmdAH.test: fix to non-ascii chars in paths when setting mtime and atime through 'file (a|m)time $path $time' [Bug 634151] 2003-01-08 Don Porter * generic/tclExecute.c (TclExprFloatError): Use the IS_NAN macro for greater clarity of code. 2003-01-07 Don Porter * generic/tclCompCmds.c (TclCompileReturnCmd): * tests/compile.test: Corrects failure of bytecompiled [catch {return}] to have result TCL_RETURN (not TCL_OK) [Bug 633204]. This patch is a workaround for 8.4.X. A new opcode INST_RETURN is a better long term solution for 8.5 and later. 2003-01-04 David Gravereaux * win/makefile.vc: * win/rules.vc: Fixed INSTALLDIR macro problem that blanked itself by accident causing the install target to put the tree at the root of the drive built on. Whoops.. Renamed the 'linkexten' option to be 'staticpkg'. Added 'thrdalloc' to allow the switching _on_ of the thread allocator. Under testing, I found it not to be benificial under windows for the purpose of the application I was using it for. It was more important for this app that resources for tcl threads be returned to the system rather than saved/moved to the global recycler. Be extra clean or extra fast for the default threaded build? Let's move to clean and allow it to be switched on for users who find it benificial for their use of threads. ****************************************************************** *** CHANGELOG ENTRIES FOR 2002 IN "ChangeLog.2002" *** *** CHANGELOG ENTRIES FOR 2001 IN "ChangeLog.2001" *** *** CHANGELOG ENTRIES FOR 2000 IN "ChangeLog.2000" *** *** CHANGELOG ENTRIES FOR 1999 AND EARLIER IN "ChangeLog.1999" *** ******************************************************************