From: Vince Darley Date: Sun, 24 Mar 2002 12:35:02 +0000 (+0000) Subject: update for Tcl changes X-Git-Tag: vfs-1-2~65 X-Git-Url: https://privyetmir.co.uk/gitweb.cgi?a=commitdiff_plain;h=5af46cc861bd8080602c9abb902344e3692ef458;p=tclvfs update for Tcl changes --- diff --git a/ChangeLog b/ChangeLog index 046176c..8502d6f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2002-03-16 Vince Darley + * generic/vfs.c: updated for latest cvs head of Tcl 8.4a5. + * library/vfs.tcl: New version from jcw, with better handling + of env(PATH). + 2002-03-09 Vince Darley * library/mk4vfs.tcl: updated version from Jean-Claude Wippler. diff --git a/README.cygwin b/README.cygwin index 74a3962..b4a39d5 100644 --- a/README.cygwin +++ b/README.cygwin @@ -3,6 +3,9 @@ hopeless on Windows, and I do not recommend you wasting your time with it. No-one seems to take any interest in fixing the millions of problems with TEA. +And really, to compile a single file 'vfs.c' do we really need to have +some 10 TEA files? + There is a good old VC++ makefile in the 'win' directory, which seems to work. diff --git a/doc/vfs.n b/doc/vfs.n index 585f7b7..8c064a6 100644 --- a/doc/vfs.n +++ b/doc/vfs.n @@ -237,7 +237,7 @@ best solution is to fix your code! We may add \fIlink\fR and \fIlstat\fR commands in the future to allow virtual filesystems to support reading and writing links - this is supported by the C API, but has simply not been exposed to Tcl in this -extension. +extension, yet. .PP The Tcl 'Tcl_FSMatchInDirectory' function takes a variety of type information in a Tcl_GlobTypeData structure. We currently only expose diff --git a/generic/vfs.c b/generic/vfs.c index b9ea6e5..71a0eb0 100644 --- a/generic/vfs.c +++ b/generic/vfs.c @@ -187,11 +187,14 @@ static Tcl_Filesystem vfsFilesystem = { &VfsPathInFilesystem, &VfsDupInternalRep, &VfsFreeInternalRep, - /* No native to normalized */ + /* No internal to normalized, since we don't create any + * pure 'internal' Tcl_Obj path representations */ NULL, - /* No create native rep function */ + /* No create native rep function, since we don't use it + * or 'Tcl_FSNewNativePath' */ NULL, - /* normalize path isn't needed */ + /* Normalize path isn't needed - we assume paths only have + * one representation */ NULL, &VfsFilesystemPathType, &VfsFilesystemSeparator, @@ -200,7 +203,7 @@ static Tcl_Filesystem vfsFilesystem = { &VfsOpenFileChannel, &VfsMatchInDirectory, &VfsUtime, - /* link is not important */ + /* We choose not to support symbolic links inside our vfs's */ NULL, &VfsListVolumes, &VfsFileAttrStrings, @@ -209,17 +212,17 @@ static Tcl_Filesystem vfsFilesystem = { &VfsCreateDirectory, &VfsRemoveDirectory, &VfsDeleteFile, - /* Use stat for lstat */ - NULL, - /* No copy file */ + /* No copy file - fallback will occur at Tcl level */ NULL, - /* No rename file */ + /* No rename file - fallback will occur at Tcl level */ NULL, - /* No copy directory */ + /* No copy directory - fallback will occur at Tcl level */ NULL, - /* No load */ + /* Use stat for lstat */ + NULL, + /* No load - fallback on core implementation */ NULL, - /* We don't need a getcwd or chdir */ + /* We don't need a getcwd or chdir - fallback on Tcl's versions */ NULL, NULL }; diff --git a/library/vfs.tcl b/library/vfs.tcl index b972084..f91f234 100644 --- a/library/vfs.tcl +++ b/library/vfs.tcl @@ -34,17 +34,18 @@ namespace eval ::vfs { catch {set temp $env(VFS_TEMP)} set temp [file join $temp tclkit] file mkdir $temp + set temp [file nativename $temp] # This is not right XXX need somewhere to unpack # indirect-dependant DLL's etc. global env tcl_platform if {$tcl_platform(platform) == "windows"} { - set env(PATH) "${vfs::temp}/bin;$env(PATH)" + set env(PATH) "${vfs::temp};$env(PATH)" } elseif {$tcl_platform(platform) == "unix"} { - set env(PATH) "${vfs::temp}/bin:$env(PATH)" + set env(PATH) "${vfs::temp}:$env(PATH)" } else { - set env(PATH) "${vfs::temp}/bin" + set env(PATH) "${vfs::temp}" } proc debug {tag body} { set cnt [info cmdcount] diff --git a/win/makefile.vc b/win/makefile.vc index 49c2e58..315911d 100644 --- a/win/makefile.vc +++ b/win/makefile.vc @@ -13,7 +13,7 @@ VFS_VERSION = 1.0 DLL_VERSION = 10 # comment the following line to compile with symbols -NODEBUG=1 +NODEBUG=0 !IF "$(NODEBUG)" == "1" DEBUGDEFINES =