summaryrefslogtreecommitdiffstats
path: root/generic/tclPathObj.c
Commit message (Collapse)AuthorAgeFilesLines
* some formatting (*.decls)jan.nijtmans2012-04-041-33/+0
|\ | | | | | | remove some unused cygwin-related code some minor gcc warnings
| * some formatting (*.decls)jan.nijtmans2012-04-041-33/+0
| | | | | | | | | | move up #undef, for macro which is conflicting with later stuff. remove some unused cygwin-related code some minor gcc warnings
* | 3479689 New internal routine TclJoinPath().dgp2012-01-271-35/+26
| | | | | | | | Refactor all the *Join*Path* routines to give them more useful interfaces that are easier to manage getting the refcounts right.
* | 3475569 Add checks for unshared values before calls demanding them.dgp2012-01-261-6/+23
|\ \ | |/ | | 3479689 Stop memory corruption when shimmering 0-refCount value to "path" type.
| * 3479689 Stop memory corruption when shimmering 0-refCount value to "path" type.dgp2012-01-261-0/+3
| |
| * 3475569 Add value-sharing checks before calls that demand unshared arguments.dgp2012-01-241-6/+20
| |
* | 3414754 Fix the PATHFLAGS != 0 intrep normalizing trailing slashes.dgp2011-10-311-28/+11
|\ \ | |/
| * Purge the old, buggy implementation.bug_3414754dgp2011-10-311-34/+0
| |
| * Proposed fix for 3414754dgp2011-10-271-0/+17
| |
* | 3389764 Eliminate possibility that "path" value dup can create reference cycle.dgp2011-08-121-12/+12
|\ \ | |/
| * 3389764 Eliminate possibility that "path" value dup can create reference cycle.dgp2011-08-121-12/+12
| |
| * Backport fix for [Bug 2857044].dgp2011-04-271-4/+1
| |
* | TclFreeIntRep() related cleanup.dgp2011-04-251-4/+0
| |
* | More generation of error codes (namespace creation, path normalization,dkf2011-04-031-0/+6
| | | | | | pipeline creation, package handling, procedures, [scan] formats)
* | Adjust ckalloc/ckfree macros to greatly reduce number of explicit casts indkf2011-03-121-8/+8
| | | | | | rest of Tcl source code. No ABI change. API change *should* be harmless.
* | 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.
| * installData.tcl: Make sure that copyDir only receives normalized paths.nijtmans2010-05-211-19/+33
| | | | | | | | | | | | tclPlatDecls.h: Fix <tchar.h> inclusion for CYGWIN. tclPathObj.c: Fix Tcl_SetStringObj usage for CYGWIN. *.c: Fix various minor other gcc warnings, like signed<->unsigned mismatch.
| * * generic/tclPathObj.c (TclPathPart): Correct inconsistency betweendgp2010-01-051-26/+10
| | | | | | | | | | | | * tests/fileName.test (filename-14.31): the string rep and the intrep of a path value created by [file rootname]. Thanks to Vitaly Magerya for reporting. [Bug 2918610]
| * * generic/tclPathObj.c: Missing refcount on cached normalized pathdgp2009-10-271-1/+2
| | | | | | | | caused crashes. [Bug 2884203].
| * * generic/tclPathObj.c: [Bug 2806250] Prevent the storage of stringsdgp2009-08-201-104/+99
| | | | | | | | | | | | | | | | starting with ~ in the "tail" part (normPathPtr field) of the path intrep when PATHFLAGS != 0. This establishes the assumptions relied on elsewhere that the name stored there is a relative path. Also refactored to make an AppendPath() routine instead of the cut/paste stanzas that were littered throughout.
| * * generic/tclPathObj.c: Added NULL check to prevent crashes duringdgp2009-08-181-2/+8
| | | | | | | | * tests/fileName.test: [glob]. [Bug 2837800]
| * * generic/tclPathObj.c (TclPathPart): TclPathPart() was computingdgp2009-03-271-3/+29
| | | | | | | | | | | | * tests/fileName.test: the wrong results for both [file dirname] and [file tail] on "path" arguments with the PATHFLAGS != 0 intrep and with an empty string for the "joined-on" part. [Bug 2710920]
| * * generic/tclPathObj.c: Fixed mistaken logic in TclFSGetPathType()dgp2009-02-201-1/+10
| | | | | | | | | | | | * tests/fileName.test: that assumed (not "absolute" => "relative"). This is a false assumption on Windows, where "volumerelative" is another possibility. [Bug 2571597].
| * * generic/tclPathObj.c (Tcl_FSGetNormalizedPath): Added anotherdgp2008-12-041-13/+76
| | | | | | | | | | flag value TCLPATH_NEEDNORM to mark those intreps which need more complete normalization attention for correct results. [Bug 2385549]
| * * generic/tclPathObj.c: Plug memory leak in [Bug 1999176] fix. Thanksdgp2008-06-291-3/+7
| | | | | | | | Rolf Ade for detecting.
| * * generic/tclPathObj.c: Plug memory leak in [Bug 1972879] fix. Thanksdgp2008-06-281-3/+8
| | | | | | | | Rolf Ade for detecting and Dan Steffen for the fix [Bug 2004654].
| * * generic/tclPathObj.c: Fixed some internals management in the "path"dgp2008-06-241-2/+25
| | | | | | | | | | Tcl_ObjType for the empty string value. Problem led to a crash in the command [glob -dir {} a]. [Bug 1999176].
| * * generic/tclPathObj.c: Fixed bug in Tcl_GetTranslatedPath() whendgp2008-06-231-2/+11
| | | | | | | | | | | | | | operating on the "Special path" variant of the "path" Tcl_ObjType intrep. A full normalization was getting done, in particular, coercing relative paths to absolute, contrary to what the function of producing the "translated path" is supposed to do. [Bug 1972879].
* | * generic/tclOOMethod.c (ProcedureMethodCompiledVarConnect):hobbs2010-09-221-9/+13
| | | | | | | | | | | | | | | | | | * generic/tclVar.c (TclLookupSimpleVar, CompareVarKeys): * generic/tclPathObj.c (Tcl_FSGetNormalizedPath, Tcl_FSEqualPaths): * generic/tclExecute.c (TclExecuteByteCode): * generic/tclIOUtil.c (TclFSCwdPointerEquals): peephole opt * generic/tclResult.c (TclMergeReturnOptions): use memcmp where applicable as possible speedup on some libc variants.
* | Code Audit results:dkf2010-03-051-21/+23
| | | | | | | | | | | | | | | | * use do { ... } while (0) in macros * avoid shadowing one local variable with another * use clearer 'foo.bar++;' instead of '++foo.bar;' where result not required (i.e., semantically equivalent) * follow Engineering Manual rules on spacing and declarations
* | Pure whitespace changes, changing to follow Engineering Manual style.dkf2010-02-241-2/+2
| |
* | * generic/tclPathObj.c (TclPathPart): Correct inconsistency betweendgp2010-01-051-26/+10
| | | | | | | | | | | | * tests/fileName.test (filename-14.31): the string rep and the intrep of a path value created by [file rootname]. Thanks to Vitaly Magerya for reporting. [Bug 2918610]
* | Various CYGWIN-related fixes. In the win32 configure script, CYGWIN is still ↵nijtmans2009-12-211-3/+15
| | | | | | | | not enabled yet, but at least it is a step in the right direction.
* | * generic/tclPathObj.c: Missing refcount on cached normalized pathdgp2009-10-271-1/+2
| | | | | | | | caused crashes. [Bug 2884203].
* | * generic/tclDictObj.c: Updated freeIntRepProc routines sodgp2009-09-301-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * generic/tclExecute.c: that they set the typePtr field to * generic/tclIO.c: NULL so that the Tcl_Obj is not left * generic/tclIndexObj.c: in an inconsistent state. * generic/tclInt.h: [Bug 2857044] * generic/tclListObj.c: * generic/tclNamesp.c: * generic/tclOOCall.c: * generic/tclObj.c: * generic/tclPathObj.c: * generic/tclProc.c: * generic/tclRegexp.c: * generic/tclStringObj.c:
* | * generic/tclPathObj.c: [Bug 2806250] Prevent the storage of stringsdgp2009-08-201-149/+80
| | | | | | | | | | | | | | | | starting with ~ in the "tail" part (normPathPtr field) of the path intrep when PATHFLAGS != 0. This establishes the assumptions relied on elsewhere that the name stored there is a relative path. Also refactored to make an AppendPath() routine instead of the cut/paste stanzas that were littered throughout.
* | * generic/tclPathObj.c: Added NULL check to prevent crashes duringdgp2009-08-181-1/+4
| | | | | | | | * tests/fileName.test: [glob]. [Bug 2837800]
* | * generic/tclPathObj.c (TclPathPart): TclPathPart() was computingdgp2009-03-271-3/+29
| | | | | | | | | | | | * tests/fileName.test: the wrong results for both [file dirname] and [file tail] on "path" arguments with the PATHFLAGS != 0 intrep and with an empty string for the "joined-on" part. [Bug 2710920]
* | * generic/tclPathObj.c: Fixed mistaken logic in TclFSGetPathType()dgp2009-02-201-1/+10
| | | | | | | | | | | | * tests/fileName.test: that assumed (not "absolute" => "relative"). This is a false assumption on Windows, where "volumerelative" is another possibility. [Bug 2571597].
* | - eliminate some unnessary type castsnijtmans2009-02-101-2/+2
| | | | | | | | | | - some internal const decorations - spacing
* | Style fixes (unfouling whitespace, sorting comments, removing useless casts, ↵dkf2009-01-091-67/+71
| | | | | | | | etc.)
* | * generic/tclPathObj.c (Tcl_FSGetNormalizedPath): Added anotherdgp2008-12-041-13/+76
| | | | | | | | | | flag value TCLPATH_NEEDNORM to mark those intreps which need more complete normalization attention for correct results. [Bug 2385549]
* | Style improvements - invoking callbacks without visual junk.dkf2008-10-261-6/+8
| |
* | Add "const" to many internalnijtmans2008-10-161-2/+2
| | | | | | | | | | const tables. No functional or API change.
* | * doc/FileSystem.3: CONSTified many functions using Tcl_FileSystemnijtmans2008-07-281-6/+6
| | | | | | | | | | | | | | | | | | | | | | * generic/tcl.decls: which all are supposed to be a constant, but * generic/tclDecls.h: this was not reflected in the API: * generic/tclFileSystem.h: Tcl_FSGetInternalRep * generic/tclIOUtil.c: Tcl_FSNewNativePath, Tcl_FSData * generic/tclPathObj.c: Tcl_FSRegister, Tcl_FSUnregister * generic/tclTest.c: Tcl_FSGetFileSystemForPath ... This change complies with TIP #24. ***POTENTIAL INCOMPATIBILITY***
* | * generic/tclPathObj.c: Plug memory leak in [Bug 1999176] fix. Thanksdgp2008-06-291-3/+7
| | | | | | | | to Rolf Ade for detecting.
* | * generic/tclPathObj.c: Plug memory leak in [Bug 1972879] fix. Thanksdgp2008-06-281-3/+7
| | | | | | | | Rolf Ade for detecting and Dan Steffen for the fix [Bug 2004654].
* | * generic/tclPathObj.c: Fixed some internals management in the "path"dgp2008-06-241-2/+25
| | | | | | | | | | Tcl_ObjType for the empty string value. Problem led to a crash in the command [glob -dir {} a]. [Bug 1999176].
* | * generic/tclPathObj.c: Fixed bug in Tcl_GetTranslatedPath() whendgp2008-06-231-7/+9
| | | | | | | | | | | | | | operating on the "Special path" variant of the "path" Tcl_ObjType intrep. A full normalization was getting done, in particular, coercing relative paths to absolute, contrary to what the function of producing the "translated path" is supposed to do. [Bug 1972879].