summaryrefslogtreecommitdiff
path: root/lisp/ls-lisp.el
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>1999-02-16 08:29:22 +0000
committerEli Zaretskii <eliz@gnu.org>1999-02-16 08:29:22 +0000
commit6c18d2f5c561d4a3d4c63788841bc35b126a5add (patch)
treeae39f819128691b30bc7ef5046e44a47f93471bc /lisp/ls-lisp.el
parentcb1846b412f7fb26a08de18c094f965ab6f49238 (diff)
downloademacs-6c18d2f5c561d4a3d4c63788841bc35b126a5add.tar.gz
(ls-lisp-insert-directory): Call fceiling to round
the size in blocks, since it can be a float. (ls-lisp-format): Likewise
Diffstat (limited to 'lisp/ls-lisp.el')
-rw-r--r--lisp/ls-lisp.el4
1 files changed, 2 insertions, 2 deletions
diff --git a/lisp/ls-lisp.el b/lisp/ls-lisp.el
index 5a3c1b52ff7..7d35b1e8dc3 100644
--- a/lisp/ls-lisp.el
+++ b/lisp/ls-lisp.el
@@ -177,7 +177,7 @@ are: A a c i r S s t u"
(search-backward "total \007")
(goto-char (match-end 0))
(delete-char -1)
- (insert (format "%d" (if (zerop sum) 0 (1+ (/ sum 1024)))))))
+ (insert (format "%.0f" (fceiling (/ sum 1024.0))))))
;; if not full-directory-p, FILE *must not* end in /, as
;; file-attributes will not recognize a symlink to a directory
;; must make it a relative filename as ls does:
@@ -246,7 +246,7 @@ are: A a c i r S s t u"
(format "%6d " (nth 10 file-attr)))
;; nil is treated like "" in concat
(if (memq ?s switches) ; size in K
- (format "%4d " (1+ (/ (nth 7 file-attr) 1024))))
+ (format "%4d " (fceiling (/ (nth 7 file-attr) 1024.0))))
(nth 8 file-attr) ; permission bits
;; numeric uid/gid are more confusing than helpful
;; Emacs should be able to make strings of them.