summaryrefslogtreecommitdiffstats
path: root/generic/tclIOCmd.c
Commit message (Collapse)AuthorAgeFilesLines
* Fix some gcc warnings which become visible with -Wextrajan.nijtmans2013-06-131-17/+17
|
* make some more internal tables constjan.nijtmans2012-04-231-1/+1
|\
| * make some more internal tables constjan.nijtmans2012-04-231-1/+1
| | | | | | On cygwin, install dll's in /usr/bin, not in /usr/lib
| * A few more compiler warningsjan.nijtmans2011-08-181-1/+1
| |
* | Fix [3148192] implementation, restoring legacy form againjan.nijtmans2011-06-201-1/+1
| |
* | Now that we're no longer using SCM based on RCS, the RCS Keyword lines causedgp2011-03-021-2/+0
|\ \ | |/ | | more harm than good. Purged them.
| * Now that we're no longer using SCM based on RCS, the RCS Keyword lines causedgp2011-03-011-2/+0
| | | | | | more harm than good. Purged them.
| * * generic/tclIOCmd.c (Tcl_FcopyObjCmd): Keeping check for negativeandreas_kupries2008-04-101-13/+8
| | | | | | | | | | | | | | | | | | | | | | values, changed to not be an error, but behave like the special value -1 (copy all, default). * tests/iocmd.test (iocmd-15.{12,13}): Removed. * tests/io.test (io-52.5{,a,b}): Reverted last change, added comment regarding the meaning of -1, added two more testcases for other negative values, and input wrapped to negative.
| * * generic/tclIOCmd.c (Tcl_FcopyObjCmd): Added checking of -sizeandreas_kupries2008-04-091-1/+15
| | | | | | | | | | | | | | | | * tests/ioCmd.test (iocmd-15.{13,14}): value to reject negative values, and values overflowing 32-bit signed. [Bug 1557855]. Basic patch by Alexandre Ferrieux <ferrieux@users.sourceforge.net>, with modifications from me to separate overflow from true negative value. Extended testsuite.
| * * generic/tclIOCmd.c (Tcl_GetsObjCmd): do not reuse resultObj ashobbs2008-02-261-4/+3
| | | | | | | | it may be shared (crash condition).
| * * generic/tclIOCmd.c (Tcl_FcopyObjCmd): Corrected a typo in theandreas_kupries2004-07-161-3/+3
| | | | | | | | | | generation of error messages and simplified by reusing data in a variable instead of retrieving the string again. Fixes [Tcl SF Bug 835289].
| * * generic/tclIOCmd.c (Tcl_PutsObjCmd): Added length check to theandreas_kupries2004-07-151-2/+2
| | | | | | | | | | | | old depreceated newline syntax, to ensure that only "nonewline" is accepted. [Tcl SF Bug 985869], reported by Joe Mistachkin <mistachkin@users.sourceforge.net>.
* | [Bug 3148192]: Commands "read/puts" incorrectly interpret parameters.nijtmans2011-01-171-27/+23
| | | | | | | | Improved error-message regarding legacy form.
* | [Bug 2949740]: Do not try to put a NULL pipeline channel into binary mode.dkf2010-02-111-2/+2
| |
* | * generic/tclIOCmd.c (Tcl_FcopyObjCmd): Keeping check for negativeandreas_kupries2008-04-101-13/+8
| | | | | | | | | | | | | | | | | | | | | | | | values, changed to not be an error, but behave like the special value -1 (copy all, default). * tests/iocmd.test (iocmd-15.{12,13}): Removed. * tests/io.test (io-52.5{,a,b}): Reverted last change, added * tests/chanio.test (chan-io-52.5{,a,b}): comment regarding the meaning of -1, added two more testcases for other negative values, and input wrapped to negative.
* | * generic/tclIOCmd.c (Tcl_FcopyObjCmd): Added checking of -sizeandreas_kupries2008-04-091-1/+15
| | | | | | | | | | | | | | | | * tests/ioCmd.test (iocmd-15.{13,14}): value to reject negative values, and values overflowing 32-bit signed. [Bug 1557855]. Basic patch by Alexandre Ferrieux <ferrieux@users.sourceforge.net>, with modifications from me to separate overflow from true negative value. Extended testsuite.
* | merge stable branch onto HEADdgp2007-12-131-1/+1
| |
* | * generic/tclIOCmd.c (FinalizeIOCmdTSD, Tcl_PutsObjCmd): cachehobbs2007-12-071-18/+59
| | | | | | | | stdout channel object for [puts $str] calls.
* | Simplify code for setting up the [chan] ensemble now that we can leveragedkf2007-12-061-8/+82
| | | | | | | | TclMakeEnsemble to do most of the work.
* | * generic/tclIO.h: Create Tcl_Obj for Tcl channels to reducehobbs2007-12-051-74/+56
| | | | | | | | | | | | | | * 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]
* | Reduce cast count.dkf2007-11-191-67/+51
| |
* | More minor cleanupdkf2007-11-181-7/+7
| |
* | [Patch 1830038]: Increased usage of macros to detect and take advantage of ↵Miguel Sofer2007-11-111-42/+42
| | | | | | | | objTypes.
* | * generic/tclIOCmd.c: Revise [open] so that it interprets leadingdgp2007-10-151-2/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | zero strings passed as the "permissions" argument as octal numbers, even if Tcl itself no longer parses integers in that way. * unix/tclUnixFCmd.c: Revise the "-permissions" [file attribute] so that it interprets leading zero strings as octal numbers, even if Tcl itself no longer parses integers in that way. * generic/tclCompExpr.c: Corrections to code that produces * generic/tclUtil.c: extended "bad octal" error messages. * tests/cmdAH.test: Test revisions so that tests pass whether or * tests/cmdIL.test: not Tcl parses leading zero strings as octal. * tests/compExpr-old.test: * tests/compExpr.test: * tests/compile.test: * tests/expr-old.test: * tests/expr.test: * tests/incr.test: * tests/io.test: * tests/lindex.test: * tests/link.test: * tests/mathop.test: * tests/parseExpr.test: * tests/set.test: * tests/string.test: * tests/stringComp.test:
* | * generic/tclInt.decls: New internal routine TclBackgroundException()dgp2007-09-061-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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:
* | Silence constness warnings for TclStackFree when building with msvc.patthoyts2007-06-281-2/+2
| |
* | * generic/tclInt.decls: Revised the interfaces of the routinesdgp2007-06-201-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * generic/tclExecute.c: TclStackAlloc and TclStackFree to make them easier for callers to use (or more precisely, harder to misuse). TclStackFree now takes a (void *) argument which is the pointer intended to be freed. TclStackFree will panic if that's not actually the memory the call will free. TSA/TSF also now tolerate receiving (interp == NULL), in which case they simply fall back to be calls to Tcl_Alloc/Tcl_Free. * generic/tclIntDecls.h: make genstubs * generic/tclBasic.c: Updated callers * generic/tclCmdAH.c: * generic/tclCmdIL.c: * generic/tclCompCmds.c: * generic/tclCompExpr.c: * generic/tclCompile.c: * generic/tclFCmd.c: * generic/tclFileName.c: * generic/tclIOCmd.c: * generic/tclIndexObj.c: * generic/tclInterp.c: * generic/tclNamesp.c: * generic/tclProc.c: * generic/tclTrace.c: * unix/tclUnixPipe.c:
* | * generic/tclIOCmd.c (Tcl_ReadObjCmd): Plugged a leak of theKevin B Kenny2007-04-241-2/+2
| | | | | | | | | | | | | | | | buffer object if the physocal read returned an error and the bypass area had no message. * generic/tclIORChan.c (TclChanCreateObjCmd): Plugged a leak of the return value from the "initialize" method of a channel handler.
* | * generic/tclBasic.c: Replace arrays on the C stack and ckallocdgp2007-04-021-11/+5
| | | | | | | | | | | | | | | | | | | | | | | | * generic/tclExecute.c: calls with TclStackAlloc calls to use memory * generic/tclFCmd.c: on Tcl's evaluation stack. * generic/tclFileName.c: * generic/tclIOCmd.c: * generic/tclIndexObj.c: * generic/tclInterp.c: * generic/tclNamesp.c: * generic/tclTrace.c: * unix/tclUnixPipe.c:
* | various "const" additions, in line with TIP #27nijtmans2007-02-201-28/+28
| |
* | Implement TIP#267dkf2006-12-041-9/+13
| |
* | fix warningdas2006-12-021-3/+4
| |
* | TIP#287 IMPLEMENTATIONdgp2006-12-011-1/+69
| | | | | | | | | | | | | | | | | | | | * doc/chan.n: New subcommand [chan pending]. * generic/tclBasic.c: Thanks to Michael Cleverly for proposal * generic/tclInt.h: and implementation. * generic/tclIOCmd.c: * library/init.tcl: * tests/chan.test: * tests/ioCmd.test:
* | * generic/regc_locale.c (cclass):das2006-07-201-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | * generic/tclExecute.c (TclExecuteByteCode): * generic/tclIOCmd.c (Tcl_ExecObjCmd): * generic/tclListObj.c (NewListIntRep): * generic/tclObj.c (Tcl_GetLongFromObj, Tcl_GetWideIntFromObj, FreeBignum, Tcl_SetBignumObj): * generic/tclParseExpr.c (Tcl_ParseExpr): * generic/tclStrToD.c (TclParseNumber): * generic/tclStringObj.c (TclAppendFormattedObjs): * unix/tclUnixPipe.c (TclpCreateProcess): fix signed-with-unsigned comparison and other warnings from gcc4 -Wextra.
* | * generic/tclBinary.c:Miguel Sofer2005-11-041-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * generic/tclCmdAH.c: * generic/tclCmdIL.c: * generic/tclCmdMZ.c: * generic/tclDictObj.c: * generic/tclExecute.c: * generic/tclIOCmd.c: * generic/tclLink.c: * generic/tclTest.c: * generic/tclVar.c: fix for [Bug 1334947]. The functions TclPtrSetVar, Tcl_ObjSetVar2 and Tcl_SetVar2Ex now always consume the newValuePtr argument - i.e., they will free a 0-refCount object if they failed to set the variable. Fixed all callers in the core.
* | ANSIfy. Also converted some deeply nested code to a less nested form for ↵dkf2005-11-011-200/+215
| | | | | | | | easier reading.
* | TIP#219 IMPLEMENTATIONandreas_kupries2005-08-241-19/+76
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * doc/SetChanErr.3: ** New File **. Documentation of the new channel API functions. * generic/tcl.decls: Stub declarations of the new channel API. * generic/tclDecls.h: Regenerated * generic/tclStubInit.c: * tclIORChan.c: ** New File **. Implementation of the reflected channel. * generic/tclInt.h: Integration of reflected channel and new error * generic/tclIO.c: propagation into the generic I/O core. * generic/tclIOCmd.c: * generic/tclIO.h: * library/init.tcl: * tests/io.test: Extended testsuite. * tests/ioCmd.test: * tests/chan.test: * generic/tclTest.c: * generic/tclThreadTest.c: * unix/Makefile.in: Integration into the build machinery. * win/Makefile.in: * win/Makefile.vc:
* | Try again :-}dkf2005-07-171-2/+3
| |
* | D'ohdkf2005-07-171-2/+2
| |
* | Getting more systematic about styledkf2005-07-171-386/+396
| |
* | Clean up tests in chan.test and add mechanism for chaining Tcl_WrongNumArgsdkf2005-06-071-4/+12
| | | | | | | | messages (used in [read] implementation)
* | copy/paste/modify errordgp2005-06-071-3/+2
| |
* | TIP#208 implementationdkf2005-06-061-1/+75
| | | | | | | | It's crude (especially in the tests and docs department) and incomplete (no truncation on non-POSIX platforms).
* | Merged kennykb-numerics-branch back to the head; TIPs 132 and 232Kevin B Kenny2005-05-101-1/+1
| |
* | TIP#183 IMPLEMENTATION [Patch 577093]dgp2005-04-271-3/+6
| | | | | | | | | | | | | | | | | | * generic/tclIOUtil.c (TclGetOpenModeEx): New routine. * generic/tclInt.h: * generic/tclIO.c (Tcl_OpenObjCmd): Support for "b" and * doc/open.n: "BINARY" in "access" argument to [open]. * tests/ioCmd.test:
* | remove unused vardgp2004-10-071-2/+2
| |
* | * generic/tclBasic.c:dgp2004-10-061-13/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * generic/tclBinary.c: * generic/tclCmdAH.c: * generic/tclCmdIL.c: * generic/tclCmdMZ.c: * generic/tclCompExpr.c: * generic/tclDictObj.c: * generic/tclEncoding.c: * generic/tclExecute.c: * generic/tclFCmd.c: * generic/tclHistory.c: * generic/tclIndexObj.c: * generic/tclInterp.c: * generic/tclIO.c: * generic/tclIOCmd.c: * generic/tclNamesp.c: * generic/tclObj.c: * generic/tclPkg.c: * generic/tclResult.c: * generic/tclScan.c: * generic/tclTimer.c: * generic/tclTrace.c: * generic/tclUtil.c: * generic/tclVar.c: It is a poor practice to directly set or append to the value of the objResult of an interp, because that value might be shared, and in that circumstance a Tcl_Panic() will be the result. Searched for example of this practice and replaced with safer alternatives, often using the Tcl_AppendResult() routine that dkf just rehabilitated.
* | * generic/tclIOCmd.c (Tcl_FcopyObjCmd): Corrected a typo in theandreas_kupries2004-07-161-3/+3
| | | | | | | | | | generation of error messages and simplified by reusing data in a variable instead of retrieving the string again. Fixes [Tcl SF Bug 835289].
* | * generic/tclIOCmd.c (Tcl_PutsObjCmd): Added length check to theandreas_kupries2004-07-151-2/+2
| | | | | | | | | | | | old depreceated newline syntax, to ensure that only "nonewline" is accepted. [Tcl SF Bug 985869], reported by Joe Mistachkin <mistachkin@users.sourceforge.net>.
* | Patch 922727 committed. Implements three changes:dgp2004-04-061-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * generic/tclInt.h: Reworked the Tcl header files into a clean * unix/tclUnixPort.h: hierarchy where tcl.h < tclPort.h < tclInt.h * win/tclWinInt.h: and every C source file should #include * win/tclWinPort.h: at most one of those files to satisfy its declaration needs. tclWinInt.h and tclWinPort.h also better organized so that tclWinPort.h includes the Windows implementation of cross-platform declarations, while tclWinInt.h makes declarations that are available on Windows only. * generic/tclBinary.c (TCL_NO_MATH): Deleted the generic/tclMath.h * generic/tclMath.h (removed): header file. The internal Tcl * macosx/Makefile (PRIVATE_HEADERS): header, tclInt.h, has a * win/tcl.dsp: #include <math.h> directly, and file external to Tcl needing libm should do the same. * win/Makefile.in (WIN_OBJS): Deleted the win/tclWinMtherr.c file. * win/makefile.bc (TCLOBJS): It's a vestige from matherr() days * win/makefile.vc (TCLOBJS): gone by. * win/tcl.dsp: * win/tclWinMtherr.c (removed):