summaryrefslogtreecommitdiffstats
path: root/generic/tclPathObj.c
Commit message (Collapse)AuthorAgeFilesLines
* TclFreeIntRep() related cleanup.dgp2011-04-251-4/+0
| | | FossilOrigin-Name: cb85bb50025cbe392b362b0bb6ab40e29ca8f146
* More generation of error codes (namespace creation, path normalization,dkf2011-04-031-0/+6
| | | | | pipeline creation, package handling, procedures, [scan] formats) FossilOrigin-Name: a6c95ed9e060d601f5fecd29fdadf14567d377ff
* 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. FossilOrigin-Name: 5574bdd262b2672cde48771787370c12854cecf4
* 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
| * 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. FossilOrigin-Name: 624625fe98a646ff7137e7331d7185ebd1886049
| * * 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] FossilOrigin-Name: dc8d903cb763ca5c8c8092f7844b74132e2880c0
| * * generic/tclPathObj.c: Missing refcount on cached normalized pathdgp2009-10-271-1/+2
| | | | | | | | | | | | caused crashes. [Bug 2884203]. FossilOrigin-Name: a60df8980eb7cd89ef33a3b22fe2ae960bc31edd
| * * 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. FossilOrigin-Name: 93b36863781d7a8708e322157812d0d524314cad
| * * generic/tclPathObj.c: Added NULL check to prevent crashes duringdgp2009-08-181-2/+8
| | | | | | | | | | | | * tests/fileName.test: [glob]. [Bug 2837800] FossilOrigin-Name: 6b2ad80bbe2992dfa588d63ef863232e9250b802
| * * 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] FossilOrigin-Name: 6f05a3d648b88e8dce75f1baa91814518f6b2b73
| * * 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]. FossilOrigin-Name: 703b79a9764ccc001a36ccef890080bae3d14d71
| * * 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] FossilOrigin-Name: 1b223784cdb795eff390043c7959db7046930d2f
| * * generic/tclPathObj.c: Plug memory leak in [Bug 1999176] fix. Thanksdgp2008-06-291-3/+7
| | | | | | | | | | | | Rolf Ade for detecting. FossilOrigin-Name: d6b206b3e69d304ee33406b9c525918ecfd174a4
| * * 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]. FossilOrigin-Name: b905ddb5c2c1a91a3b9e386a92120316c0f2914c
| * * 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]. FossilOrigin-Name: 7caf3c5fd2b4cfc477a6a95748342eeb939c13b5
| * * 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]. FossilOrigin-Name: c8958d4e9e0401bd59178ed62edc2d718dacfeaf
* | * 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. FossilOrigin-Name: 9dc86adce744657674fe3c8a0dac07f44f47f583
* | 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 FossilOrigin-Name: 4d8a4f639d28df5b5dfabd407be8efbb44454601
* | Pure whitespace changes, changing to follow Engineering Manual style.dkf2010-02-241-2/+2
| | | | | | FossilOrigin-Name: c81eddebbb969209a42ab4c210dd62f3080909d4
* | * 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] FossilOrigin-Name: 07892416f42b69105ade94a889857297d811f2d7
* | 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. FossilOrigin-Name: dca4a9980ea1e6abbb78a199f0fbf597beb38138
* | * generic/tclPathObj.c: Missing refcount on cached normalized pathdgp2009-10-271-1/+2
| | | | | | | | | | | | caused crashes. [Bug 2884203]. FossilOrigin-Name: 07717b8954c1637d2f446647494310e6059cc4bc
* | * 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: FossilOrigin-Name: c712d7d7bb31719fdaa59e4625f78e004c15dd4e
* | * 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. FossilOrigin-Name: 981d2d61d7cfa7acc73e1e2051b59698928bff29
* | * generic/tclPathObj.c: Added NULL check to prevent crashes duringdgp2009-08-181-1/+4
| | | | | | | | | | | | * tests/fileName.test: [glob]. [Bug 2837800] FossilOrigin-Name: 3432a10a2760a0e4605749297dc3c03ca3f9389b
* | * 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] FossilOrigin-Name: 5771cd99949edd11359be46db043cf60113c27d6
* | * 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]. FossilOrigin-Name: c8c2551b948dccaaf904fcd575733d0c71afa77f
* | - eliminate some unnessary type castsnijtmans2009-02-101-2/+2
| | | | | | | | | | | | | | - some internal const decorations - spacing FossilOrigin-Name: 160bcb11525977fb1ee14ae1e09ba9cb60b29920
* | Style fixes (unfouling whitespace, sorting comments, removing useless casts, ↵dkf2009-01-091-67/+71
| | | | | | | | | | etc.) FossilOrigin-Name: cd3c38f00ada216d7bc93560d3d70012c2918343
* | * 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] FossilOrigin-Name: 936137456c10b9da094a07e6ac7079511c6d04de
* | Style improvements - invoking callbacks without visual junk.dkf2008-10-261-6/+8
| | | | | | FossilOrigin-Name: a1a8afc25d47810e677f42869f79723f80f3d6a6
* | Add "const" to many internalnijtmans2008-10-161-2/+2
| | | | | | | | | | | | | | const tables. No functional or API change. FossilOrigin-Name: f03d2e2d83be42035c4aad3b01bbd09f5a967c1b
* | * 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*** FossilOrigin-Name: 246dcb287a9d07013c2f642ea91f537f076a18e8
* | * generic/tclPathObj.c: Plug memory leak in [Bug 1999176] fix. Thanksdgp2008-06-291-3/+7
| | | | | | | | | | | | to Rolf Ade for detecting. FossilOrigin-Name: 47846b80dd0cd2bcc3236c71f7b06482c41ee8fb
* | * 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]. FossilOrigin-Name: f30a13da50a040061903e4a7bc7d101be6b2b393
* | * 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]. FossilOrigin-Name: 88f07bcd32c2bf9fdc4078b95ea5b756e1ec0d91
* | * 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]. FossilOrigin-Name: 8ab9adb4fe04c6ddeb804a7d8924220012fe8d1b
* | * generic/tclPathObj.c: Fixed bug in Tcl_GetTranslatedPath() whendgp2008-06-231-2/+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]. FossilOrigin-Name: 8fbbf20d52595f44aa797fe5477c220611b32ada
* | Get rid of pre-C89-isms (esp. CONST vs const).dkf2008-04-271-2/+2
|/ | | FossilOrigin-Name: 2d205c22fbe5def21ccd36bc6f7b2d3831f6122d
* merge stable branch onto HEADdgp2007-12-131-1/+1
| | | FossilOrigin-Name: d1f7550cd9bf1343d8505fb99fc5141b58bb88bf
* Reduce cast count.dkf2007-11-191-109/+102
| | | FossilOrigin-Name: f968d80835ab0ecdb1448777a789ceb209d9062e
* More minor cleanupdkf2007-11-181-6/+6
| | | FossilOrigin-Name: 2746b844cadd89c74077393da3fe02624ac8b162
* * generic/tclPathObj.c (Tcl_FSJoinPath, Tcl_FSGetNormalizedPath):kennykb2007-05-021-3/+10
| | | | | | | | Corrected several memory leaks that caused refcount imbalances resulting in memory leaks on Windows. Thanks to Joe Mistachkin for the patch. FossilOrigin-Name: d9bda6ffc817a1b8159ce6cfffc19c590b6deb0c
* Replaced commas in varargs with string concatenation where possible [Patch ↵kennykb2007-04-201-4/+4
| | | | | 1515234] FossilOrigin-Name: d0d3c30f1a60ecb75cdca7e63593bb7d7a98f017
* * doc/clock.n: Corrected a silly error (transposed 'uppercase'kennykb2007-04-201-2/+3
| | | | | | | | | | | | | | | | | and 'lowercase' in clock.n. [Bug 1656002] Clarified that [clock scan] does not recognize a locale's alternative calendar. * library/clock.tcl: Corrected an error in skipping over the %Ey field on input. * library/msgs/ja.msg: * tools/loadICU.tcl: Corrected several localisation faults in the Japanese locale (most notably, incorrect dates for the Emperors' eras). [Bug 1637471]. Many thanks to SourceForge user 'nyademo' for pointing this out and developing a fix. * generic/tclPathObj.c: Corrected a 'const'ness fault that caused bitter complaints from MSVC. FossilOrigin-Name: d2cd76b378ff597107ae7e5c09eff68e487cb961
* Eliminate use of (VOID*) casts when calling memset or memcpy.dkf2007-04-171-3/+3
| | | FossilOrigin-Name: 45b49489451e09193f60023f5244b0d73a26880e
* Handle creation of Tcl_Objs from constant strings better (easier to use, moredkf2007-04-101-2/+2
| | | | | | efficient). After [Patch 1529526] (afredd) FossilOrigin-Name: 4d69119aadb4298f8e994440eb988c6c46396086
* various "const" additions, in line with TIP #27nijtmans2007-02-201-26/+26
| | | FossilOrigin-Name: 81ea4e1335f3c78465e90ec021758c096ba9b544
* Bug #1479814. Handle extended paths on Windows NT and above.patthoyts2007-02-201-1/+16
| | | FossilOrigin-Name: 05001e9ac26df0543c40dddde186d08225a14adf