perl-docs-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject cvs commit: modperl-docs/lib/DocSet Util.pm
Date Fri, 19 Apr 2002 02:59:51 GMT
stas        02/04/18 19:59:51

  Modified:    lib/DocSet Util.pm
  Log:
  fix a bug where a few sizes fell through
  
  Revision  Changes    Path
  1.10      +4 -3      modperl-docs/lib/DocSet/Util.pm
  
  Index: Util.pm
  ===================================================================
  RCS file: /home/cvs/modperl-docs/lib/DocSet/Util.pm,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- Util.pm	13 Apr 2002 15:44:20 -0000	1.9
  +++ Util.pm	19 Apr 2002 02:59:51 -0000	1.10
  @@ -245,17 +245,18 @@
     if ($bytes < KBYTE) {
         return sprintf "%5dB", $bytes;
     }
  -  elsif (KBYTE < $bytes  and $bytes < MBYTE) {
  +  elsif (KBYTE <= $bytes  and $bytes < MBYTE) {
         return sprintf "%4.@{[int($bytes/KBYTE) < 10 ? 1 : 0]}fKiB", $bytes/KBYTE;
     }
  -  elsif (MBYTE < $bytes  and $bytes < GBYTE) {
  +  elsif (MBYTE <= $bytes  and $bytes < GBYTE) {
         return sprintf "%4.@{[int($bytes/MBYTE) < 10 ? 1 : 0]}fMiB", $bytes/MBYTE;
     }
  -  elsif (GBYTE < $bytes) {
  +  elsif (GBYTE <= $bytes) {
         return sprintf "%4.@{[int($bytes/GBYTE) < 10 ? 1 : 0]}fGiB", $bytes/GBYTE;
     }
     else {
         # shouldn't happen
  +      die "cannot handle formatting of $bytes"
     }
   }
   
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: docs-cvs-unsubscribe@perl.apache.org
For additional commands, e-mail: docs-cvs-help@perl.apache.org


Mime
View raw message