summaryrefslogtreecommitdiffstats
path: root/generic/tclIORTrans.c
Commit message (Collapse)AuthorAgeFilesLines
* Micro-optimization: Use TclGetStringFromObj in stead of Tcl_GetStringFromObj ↵jan.nijtmans2016-07-081-2/+2
| | | | in many places where possible.
* typo in comment. Eliminate unnecessary end-of-line spacing.jan.nijtmans2015-10-191-3/+3
|
* Reflected Transform channel fix. Be sure each EOF on the base channel getsdgp2014-11-051-3/+15
| | | | passed up to become an eof of the transform before continuing on to additional ReadRaw() from the base channel. This way we don't miss fleeting EOFs.
* Make sure reflected channels do not make a double call to Tcl_ReadRaw(),dgp2014-11-031-4/+5
| | | with the unwarranted assumption that EOF is a permanent condition.
* The write and flush operations of reflected transforms ([chan push]) havedgp2014-07-081-2/+2
| | | | | | | been converting all lower level channel errors from Tcl_WriteRaw() into EINVAL. Generally this is a perplexing discard of useful information, but worse it interferes with the EAGAIN signalling that is required to manage the BLOCKED state of a nonblocking channel. Thanks to aspect for demo scripts that pointed to the bug.
* [b47b176adf] Stop segfault when variability in mutex lock schedules cause dgp2014-06-191-0/+6
| | | | a ForwardingResult to remain on the forwardList after it has been processed.
* Simplify ReflectInput(). Also stop intruding on channel internals withdgp2014-05-191-36/+16
| | | direct clearing of CHANNEL_EOF flag.
* Have the [chan push] machinery ReadRaw() directly into the argument to bedgp2014-05-121-14/+20
| | | passed to the read method of the channel transformation command. Save a copy.
* Repair another "impossible" test and the segfault it reveals.dgp2014-05-091-0/+2
|
* remove stray calls to Tcl_Alloc and friends: the core should only use ↵mig2013-01-021-3/+3
| | | | ckalloc to allow MEM_DEBUG to work properly
* Final part of result generation conversion (modulo any minor blunders)dkf2012-08-051-53/+58
|
* Factor out constant that must be the same in multiple places. Prompted by adkf2012-05-251-1/+2
| | | conversation with Alexandre Ferrieux.
* Use zero-delays instead of finite ones when posting fileevents, because (1) ↵bug_3525907ferrieux2012-05-221-8/+1
| | | | they should be zero in the first place (see UpdateInterest) and (2) ever-reposting cases will be detected with greater ease.
* Fix for bug 3525907. Reworked TransformInput() entirely, tightened use of ↵andreask2012-05-171-1/+1
| | | | timed events, and added code handling special situations like EAGAIN, parent eof, etc.
* Fix gcc warnings (discovered with latest mingw, based on gcc 4.6.1)jan.nijtmans2011-10-071-1/+1
|
* More revisions to get finalization of ReflectedTransforms correct,dgp2011-09-231-56/+63
| | | including adopting a "dead" field as was done in tclIORChan.c.
* * generic/tclIORTrans.c (ForwardOpToOwnerThread): Fixed theandreask2011-09-211-0/+1
| | | | | missing initialization of the 'dsti' field. Reported by Don Porter, on chat.
* Revised ReflectClose() and FreeReflectedTransform() so that we stop leakingdgp2011-09-201-25/+43
| | | | ReflectedTransforms, yet free all Tcl_Obj values in the same thread that alloced them.
* Leak of ReflectedTransformMap.dgp2011-08-291-4/+3
|
* 3393279, 3393280 ReflectClose(.) is missing Tcl_EventuallyFree() callsdgp2011-08-191-0/+2
| | | at some of its exits.
* Use Tcl_PrintfObj to generate more (complex) error messages.dkf2011-08-051-21/+15
|
* Adjust ckalloc/ckfree macros to greatly reduce number of explicit casts indkf2011-03-121-13/+11
| | | 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-1/+1
| | | the Engineering Manual.
* More gcc warnings: variable set but not usedpseudotrunk_2011_03_08jan.nijtmans2011-03-081-2/+0
|
* 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).
* * generic/tclIORChan.c: [Bug 3034840]: Fixed reference countingandreas_kupries2010-08-041-9/+30
| | | | | * generic/tclIORTrans.c: in InvokeTclMethod and callers. * tests/ioTrans.test:
* Use "tclIO.h" and "tclTomMathDecls.h" everywherenijtmans2010-05-031-2/+2
|
* If tclInt.h or tclPort.h is alreadynijtmans2010-04-271-2/+2
| | | | | | | included, don't include <limits.h> again. Follow-up to [Bug 2991415]: tclport.h #included before limits.h See comments in [Bug 2991415]
* * generic/tclIORTrans.c (ReflectInput, ReflectOutput,andreas_kupries2010-03-171-20/+36
| | | | | | | | | | | | | 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.
* Fix [Bug 2964425].dkf2010-03-051-3/+1
|
* Code Audit results:dkf2010-03-051-11/+8
| | | | | | | | * use do { ... } while (0) in macros * avoid shadowing one local variable with another * use clearer 'foo.bar++;' instead of '++foo.bar;' where result not required (i.e., semantically equivalent) * follow Engineering Manual rules on spacing and declarations
* More tidying up (whitespace, spelling, useless parentheses, useless casts)dkf2010-02-241-18/+21
|
* * win/tclWinDde.c: VC++ 6.0 doesn't havenijtmans2010-01-101-3/+3
| | | | | | | | | | | | | | | | | | | | * win/tclWinReg.c PDWORD_PTR * win/tclWinThrd.c: Fix various minor gcc warnings. * win/tclWinTime.c * win/tclWinConsole.c Put channel type definitions * win/tclWinChan.c in static const memory * win/tclWinPipe.c * win/tclWinSerial.c * win/tclWinSock.c * generic/tclIOGT.c * generic/tclIORChan.c * generic/tclIORTrans.c * unix/tclUnixChan.c * unix/tclUnixPipe.c * unix/tclUnixSock.c * unix/configure (regenerated with autoconf 2.59) * tests/info.test: Make test independant from tcltest implementation.
* Eliminate unneccessary spacesnijtmans2009-11-181-4/+4
|
* * generic/tclIORTrans.c (ReflectInput): Remove error response toandreas_kupries2009-09-011-5/+2
| | | | | | | | 0-result from method 'limit?' of transformations. Return the number of copied bytes instead, which is possibly nothing. The latter then triggers EOF handling in the higher layers, making the 0-result of limit? the way to inject artificial EOF's into the data stream.
* * generic/tclIORChan.c (ReflectClose): Fix for [Bug 2458202].andreas_kupries2009-01-221-6/+11
| | | | | | | * generic/tclIORTrans.c (ReflectClose): Closing a channel may supply NULL for the 'interp'. Test for finalization needs to be different, and one place has to pull the interp out of the channel instead.
* Style fixes (unfouling whitespace, sorting comments, removing useless casts, ↵dkf2009-01-091-7/+7
| | | | etc.)
* Style improvements - invoking callbacks without visual junk.dkf2008-10-261-487/+507
|
* * generic/tclIORTrans.c (DeleteReflectedTransformMap): Removedandreas_kupries2008-10-171-5/+1
| | | | debug output in C++ comment.
* Add "const" to many internalnijtmans2008-10-161-11/+11
| | | | | const tables. No functional or API change.
* * generic/tclIORTrans.c: fix signed <-> unsigned cast warnings.das2008-06-121-15/+20
|
* * generic/tclIORTrans.c (ReflectInput): Fixed a bug triggered byandreas_kupries2008-06-101-3/+6
| | | | | | | | | | | Pat Thoyts <patthoyts@users.sourceforge.net>. Reset the EOF flag after draining the Tcl level into the result buffer, to make sure that the result buffer will be drained as well by repeated calls to ReflectInput should it contain more than one buffer-full of data. Without that reset the higher I/O system will not call on ReflectInput anymore due to the assumed EOF, thus losing the data which did not fit in the buffer of the call which caused the eof and drain.
* TIP #230 IMPLEMENTATIONandreas_kupries2008-06-061-0/+3345
* generic/tclIOCmd.c: Integration of transform commands into 'chan' ensemble. * generic/tclInt.h: Definitions of the transform commands. * generic/tclIORTrans.c: Implementation of the reflection transforms. * tests/chan.test: Tests updated for new sub-commands of 'chan'. * tests/ioCmd.test: Tests updated for new sub-commands of 'chan'. * tests/ioTrans.test: Whole new set of tests for the reflection transform. * unix/Makefile.in: Integration of new files into build rules. * win/Makefile.in: Integration of new files into build rules. * win/makefile.vc: Integration of new files into build rules. NOTE: The file 'tclIORTrans.c' has a lot of code in common with the file 'tclIORChan.c', as that made it much easier to develop the reference implementation as a separate module. Now that the transforms have been committed the one thing left to do is to go over both modules and see which of the common parts we can factor out and share.