changeset 93697:513fb6886f41

(ls-lisp-format): Support inodes that are 2- or 3-member cons cells.
author Eli Zaretskii <eliz@gnu.org>
date Sat, 05 Apr 2008 15:02:43 +0000
parents 83e82d9ab227
children 62a42f14436b
files lisp/ls-lisp.el
diffstat 1 files changed, 11 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ls-lisp.el	Sat Apr 05 14:47:38 2008 +0000
+++ b/lisp/ls-lisp.el	Sat Apr 05 15:02:43 2008 +0000
@@ -529,7 +529,17 @@
 	;; for symbolic link, or nil.
 	(drwxrwxrwx (nth 8 file-attr)))	; attribute string ("drwxrwxrwx")
     (concat (if (memq ?i switches)	; inode number
-		(format " %6d" (nth 10 file-attr)))
+		(let ((inode (nth 10 file-attr)))
+		  (if (consp inode)
+		      (if (consp (cdr inode))
+			  (format " %17.0f "
+				  (+ (* (car inode) 1099511627776.0)
+				     (* (cadr inode) 65536.0)
+				     (cddr inode)))
+			(format " %17.0f "
+				(+ (* (car inode) 65536.0)
+				   (cdr inode))))
+		    (format " %17d " inode))))
 	    ;; nil is treated like "" in concat
 	    (if (memq ?s switches)	; size in K
 		(format " %4.0f" (fceiling (/ file-size 1024.0))))