| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* generic/tclDecls.h: Regenerated from tcl.decls.
* generic/tclStubInit.c:
* doc/CrtChannel.3: Documentation of extended API,
* generic/tcl.decls: extended testsuite, and
* generic/tcl.h: implementation. Removal of old
* generic/tclIO.c: driver-specific TclpCut/Splice
* generic/tclInt.h: functions. Replaced with generic
* tests/io.test: thread-action calls through the
* unix/tclUnixChan.c: new hooks. Update of all builtin
* unix/tclUnixPipe.c: channel drivers to version 4.
* unix/tclUnixSock.c: Windows drivers extended to
* win/tclWinChan.c: manage thread state in a thread
* win/tclWinConsole.c: action handler.
* win/tclWinPipe.c:
* win/tclWinSerial.c:
* win/tclWinSock.c:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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/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.
* 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.
|
|
|
|
|
|
|
| |
verification on -buffersize so original behavior for silently ignoring
bad settings is returned. The only difference now is the behavior
difference between atoi and Tcl_GetInt which gains the ability to
error for 'not a number' and can understand hexidecimal.
|
|
|
|
|
|
| |
for -buffersize weren't being reported as errors and were blindly
ignored. Now reports conversion errors to an int and checks
ranges for validity. atoi() swapped for Tcl_GetInt().
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
| |
930851]. When changing the eofchar we have to zap the related
flags to prevent them from prematurely aborting the next read.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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):
|
| |
|
|
|
|
| |
[Bug 405995]
|
|
|
|
|
|
|
| |
to 'Tcl_Panic' (the function). The #define
of panic in tcl.h clearly states it is
deprecated in the comments.
[Patch 865264]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
| |
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 :)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
| |
* generic/tclIO.c (WriteChars): Added flag to break out of loop if
nothing of the input is consumed at all, to prevent infinite
looping of called with a non-UTF-8 string. Fixes Bug 584603
(partially). Added new test "io-60.1". Might need additional
changes to Tcl_Main so that unprintable results are printed as
binary data.
|
|
|
|
| |
new TIP#72-enabled Tcl. See http://purl.org/tcl/tip/91 for details.
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
| |
* generic/tclIO.c (FilterInputBytes): reset the TCL_ENCODING_START
flags in the ChannelState when using 'gets'. [Bug #523988]
Also reduced the value of ENCODING_LINESIZE from 30 to 20 as this
seems to improve the performance of 'gets' according to tclbench.
|
|
|
|
|
| |
This version builds clean on Solaris/SPARC, with GCC and CC, both with and
without threads and both in 32-bit and 64-bit mode.
|
|
|
|
| |
longer needed after the TIP 27 effort.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
server sockets. [Bug 496733]
* generic/tclIO.c (Tcl_GetChannelOption, Tcl_SetChannelOption):
Instead of returning nothing for the -translation option
on a server socket, always return "auto". Return the empty
string enclosed in quotes for the -eofchar option on
a server socket. Fixup -eofchar usage message so that
it matches the implementation.
* tests/io.test: Add -eofchar tests and -translation tests
to ensure options are read only on server sockets.
* tests/socket.test: Update tests to account for -eofchar
and -translation option changes.
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Martin Forssen <ruric@users.sourceforge.net>. The encoding
chosen in the script exposing the bug writes out three intro
characters when TCL_ENCODING_START is set, but does not consume
any input as TCL_ENCODING_END is cleared. As some output was
generated the enclosing loop calls UtfToExternal again, again
with START set. Three more characters in the out and still no
use of input ... To break this infinite loop we remove
TCL_ENCODING_START from the set of flags after the first call
(no condition is required, the later calls remove an unset flag,
which is a no-op). This causes the subsequent calls to
UtfToExternal to consume and convert the actual input.
|
|
|
|
|
|
|
| |
overlooked before. Updated callers.
***POTENTIAL INCOMPATIBILITY***
Includes a source incompatibility in the tablePtr arguments of
the Tcl_GetIndexFromObj* routines.
|
|
|
|
| |
to the guidelines of TIP 27. Updated callers.
|
|
|
|
| |
according to the guidelines of TIP 27. Updated callers. [Patch 499196]
|
|
|
|
|
|
|
|
|
|
|
| |
of TIP 27. Several minor documentation corrections as well.
* Updated channel driver interface according to the guidelines of
TIP 27. See also [Bug 500348].
* Moved Tcl_EolTranslation enum declaration from generic/tcl.h to
generic/tclInt.h (renamed to TclEolTranslation). It is not used
anywhere in Tcl's public interface.
|
|
|
|
|
| |
<schroedter@users.sourceforge.net> to prevent fcopy on serial
ports from flooding the event queue.
|
|
|
|
|
| |
provided by Don Porter <dgp@users.sourceforge.net>. Fixes
assumption of having an empty Tcl_Obj to work with.
|
| |
|
| |
|
| |
|
|
|
|
| |
and Tcl_Release.
|
|
|
|
|
| |
and Tcl_Release() to fix segfault introduced by the 2001-09-26
changes. [Bug 465494]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
more than was in the buffers and then blocked in the OS call as
its pty channel driver provides no blockmodeproc through which
the OS could be notified of blocking-behaviour. Because of this
the general I/O core has to take more care than usual to
preserve the semantics of non-blocking channels.
* generic/tclIO.c (Tcl_ReadRaw): Do not read from the driver if
the channel is non-blocking and the fileevent causing the read
was generated by a timer. We do not know if there is data
available from the OS. Instead of going to the OS for more and
potentially blocking we simply signal EWOULDBLOCK to the higher
levels to cause the system to wait for true fileevents.
(GetInput): Same as before.
(ChannelTimerProc): Added set and clear of CHANNEL_TIMER_FEV.
* generic/tclIO.h (CHANNEL_TIMER_FEV): New flag for channels. Is
set if a fileevent was generated by a timer, the channel is not
blocking and the driver did not provide a blockmodeproc. In that
case the I/O core has to be especially careful about going to
the driver for more data.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|