summaryrefslogtreecommitdiffstats
path: root/generic/tclIO.c
Commit message (Collapse)AuthorAgeFilesLines
...
| | | * | | | | | | | | | | | | | | | Style fixes (unfouling whitespace, sorting comments, removing useless casts, ↵dkf2009-01-091-33/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | etc.)
| | | * | | | | | | | | | | | | | | | * generic/tclIO.c (Tcl_CloseEx,CloseWrite,CloseChannelPart,ChanCloseHalf):andreas_kupries2008-12-181-18/+247
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rewrite the half-close to properly flush the channel, like is done for a full close, going through FlushChannel, and using the flag BG_FLUSH_SCHEDULED (async flush during close). New functions CloseWrite, CloseChannelPart, new flag CHANNEL_CLOSEDWRITE. * tests/chanio.test (chanio-28.[67]): Reactivated these tests. Replaced tclsh -> [interpreter] to get correct executable for the pipe process, and added after cancel to kill the fail timers when we are done. Removed the explicits calls to [flush], now that [close] handles this correctly.
| | | * | | | | | | | | | | | | | | | Add missing flush for half-close of the write sideferrieux2008-12-181-1/+16
| | | | | | | | | | | | | | | | | | |
| | | * | | | | | | | | | | | | | | | TIP #332 IMPLEMENTATION - Half-Close for Bidirectional Channelsferrieux2008-12-181-1/+126
| | | | | | | | | | | | | | | | | | |
| | | * | | | | | | | | | | | | | | | * generic/tclIO.c (SetChannelFromAny and related): Modified theandreas_kupries2008-12-111-2/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * tests/io.test: internal representation of the tclChannelType to contain not only the ChannelState pointer, but also a reference to the interpreter it was made in. Invalidate and recompute the internal representation when it is used in a different interpreter (Like cmdName intrep's). Added testcase. [Bug 2407783].
| | | * | | | | | | | | | | | | | | | TIP #337 IMPLEMENTATIONdgp2008-12-091-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * doc/BackgdErr.3: Converted internal routine * doc/interp.n: TclBackgroundException() into public routine * generic/tcl.decls: Tcl_BackgroundException(). * generic/tclEvent.c: * generic/tclInt.decls: * generic/tclDecls.h: make genstubs * generic/tclIntDecls.h: * generic/tclStubInit.c: * generic/tclIO.c: Update callers. * generic/tclIOCmd.c: * generic/tclInterp.c: * generic/tclTimer.c: *** POTENTIAL INCOMPATIBILITY only for extensions using the converted internal routine ***
| | | * | | | | | | | | | | | | | | | A bit more readability refactoring.dkf2008-12-091-278/+294
| | | | | | | | | | | | | | | | | | |
| | | * | | | | | | | | | | | | | | | * generic/tclIO.c (TclFinalizeIOSubsystem): Replaced Alexandreandreas_kupries2008-12-021-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ferrieux's first patch for [Bug 2270477] with a gentler version, also supplied by him.
| | | * | | | | | | | | | | | | | | | Eliminate 3 calls to Tcl_SetResult, asnijtmans2008-11-251-9/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | examples how it should have been done. purpose: contribute in the TIP #340 discussion.
| | | * | | | | | | | | | | | | | | | * generic/tclIO.c (TclFinalizeIOSubsystem): Applied Alexandreandreas_kupries2008-11-251-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ferrieux's patch for [Bug 2270477] to prevent infinite looping during finalization of channels not bound to interpreters.
| | | * | | | | | | | | | | | | | | | Fix IsChannelExisting name comparison [Bug 2333466]ferrieux2008-11-231-2/+2
| | | | | | | | | | | | | | | | | | |
| | | * | | | | | | | | | | | | | | | add "-Wno-implicit-int" for gcc, as on UNIXnijtmans2008-11-061-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | eliminate an 'array index out of bounds' warning on HP-UX'
| | | * | | | | | | | | | | | | | | | Style improvements - invoking callbacks without visual junk.dkf2008-10-261-50/+48
| | | | | | | | | | | | | | | | | | |
| | | * | | | | | | | | | | | | | | | Add "const" to many internalnijtmans2008-10-161-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | const tables. No functional or API change.
| | | * | | | | | | | | | | | | | | | * doc/ChnlStack.3: CONSTified the typePtr argumentnijtmans2008-10-041-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * doc/CrtChannel.3: of Tcl_CreateChannel and Tcl_StackChannel * generic/tcl.decls and the return value of Tcl_GetChannelType * generic/tcl.h * generic/tclIO.h * generic/tclIO.c * ChangeLog * generic/tclDecls.h: regenerated This change complies with TIP #27.
| | | * | | | | | | | | | | | | | | | * win/tclWinChan.c (FileWideSeekProc): Accepted a patch byandreas_kupries2008-05-231-5/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Alexandre Ferrieux <ferrieux@users.sourceforge.net> to fix the [Bug 1965787]. 'tell' now works for locations > 2 GB as well instead of going negative. * generic/tclIO.c (Tcl_SetChannelBufferSize): Accepted a patch by * tests/io.test: Alexandre Ferrieux <ferrieux@users.sourceforge.net> * tests/chanio.test: to fix the [Bug 1969953]. Buffersize outside of the supported range are now clipped to nearest boundary instead of ignored.
| | | * | | | | | | | | | | | | | | | * generic/tclIO.c (CopyData): Applied another patch by Alexandreandreas_kupries2008-04-151-6/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * io.test (io-53.8a): Ferrieux <ferrieux@users.sourceforge.net>, * chanio.test (chan-io-53.8a): to shift EOF handling to the async part of the command if a callback is specified, should the channel be at EOF already when fcopy is called. Testcase by myself.
| | | * | | | | | | | | | | | | | | | * tests/io.test (io-53.10): Testcase for bi-directionaly fcopy.andreas_kupries2008-04-071-27/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * tests/chanio.test: * generic/tclIO.c: Additional changes to data structures for fcopy * generic/tclIO.h: and channels to perform proper cleanup in case of a channel having two background copy operations running as is now possible.
| | | * | | | | | | | | | | | | | | | * generic/tclIO.c (BUSY_STATE, CheckChannelErrors,andreas_kupries2008-04-071-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | TclCopyChannel): New macro, and the places using it. This change allows for bi-directional fcopy on channels. Thanks to Alexandre Ferrieux <ferrieux@users.sourceforge.net> for the patch.
| | | * | | | | | | | | | | | | | | | * generic/tclIO.c (CopyData): Applied patch [Bug 1932639] toandreas_kupries2008-04-031-14/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * tests/io.test: prevent fcopy from calling -command synchronously * tests/chanio.test: the first time. Thanks to Alexandre Ferrieux <ferrieux@users.sourceforge.net> for report and patch.
| | | * | | | | | | | | | | | | | | | * generic/tclIO.c (CopyData): Applied patch for the fcopy problemandreas_kupries2008-04-021-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [Bug 780533], with many thanks to Alexandre Ferrieux <ferrieux@users.sourceforge.net> for tracking it down and providing a solution. Still have to convert his test script into a proper test case.
| * | | | | | | | | | | | | | | | | | merge 8.5dgp2014-05-011-10/+31
| |\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ | | |/ / / / / / / / / / / / / / / / /
| | * | | | | | | | | | | | | | | | | Stop the segfaults in [close] during [gets] tests.dgp2014-04-301-9/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Not sure this is the right behavior, but it's better than crashing.
| | * | | | | | | | | | | | | | | | | Panic message to pinpoint the cause of iocmd-21.23 segfault.dgp2014-04-301-0/+3
| | | | | | | | | | | | | | | | | | |
| | * | | | | | | | | | | | | | | | | Make sure no shared ChannelBuffers get recycled.dgp2014-04-291-0/+11
| | | |_|_|_|_|_|_|_|_|_|_|_|_|_|/ / | | |/| | | | | | | | | | | | | | |
| | * | | | | | | | | | | | | | | | Fix bug exposed when buffer recycling is disabled.dgp2014-04-291-2/+4
| | |\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ | | | |_|_|_|_|_|_|_|_|_|_|_|_|_|/ / | | |/| | | | | | | | | | | | | | |
| | | * | | | | | | | | | | | | | | Revise the logic for setting TCL_ENCODING_END in the outputEncodingFlagsdgp_no_buffer_recycledgp2014-04-291-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | so it does not rely on buffer recycling.
| | | * | | | | | | | | | | | | | | Disable buffer recycling to expose bugs for fixing.dgp2014-04-251-1/+1
| | |/ / / / / / / / / / / / / / /
| * | | | | | | | | | | | | | | | merge 8.5dgp2014-04-211-8/+42
| |\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ | | |/ / / / / / / / / / / / / / /
| | * | | | | | | | | | | | | | | Added a refcounting mechanism to ChannelBuffers. Other edits todgp2014-04-211-8/+42
| | | |_|_|_|_|_|_|_|_|_|_|_|/ / | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | stop segfaults in tests iocmd-21.2[12].
| * | | | | | | | | | | | | | | merge 8.5dgp2014-04-161-4/+32
| |\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ | | |/ / / / / / / / / / / / / / | | | | | | | | | | | | | | | / | | |_|_|_|_|_|_|_|_|_|_|_|_|/ | |/| | | | | | | | | | | | |
| | * | | | | | | | | | | | | Fix test failure socket-2.9: "1 {not owner}" instead of "1 {couldn't open ↵oehhar2014-04-011-9/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | socket address already in use}" by only setting returned error message if not jet set.
| | * | | | | | | | | | | | | Set return message in close if a flush error is reported (which may be an ↵oehhar2014-04-011-2/+13
| | | |_|_|_|_|_|_|_|_|_|_|/ | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | error from a background flush). Ticket [97069ea11a]
| | * | | | | | | | | | | | Minimal patch to fix iocmd-23.11. Might not be the best fix, but is *a* fix.dgp2014-03-271-3/+20
| | | |_|_|_|_|_|_|_|_|_|/ | | |/| | | | | | | | | |
| * | | | | | | | | | | | Don't allow buffer recycling to prevent or delay buffersize shrinkage.dgp2014-03-201-40/+28
| | | | | | | | | | | | |
| * | | | | | | | | | | | Stop routine clearing of CHANNEL_EOF. Only clear when there's a reasondgp2014-03-201-18/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (seek, eofchar change, ungets). Otherwise, once you hit EOF you stay there.
| * | | | | | | | | | | | Use assertions about the pushback buffers to simplify their handling.dgp2014-03-201-23/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Mark several things left TODO. Some tidying.
| * | | | | | | | | | | | Let TranslateInputEOL handle the "\r$eofChar" sequence in CRLF mode.dgp2014-03-191-27/+17
| | | | | | | | | | | | |
| * | | | | | | | | | | | Complete rewrite of DoRead().dgp2014-03-191-156/+132
| | | | | | | | | | | | |
| * | | | | | | | | | | | Remove long dead "BAD_BLOCKING" support code so it no longer confusesdgp2014-03-171-123/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | people reading/editing this code.
| * | | | | | | | | | | | Compress code for better single screen viewing.dgp2014-03-111-47/+8
| | | | | | | | | | | | |
| * | | | | | | | | | | | Trial rewrite of AUTO input translation.dgp2014-03-111-0/+35
| | | | | | | | | | | | |
| * | | | | | | | | | | | .... and then the bug fix.dgp2014-03-101-1/+1
| | | | | | | | | | | | |
| * | | | | | | | | | | | Rewrite CRLF translation to use more system calls.dgp2014-03-101-18/+28
| | | | | | | | | | | | |
| * | | | | | | | | | | | Bring CRLF translation in parallel with others.dgp2014-03-101-13/+7
| | | | | | | | | | | | |
| * | | | | | | | | | | | TranslateInputEOL doesn't need to return anything. No caller cares.dgp2014-03-101-36/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Other optimizations and simplifications.
| * | | | | | | | | | | | TranslateInputEOL() callers no longer need assert dstLen <= srcLen.dgp2014-03-071-7/+5
| | | | | | | | | | | | |
| * | | | | | | | | | | | Simplify the input eof char scan. Update some comments.dgp2014-03-071-31/+33
| | | | | | | | | | | | |
| * | | | | | | | | | | | Variable "rawStart" serves no purpose.dgp2014-03-061-3/+2
| | | | | | | | | | | | |
| * | | | | | | | | | | | Remove old dead code; silence compiler warnings; tidy up.dgp2014-03-051-403/+12
| | | | | | | | | | | | |