TclVFS

Check-in [d888143e47]
Login
Bounty program for improvements to Tcl and certain Tcl packages.

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:2011-03-30 Steve Huntley <[email protected]> * vfslib.tcl, zipvfs.tcl: Added contributed patches to fix bugs 3160686 & 3224057.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: d888143e47d3bc2061f829aee75eafaa894eda8a
User & Date: blacksqr 2011-03-30 06:44:42
Context
2011-04-28
08:01
2011-04-28 Steve Huntley <[email protected]> * zipvfs.tcl: Added contributed patch to speed up zipvfs directory listing. See patch 3279418. check-in: 1267093049 user: blacksqr tags: trunk
2011-03-30
06:44
2011-03-30 Steve Huntley <[email protected]> * vfslib.tcl, zipvfs.tcl: Added contributed patches to fix bugs 3160686 & 3224057. check-in: d888143e47 user: blacksqr tags: trunk
05:14
2011-03-30 Steve Huntley <[email protected]> * globfind.tcl: Updated to latest file version (1.5.3). check-in: 391a075003 user: blacksqr tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to ChangeLog.






1
2
3
4
5
6
7




2011-03-30  Steve Huntley  <[email protected]>

	* globfind.tcl: Updated to latest file version (1.5.3).

2010-12-31  Steve Huntley  <[email protected]>

	* vfs.tcl: Removed requirement for 8.6 for sourcing of vfslib.tcl, since
>
>
>
>
>







1
2
3
4
5
6
7
8
9
10
11
12
2011-03-30  Steve Huntley  <[email protected]>

	* vfslib.tcl, zipvfs.tcl: Added contributed patches to fix bugs 3160686
	& 3224057.

2011-03-30  Steve Huntley  <[email protected]>

	* globfind.tcl: Updated to latest file version (1.5.3).

2010-12-31  Steve Huntley  <[email protected]>

	* vfs.tcl: Removed requirement for 8.6 for sourcing of vfslib.tcl, since

Changes to library/vfslib.tcl.

188
189
190
191
192
193
194
195


196
197
198
199
200
201
202
    proc vfs::memchan {{filename {}}} {
	set fd [rechan ::vfs::memchan_handler 6]
	set ::vfs::_memchan_buf($fd) ""
	set ::vfs::_memchan_pos($fd) 0
        set ::vfs::_memchan_nam($fd) $filename
	return $fd
    }



    proc vfs::zstream_handler {zcmd ifd clen ilen imode cmd fd {a1 ""} {a2 ""}} {
	#puts stderr "z $zcmd $ifd $ilen $cmd $fd $a1 $a2"
	upvar ::vfs::_zstream_pos($fd) pos

	switch -- $cmd {
	    seek {
		switch $a2 {






|
>
>







188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
    proc vfs::memchan {{filename {}}} {
	set fd [rechan ::vfs::memchan_handler 6]
	set ::vfs::_memchan_buf($fd) ""
	set ::vfs::_memchan_pos($fd) 0
        set ::vfs::_memchan_nam($fd) $filename
	return $fd
    }
}

if {[info command rechan] ne "" || ![catch {load "" rechan}]} {
    proc vfs::zstream_handler {zcmd ifd clen ilen imode cmd fd {a1 ""} {a2 ""}} {
	#puts stderr "z $zcmd $ifd $ilen $cmd $fd $a1 $a2"
	upvar ::vfs::_zstream_pos($fd) pos

	switch -- $cmd {
	    seek {
		switch $a2 {

Changes to library/zipvfs.tcl.

496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
    binary scan $buf A4ssssssiiisssssii hdr \
      sb(vem) sb(ver) sb(flags) sb(method) time date \
      sb(crc) sb(csize) sb(size) \
      flen elen clen sb(disk) sb(attr) \
      sb(atx) sb(ino)

    set sb(ino) [expr {$cb(base) + $sb(ino)}]

    if { ![string equal "PK\01\02" $hdr] } {
	binary scan $hdr H* x
	return -code error "bad central header: $x"
    }

    foreach v {vem ver flags method disk attr} {
	set sb($v) [expr {$sb($v) & 0xffff}]






<
<







496
497
498
499
500
501
502


503
504
505
506
507
508
509
    binary scan $buf A4ssssssiiisssssii hdr \
      sb(vem) sb(ver) sb(flags) sb(method) time date \
      sb(crc) sb(csize) sb(size) \
      flen elen clen sb(disk) sb(attr) \
      sb(atx) sb(ino)



    if { ![string equal "PK\01\02" $hdr] } {
	binary scan $hdr H* x
	return -code error "bad central header: $x"
    }

    foreach v {vem ver flags method disk attr} {
	set sb($v) [expr {$sb($v) & 0xffff}]