changeset 67004:5a972cf172a7

(ls-lisp-format-file-size): Format file size with 9 digits, not 8, to avoid misalignment for files larger than 100MB.
author Eli Zaretskii <eliz@gnu.org>
date Sat, 19 Nov 2005 11:38:23 +0000
parents e7f5359f0316
children d76b0a05c7d6
files lisp/ls-lisp.el
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ls-lisp.el	Sat Nov 19 11:23:38 2005 +0000
+++ b/lisp/ls-lisp.el	Sat Nov 19 11:38:23 2005 +0000
@@ -588,11 +588,11 @@
 (defun ls-lisp-format-file-size (file-size human-readable)
   (if (or (not human-readable)
           (< file-size 1024))
-      (format (if (floatp file-size) " %8.0f" " %8d") file-size)
+      (format (if (floatp file-size) " %9.0f" " %9d") file-size)
     (do ((file-size (/ file-size 1024.0) (/ file-size 1024.0))
          ;; kilo, mega, giga, tera, peta, exa
          (post-fixes (list "k" "M" "G" "T" "P" "E") (cdr post-fixes)))
-        ((< file-size 1024) (format " %7.0f%s"  file-size (car post-fixes))))))
+        ((< file-size 1024) (format " %8.0f%s"  file-size (car post-fixes))))))
 
 (provide 'ls-lisp)