Check-in [6e6c5fd01a]
Overview
Comment:Corrected typo in ZipVFS
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:6e6c5fd01a4011c20b1deff9b1895833ee4f1e40
User & Date: rkeene on 2010-09-26 04:45:20
Other Links: manifest | tags
Context
2010-09-26
04:45
Updated to set encoding from system (untested) check-in: 095125b887 user: rkeene tags: trunk
04:45
Corrected typo in ZipVFS check-in: 6e6c5fd01a user: rkeene tags: trunk
04:45
Updated to not build zlib package under Tcl 8.6+ as it is natively provided check-in: e639016509 user: rkeene tags: trunk
Changes

Modified kitsh/buildsrc/kitsh-0.0/zipvfs.tcl from [734aa55ae1] to [952d380c4b].

   235    235       proc u_short {n}  { return [expr { ($n+0x10000)%0x10000 }] }
   236    236   }
   237    237   
   238    238   proc zip::DosTime {date time} {
   239    239       # The pre-VFS environment will not have access to "clock", so don't even
   240    240       # bother
   241    241       return 0
   242         -
   243         -    set time [u_short $time]
   244         -    set date [u_short $date]
   245         -
   246         -    # time = fedcba9876543210
   247         -    #        HHHHHmmmmmmSSSSS (sec/2 actually)
   248         -
   249         -    # data = fedcba9876543210
   250         -    #        yyyyyyyMMMMddddd
   251         -
   252         -    set sec  [expr { ($time & 0x1F) * 2 }]
   253         -    set min  [expr { ($time >> 5) & 0x3F }]
   254         -    set hour [expr { ($time >> 11) & 0x1F }]
   255         -
   256         -    set mday [expr { $date & 0x1F }]
   257         -    set mon  [expr { (($date >> 5) & 0xF) }]
   258         -    set year [expr { (($date >> 9) & 0xFF) + 1980 }]
   259         -
   260         -    # Fix up bad date/time data, no need to fail
   261         -    if {$sec  > 59} {set sec  59}
   262         -    if {$min  > 59} {set sec  59}
   263         -    if {$hour > 23} {set hour 23}
   264         -    if {$mday < 1}  {set mday 1}
   265         -    if {$mday > 35} {set mday 35}
   266         -    if {$mon  < 1}  {set mon  1}
   267         -    if {$mon > 12}  {set mon  12}
   268         -
   269         -    set res 0
   270         -    while {$mday > 1 && [catch {
   271         -	set dt [format {%4.4d-%2.2d-%2.2d %2.2d:%2.2d:%2.2d} \
   272         -		    $year $mon $mday $hour $min $sec]
   273         -	set res [clock scan $dt -gmt 1]
   274         -    }]} {
   275         -	# Only mday can be wrong, at end of month
   276         -	incr mday -1
   277         -    }
   278         -
   279         -    return $res
   280    242   }
   281    243   
   282    244   
   283    245   proc zip::Data {fd arr {varPtr ""} {verify 0}} {
   284    246       upvar 1 $arr sb
   285    247   
   286    248       if { $varPtr != "" } {

Modified tclvfs/patches/all/tclvfs-20080503-zipvfs-clock_and_append_to_exe.diff from [b74bd5027c] to [776417ea28].

     9      9   -    while {$sec  > 59} {incr sec  -60}
    10     10   -    while {$min  > 59} {incr sec  -60}
    11     11   -    while {$hour > 23} {incr hour -24}
    12     12   -    if {$mday < 1}  {incr mday}
    13     13   -    if {$mon  < 1}  {incr mon}
    14     14   -    while {$mon > 12} {incr hour -12}
    15     15   +    if {$sec  > 59} {set sec  59}
    16         -+    if {$min  > 59} {set sec  59}
           16  ++    if {$min  > 59} {set min  59}
    17     17   +    if {$hour > 23} {set hour 23}
    18     18   +    if {$mday < 1}  {set mday 1}
    19     19   +    if {$mday > 31} {set mday 31}
    20     20   +    if {$mon  < 1}  {set mon  1}
    21     21   +    if {$mon > 12}  {set mon  12}
    22     22    
    23     23   -    while {[catch {