summaryrefslogtreecommitdiffstats
path: root/generic/tclFCmd.c
Commit message (Collapse)AuthorAgeFilesLines
* 3479689 New internal routine TclJoinPath().dgp2012-01-271-4/+1
| | | | Refactor all the *Join*Path* routines to give them more useful interfaces that are easier to manage getting the refcounts right.
* Bug-3474726 minGW Tcl_StatBuf not defined correctly in tcl.hjan.nijtmans2012-01-211-0/+5
|\
| * Bug-3474726 minGW Tcl_StatBuf not defined correctly in tcl.hjan.nijtmans2012-01-211-0/+5
| |\
| | * [Bug-3474726] minGW Tcl_StatBuf not defined correctly in tcl.hjan.nijtmans2012-01-191-0/+5
| | |
| | * [Bug 3388350] mingw64 compiler warningsjan.nijtmans2011-08-161-0/+1
| | | | | | | | | | | | n mingw, sys/stat.h must be included before winsock2.h, so make sure of that
| * | (TclFileAttrsCmd): Added commands to reset the typePtr of the Tcl_Obj* whose ↵andreask2011-04-201-0/+2
| | | | | | | | | | | | | | | | | | | | | int-rep was just purged. Required to prevent a dangling IndexRep* to reused, smashing the heap. See also the entries at 2011-04-16 and 2011-03-24 for the history of the problem. Note also bug 2857044. This is the original report and fix of such issues for HEAD.
| * | Added code to try to tame the [file attributes] guts, while trying to simplifydkf2011-04-161-9/+12
| | | | | | | | | | | | things enough that I can puzzle out AK's TclVFS problems. I suspect this is not a real fix though; just an attempt to make the problem tractable.
* | | Added comments to try to tame the file attributes guts, while trying to simplifydkf2011-04-161-14/+22
| | | | | | | | | | | | things enough that I can puzzle out AK's TclVFS problems. I suspect this is not a real fix though; just an attempt to make the problem tractable.
* | | More generation of error codes (most platform-specific parts not already usingdkf2011-04-061-0/+8
| | | | | | | | | Tcl_PosixError).
* | | Ensure that any reference to temporary index tables is squelched immediatelydkf2011-03-241-0/+6
|\ \ \ | |/ / | | | rather than hanging around to trip us up in the future.
| * | Ensure that any reference to temporary index tables is squelched immediatelydkf2011-03-241-0/+6
| |\ \ | | |/ | | | rather than hanging around to trip us up in the future.
| | * Ensure that any reference to temporary index tables is squelched immediatelydkf2011-03-241-0/+10
| | | | | | | | | rather than hanging around to trip us up in the future.
* | | 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/tclFCmd.c (TclFileMakeDirsCmd): fix to race condition inhobbs2005-08-171-5/+31
| | | | | | | | | | | | file mkdir (backport from head 2005-06-13) [Bug 1217375]
| | * file copy empty filename bug fixvincentdarley2003-06-231-1/+9
| | |
| * | Backported fix for bug #2015723patthoyts2008-07-211-5/+7
| | |
* | | * generic/tclCmdAH.c (TclInitFileCmd, TclMakeFileCommandSafe, ...):dkf2010-12-091-43/+400
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | Pure whitespace changes, changing to follow Engineering Manual style.dkf2010-02-241-11/+11
| | |
* | | * generic/tclExecute.c: fix potential uninitialized variable use anddas2009-09-071-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * generic/tclFCmd.c: null dereference flagged by clang static * generic/tclProc.c: analyzer. * generic/tclTimer.c: * generic/tclUtf.c: * generic/tclExecute.c: silence false positives from clang static * generic/tclIO.c: analyzer about potential null dereference. * generic/tclScan.c: * generic/tclCompExpr.c:
* | | fixed constness of last commit for msvcpatthoyts2008-10-061-2/+2
| | |
* | | * doc/FileSystem.3: CONSTified Tcl_FSFileAttrStringsProcnijtmans2008-10-051-7/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * generic/tclFCmd.c: and tclpFileAttrStrings. This allows * generic/tclIOUtil.c: FileSystems to report their attributes * generic/tclTest.c: as const strings, without worrying that * unix/tclUnixFCmd.c: Tcl modifies them (which Tcl should not * win/tclWinFCmd.c: do anyway, but the API didn't indicate that) * generic/tcl.decls * generic/tclDecls.h: regenerated * generic/tcl.h: make sure that if CONST84 is defined as empty, CONST86 should be defined as empty as well (unless overridden). This change complies with TIP #27 *** POTENTIAL INCOMPATIBILITY ***
* | | TIP #323 IMPLEMENTATION (partial)dgp2008-09-241-7/+1
| | | | | | | | | | | | | | | | | | | | | | | | * doc/file.n: Revise [file delete] and [file mkdir] to * generic/tclCmdAH.c: accept zero "pathname" arguments (the * generic/tclFCmd.c: no-op case). * tests/cmdAH.test: * tests/fCmd.test:
* | | Inode numbers on Windows are not unique so avoid the inode check on this ↵patthoyts2008-07-211-5/+7
| | | | | | | | | | | | platform [Bug 2015723]
* | | more consistent wrong # arg messages: change all messages containing ↵nijtmans2008-07-131-4/+4
| | | | | | | | | | | | ?options? to the form ?-option value ...?
* | | Get rid of pre-C89-isms (esp. CONST vs const).dkf2008-04-271-16/+16
|/ /
* | merge stable branch onto HEADdgp2007-12-131-1/+1
| |
* | Generate literal values more efficiently using TclNewLiteralStringObj macro.dkf2007-09-171-9/+9
| |
* | 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:
* | Whitespace policing, replacing commas in varargs with constant string ↵Kevin B Kenny2007-04-201-2/+2
| | | | | | | | catenation, and fixed an oversight in the fix for NZA time zones.
* | Handle creation of Tcl_Objs from constant strings better (easier to use, moredkf2007-04-101-2/+4
| | | | | | | | efficient). After [Patch 1529526] (afredd)
* | * generic/tclBasic.c: Replace arrays on the C stack and ckallocdgp2007-04-021-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | * 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:
* | ANSIfy. Also converted some deeply nested code to a less nested form for ↵dkf2005-11-011-81/+76
| | | | | | | | easier reading.
* | Getting more systematic about styledkf2005-07-241-280/+335
| |
* | correct fix to file mkdirvincentdarley2005-06-131-4/+7
| |
* | fix to race condition in file mkdir and fix to glob documentationvincentdarley2005-06-091-3/+27
| |
* | Merged kennykb-numerics-branch back to the head; TIPs 132 and 232Kevin B Kenny2005-05-101-1/+1
| |
* | With vfs permissions can exist on non-unix filesystemsvincentdarley2005-01-141-3/+1
| |
* | Stop reliance on absolute attribute indexes with helper function [Bug 1100671]dkf2005-01-141-5/+8
| |
* | * generic/tclInt.h (Tcl*InterpState): New internal routinesdgp2004-10-191-7/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * generic/tclResult.c (Tcl*InterpState): TclSaveInterpState, TclRestoreInterpState, and TclDiscardInterpState are superior replacements for Tcl_(Save|Restore|Discard)Result. Intent is that these routines will be converted to public routines after TIP approval. * generic/tclBasic.c (TclEvalObjvInternal): * generic/tclDictObj.c (DictUpdateCmd, DictWithCmd): * generic/tclIOGT.c (ExecuteCallback): * generic/tclTrace.c (Trace*Proc,TclCheck*Traces,TclCallVarTraces): Callers of Tcl_*Result updated to call the new routines. The calls were relocated in several cases to perform save/restore operations only when needed. * generic/tclEvent.c (HandleBgErrors): * generic/tclFCmd.c (CopyRenameOneFile): Calls to Tcl_*Result that were eliminated because they appeared to serve no useful purpose, typically saving/restoring an error message, only to throw it away.
* | * generic/tclBasic.c:dgp2004-10-061-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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: 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.
* | Add braces round if body...dkf2004-10-061-2/+4
| |
* | 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):
* | Removed support for Mac OS Classic platform [Patch 918142]das2004-03-171-2/+2
| |
* | filesystem fixes for '-force' consistency and picky compilersvincentdarley2004-01-291-1/+17
| |
* | filesystem optimisation -- Three main issues accomplished: (1) cleaned up ↵vincentdarley2004-01-211-6/+26
| | | | | | | | variable names in
* | filesystem fixes -- see ChangeLogvincentdarley2003-06-231-1/+9
| |
* | Implementation of TIP 118:das2003-05-141-11/+19
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * generic/tclFCmd.c (TclFileAttrsCmd): return the list of attributes that can be retrieved without error for a given file, instead of aborting the whole command when any error occurs. * unix/tclUnixFCmd.c: added support for new file attributes and for copying Mac OS X file attributes & resource fork during [file copy]. * generic/tclInt.decls: added declarations of new external commands needed by new file attributes support in tclUnixFCmd.c. * macosx/tclMacOSXFCmd.c (new): Mac OS X specific implementation of new file attributes and of attribute & resource fork copying. * mac/tclMacFCmd.c: added implementation of -rsrclength attribute & fixes to other attributes for consistency with OSX implementation. * mac/tclMacResource.c: fixes to OSType handling. * doc/file.n: documentation of [file attributes] changes. * unix/configure.in: check for APIs needed by new file attributes. * unix/Makefile.in: * unix/tcl.m4: added new platform specifc tclMacOSXFCmd.c source. * unix/configure: * generic/tclStubInit.c: * generic/tclIntPlatDecls.h: regen. * tools/genStubs.tcl: fixes to completely broken code trying to prevent overlap of "aqua", "macosx", "x11" and "unix" stub entries. * tests/unixFCmd.test: added tests of -readonly attribute. * tests/macOSXFCmd.test (new): tests of macosx file attributes and of preservation of attributes & resource fork during [file copy]. * tests/macFCmd.test: restore -readonly attribute of test dir, as otherwise its removal can fail on unices supporting -readonly.