summaryrefslogtreecommitdiffstats
path: root/generic/tclIO.c
Commit message (Collapse)AuthorAgeFilesLines
...
| | | * | | | | | Simplify the core output operations of channels. Reduce duplicative and dead ↵dgp2014-02-041-590/+63
| | | |\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | code.
| | | * \ \ \ \ \ \ Eliminate the use of a staging buffer in WriteChars().dgp2014-01-301-185/+115
| | | |\ \ \ \ \ \ \
| | | * \ \ \ \ \ \ \ In WriteChars(), eliminate the copy step through a staging buffer when itdgp2014-01-241-10/+12
| | | |\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | is not required for channel translation.
| | | * \ \ \ \ \ \ \ \ Remove from tclIO.h structs used only in tclIO.c.dgp2013-02-261-0/+102
| | | |\ \ \ \ \ \ \ \ \
| | | * \ \ \ \ \ \ \ \ \ Repair linked list management in Tcl_DeleteCloseHandler().dgp2013-02-251-0/+14
| | | |\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | CloseCallback struct used only locally. Remove from tclIO.h.
| | | * \ \ \ \ \ \ \ \ \ \ merge core-8-5-branchjan.nijtmans2013-01-311-2/+2
| | | |\ \ \ \ \ \ \ \ \ \ \
| | | * | | | | | | | | | | | Fix busyloop at exit under TCL_FINALIZE_ON_EXIT when there are unflushed ↵ferrieux2012-12-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | nonblocking channels. Thanks Miguel for spotting.
| | | * | | | | | | | | | | | Fix for core bug yet to be named/numbered.dgp_stackedstdchandgp2012-10-021-3/+9
| | | | | | | | | | | | | | |
| | | * | | | | | | | | | | | Final part of result generation conversion (modulo any minor blunders)dkf2012-08-051-58/+67
| | | | | | | | | | | | | | |
| | | * | | | | | | | | | | | Preserve the chanPtr so that script evaluation cannot invalidate it whendgp2012-07-241-0/+2
| | | |\ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | we plan to use it again.
| | | * | | | | | | | | | | | | [Bug 3545365]: Never try a bg-flush on a dead channel, just like before ↵ferrieux2012-07-231-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2011-08-17.
| | | * | | | | | | | | | | | | Factor out a number of common patterns of use of Tcl_DStringAppend.dkf2012-07-031-5/+3
| | | | | | | | | | | | | | | |
| | | * | | | | | | | | | | | | Factor out constant that must be the same in multiple places. Prompted by adkf2012-05-251-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | conversation with Alexandre Ferrieux.
| | | * | | | | | | | | | | | | * generic/tclIORChan.c [Bug 3522560]: Fixed the crash, enabled theandreask2012-05-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | test case. Modified [chan postevent] to properly inject the event(s) into the owner thread's event queue for execution in the correct context. Renamed the ForwardOpTo...Thread() function to match with our terminology.
| | | * | | | | | | | | | | | | Properly close nonblocking channels even when not flushing them.ferrieux2012-05-071-3/+3
| | | | | | | | | | | | | | | |
| | | * | | | | | | | | | | | | IMPLEMENTATION OF TIP#398 : Quickly Exit with Non-Blocking Blocked Channelsferrieux2012-04-281-7/+28
| | | |\ \ \ \ \ \ \ \ \ \ \ \ \
| | | | * | | | | | | | | | | | | Compat flag, test, and doc update.tip_398_implferrieux2012-04-281-3/+29
| | | | | | | | | | | | | | | | |
| | | | * | | | | | | | | | | | | merge trunkferrieux2012-04-241-1/+1
| | | | |\ \ \ \ \ \ \ \ \ \ \ \ \
| | | | * | | | | | | | | | | | | | Take two. Don't forget to apply all patches, even when the phone rings in ↵ferrieux2012-03-221-5/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | between.
| | | | * | | | | | | | | | | | | | Implement tip 398 : Quickly Exit with Non-Blocking Blocked Channels. This is ↵ferrieux2012-03-221-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | simply a revert of the (C part of the) 1025712d5b commit of 2011-08-17.
| | | * | | | | | | | | | | | | | | get rid of _ANSI_ARGS_ and CONSTjan.nijtmans2012-04-261-1/+1
| | | |\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ | | | | |_|/ / / / / / / / / / / / / | | | |/| | | | | | | | | | | | | |
| | | * | | | | | | | | | | | | | | make some more internal tables constjan.nijtmans2012-04-231-1/+1
| | | |\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ | | | | |/ / / / / / / / / / / / / / | | | | | / / / / / / / / / / / / / | | | | |/ / / / / / / / / / / / / | | | |/| | | | | | | | | | | | |
| | | * | | | | | | | | | | | | | [Bug 3412487]: Now short reads are allowed in synchronous fcopy, avoid ↵ferrieux2011-09-211-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | mistaking them as nonblocking ones.
| | | * | | | | | | | | | | | | | 3394654, 3393276 Revise FlushChannel() to account for the possibilitydgp2011-08-191-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | that the ChanWrite() call might recycle the buffer out from under us.
| | | * | | | | | | | | | | | | | Preserve the chanPtr during FlushChannel so that channel driversdgp2011-08-191-4/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | don't yank it away before we're done with it.
| | | * | | | | | | | | | | | | | [Bug 3096275] Sync fcopy buffers input.ferrieux2011-08-181-5/+10
| | | | | | | | | | | | | | | | |
| | | * | | | | | | | | | | | | | [Bug 2946474] Consistently resume backgrounded flushes+closes when exiting.ferrieux2011-08-171-2/+3
| | | | | | | | | | | | | | | | |
| | | * | | | | | | | | | | | | | Use Tcl_PrintfObj to generate more (complex) error messages.dkf2011-08-051-6/+3
| | | | | | | | | | | | | | | | |
| | | * | | | | | | | | | | | | | Make sure SetFooFromAny routines react reasonably when passed a NULL interp.dgp2011-04-211-0/+3
| | | |\ \ \ \ \ \ \ \ \ \ \ \ \ \
| | | * | | | | | | | | | | | | | | Adjust ckalloc/ckfree macros to greatly reduce number of explicit casts indkf2011-03-121-41/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | rest of Tcl source code. No ABI change. API change *should* be harmless.
| | | * | | | | | | | | | | | | | | MINOR: Formatting fixes, mainly to comments, so code better fits the style indkf2011-03-101-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the Engineering Manual.
| | | * | | | | | | | | | | | | | | Now that we're no longer using SCM based on RCS, the RCS Keyword linesdgp2011-03-021-2/+0
| | | |\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | cause more harm than good. Purged them (except in zlib files).
| | | * | | | | | | | | | | | | | | | Make sure [fcopy -size ... -command ...] always calls the callback ↵ferrieux2010-12-101-1/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | asynchronously, even for size zero.
| | | * | | | | | | | | | | | | | | | Missed a spot.dkf2010-03-201-2/+2
| | | | | | | | | | | | | | | | | | |
| | | * | | | | | | | | | | | | | | | Allow [fcopy] to move more than 2GB per call. Frederic Bonnet identified issue.dkf2010-03-201-38/+48
| | | | | | | | | | | | | | | | | | |
| | | * | | | | | | | | | | | | | | | * generic/tclIORTrans.c (ReflectInput, ReflectOutput,andreas_kupries2010-03-171-1/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ReflectSeekWide): [Bug 2921116]: Added missing TclEventuallyFree calls for preserved ReflectedTransform* structures. Reworked ReflectInput to preserve the structure for its whole life, not only in InvokeTclMethod. * generic/tclIO.c (Tcl_GetsObj): [Bug 2921116]: Regenerate topChan, may have been changed by a self-modifying transformation. * tests/ioTrans/test (iortrans-4.8, iortrans-4.9, iortrans-5.11, iortrans-7.4, iortrans-8.3): New test cases.
| | | * | | | | | | | | | | | | | | | More tidying up (whitespace, spelling, useless parentheses, useless casts)dkf2010-02-241-37/+45
| | | | | | | | | | | | | | | | | | |
| | | * | | | | | | | | | | | | | | | * generic/tclIO.c (CreateScriptRecord): [Bug 2918110]: Initializeandreas_kupries2010-01-181-6/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the EventScriptRecord (esPtr) fully before handing it to Tcl_CreateChannelHandler for registration. Otherwise a reflected channel calling 'chan postevent' (== Tcl_NotifyChannel) in its 'watchProc' will cause the function 'TclChannelEventScriptInvoker' to be run on an uninitialized structure.
| | | * | | | | | | | | | | | | | | | Killed c99/c++ comments left in by the IO patch.andreas_kupries2009-12-091-6/+1
| | | | | | | | | | | | | | | | | | |
| | | * | | | | | | | | | | | | | | | * generic/tclIO.c: [Bug 2901998]: Applied Alexandre Ferrieux'sandreas_kupries2009-12-091-5/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | patch fixing the inconsistent buffered I/O. Tcl's I/O now flushes buffered output before reading, discards buffered input before writing, etc.
| | | * | | | | | | | | | | | | | | | Fix [Bug 2849797]: channel name inconsistencies as suggested by DKFnijtmans2009-11-181-5/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | minor *** POTENTIAL INCOMPATIBILITY *** because Tcl_CreateChannel() and its derivatives, now sometimes ignore their "chanName" argument.
| | | * | | | | | | | | | | | | | | | * generic/tclIO.c (CopyData): [Bug 2895565]. Dropped bogosityandreas_kupries2009-11-121-9/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * tests/io.test: which used the number of _written_ bytes or character to update the counters for the read bytes/characters. New test io-53.11. This is a forward port from the 8.5 branch.
| | | * | | | | | | | | | | | | | | | Fix [Bug 2888099] (close discards ENOSPC error) by saving the errnoferrieux2009-11-101-2/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | from the first of two FlushChannel()s. Uneasy to test; might need specific channel drivers. Four-hands with aku.
| | | * | | | | | | | | | | | | | | | Some small bits of tidying up.dkf2009-11-091-16/+14
| | | | | | | | | | | | | | | | | | |
| | | * | | | | | | | | | | | | | | | * generic/tclIO.c (FlushChannel): Skip OutputProc for low-levelandreas_kupries2009-10-231-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 0-length writes. When closing pipes which have already been closed not skipping leads to spurious SIG_PIPE signals. Reported by Mikhail Teterin <mi+thun@aldan.algebra.com>.
| | | * | | | | | | | | | | | | | | | * generic/tclIO.c: Revised ReadChars and FilterInputBytes routinesdgp2009-10-191-17/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | to permit reads to continue up to the string limits of Tcl values. Before revisions, large read attempts could panic when as little as half the limiting value length was reached. [Patch 2107634] Thanks to Sean Morrison and Bob Parker for their roles in the fix.
| | | * | | | | | | | | | | | | | | | * generic/tclDictObj.c: Updated freeIntRepProc routines sodgp2009-09-301-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * generic/tclExecute.c: that they set the typePtr field to * generic/tclIO.c: NULL so that the Tcl_Obj is not left * generic/tclIndexObj.c: in an inconsistent state. * generic/tclInt.h: [Bug 2857044] * generic/tclListObj.c: * generic/tclNamesp.c: * generic/tclOOCall.c: * generic/tclObj.c: * generic/tclPathObj.c: * generic/tclProc.c: * generic/tclRegexp.c: * generic/tclStringObj.c:
| | | * | | | | | | | | | | | | | | | * generic/tclExecute.c: fix potential uninitialized variable use anddas2009-09-071-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * generic/tclFCmd.c: null dereference flagged by clang static * generic/tclProc.c: analyzer. * generic/tclTimer.c: * generic/tclUtf.c: * generic/tclExecute.c: silence false positives from clang static * generic/tclIO.c: analyzer about potential null dereference. * generic/tclScan.c: * generic/tclCompExpr.c:
| | | * | | | | | | | | | | | | | | | * generic/tclIO.c (Tcl_GetChannelHandle): Do not crash forandreas_kupries2009-07-231-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * generic/tclPipe.c (FileForRedirect): getHandleProc == NULL, this is allowed. Provide a nice error message in the bypass area. Updated caller to check the bypass for a mesage. This fixes the bug [Bug 2826248] reported by Andy Sonnenburg <andy22286@users.sourceforge.net>
| | | * | | | | | | | | | | | | | | | - eliminate some unnessary type castsnijtmans2009-02-101-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - some internal const decorations - spacing