[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
tar-mode.el (tar-octal-time bug)
From: |
Vivek Dasmohapatra |
Subject: |
tar-mode.el (tar-octal-time bug) |
Date: |
12 May 2002 01:28:48 +0100 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 |
tar-octal-time (as shipped with emacs 21.2-1 in Debian GNU/Linux)
is implemented as follows:
(defun tar-octal-time (timeval)
;; Format a timestamp as 11 octal digits. Ghod, I hope this works...
(let ((hibits (car timeval)) (lobits (car (cdr timeval))))
(insert (format "%05o%01o%05o"
(lsh hibits -2)
(logior (lsh (logand 3 hibits) 1) (> (logand lobits 32768)
0))
(logand 32767 lobits)
))))
I think it's meant to be more like this:
(defun tar-octal-time (timeval)
;; Format a timestamp as 11 octal digits. Ghod, I hope this works...
(let ((hibits (car timeval)) (lobits (car (cdr timeval))))
(format "%05o%01o%05o"
(lsh hibits -2)
(logior (lsh (logand 3 hibits) 1) (if (> lobits 32768) 1 0))
(logand 32767 lobits)) ))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- tar-mode.el (tar-octal-time bug),
Vivek Dasmohapatra <=