summaryrefslogtreecommitdiffstats
path: root/generic/tclIO.c
Commit message (Collapse)AuthorAgeFilesLines
* per ticket [e08c2c407b053bbfaab] (and stray code related to ↵bch2015-02-191-3/+0
| | | | [84f208762f172e]) adj code to passing test suite
* Even clearer failure messages.dkf2015-02-111-16/+17
|
* inputProc and outputProc tests run conditionally on TCL_READABLE, ↵bch2015-02-081-2/+2
| | | | TCL_WRITABLE mask
* switch raw assert() to Tcl_Panic() per discussion w/ dkf bch2015-02-071-7/+17
|
* merge [trunk]bch2015-02-071-2/+2
|\
| * Fix [08872796bc]dgp2015-01-291-2/+2
| |
* | truncateProc *can* be NULLbch2015-01-211-1/+0
| |
* | assert() on missing definitions for Tcl_ChannelCreate() required struct ↵bch2015-01-201-0/+9
|/ | | | Tcl_ChannelType{} fields.
* Now that we're using TCL_ENCODING_NO_TERMINATE - be careful about acting ondgp2015-01-021-2/+1
| | | | the contents of dst -- they could be leftovers. Only check bytes reported to have been written and take care to get the assertions right.
* Use the new TCL_ENCODING_CHAR_LIMIT flag to have the encoding system managedgp2014-12-231-4/+11
| | | the max chars to read constraint.
* merge trunkdgp2014-12-231-0/+3
|\
| * [7c187a3773] Fix error in managing inStatePtr->inQueueTail value in thedgp2014-12-181-0/+3
| | | | | | byte-moving optimized path of [chan copy]. Thanks to Benno.
* | With no padding needed for a terminating NUL, there no need for a distinctiondgp2014-11-151-5/+4
| | | | | | between the dstNeeded and dstLimit values.
* | Tcl_ExternalToUtf appends a terminating NUL to its encoded results.dgp2014-11-151-21/+23
|/ | | | | | | Perhaps this is a welcome convenience for some callers, but not for Tcl's I/O system, which has no need for that. Added a new flag value TCL_ENCODING_NO_TERMINATE that callers can use to suppress this behavior. This means buffers don't require so much padding, and a tiny bit of processing is saved. Update I/O callers to use the feature.
* Likely fix for channel mem leaks.core_8_6_3core_8_6_3_rcdgp2014-11-111-3/+15
|
* Same patch re-enabling read after EOF, but here applied to 8.6.dgp2014-11-031-42/+184
|\ | | | | Likely additional changes needed in the other channel transforms new in 8.6.
| * [5adc350683] Reworked the management of the EOF states to re-enable thedgp2014-11-031-43/+139
| | | | | | | | ability to read beyond EOF. Plenty of assert()s to keep thing from going off track again.
| * Work in progress restoring ability to [read] after [eof] and get non-emptydgp2014-10-281-21/+67
| | | | | | | | | | strings back in those cases where the channel has them to offer. Also working through all the implications of this possibility on Tcl's more exotic channel features, like stacking.
* | Disable assertion until tls bug it detects is fixed.dgp2014-11-011-1/+7
| |
* | [10dc6daa37] New fix for [gets] on non-blocking channel. This time properly ↵dgp2014-10-181-6/+8
|\ \ | |/ | | | | accounts for the effects of ENCODING_LINESIZE.
| * [10dc6daa37] New fix for [gets] on non-blocking channel. This timedgp2014-10-181-6/+8
| |\ | | | | | | properly accounts for the effects of ENCODING_LINESIZE.
| | * [10dc6daa37] [gets] on a non-blocking channel must take care so thatdgp2014-10-171-0/+6
| |/ | | | | | | | | | | | | 1) At least one call to the channel driver input proc gets made. Failure to do this locks up the channel - catastrophic FAIL. 2) After any driver call reports BLOCKED, don't call again. This is less serious, but FAILs to respect the non-blocking setting. Code corrections and tests included, to restore 8.5.15 compat.
* | [bf7135428c] Restore the Tcl_Write() return value logic.dgp2014-10-101-1/+4
|\ \ | |/
| * [bf7135428c] Restore the Tcl_Write() return value logic.dgp2014-10-101-1/+4
| |
* | [ed29c4da21] Completed fix for [chan copy] handling [chan blocked].dgp2014-10-101-1/+5
| |
* | [ed29c4da21] Merge patch from 8.5, still not a complete fix.dgp2014-10-101-5/+23
|\ \ | |/
| * [ed29c4da21] Don't let BLOCKED state get converted into a channel error.dgp2014-10-101-5/+23
| |
* | [bc5b790099] Improper calculation of new dstLimit value. New test io-12.7.dgp2014-10-021-3/+2
|\ \ | |/
| * [bc5b790099] Improper calculation of new dstLimit value. New test io-12.7.dgp2014-10-021-3/+2
| |
* | Make corrections to long-false comments.dgp2014-09-051-9/+9
| |
* | Remove ChannelHandlerEvent struct, which has never been used in all ofdgp2014-09-041-11/+0
| | | | | | | | | | recorded Tcl history. Still need to purge comments of mentions of ChannelHandlerEventProc() which is similarly pre-historic.
* | merge 8.5; fix notifier mask bug and Tcl_Read performance regressiondgp2014-08-221-20/+8
|\ \ | |/
| * Same results; simpler logic.dgp_slow_readdgp2014-08-221-21/+7
| |
| * Test fix for likely cause of reported I/O slowdown.dgp2014-08-211-0/+2
| | | | | | | | | | | | | | | | | | In a DoRead() revision, it came to favor making every effort to fill buffers, in preference to a more sensible goal of favoring avoiding calls out to the driver if there's already enough data in the buffers to satisfy the read operation. Result is many more calls out to recv() than are a good idea. Ought to show up most glaringly when many Tcl_Read() calls asking for small numbers of bytes (compared to buffer size) each, and that matches the reported case.
| * Docs for Tcl_CreateChannelHandler() state that the registered handler procaku_reviewdgp2014-08-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | will be called back with a mask value. "Mask is an integer mask indicating which of the requested conditions actually exists for the channel; it will contain ***a subset of the bits from the mask argument*** to Tcl_CreateChannelHandler when the handler was created." (emhpasis added). Tcl_NotifyChannel is not honoring this. It passes a mask value that may contain bits not in common with the mask argument to T_CCH(). This commit is a one-liner patch adding in the masking step to make things behave as documented. Thanks to apn for digging this out. (In combination with other questionable code, this led to a hang in test http-4.6 on Windows) Tcl_NotifyChannel() has had this error in all of recorded Tcl history. It's hard to imagine any code dependent on it though. If any exists, it can be revised to pass the mask value it truly needs to T_CCH() and end up with code suitable both before and after this change. If you concur, please merge to core-8-5-branch, and I'll take it from there.
| * Accommodate the "udp" package, and any other Tcl package that expects adgp2014-08-121-1/+1
| | | | | | | | | | [read] on a channel @ EOF to attempt another pass through the channel drivers instead of immediately returning an empty string. Correcting this misbehavior appears too disruptive in a patch release to a long stable branch.
* | Fixed type conversion warnings which break a Win32 debug build (MSVC).andreask2014-08-061-2/+10
| |
* | Another Preserve/Release on channels is needed during IO finalization.dgp2014-08-021-0/+2
|\ \ | |/
| * Another Preserve/Release on channels is needed during IO finalization.dgp2014-08-021-0/+3
| |
| * Updated package "platform" to version 1.0.13. Separated theandreask2014-08-011-1/+1
| | | | | | | | | | | | | | | | identifiers "macosx*-i386-x86_64" and "macosx-universal" as incompatible with each other. Plus addition of a cast in tclIO.c to match types in a comparison which otherwise bugs a Windows debug build (warnings are errors).
| * Backport the cheaper Preserve/Release on channels.dgp2014-08-011-33/+55
| |\ | |/ |/|
* | Complete transformation off Tcl_Preserve() legacy onto ref counting.dgp2014-07-301-15/+7
| |
* | Reduce the cost of Preserve/Release on channelsdgp2014-07-301-25/+52
| |
* | Revise MBRead() to be used in both sync and async modes.dgp2014-07-281-44/+34
| |
* | Push MBWrite() differences out to callers.dgp2014-07-271-27/+22
| |
* | Rework MBWrite() so it can be used in both sync and async modes.dgp2014-07-271-68/+41
| | | | | | Reduce code duplication.
* | Use common MBError() routine for sync and async operations.dgp2014-07-261-25/+24
| |
* | Extend the "move buffer" implementation to cover the async case.dgp2014-07-261-11/+175
| |
* | simplify moveBytes selection logicdgp2014-07-241-3/+1
| |
* | Make sure MoveBytes error reporting reproduces what CopyData does. Bugward ↵dgp2014-07-241-0/+8
| | | | | | | | compatibility!