summaryrefslogtreecommitdiffstats
path: root/generic/tclIOCmd.c
Commit message (Collapse)AuthorAgeFilesLines
* 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).
| * 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.
* | | [Bug 3148192]: Commands "read/puts" incorrectly interpret parameters.nijtmans2011-01-171-28/+28
| | | | | | | | | | | | Improved error-message regarding legacy form.
* | | Fix gcc -Wextra warning: missing initializernijtmans2010-12-101-21/+21
| | |
* | | * generic/tclCmdAH.c (TclInitFileCmd, TclMakeFileCommandSafe, ...):dkf2010-12-091-2/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Break up [file] into an ensemble. Note that the ensemble is safe in itself, but the majority of its subcommands are not. * generic/tclFCmd.c (FileCopyRename,TclFileDeleteCmd,TclFileAttrsCmd) (TclFileMakeDirsCmd): Adjust these subcommand implementations to work inside an ensemble. (TclFileLinkCmd, TclFileReadLinkCmd, TclFileTemporaryCmd): Move these subcommand implementations from tclCmdAH.c, where they didn't really belong. * generic/tclIOCmd.c (TclChannelNamesCmd): Move to more appropriate source file. * generic/tclEnsemble.c (TclMakeEnsemble): Start of code to make partially-safe ensembles. Currently does not function as expected due to various shortcomings in how safe interpreters are constructed. * tests/cmdAH.test, tests/fCmd.test, tests/interp.test: Test updates to take into account systematization of error messages.
* | | Remove many type casts which are no longernecessary as a result of [Patch ↵nijtmans2010-08-221-2/+2
| | | | | | | | | | | | 3009403]: Signature of Tcl_GetHashKey, Tcl_(Create|Find)HashEntry
* | | Allow [fcopy] to move more than 2GB per call. Frederic Bonnet identified issue.dkf2010-03-201-5/+7
| | |
* | | Pure whitespace changes, changing to follow Engineering Manual style.dkf2010-02-241-2/+2
| | |
* | | [Bug 2949740]: Do not try to put a NULL pipeline channel into binary mode.dkf2010-02-111-2/+2
| | |
* | | Eliminate various gcc warnings (in -Wextra mode)nijtmans2009-11-181-20/+20
| | |
* | | Reset internal INTERP_ALTERNATE_WRONG_ARGSnijtmans2009-04-271-3/+1
| | | | | | | | | | | | | | | flag inside the Tcl_WrongNumArgs function, so the caller no longer has to do the reset.
* | | - eliminate some unnessary type castsnijtmans2009-02-101-10/+10
| | | | | | | | | | | | | | | - some internal const decorations - spacing
* | | Style fixes (unfouling whitespace, sorting comments, removing useless casts, ↵dkf2009-01-091-9/+11
| | | | | | | | | | | | etc.)
* | | TIP #332 IMPLEMENTATION - Half-Close for Bidirectional Channelsferrieux2008-12-181-3/+45
| | |
* | | TIP #337 IMPLEMENTATIONdgp2008-12-091-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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 ***
* | | Add "const" to many internalnijtmans2008-10-161-7/+7
| | | | | | | | | | | | | | | const tables. No functional or API change.
* | | formatting, whitespacedas2008-07-211-18/+21
| | |
* | | fix [2021443] inconsistant "wrong # args" messages (follow-up)nijtmans2008-07-211-2/+2
| | |
* | | TIP #304 implementationferrieux2008-07-211-1/+50
| | |
* | | more consistent wrong # arg messages: change all messages containing ↵nijtmans2008-07-131-2/+2
| | | | | | | | | | | | ?options? to the form ?-option value ...?
* | | TIP #230 IMPLEMENTATIONandreas_kupries2008-06-061-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* | | * 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: