| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
* generic/tclIOUtil.c: interp == NULL arguments. [Bug 1380662]
|
|
|
|
| |
until we netrieve next statePtr from it.
|
|
|
|
|
|
|
| |
patch for [SF Tcl Bug 1359094]. This moves the retrieval of the
next channel state to the end of the loop, as the called
closeproc may close other channels, i.e. modify the list we are
iterating, invalidating any pointer retrieved earlier.
|
|
|
|
| |
for more info.
|
| |
|
|
|
|
| |
event processing when channel is being closed/cutted.
|
|
|
|
|
| |
timer for the channel. Also, prevents events still in
the event queue from triggering on the current channel.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
* tests/io.test: changed from ten bytes to one byte. Need
* tests/iogt.test: for this change was proven by
Ross Cartlidge <rossc@cisco.com> where [read stdin 1] was grabbing
10 bytes followed by starting a child process that was intended to
continue reading from stdin. Even with -buffersize set to one,
nine chars were getting lost by the buffersize over reading for
the native read() caused by [read].
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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:
* mac/tclMacChan.c:
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
| |
after shifting the code.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
| |
[Bug 405995]
|
|
|
|
|
|
|
| |
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 :)
|
|
|
|
|
|
| |
are problems than to try and compile everything manually on all the
platforms. This way the AS auto-build gets the change without fuss,
and I can read the logs tomorrow.
|
| |
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
* generic/tclIO.c: Aftermath to [SF #427196]. Squash empty buffers
if they are smaller than the requested buffersize, to prevent
reusage of old buffers and to honor changes in the requested
buffersize made by the user.
|
|
|
|
|
|
|
|
|
|
| |
* generic/tclIO.c (GetInput): Fixed [SF #427196]. Memory was
overwritten because a buffer was used after a change of the
requested buffersize together with that requested buffersize and
not its actual size, which was smaller. Note that the continous
reuse of the smaller buffer negatively impacts performance. The
system never allocates a buffer with the newly requested bigger
buffersize.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
performance benchmarks for [fcopy] too.
* doc/fcopy.n: Updated to reflect the extended behaviour of 'fcopy'.
* tests/io.test: Added tests 'io-52.9', 'io-52.10' and 'io-52.11'
to test the handling of encodings by 'fcopy' / 'TclCopychannel'
[Bug #209210].
* generic/tclIO.c: Split of both 'Tcl_ReadChars' and
'Tcl_WriteChars' into a public error checking and an internal
working part. The public functions now use the new internal
ones. The new functions are 'DoReadChars' and 'DoWriteChars'.
Extended 'CopyData' to use the new functions 'DoXChars' when
required by the encodings on the input and output channels
[Bug #209210].
|