summaryrefslogtreecommitdiffstats
path: root/generic/tclFCmd.c
Commit message (Collapse)AuthorAgeFilesLines
* 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. FossilOrigin-Name: f1162c3bd2b9536734affc339f47f542a5aa61cf
* More generation of error codes (most platform-specific parts not already usingdkf2011-04-061-0/+8
| | | | | Tcl_PosixError). FossilOrigin-Name: 1b095ad294cc30f692b20d00970574897298b030
* 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. FossilOrigin-Name: 7d471fa4b4c2bc5413600fcf71572a5c2ca0e9b1
| * 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. FossilOrigin-Name: 3971651ab7d6ced32757dba1f25b7c28c28b5b4b
| | * 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. FossilOrigin-Name: e7289d12661027dc67a8aa95066e782a78a83bc5
* | | 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). FossilOrigin-Name: c64f310d38b977e7ae26a48bcf8bb8c50e453af7
| * | 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. FossilOrigin-Name: 79367df0f0e01a96f037f893e889e7cb9b807847
| | * 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. FossilOrigin-Name: 90b4acd7bdab65433169a232124967885c18d972
| | * * generic/tclFCmd.c (TclFileMakeDirsCmd): fix to race condition inhobbs2005-08-171-5/+31
| | | | | | | | | | | | | | | | | | file mkdir (backport from head 2005-06-13) [Bug 1217375] FossilOrigin-Name: 0078c07abee03191d5f8b7b47e176c86a56fa2c0
| | * file copy empty filename bug fixvincentdarley2003-06-231-1/+9
| | | | | | | | | FossilOrigin-Name: 601c047b17758338840c4b48d0ac570c672970c1
| * | Backported fix for bug #2015723patthoyts2008-07-211-5/+7
| | | | | | | | | FossilOrigin-Name: 295579a55510f6cd205739dcb7c0734b5ce060c7
* | | * 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. FossilOrigin-Name: 264ccb78f6fab91cf8c37d3c2f2126be9f368fe3
* | | Pure whitespace changes, changing to follow Engineering Manual style.dkf2010-02-241-11/+11
| | | | | | | | | FossilOrigin-Name: c81eddebbb969209a42ab4c210dd62f3080909d4
* | | * 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: FossilOrigin-Name: e93f957325ed49415f01559c8162a31df1ee28cf
* | | fixed constness of last commit for msvcpatthoyts2008-10-061-2/+2
| | | | | | | | | FossilOrigin-Name: 2d35bb9a0e323f2b8c819c1edb42350ccb769662
* | | * 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 *** FossilOrigin-Name: 40d0887361f264429c18746a1547bcb110f2c24d
* | | 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: FossilOrigin-Name: 535191324164825517ff6d743bc0a0b050cf0aa5
* | | Inode numbers on Windows are not unique so avoid the inode check on this ↵patthoyts2008-07-211-5/+7
| | | | | | | | | | | | | | | platform [Bug 2015723] FossilOrigin-Name: afa89c186541975ee5d57f1c752717fd25d3d127
* | | more consistent wrong # arg messages: change all messages containing ↵nijtmans2008-07-131-4/+4
| | | | | | | | | | | | | | | ?options? to the form ?-option value ...? FossilOrigin-Name: 7dcec0e5e289de4aed4290b3ee93e1e425c765e0
* | | Get rid of pre-C89-isms (esp. CONST vs const).dkf2008-04-271-16/+16
|/ / | | | | FossilOrigin-Name: 2d205c22fbe5def21ccd36bc6f7b2d3831f6122d
* | merge stable branch onto HEADdgp2007-12-131-1/+1
| | | | | | FossilOrigin-Name: d1f7550cd9bf1343d8505fb99fc5141b58bb88bf
* | Generate literal values more efficiently using TclNewLiteralStringObj macro.dkf2007-09-171-9/+9
| | | | | | FossilOrigin-Name: 9c077526f1cfc6e23453cdcb65def42278b3b6b6
* | Silence constness warnings for TclStackFree when building with msvc.patthoyts2007-06-281-2/+2
| | | | | | FossilOrigin-Name: e7805530ef3bc12e7f28716d94953b2ead971f41
* | * 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: FossilOrigin-Name: 4ea644b0decea73815d69d6a1d3767ed27191491
* | Whitespace policing, replacing commas in varargs with constant string ↵kennykb2007-04-201-2/+2
| | | | | | | | | | catenation, and fixed an oversight in the fix for NZA time zones. FossilOrigin-Name: d6ee490b6b6a9de069d6463ed744906e1e89e221
* | Handle creation of Tcl_Objs from constant strings better (easier to use, moredkf2007-04-101-2/+4
| | | | | | | | | | | | efficient). After [Patch 1529526] (afredd) FossilOrigin-Name: 4d69119aadb4298f8e994440eb988c6c46396086
* | * 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: FossilOrigin-Name: fbe8c8af9f9e911a208ffc73968ed27691b54367
* | ANSIfy. Also converted some deeply nested code to a less nested form for ↵dkf2005-11-011-81/+76
| | | | | | | | | | easier reading. FossilOrigin-Name: a3b0b6f1d981da1fe106445a90860a30e0c63d29
* | Getting more systematic about styledkf2005-07-241-280/+335
| | | | | | FossilOrigin-Name: 83d72c558cc66d1e10666e2fab0f6e87addb5c3d
* | correct fix to file mkdirvincentdarley2005-06-131-4/+7
| | | | | | FossilOrigin-Name: 9c6c2985d7adad6c2a36c877e5f6fce5ac55a3f9
* | fix to race condition in file mkdir and fix to glob documentationvincentdarley2005-06-091-3/+27
| | | | | | FossilOrigin-Name: a6ebffa26e5ce24b5fe04090cc847756b4bdeb62
* | Merged kennykb-numerics-branch back to the head; TIPs 132 and 232kennykb2005-05-101-1/+1
| | | | | | FossilOrigin-Name: 1cc2336920c70c6b9f7825b88dec87fc223f2c4e
* | With vfs permissions can exist on non-unix filesystemsvincentdarley2005-01-141-3/+1
| | | | | | FossilOrigin-Name: 307ccff159314899e44726577a4bf9546c0d51f9
* | Stop reliance on absolute attribute indexes with helper function [Bug 1100671]dkf2005-01-141-5/+8
| | | | | | FossilOrigin-Name: 7612557f3c34665586acdce39a375e383211ca5d
* | * 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. FossilOrigin-Name: 4073981ce31d5d39260dd1a9e458920306833f50
* | * 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. FossilOrigin-Name: ee7c709e65fd0e2df636a6d1467bc907a2104da0
* | Add braces round if body...dkf2004-10-061-2/+4
| | | | | | FossilOrigin-Name: 3ec20e5c0e9cd9d24fb12c732eff5361a18f23ca
* | 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): FossilOrigin-Name: 2e5b18c85c944b46540edfdd6580648e32645e2b
* | Removed support for Mac OS Classic platform [Patch 918142]das2004-03-171-2/+2
| | | | | | FossilOrigin-Name: b6330dbac725e2d527ad089669aa7f4779d19398
* | filesystem fixes for '-force' consistency and picky compilersvincentdarley2004-01-291-1/+17
| | | | | | FossilOrigin-Name: fff97fe11686fd45ff17aebdd91fb6c89fd9498a
* | filesystem optimisation -- Three main issues accomplished: (1) cleaned up ↵vincentdarley2004-01-211-6/+26
| | | | | | | | | | variable names in FossilOrigin-Name: 9cfcca63fb07d8c7d68befc16d84d01790094ac5
* | filesystem fixes -- see ChangeLogvincentdarley2003-06-231-1/+9
| | | | | | FossilOrigin-Name: c25e6f0318fb9679ee1dcb0bb493bc1f33f6bcec
* | 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. FossilOrigin-Name: a25df0d3d994f84ae358d728b146f05dae415a83
* [Patch #591647] (darley)hobbs2002-08-081-2/+4
| | | | | | | | (CopyRenameOneFile): this is currently disabled by default until further issues with such behavior (like relative links) can be handled correctly. FossilOrigin-Name: eda141e5d34cb5fa4026577431695da341deb4ae
* * tests/fCmd.test:hobbs2002-08-081-3/+53
| | | | | | | | | | | * tests/unixFCmd.test: updated tests for new link copy behavior. * generic/tclFCmd.c (CopyRenameOneFile): changed the behavior to follow links to endpoints and copy that file/directory instead of just copying the surface link. This means that trying to copy a link that has no endpoint (danling link) is an error. [Patch #591647] (darley) FossilOrigin-Name: 2912293401e5fd2c308e963c6648056009000299
* fix to knownBug testvincentdarley2002-07-181-1/+13
| | | FossilOrigin-Name: 629fc268526a7df449dd8fc70ad84503641a85c0
* 4 fs fixesvincentdarley2002-03-241-5/+4
| | | FossilOrigin-Name: d33368661952a4384e657612e1b3b49a2bd6b278
* TIP#72 implementation. See ChangeLog for details.dkf2002-02-151-8/+8
| | | | | | | This version builds clean on Solaris/SPARC, with GCC and CC, both with and without threads and both in 32-bit and 64-bit mode. FossilOrigin-Name: 8d82de1905ada4c5d06f5fb967721e8b681b7c82
* * More TIP 27 updates in tclIOUtil.c and tclIndexObj.c that weredgp2002-01-171-3/+4
| | | | | | | | | overlooked before. Updated callers. ***POTENTIAL INCOMPATIBILITY*** Includes a source incompatibility in the tablePtr arguments of the Tcl_GetIndexFromObj* routines. FossilOrigin-Name: 28b6020550dd9e62f46b824e4c2ba2a6302657f6
* small fs fixesvincentdarley2001-10-151-4/+4
| | | FossilOrigin-Name: 67fbce9b36cdf8890740e7479c4c98f56a0e4b8e