| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
commentary to a piece of code which relies on BUFFER_PADDING to
create enough space at the beginning of each buffer forthe
insertion of partial multi-byte data at the beginning of a
buffer. To explain why this code is ok, and as precaution if
someone twiddled the BUFFER_PADDING into uselessness.
* generic/tclIO.c (ReadChars): [SF Tcl Bug 1462248]. Added code
temporarily suppress the use of TCL_ENCODING_END set when eof
was reached while the buffer we are converting is not truly the
last buffer in the queue. together with the Utf bug below it was
possible to completely bollox the buffer data structures,
eventually crashing Tcl.
* generic/tclEncoding.c (UtfToUtfProc): Fixed problem where the
function accessed memory beyond the end of the input
buffer. When TCL_ENCODING_END is set and the last bytes of the
buffer start a multi-byte sequence. This bug contributed to [SF
Tcl Bug 1462248].
|
|
|
|
| |
produced a huge slowdown in encoding.test on Windows.
|
|
|
|
| |
is missing one of its sub-encodings [Bug 506653].
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* doc/Encoding.3: New subcommand [encoding dirs].
* doc/encoding.n: New routine Tcl_GetEncodingNameFromEnvironment.
* generic/tcl.decls: Made public:
* generic/tclBasic.c: TclGetEncodingFromObj
* generic/tclCmdAH.c: -> Tcl_GetEncodingFromObj
* generic/tclEncoding.c:TclGetEncodingSearchPath
* generic/tclInt.decls: -> Tcl_GetEncodingSearchPath
* generic/tclInt.h: TclSetEncodingSearchPath
* generic/tclTest.c: -> Tcl_SetEncodingSearchPath
* library/init.tcl: Removed commands:
* tests/cmdAH.test: [tcl::unsupported::EncodingDirs]
* tests/encoding.test: [testencoding path] (Tcltest)
* unix/tclUnixInit.c: [Patch 1413934].
* win/tclWinInit.c:
* generic/tclDecls.h: make genstubs
* generic/tclIntDecls.h:
* generic/tclStubInit.c:
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
static modifier in declaration and definition of function.
* unix/tclUnixChan.c (FileTruncateProc): Synchronized use of
static modifier in declaration and definition of function.
* generic/tclResult.c (ReleaseKeys): Synchronized use of static
modifier in declaration and definition of function.
* generic/tclListObj.c (NewListIntRep): Synchronized use of static
modifier in declaration and definition of function.
* generic/tclEncoding.c (InitializeEncodingSearchPath):
Synchronized use of static modifier in declaration and
definition of function.
* generic/tclEncoding.c (FillEncodingFileMap): Synchronized use of
static modifier in declaration and definition of function.
* generic/tclIORChan.c (RcNewHandle): Synchronized use of static
modifier in declaration and definition of function.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* generic/tclUtil.c (TclGetProcessGlobalValue): More robust handling
of bad TclInitProcessGlobalValueProc behavior; an immediate panic
rather than a mysterious crash later.
* generic/tclEncoding.c: Several changes to the way the
encodingFileMap cache is maintained. Previously, it was attempted
to keep the file map filled and up to date with changes in the
encoding search path. This contributed to slow startup times since
it required an expensive "glob" operation to fill the cache. Now the
validity of items in the cache are checked at the time they are
used, so the cache is permitted to fall out of sync with the
encoding search path. Only [encoding names] and Tcl_GetEncodingNames()
now pay the full expense. [Bug 1177363]
|
|
|
|
|
|
|
|
|
| |
* generic/tclEncoding.c (TclGetEncodingFromObj): retrieve a
Tcl_Encoding value, as well as cache it in the internal rep
of a new "encoding" Tcl_ObjType.
* generic/tclCmdAH.c (Tcl_EncodingObjCmd): Updated to call
new function so that Tcl_Encoding's used by [encoding convert*]
routines are not freed too quickly. [Bug 1077262]
|
|
|
|
| |
* generic/tclUtil.c: Rolf Ade for reports and testing [Bug 1083082]
|
|
|
|
|
|
|
|
|
| |
* generic/tclEvent.c: Broke apart TclpSetInitialEncodings() on
* generic/tclInt.h: Windows into TclpSetInterfaces(), that is
* unix/tclUnixInit.c: fundamentally essential, and the initialization
* win/tclWinInit.c: of the system encoding, which is not. Made
the TclpSetInterfaces call part of TclInitSubsystems so it cannot be
overlooked.
|
|
|
|
|
|
|
|
| |
where a ProcessGlobalValue might be assigned to itself.
* generic/tclEncoding.c (MakeFileMap): Correct refcounting errors
managing values returned by TclPathPart (with refCount of 1!) that
led to a memory leak. [Bug 1077474].
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* generic/tclEncoding.c: make use of a ProcessGlobalValue for
* generic/tclEvent.c: storing the executable name.
Added internal routines Tcl(Get|Set)ObjNameOfExecutable() to access
that storage in Tcl_Obj, rather than string format.
* unix/tclUnixFile.c: Rewrote TclpFindExecutable() to use
* win/tclWinFile.c: TclSetObjNameOfExecutable to store the
executable name it computes.
* generic/tclInt.h: Added internal stub entries for
* generic/tclInt.decls: TclpFindExecutable and
Tcl(Get|Set)ObjNameOfExecutable.
* generic/tclIntDecls.h: make genstubs
* generic/tclStubInit.c:
* generic/tclCmdIL.c: Retrieve executable name in Tcl_Obj form
* win/tclWinPipe.c: instead of string form.
* unix/tclUnixTest.c: Update [testfindexecutable] command to use
new internal interfaces.
|
|
|
|
|
|
|
|
| |
call from Tcl_FindExecutable() into TclInitEncodingSubsystem().
This is important on Windows where it establishes whether the
"ascii" or "unicode" set of system routines will be used, and
that needs to be done earlier to support filesystem operations.
[Bug 1077005]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
startup/initialization of the Tcl library, focused on the
activities of Tcl_FindExecutable().
* generic/tclIO.c: Removed bogus claim in comment that
encoding "iso8859-1" is "built-in" to Tcl.
* generic/tclInt.h: Created a new struct ProcessGlobalValue,
* generic/tclUtil.c: routines Tcl(Get|Set)ProcessGlobalValue,
and function type TclInitProcessGlobalValueProc. Together, these
take care of the housekeeping for "values" (things that can be
held in a Tcl_Obj) that are global across a whole process. That is,
they are shared among multiple threads, and epoch and mutex
protection must govern the validity of cached copies maintained
in each thread.
* generic/tclNotify.c: Modified TclInitNotifier() to tolerate
being called multiple times in the same thread.
* generic/tclEvent.c: Dropped the unused argv0 argument to
TclInitSubsystems(). Removed machinery to unsure only one
TclInitNotifier() call per thread, now that that is safe.
Converted Tcl(Get|Set)LibraryPath to use a ProcessGlobalValue,
and moved them to tclEncoding.c.
* generic/tclBasic.c: Updated caller.
* generic/tclInt.h: TclpFindExecutable now returns void.
* unix/tclUnixFile.c:
* win/tclWinFile.c:
* win/tclWinPipe.c:
* generic/tclEncoding.c: Built new encoding search initialization
on a foundation of ProcessGlobalValues, exposing new routines
Tcl(Get|Set)EncodingSearchPath. A cache of a map from encoding name
to directory pathname keeps track of where encodings are available
for loading. Tcl_FindExecutable greatly simplified into just
three function calls. The "library path" is now misnamed, as its
only remaining purpose is as a foundation for the default encoding
search path.
* generic/tclInterp.c: Inlined the initScript that is evaluated
by Tcl_Init(). Added verification after initScript evaluation
that Tcl can find its installed *.enc files, and that it has
initialized [encoding system] in agreement with what the environment
expects. [tclInit] no longer driven by the value of $::tcl_libPath;
it largely constructs its own search path now, rather than attempt
to share one with the encoding system.
* unix/tclUnixInit.c: TclpSetInitialEncodings factored so that a new
* win/tclWinInit.c: routine TclpGetEncodingNameFromEnvironment
can reveal that Tcl thinks the [encoding system] should be, even
when an incomplete encoding search path, or a missing *.enc file
won't allow that initialization to succeed. TclpInitLibraryPath
reworked as an initializer of a ProcessGlobalValue.
* unix/tclUnixTest.c: Update implementations of [testfindexecutable],
[testgetdefenc], and [testsetdefenc].
* tests/unixInit.test: Corrected tests to operate properly even
when a value of TCL_LIBRARY is required to find encodings.
* generic/tclInt.decls: New internal stubs: TclGetEncodingSearchPath,
TclSetEncodingSearchPath, TclpGetEncodingNameFromEnvironment. These
are candidates for public exposure by future TIPs.
* generic/tclIntDecls.h: make genstubs
* generic/tclStubInit.c:
* generic/tclTest.c: Updated [testencoding] to use
* tests/encoding.test: Tcl(Get|Set)EncodingSearchPath. Updated tests.
|
|
|
|
| |
condition when TCL_UTF_MAX == 6. [Bug 1004065]
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* generic/tclBinary.c:
* generic/tclCmdAH.c:
* generic/tclCmdIL.c:
* generic/tclCmdMZ.c:
* generic/tclCompExpr.c:
* generic/tclDictObj.c:
* generic/tclEncoding.c:
* generic/tclExecute.c:
* generic/tclFCmd.c:
* generic/tclHistory.c:
* generic/tclIndexObj.c:
* generic/tclInterp.c:
It is a poor practice to directly set or append to the value
of the objResult of an interp, because that value might be
shared, and in that circumstance a Tcl_Panic() will be the
result. Searched for example of this practice and replaced
with safer alternatives, often using the Tcl_AppendResult()
routine that dkf just rehabilitated.
|
|
|
|
|
|
|
| |
* 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:
|
|
|
|
|
|
| |
* tests/encoding.test: added support and tests for translating
embedded null characters between real nullbytes and the internal
representation on input/output (Bug #949905).
|
|
|
|
|
| |
before the hash table itereation as it was causing a double free attempt under
some conditions.
|
|
|
|
| |
because its ref count was incremented in TclInitEncodingSubsystem.
|
|
|
|
|
|
|
|
|
|
| |
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]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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 <math.h> 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):
|
|
|
|
|
|
|
| |
to 'Tcl_Panic' (the function). The #define
of panic in tcl.h clearly states it is
deprecated in the comments.
[Patch 865264]
|
|
|
|
|
|
|
|
|
| |
* 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:
|
|
|
|
| |
cleanup all encodings by using Tcl_FirstHashEntry in the while loop.
|
|
|
|
|
|
|
| |
(TableFromUtfProc, EscapeFromUtfProc): Use TclUtfToUniChar.
(UnicodeToUtfProc, TableToUtfProc): add 1-byte char optimizations
for Tcl_UniCharToUtf call. These improve encoded channel
conversion speeds by up to 20%.
|
|
|
|
|
|
| |
* generic/tclIO.c (WriteChars, Tcl_Close): corrected the handling
of outputting end escapes for escape-based encodings.
[Bug #526524] (yamamoto)
|
|
|
|
|
|
|
|
| |
* generic/tclIO.c (DoReadChars, ReadBytes, ReadChars):
Use NULL value instead of pointer set to NULL to make
things more clear. Reorder arguments so that they
match the function signatures. Cleanup little typos
and add more descriptive comment.
|
|
|
|
|
|
|
|
|
| |
* tests/encoding.test: corrected iso2022 encoding results.
added encoding-24.*
* generic/tclEncoding.c (EscapeFromUtfProc): corrected output of
escape codes as per RFC 1468. [Patch #474358] (taguchi)
(TclFinalizeEncodingSubsystem): corrected potential double-free
when encodings were finalized on exit. [Bug #219314, #524674]
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
restored to return (char *): Tcl_DStringAppend,
Tcl_DStringAppendElement, Tcl_JoinPath, Tcl_TranslateFileName,
Tcl_ExternalToUtfDString, Tcl_UtfToExternalDString,
Tcl_UniCharToUtfDString, Tcl_GetCwd, Tcl_WinTCharToUtf. Also
restored Tcl_WinUtfToTChar to return (TCHAR *) and
Tcl_UtfToUniCharDString to return (Tcl_UniChar *). Modified
some callers. This change recognizes that Tcl_DStrings are
de-facto white-box objects.
* generic/tclCmdMZ.c: corrected use of C++-style comment.
|
|
|
|
|
|
|
|
|
|
|
| |
generic/tclIOUtil.c, generic/tclPipe.c, generic/tclResult.c,
generic/tclUtil.c, generic/tclVar.c and mac/tclMacResource.c according
to TIP 27. Tcl_TranslateFileName rewritten as wrapper around
VFS-aware version. Updated callers.
***POTENTIAL INCOMPATIBILITY***
Includes source incompatibilities: argv arguments of Tcl_Concat,
Tcl_JoinPath, Tcl_OpenCommandChannel, Tcl_Merge; argvPtr arguments of
Tcl_SplitList and Tcl_SplitPath.
|
|
|
|
|
| |
generic/tclUtil.c according to the guidelines of TIP 27.
[Patch 464553]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The following files were impacted.
* doc/Access.3:
* doc/FileSystem.3:
* doc/OpenFileChnl.3:
* doc/file.n:
* doc/glob.n:
* generic/tcl.decls:
* generic/tcl.h:
* generic/tclCmdAH.c:
* generic/tclCmdIL.c:
* generic/tclCmdMZ.c:
* generic/tclDate.c:
* generic/tclDecls.h:
* generic/tclEncoding.c:
* generic/tclFCmd.c:
* generic/tclFileName.c:
* generic/tclGetDate.y:
* generic/tclIO.c:
* generic/tclIOCmd.c:
* generic/tclIOUtil.c:
* generic/tclInt.decls:
* generic/tclInt.h:
* generic/tclIntDecls.h:
* generic/tclLoad.c:
* generic/tclStubInit.c:
* generic/tclTest.c:
* generic/tclUtil.c:
* library/init.tcl:
* mac/tclMacFCmd.c:
* mac/tclMacFile.c:
* mac/tclMacInit.c:
* mac/tclMacPort.h:
* mac/tclMacResource.c:
* mac/tclMacTime.c:
* tests/cmdAH.test:
* tests/event.test:
* tests/fCmd.test:
* tests/fileName.test:
* tests/io.test:
* tests/ioCmd.test:
* tests/proc-old.test:
* tests/registry.test:
* tests/unixFCmd.test:
* tests/winDde.test:
* tests/winFCmd.test:
* unix/mkLinks:
* unix/tclUnixFCmd.c:
* unix/tclUnixFile.c:
* unix/tclUnixInit.c:
* unix/tclUnixPipe.c:
* win/tclWinFCmd.c:
* win/tclWinFile.c:
* win/tclWinInit.c:
* win/tclWinPipe.c
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
string if the body has been bytecompiled.
* generic/tclBasic.c (Tcl_EvalObjEx): added pedantic check for
originating proc body of bytecompiled code, #def'd out as the
change for [info body] should make it unnecessary
* tests/set.test: added test for complex array elem name compiling
* generic/tclCompCmds.c (TclCompileSetCmd): Fixed parsing of array
elements during compiling, and slightly optimised same [Bug: 3889]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* tests/fileName.test:
* generic/tclInt.decls:
* generic/tclInt.h:
* generic/tclIntDecls.h:
* generic/tclStubInit.c:
* generic/tclEncoding.c:
* generic/tclFileName.c:
* mac/tclMacFile.c:
* unix/tclUnixFile.c:
* win/tclWinFile.c: enhanced the glob command with the new options
-types -path -directory and -join. Deprecated TclpMatchFiles with
TclpMatchFilesTypes, extended TclGlob and TclDoGlob and added
GlobTypeData structure.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* generic/tclMain.c :
* unix/tclAppInit.c:
* win/tclAppInit.c: Added two new internal functions,
TclSetStartupScriptFileName() and TclGetStartupScriptFileName()
and added hooks into the main() code for supporting TclPro and
other "big" shells more easily without requiring a copy of the
main() code.
* generic/tclEncoding.c:
* generic/tclEvent.c: Moved encoding-related startup code from
tclEvent.c into the more appropriate tclEncoding.c.
|
|
|