summaryrefslogtreecommitdiffstats
path: root/generic/tclPathObj.c
Commit message (Collapse)AuthorAgeFilesLines
* 3559678 Fix bad filename normalization when the last component is the empty ↵dgp2012-08-201-2/+7
| | | | string.
* Simplify tclFileSystem.h. Define structs where used.dgp2012-06-281-12/+10
|
* fix some gcc 64-bit warningsjan.nijtmans2012-06-261-3/+0
| | | | quoting improvements eliminate unused variable
* Simplify bug fix so that active claims on the FilesystemRecord list of a threadbug_3024359dgp2012-06-251-2/+1
|\ | | | | | | | | | | | | | | | | | | prevent any overwriting of that per-thread cache. This keeps active traversals of the list valid. The possible downside is that this may result in some delay in noticing new epochs and result in somewhat greater likelihood we will cache things in a "path" value that are out of date. Since the system has to deal with out of date cached data anyway, this should have no correctness affects, measured against the status quo. In multi-threaded operation the possibility of caching and/or retrieving outdated information can never be eliminated. Checkin also includes merge of 8.5.
* \ merge 8.5dgp2012-06-211-41/+24
|\ \ | |/
| * Stop storing FilesystemRecord in the intrep of a "path". We never use it.dgp2012-06-211-41/+24
| | | | | | Store the Tcl_Filesystem instead, which is what we actually need.
* | Only record the filesystemEpoch when it actually marks the validity ofdgp2012-06-211-6/+15
|/ | | something we are caching.
* Purge more dead fs path code.dgp2012-06-201-17/+3
|
* Remove dead code that complicates fs path values but adds no value.dgp2012-06-201-26/+7
|
* When using Tcl_SetObjLength() calls to grow and shrink the objPtr->bytes buffer,dgp2012-05-211-1/+1
| | | | | care must be taken that the value cannot possibly become pure Unicode. Calling Tcl_AppendToObj() has the possibility of making such a conversion. Bug found while valgrinding the trunk.
* 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 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
|
* 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
|
* Backport fix for [Bug 2857044].dgp2011-04-271-4/+1
|
* 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].
* merge stable branch onto HEADdgp2007-12-131-1/+1
|
* Reduce cast count.dkf2007-11-191-109/+102
|
* More minor cleanupdkf2007-11-181-6/+6
|
* * generic/tclPathObj.c (Tcl_FSJoinPath, Tcl_FSGetNormalizedPath):Kevin B Kenny2007-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.
* Replaced commas in varargs with string concatenation where possible [Patch ↵Kevin B Kenny2007-04-201-4/+4
| | | | 1515234]
* * doc/clock.n: Corrected a silly error (transposed 'uppercase'Kevin B Kenny2007-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.
* Eliminate use of (VOID*) casts when calling memset or memcpy.dkf2007-04-171-3/+3
|
* Handle creation of Tcl_Objs from constant strings better (easier to use, moredkf2007-04-101-2/+2
| | | | efficient). After [Patch 1529526] (afredd)
* various "const" additions, in line with TIP #27nijtmans2007-02-201-26/+26
|
* Bug #1479814. Handle extended paths on Windows NT and above.patthoyts2007-02-201-1/+16
|
* fixed [ 1548263 ] NULL return from Tcl_FSGetNormalizedPath segvcoldstore2006-08-291-2/+4
|
* * generic/tclPathObj.c: Yet another revised fix for the [Bug 1379287]dgp2006-04-071-5/+12
| | | | * tests/fileSystem.test: family of path normalization bugs.
* * generic/tclPathObj.c: Revised fix for the [Bug 1379287] familydgp2006-04-061-30/+19
| | | | of path normalization bugs.
* * generic/tclPathObj.c: More fixes for path normalization when /../dgp2006-03-291-9/+15
| | | | * tests/fileSystem.test: tries to go beyond root.[Bug 1379287]
* another stab at fixing 1379287dgp2006-03-041-6/+13
|
* * generic/tclPathObj.c: Revised yesterday's fix for [Bug 1379287]dgp2006-03-031-4/+6
| | | | to work on Windows.
* * generic/tclPathObj.c: Fix for failed normalization ofdgp2006-03-031-2/+10
| | | | | * tests/fileSystem.test: paths with /../ that lead back to the root of the filesystem, like /foo/.. [Bug 1379287].
* Fixed potential overwriting of already freed memoryvasiljevic2006-01-121-3/+7
| | | | | which caused all kinds of (rare but reproducible) coredumps all over the place.
* * unix/tcl.m4 (Darwin): add 64bit support, check for Tiger copyfile(),das2005-11-271-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | add CFLAGS to SHLIB_LD to support passing -isysroot in env(CFLAGS) to configure (flag can't be present twice, so can't be in both CFLAGS and LDFLAGS during configure), don't use -prebind when deploying on 10.4, define TCL_IO_TRACK_OS_FOR_DRIVER_WITH_BAD_BLOCKING (rdar://3171542). (SC_ENABLE_LANGINFO, SC_TIME_HANDLER): add/fix caching, fix obsolete autoconf macros. Sync with tk/unix/tcl.m4. * unix/configure.in: fix obsolete autoconf macros, sync gratuitous formatting/ordering differences with tk/unix/configure.in. * unix/Makefile.in: add CFLAGS to tclsh/tcltest link to make executable linking the same as during configure (needed to avoid loosing any linker relevant flags in CFLAGS, in particular flags that can't be in LDFLAGS). Avoid concurrent linking of tclsh and compiling of tclTestInit.o or xtTestInit.o during parallel make. (checkstubs, checkdoc, checkexports): dependency and Darwin fixes (dist): add new macosx files. * unix/tclLoadDyld.c (TclpDlopen): use NSADDIMAGE_OPTION_WITH_SEARCHING on second NSAddImage only. [Bug 1204237] (TclGuessPackageName): should not be MODULE_SCOPE. (TclpLoadMemory): ppc64 and endian (i386) fixes, add support for loading universal (fat) bundles from memory. * unix/tclUnixFCmd.c: * macosx/tclMacOSXFCmd.c: ppc64 and endian (i386) fixes. (TclMacOSXCopyFileAttributes): add support for new Tiger copyfile() API to enable copying of xattrs & ACLs by [file copy]. * generic/tcl.h: add Darwin specifc configure overrides for TCL_WIDE defines to support fat compiles of ppc and ppc64 at the same time, (replaces Darwin CVS fix by emoy, rdar://3693001). add/correct location of version numbers in macosx files. * generic/tclInt.h: clarify fat compile comment. * unix/tclUnixPort.h: add Darwin specifc configure overrides to support fat compiles, where configure runs only once for multiple architectures (replaces Darwin CVS fix by emoy, rdar://3693001). * macosx/tclMacOSXBundle.c: * macosx/tclMacOSXNotify.c: * unix/tclUnixNotfy.c: * unix/tclUnixPort.h: fix #include order to support compile time override of HAVE_COREFOUNDATION in tclUnixPort.h when building for ppc64 * macosx/Tcl.pbproj/default.pbxuser (new file): * macosx/Tcl.pbproj/jingham.pbxuser: * macosx/Tcl.pbproj/project.pbxproj: * macosx/Tcl.xcode/default.pbxuser (new file): * macosx/Tcl.xcode/project.pbxproj (new file): * macosx/Tcl.xcodeproj/default.pbxuser (new file): * macosx/Tcl.xcodeproj/project.pbxproj (new file): new/updated projects for Xcode 2.2 on 10.4, Xcode 1.5 on 10.3 & ProjectBuilder on 10.2, with native tcltest targets and support for universal (fat) compiles. * macosx/README: clarification/cleanup, document new Xcode projects and universal (fat) builds via CFLAGS (i.e. all of ppc ppc64 i386 at once). * unix/Makefile.in: * unix/aclocal.m4: * unix/configure.in: * unix/dltest/Makefile.in: * macosx/configure.ac (new file): add support for inclusion of unix/configure.in by macosx/configure.ac, allows generation of a config headers enabled configure script in macosx (required by Xcode projects). * macosx/GNUmakefile: rename from Makefile to avoid overwriting by configure run in tcl/macosx, add support for reusing configure cache, build target fixes, remove GENERIC_FLAGS override now handled by tcl.m4. * generic/tcl.decls: add Tcl_Main declaration as comment to avoid 'checkstubs' target complaining about it missing from stubs. * generic/regex.h: * generic/tclDate.c: * generic/tclEnv.c: * generic/tclGetDate.y: * generic/tclIOUtil.c: * generic/tclObj.c: * generic/tclStubInit.c: * generic/tclStubLib.c: * generic/tclPathObj.c: * generic/tclThreadAlloc.c: * generic/tclThreadStorage.c: * generic/tclTrace.c: * generic/tclVar.c: * generic/tommath.h: * tools/fix_tommath_h.tcl: * unix/tclUnixFCmd.c: ensure externally visible symbols not contained in stubs table are declared as MODULE_SCOPE (or as static if not used outside of own source file). These changes allow 'make checkstubs' to complete without error on Darwin with gcc 4. * generic/rege_dfa.c (getvacant): * generic/regexec.c (cfind): * generic/tclCompExpr.c (CompileSubExpr): * generic/tclNamesp.c (NamespaceEnsembleCmd): * unix/tclUnixChan.c (TclUnixWaitForFile): initialise variables to silence gcc 4 warnings. * generic/tclExecute.c (TclExecuteByteCode): fix unused variable warning when NO_WIDE_TYPE is defined. * generic/regguts.h: only #define NDEBUG if not already #defined. * unix/tclUnixNotfy.c: * macosx/tclMacOSXNotify.c: sync whitespace & comments. * unix/tclUnixPort.h: * win/tclWinPort.h: remove declaration of obsolete&unused TclpMutex API. * unix/configure: * unix/tclConfig.h.in: regen.
* Formatting and pure ANSI function declsdkf2005-10-121-152/+161
|