From b0e7d55b8d0e6426378bae2544967cc93310f39b Mon Sep 17 00:00:00 2001 From: Jean-Claude Wippler Date: Mon, 17 Mar 2003 10:01:55 +0000 Subject: [PATCH] mk4vfs tweaks --- ChangeLog | 5 +++++ library/mk4vfs.tcl | 18 ++++++++++-------- library/pkgIndex.tcl | 4 ++-- library/pkgIndex.tcl.in | 4 ++-- 4 files changed, 19 insertions(+), 12 deletions(-) diff --git a/ChangeLog b/ChangeLog index a18a287..daf0cc7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2003-03-17 Jean-Claude Wippler + + * pkgIndex.tcl, pkgIndex.tcl.in: mk4vfs rev bumped to 1.9 + * mk4vfs.tcl: reverted to old translucent/readwrite open modes + 2003-03-11 Andreas Kupries * doc/vfs.man: Added doctools documentation derived diff --git a/library/mk4vfs.tcl b/library/mk4vfs.tcl index cd08790..e069f89 100644 --- a/library/mk4vfs.tcl +++ b/library/mk4vfs.tcl @@ -13,9 +13,10 @@ # 20jan03 jcw 1.7 streamed zlib decompress mode, reduces memory usage # 01feb03 jcw 1.8 fix mounting a symlink, cleanup mount/unmount procs # 04feb03 jcw 1.8 whoops, restored vfs::mk4::Unmount logic +# 17mar03 jcw 1.9 start with mode translucent or readwrite -package provide mk4vfs 1.8 -package provide vfs::mk4 1.8 +package provide mk4vfs 1.9 +package provide vfs::mk4 1.9 package require Mk4tcl package require vfs @@ -340,16 +341,17 @@ namespace eval mk4vfs { init $db - set v::mode($db) "readwrite" - for {set idx 0} {$idx < [llength $args]} {incr idx} { - switch -- [lindex $args $idx] { - -readonly { set v::mode($db) "readonly" } - -nocommit { set v::mode($db) "translucent" } + set mode 0 + foreach arg $args { + switch -- $arg { + -readonly { set mode 1 } + -nocommit { set mode 2 } } } - if {$v::mode($db) == "readwrite"} { + if {$mode == 0} { periodicCommit $db } + set v::mode($db) [lindex {translucent readwrite readwrite} $mode] } return $db } diff --git a/library/pkgIndex.tcl b/library/pkgIndex.tcl index 2240318..768966d 100644 --- a/library/pkgIndex.tcl +++ b/library/pkgIndex.tcl @@ -43,13 +43,13 @@ package ifneeded starkit 1.2 [list source [file join $dir starkit.tcl]] package ifneeded vfslib 1.3.1 [list source [file join $dir vfslib.tcl]] # Old -package ifneeded mk4vfs 1.8 [list source [file join $dir mk4vfs.tcl]] +package ifneeded mk4vfs 1.9 [list source [file join $dir mk4vfs.tcl]] package ifneeded zipvfs 1.0 [list source [file join $dir zipvfs.tcl]] # New package ifneeded vfs::ftp 1.0 [list source [file join $dir ftpvfs.tcl]] package ifneeded vfs::http 0.5 [list source [file join $dir httpvfs.tcl]] -package ifneeded vfs::mk4 1.8 [list source [file join $dir mk4vfs.tcl]] +package ifneeded vfs::mk4 1.9 [list source [file join $dir mk4vfs.tcl]] package ifneeded vfs::ns 0.5 [list source [file join $dir tclprocvfs.tcl]] package ifneeded vfs::tar 0.9 [list source [file join $dir tarvfs.tcl]] package ifneeded vfs::test 1.0 [list source [file join $dir testvfs.tcl]] diff --git a/library/pkgIndex.tcl.in b/library/pkgIndex.tcl.in index 12b16fe..fc1313f 100644 --- a/library/pkgIndex.tcl.in +++ b/library/pkgIndex.tcl.in @@ -30,13 +30,13 @@ package ifneeded starkit 1.2 [list source [file join $dir starkit.tcl]] package ifneeded vfslib 1.3.1 [list source [file join $dir vfslib.tcl]] # Old -package ifneeded mk4vfs 1.8 [list source [file join $dir mk4vfs.tcl]] +package ifneeded mk4vfs 1.9 [list source [file join $dir mk4vfs.tcl]] package ifneeded zipvfs 1.0 [list source [file join $dir zipvfs.tcl]] # New package ifneeded vfs::ftp 1.0 [list source [file join $dir ftpvfs.tcl]] package ifneeded vfs::http 0.5 [list source [file join $dir httpvfs.tcl]] -package ifneeded vfs::mk4 1.8 [list source [file join $dir mk4vfs.tcl]] +package ifneeded vfs::mk4 1.9 [list source [file join $dir mk4vfs.tcl]] package ifneeded vfs::ns 0.5 [list source [file join $dir tclprocvfs.tcl]] package ifneeded vfs::tar 0.9 [list source [file join $dir tarvfs.tcl]] package ifneeded vfs::test 1.0 [list source [file join $dir testvfs.tcl]] -- 2.23.0