summaryrefslogtreecommitdiffstats
path: root/generic/tclIO.c
Commit message (Collapse)AuthorAgeFilesLines
* * 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.
* * generic/tclIO.c (TclGetsObjBinary): operate on topmost channel.hobbs2008-01-201-7/+13
| | | | [Bug 1869405] (Ficicchia)
* merge stable branch onto HEADdgp2007-12-131-1/+1
|
* make tclChannelType static (fix 'make checkstubs')das2007-12-101-2/+2
|
* * tests/io.test, tests/chanio.test (io-73.1): Make sure to invalidatehobbs2007-12-091-6/+8
| | | | | * generic/tclIO.c (SetChannelFromAny): internal rep only after validating channel rep. [Bug 1847044]
* * generic/tclIO.h: Create Tcl_Obj for Tcl channels to reducehobbs2007-12-051-41/+283
| | | | | | | * generic/tclIO.c: overhead in lookup by Tcl_GetChannel. New * generic/tclIOCmd.c: TclGetChannelFromObj for internal use. * generic/tclIO.c (WriteBytes, WriteChars): add opt check to avoid EOL translation when not linebuffered or using lf. [Bug 1845092]
* * generic/tclIO.c: Simplify test and improve accuracy of errordgp2007-11-281-5/+4
| | | | message in latest changes.
* -eofchar must support no eofchar.patthoyts2007-11-281-3/+3
|
* * doc/chan.n: "Fix" the limitation on channel -eofchardgp2007-11-271-13/+18
| | | | | | | * doc/fconfigure.n: values to single byte characters by documenting * generic/tclIO.c: it and making it fail loudly. Thanks to * tests/chan.test: Stuart Cassoff for contributing the fix. [Bug 800753]
* Simplifications (fewer casts, less manual bit twiddling)dkf2007-11-191-192/+191
|
* [Patch 1830038]: Increased usage of macros to detect and take advantage of ↵Miguel Sofer2007-11-111-9/+9
| | | | objTypes.
* fix (unsigned char*) vs. (char*) warningsdas2007-11-081-2/+2
|
* (DoWriteChars): special case for 1-byte channel write.hobbs2007-11-071-6/+11
|
* * generic/tclIO.c (TclGetsObjBinary): add an efficient binary pathhobbs2007-11-071-4/+254
| | | | for [gets].
* (CopyData): avoid leaking msg and errObj (if interp == NULL)das2007-09-171-15/+27
|
* * generic/tclInt.decls: New internal routine TclBackgroundException()dgp2007-09-061-4/+6
| | | | | | | | | | | | | | | | * generic/tclEvent.c: that for the first time permits non-TCL_ERROR exceptions to trigger [interp bgerror] handling. Closes a gap in TIP 221. When falling back to [bgerror] (which is designed only to handle TCL_ERROR), convert exceptions into errors complaining about the exception. * generic/tclInterp.c: Convert Tcl_BackgroundError() callers to call * generic/tclIO.c: TclBackgroundException(). * generic/tclIOCmd.c: * generic/tclTimer.c: * generic/tclIntDecls.h: make genstubs * generic/tclStubInit.c:
* * generic/tclIO.c: Removed dead code.dgp2007-07-021-9/+1
| | | | * unix/tclUnixChan.c:
* * tests/encoding.test: Modified so that encoding tests happenKevin B Kenny2007-05-041-2/+2
| | | | | | | | | in a private namespace, to avoid polluting the global one. This problem was discovered when running the test suite '-singleproc 1 -skip exec.test' because the 'path' variable in encoding.test conflicted with the one in io.test. * tests/io.test: Made more of the working variables private to the namespace.
* * generic/tclIO.c (DeleteChannelTable): Made changes so thatKevin B Kenny2007-05-011-60/+72
| | | | | | | DeleteChannelTable tries to close all open channels, not just the first. [Bug 1710285] * generic/tclThread.c (TclFinalizeSynchronization): Make sure that TSD blocks get freed on non-threaded builds. [Bug 1710825]
* * generic/tclIO.c (FixLevelCode): Corrected reference countandreas_kupries2007-04-301-13/+19
| | | | | | mismanagement of newlevel, newcode. Changed to allocate the Tcl_Obj's as late as possible, and only when actually needed. [Bug 1705778, leak K29].
* Whitespace policing, replacing commas in varargs with constant string ↵Kevin B Kenny2007-04-201-11/+11
| | | | catenation, and fixed an oversight in the fix for NZA time zones.
* Simplification of some argument processing through introduction of a helperdkf2007-04-051-26/+26
| | | | macro.
* various "const" additions, in line with TIP #27nijtmans2007-02-231-69/+69
|
* Missed a spot; thanks to Andreas Kupries for spotting this one.dkf2007-01-171-5/+10
|
* Added macros to make usage of ChannelBuffers clearer.dkf2007-01-171-81/+128
|
* * generic/tclIO.c (Tcl_GetsObj):mdejong2006-12-271-14/+20
| | | | | Avoid checking for for the LF in a possible CRLF sequence when EOF has already been found.
* * generic/tclIO.c: When [gets] on a binary channel needs to usedgp2006-11-131-12/+41
| | | | | | | the "iso8859-1" encoding, save a copy of that encoding per-thread to avoid repeated freeing and re-loading of it from the file system. This replaces the cached copy of this encoding that the platform initialization code used to keep in pre-8.5 releases.
* * generic/tclCompExpr.c: fix gcc warnings about 'cast to/fromdas2006-11-131-2/+2
| | | | | | | | | | | | | | | | | | | | | | | * generic/tclEncoding.c: pointer from/to integer of different * generic/tclEvent.c: size' on 64-bit platforms by casting to * generic/tclExecute.c: intermediate types intptr_t/uintptr_t * generic/tclHash.c: via new PTR2INT(), INT2PTR(), * generic/tclIO.c: PTR2UINT() and UINT2PTR() macros. * generic/tclInt.h: [Patch 1592791] * generic/tclProc.c: * generic/tclTest.c: * generic/tclThreadStorage.c: * generic/tclTimer.c: * generic/tclUtil.c: * unix/configure.in: * unix/tclUnixChan.c: * unix/tclUnixPipe.c: * unix/tclUnixPort.h: * unix/tclUnixTest.c: * unix/tclUnixThrd.c: * unix/configure: autoconf-2.59 * unix/tclConfig.h.in: autoheader-2.59
* Rewrite for style and clarity (esp. tclPkg.c)dkf2006-11-081-231/+275
|
* * generic/tclIO.c (Tcl_GetsObj): added two test'n'panic guards forMiguel Sofer2006-09-281-1/+7
| | | | possible NULL derefs, [Bug 1566382] and coverity #33.
* * generic/tclIO.c (Tcl_StackChannel): Fixed [SF Tcl Bug 1564642],andreas_kupries2006-09-251-2/+2
| | | | | aka coverity #51. Extended loop condition, added checking for NULL to prevent seg.fault.
* * generic/tclIO.c (ReadChars): Added check and panic andandreas_kupries2006-04-051-1/+76
| | | | | | | | | | | | | | | | | | | | | commentary to a piece of code which relies on BUFFER_PADDING to create enough space at the beginning of each buffer forthe insertion of partial multi-byte data at the beginning of a buffer. To explain why this code is ok, and as precaution if someone twiddled the BUFFER_PADDING into uselessness. * generic/tclIO.c (ReadChars): [SF Tcl Bug 1462248]. Added code temporarily suppress the use of TCL_ENCODING_END set when eof was reached while the buffer we are converting is not truly the last buffer in the queue. together with the Utf bug below it was possible to completely bollox the buffer data structures, eventually crashing Tcl. * generic/tclEncoding.c (UtfToUtfProc): Fixed problem where the function accessed memory beyond the end of the input buffer. When TCL_ENCODING_END is set and the last bytes of the buffer start a multi-byte sequence. This bug contributed to [SF Tcl Bug 1462248].
* * doc/CrtChannel.3: Added TCL_CHANNEL_VERSION_5, made itandreas_kupries2006-03-271-2/+4
| | | | | | | | | | | | | | * generic/tcl.h: the version where the "truncateProc" * generic/tclIO.c: is defined at, and moved all channel * generic/tclIOGT.c: drivers of Tcl to v5. * generic/tclIORChan.c: * unix/tclUnixChan.c: * unix/tclUnixPipe.c: * win/tclWinChan.c: * win/tclWinConsole.c: * win/tclWinPipe.c: * win/tclWinSerial.c: * win/tclWinSock.c:
* Calls TclpFinalizeSockets() as partvasiljevic2006-03-101-1/+8
| | | | of the TclFinalizeIOSubsystem()
* * generic/tclIO.c: Made several routines tolerant ofdgp2006-02-151-23/+39
| | | | | * generic/tclIORChan.c: interp == NULL arguments. [Bug 1380662] * generic/tclIOUtil.c:
* Export stubs for libtommath; fix mingw compiler warningsKevin B Kenny2005-12-131-2/+2
|
* * generic/tclIO.c (TclFinalizeIOSubsystem): preserve statePtrhobbs2005-11-181-5/+10
| | | | until we netrieve next statePtr from it.