From a15cdcc4f48be0cd16ae1f900567dd20e50f1c79 Mon Sep 17 00:00:00 2001 From: drh Date: Sat, 17 Sep 2005 19:28:45 +0000 Subject: [PATCH] Download page reports sizes in MiB and KiB instead of just bytes. (CVS 2718) FossilOrigin-Name: e985f02d20d50b0451bfd35a7343e0386336dd71 --- manifest | 12 ++++++------ manifest.uuid | 2 +- www/download.tcl | 12 ++++++++++-- 3 files changed, 17 insertions(+), 9 deletions(-) diff --git a/manifest b/manifest index 6cd29edc99..684c5d9e8f 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Update\sto\sthe\sdownload\spage\son\sthe\swebsite.\s(CVS\s2717) -D 2005-09-17T19:14:40 +C Download\spage\sreports\ssizes\sin\sMiB\sand\sKiB\sinstead\sof\sjust\sbytes.\s(CVS\s2718) +D 2005-09-17T19:28:46 F Makefile.in 12784cdce5ffc8dfb707300c34e4f1eb3b8a14f1 F Makefile.linux-gcc 06be33b2a9ad4f005a5f42b22c4a19dab3cbb5c7 F README 9c4e2d6706bdcc3efdd773ce752a8cdab4f90028 @@ -280,7 +280,7 @@ F www/datatypes.tcl 7c786d2e8ff434346764534ec015966d17efce60 F www/different.tcl 81377eb0c8e27d3bdf812bde357281c4c44bec0c F www/direct1b.gif 32b48b764244817b6b591898dc52a04299a7b8a7 F www/docs.tcl 4e2d716f004cc4c4dae773206ed58f50d4468a87 -F www/download.tcl 9bde8c5ef480ad4656d54d7a19c4df35399c1e77 +F www/download.tcl d56a1c30b1c3c18f62926a806179976eb133ce94 F www/dynload.tcl 02eb8273aa78cfa9070dd4501dca937fb22b466c F www/faq.tcl eb7fb7b7242ccfec65820f01b94d0d83956236c1 F www/fileformat.tcl 900c95b9633abc3dcfc384d9ddd8eb4876793059 @@ -309,7 +309,7 @@ F www/tclsqlite.tcl ddcf912ea48695603c8ed7efb29f0812ef8d1b49 F www/vdbe.tcl 87a31ace769f20d3627a64fa1fade7fed47b90d0 F www/version3.tcl a99cf5f6d8bd4d5537584a2b342f0fb9fa601d8b F www/whentouse.tcl 97e2b5cd296f7d8057e11f44427dea8a4c2db513 -P 1cdfe66714c2374b1d93bc62f37873111e090e44 -R a4455ae11231eb14ec58f9aee6180c1c +P 91bc0d0032d5305671da0ebfc6e697b9b882f1ad +R ff0139107a70910902346049e88a48c7 U drh -Z 84d6f16806c3fa1cdfbf34db1b70a1f6 +Z 56f8c51b415281e73290ccca2e172dec diff --git a/manifest.uuid b/manifest.uuid index 608a8adb56..ff257dc599 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -91bc0d0032d5305671da0ebfc6e697b9b882f1ad \ No newline at end of file +e985f02d20d50b0451bfd35a7343e0386336dd71 \ No newline at end of file diff --git a/www/download.tcl b/www/download.tcl index 4a2b735260..1a4a8c11f8 100644 --- a/www/download.tcl +++ b/www/download.tcl @@ -1,7 +1,7 @@ # # Run this TCL script to generate HTML for the download.html file. # -set rcsid {$Id: download.tcl,v 1.21 2005/09/17 19:14:40 drh Exp $} +set rcsid {$Id: download.tcl,v 1.22 2005/09/17 19:28:46 drh Exp $} source common.tcl header {SQLite Download Page} @@ -19,9 +19,17 @@ proc Product {pattern desc} { if {![regexp ^$p2\$ $file all version]} continue regsub -all _ $version . version set size [file size $file] + set units bytes + if {$size>1024*1024} { + set size [format %.2f [expr {$size/(1024.0*1024.0)}]] + set units MiB + } elseif {$size>1024} { + set size [format %.2f [expr {$size/(1024.0)}]] + set units KiB + } puts "" puts "" - puts "$file
($size bytes)" + puts "$file
($size $units)" puts "" regsub -all VERSION $desc $version d2 puts "[string trim $d2]"