| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
of mutex locks.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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:
* generic/tclIO.c:
* generic/tclIOCmd.c:
* generic/tclNamesp.c:
* generic/tclObj.c:
* generic/tclPkg.c:
* generic/tclResult.c:
* generic/tclScan.c:
* generic/tclTimer.c:
* generic/tclTrace.c:
* generic/tclUtil.c:
* generic/tclVar.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:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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):
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
| |
|
|
|
|
|
|
| |
TclNeedSpace() where non-breaking space (\u00A0) and backslash-escaped
spaces were handled incorrectly.
* tests/util.test: Added new tests util-8.[2-6].
|
| |
|
|
|
|
| |
bugs discussed in [Bug 411825].
|
|
|
|
|
| |
* generic/tclUtil.c: assume that ckfree == free, as that is not
* generic/tclResult.c: always true. [Bug 756791] (fuller)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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:
|
|
|
|
|
|
|
|
|
|
| |
after the "end-" prefix.
* generic/get.test:
* generic/string.test:
* generic/tclObj.c (SetIntFromAny, SetWideIntFromAny):
* generic/tclGet.c (TclGetLong, Tcl_GetInt): simplify sign
handling before calling strtoul(l). [Bug #634856]
|
|
|
|
|
| |
(Tcl_StringCaseMatch): use TclUtfToUniChar and add further
optimizations for the one-byte/char case.
|
|
|
|
|
| |
* generic/tclDecls.h: Tcl_Merge, it transfers ownership of a dynamic
* generic/tclUtil.c: allocated string to the caller.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* doc/Concat.3: all remaining public interfaces of Tcl.
* doc/CrtCommand.3: Notably, the parser no longer writes on
* doc/CrtSlave.3: the string it is parsing, so it is no
* doc/CrtTrace.3: longer necessary for Tcl_Eval() to be
* doc/Eval.3: given a writable string. Also, the
* doc/ExprLong.3: refactoring of the Tcl_*Var* routines
* doc/LinkVar.3: by Miguel Sofer is included, so that the
* doc/ParseCmd.3: "part1" argument for them no longer needs
* doc/SetVar.3: to be writable either.
* doc/TraceVar.3:
* doc/UpVar.3: Compatibility support has been enhanced so
* generic/tcl.decls that a #define of USE_NON_CONST will remove
* generic/tcl.h all possible source incompatibilities with
* generic/tclBasic.c the 8.3 version of the header file(s).
* generic/tclCmdMZ.c The new #define of USE_COMPAT_CONST now does
* generic/tclCompCmds.c what USE_NON_CONST used to do -- disable
* generic/tclCompExpr.c only those new CONST's that introduce
* generic/tclCompile.c irreconcilable incompatibilities.
* generic/tclCompile.h
* generic/tclDecls.h Several bugs are also fixed by this patch.
* generic/tclEnv.c [Bugs 584051,580433] [Patches 585105,582429]
* generic/tclEvent.c
* generic/tclInt.decls
* generic/tclInt.h
* generic/tclIntDecls.h
* generic/tclInterp.c
* generic/tclLink.c
* generic/tclObj.c
* generic/tclParse.c
* generic/tclParseExpr.c
* generic/tclProc.c
* generic/tclTest.c
* generic/tclUtf.c
* generic/tclUtil.c
* generic/tclVar.c
* mac/tclMacTest.c
* tests/expr-old.test
* tests/parseExpr.test
* unix/tclUnixTest.c
* unix/tclXtTest.c
* win/tclWinTest.c
|
|
|
|
| |
empty result when generating an error message.
|
| |
|
|
|
|
| |
to TIP 27. In particular, the "part2" arguments were CONSTified.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
some tests to test what they claimed to be testing.
|
|
|
|
| |
This deprecates TclpGetTime in favor of new Tcl_GetTime.
|
|
|
|
|
|
| |
ability of the [lindex] command to have multiple index arguments,
and adds the [lset] command. Both commands are byte-code compiled.
[Patch #471874] (work by Kenny, commited by Hobbs)
|
|
|
|
|
| |
generic/tclUtil.c according to the guidelines of TIP 27.
[Patch 464553]
|
| |
|
|
|
|
|
|
|
|
|
| |
* generic/tclUtil.c (TclGetIntForIndex): added Tcl_ResetResult
before Tcl_AppendStringsToObj to prevent shared object crash when
called from bcc instruction. The Tcl_Append* calls that append to
the result object that are invoked by bcc insts must remember to
call Tcl_ResetResult because the bcc doesn't do this for us.
[Bug #456892]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The following files were impacted.
* doc/Access.3:
* doc/FileSystem.3:
* doc/OpenFileChnl.3:
* doc/file.n:
* doc/glob.n:
* generic/tcl.decls:
* generic/tcl.h:
* generic/tclCmdAH.c:
* generic/tclCmdIL.c:
* generic/tclCmdMZ.c:
* generic/tclDate.c:
* generic/tclDecls.h:
* generic/tclEncoding.c:
* generic/tclFCmd.c:
* generic/tclFileName.c:
* generic/tclGetDate.y:
* generic/tclIO.c:
* generic/tclIOCmd.c:
* generic/tclIOUtil.c:
* generic/tclInt.decls:
* generic/tclInt.h:
* generic/tclIntDecls.h:
* generic/tclLoad.c:
* generic/tclStubInit.c:
* generic/tclTest.c:
* generic/tclUtil.c:
* library/init.tcl:
* mac/tclMacFCmd.c:
* mac/tclMacFile.c:
* mac/tclMacInit.c:
* mac/tclMacPort.h:
* mac/tclMacResource.c:
* mac/tclMacTime.c:
* tests/cmdAH.test:
* tests/event.test:
* tests/fCmd.test:
* tests/fileName.test:
* tests/io.test:
* tests/ioCmd.test:
* tests/proc-old.test:
* tests/registry.test:
* tests/unixFCmd.test:
* tests/winDde.test:
* tests/winFCmd.test:
* unix/mkLinks:
* unix/tclUnixFCmd.c:
* unix/tclUnixFile.c:
* unix/tclUnixInit.c:
* unix/tclUnixPipe.c:
* win/tclWinFCmd.c:
* win/tclWinFile.c:
* win/tclWinInit.c:
* win/tclWinPipe.c
|
|
|
|
|
| |
* generic/tclUtil.c (Tcl_ConcatObj): Corrected walking backwards
over utf-8 chars. [Bug #227512]
|
|
|
|
| |
extra strlen call. [Bug #428572]
|
|
|
|
|
|
|
|
|
|
| |
* generic/tclStubInit.c:
* generic/tcl.decls:
* generic/tclDecls.h:
* generic/tclUtf.c: Added new functions Tcl_UniCharNcasecmp and
Tcl_UniCharCaseMatch (unicode parallel to Tcl_StringCaseMatch)
* generic/tclUtil.c: rewrote Tcl_StringCaseMatch algorithm for
optimization and made Tcl_StringMatch just call Tcl_StringCaseMatch
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* generic/tclCompile.c: fixed problem where setting to {} array
would intermittently not work. (Fontaine) [Bug: 3339]
* generic/tclCmdMZ.c:
* generic/tclExecute.c: optimized INST_TRY_CVT_TO_NUMERIC to
recognize boolean objects. (Spjuth) [Bug: 2815]
* tests/info.test:
* tests/parseOld.test:
* generic/tclCmdAH.c:
* generic/tclProc.c: changed Tcl_UplevelObjCmd (uplevel) and
Tcl_EvalObjCmd (eval) to use TCL_EVAL_DIRECT in the single arg
case as well, to take advantage of potential pure list input
optimization. This means that it won't get byte compiled though,
which should be acceptable.
* generic/tclBasic.c: made Tcl_EvalObjEx pure list object aware in
the TCL_EVAL_DIRECT case for efficiency.
* generic/tclUtil.c: made Tcl_ConcatObj pure list object aware,
and return a list object in that case [Bug: 2098 2257]
* generic/tclMain.c: changed Tcl_Main to not constantly reuse the
commandPtr object (interactive case) as it could be shared. (Fellows)
|
|
|
|
|
|
|
|
|
|
|
|
| |
* unix/Makefile.in: fixed make gendate to swap const with CONST
so it uses the Tcl defined CONST type [Bug: 3521]
* generic/tclIO.c: removed panic that could occur in FlushChannel
when a "blocking" channel would receive EAGAIN, instead treating
it the same as non-blocking. [Bug: 3773]
* generic/tclUtil.c: fixed Tcl_ScanCountedElement to not step
beyond the end of the counted string [Bug: 3336]
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* tests/parseExpr.test:
* tests/string.test:
* generic/tclGet.c:
* generic/tclInt.h:
* generic/tclObj.c:
* generic/tclParseExpr.c:
* generic/tclUtil.c:
* generic/tclExecute.c: added TclCheckBadOctal routine to enhance
error message checking for when users use invalid octal numbers
(like 08), as well as replumbed the Expr*Funcs with a new
VerifyExprObjType to simplify type handling.
* tests/expr.test:
* generic/tclCompile.c: fixed 'bad code length' error for
'expr + {[incr]}' case, with new test case [Bug: 3736]
and seg fault on 'expr + {[error]}' (different cause) that
was caused by a correct optimization that didn't correctly
track how it was modifying the source string in the opt.
The optimization was removed, which means that:
expr 1 + {[string length abc]}
will be not be compiled inline as before, but this should be
written:
expr {1 + [string length abc]}
which will be compiled inline for speed. This prevents
expr 1 + {[mindless error]}
from seg faulting, and only affects optimizations for
degenerate cases [Bug: 3737]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* tests/timer.test: changed after delay in timer test 6.29 from
1 to 10. [Bug: 2796]
* tests/pkg.test:
* generic/tclPkg.c: fixed package version check to disallow 1.2..3
[Bug: 2539]
* unix/Makefile.in: fixed gendate target - this never worked
since RCS was intro'd.
* generic/tclGetDate.y: updated to reflect previous changes
to tclDate.c (leap year calc) and added CEST and UCT time zone
recognition. Fixed 4 missing UCHAR() casts. [Bug: 2717, 954,
1245, 1249]
* generic/tclCkalloc.c: changed Tcl_DumpActiveMemory to really
dump to stderr and close it [Bug: 725] and changed Tcl_Ckrealloc
and Tcl_Ckfree to not bomb when NULL was passed in [Bug: 1719]
and changed Tcl_Alloc, et al to not panic when a alloc request
for zero came through and NULL was returned (valid on AIX, Tru64)
[Bug: 2795, etc]
* tests/clock.test:
* doc/clock.n:
* generic/tclClock.c: added -milliseconds switch to clock clicks
to guarantee that the return value of clicks is in the millisecs
granularity [Bug: 2682, 1332]
1999-09-15 Jeff Hobbs <hobbs@scriptics.com>
* generic/tclIOCmd.c: fixed potential core dump in conjunction
with stacked channels with result obj manipulation in
Tcl_ReadChars [Bug: 2623]
* tests/format.test:
* generic/tclCmdAH.c: fixed translation of %0#s in format [Bug: 2605]
* doc/msgcat.n: fixed \\ bug in example [Bug: 2548]
* unix/tcl.m4:
* unix/aclocal.m4: added fix for FreeBSD-[1-2] recognition
[Bug: 2070] and fix for IRIX SHLIB_LB_LIBS. [Bug: 2610]
* doc/array.n:
* tests/var.test:
* tests/set.test:
* generic/tclVar.c: added an array unset operation, with docs
and tests. Variation of [Bug: 1775]. Added fix in TclArraySet
to check when trying to set in a non-existent namespace. [Bug: 2613]
1999-09-14 Jeff Hobbs <hobbs@scriptics.com>
* tests/linsert.test:
* doc/linsert.n:
* generic/tclCmdIL.c: fixed end-int interpretation of linsert
to correctly calculate value for end, added test and docs [Bug: 2693]
* doc/regexp.n:
* doc/regsub.n:
* tests/regexp.test:
* generic/tclCmdMZ.c: add -start switch to regexp and regsub
with docs and tests
* doc/switch.n: added proper use of comments to example.
* generic/tclCmdMZ.c: changed switch to complain when an error
occurs that seems to be due to a misplaced comment.
* generic/tclCmdMZ.c: fixed illegal ref for \[0-9] substitutions
in regsub [Bug: 2723]
* generic/tclCmdMZ.c: changed [string equal] to return an Int
type object (was a Boolean)
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* tests/cmdIL.test:
* tests/cmdMZ.test:
* tests/error.test:
* tests/ioCmd.test:
* tests/lindex.test:
* tests/linsert.test:
* tests/lrange.test:
* tests/lreplace.test:
* tests/string.test:
* tests/cmdIL.test:
* generic/tclUtil.c:
* generic/tclCmdMZ.c: Replaced "string icompare/iequal" with
-nocase and -length switches to "string compare/equal". Added a
-nocase option to "string map". Changed index syntax to allow
integer or end?-integer? instead of a full expression. This is
much simpler with safeTcl scripts since it avoids double
substitution issues.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* tests/cmdMZ.test:
* tests/error.test:
* tests/lindex.test:
* tests/linsert.test:
* tests/lrange.test:
* tests/lreplace.test:
* tests/string.test:
* generic/tclCmdMZ.c (Tcl_StringObjCmd):
* generic/tclUtil.c (TclGetIntForIndex): Applied Jeff Hobbs's
string patch which includes the following changes [Bug: 1845]:
|
| |
|
|
|
|
|
| |
defined Tcl_Stat and Tcl_Access to call TclStat and TclAccess instead of
TclpStat and TclpAccess.
|
|
|
|
| |
also one minor fix in tests/all.tcl to fix bug 1770.
|
| |
|
| |
|
| |
|
|
|
|
| |
Added implementation for the new public routine 'Tcl_GetNameOfExecutable(...)'.
|