aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiles Bader2008-05-26 06:57:40 +0000
committerMiles Bader2008-05-26 06:57:40 +0000
commit142e26a72e9b8bbbec23c6bf7234e9f2544b5f89 (patch)
treef419218fed5cc005b94187631f792e0ca27dd2d3
parentf394fa259f0065c91a6312f291857907c787da23 (diff)
parent16cf244edb9f5b9dfb8d575921caee6f5365f38e (diff)
downloademacs-142e26a72e9b8bbbec23c6bf7234e9f2544b5f89.tar.gz
emacs-142e26a72e9b8bbbec23c6bf7234e9f2544b5f89.zip
Merge from emacs--rel--22
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-1179
-rw-r--r--lisp/ChangeLog4
-rw-r--r--lisp/progmodes/cc-mode.el1
-rw-r--r--lisp/tar-mode.el18
3 files changed, 18 insertions, 5 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 62a777fee6b..75aebfccfd6 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,7 @@
12008-05-25 Stefan Monnier <monnier@iro.umontreal.ca>
2
3 * tar-mode.el (tar-summarize-buffer): Handle GNU Tar @LongLink format.
4
12008-05-26 Glenn Morris <rgm@gnu.org> 52008-05-26 Glenn Morris <rgm@gnu.org>
2 6
3 * calendar/cal-hebrew.el (diary-ordinal-suffix): Declare for compiler. 7 * calendar/cal-hebrew.el (diary-ordinal-suffix): Declare for compiler.
diff --git a/lisp/progmodes/cc-mode.el b/lisp/progmodes/cc-mode.el
index 03d1019bd53..0ae038578b7 100644
--- a/lisp/progmodes/cc-mode.el
+++ b/lisp/progmodes/cc-mode.el
@@ -719,6 +719,7 @@ Note that the style variables are always made local to the buffer."
719 (or (stringp c-file-style) 719 (or (stringp c-file-style)
720 (error "c-file-style is not a string")) 720 (error "c-file-style is not a string"))
721 (c-set-style c-file-style)) 721 (c-set-style c-file-style))
722
722 (and c-file-offsets 723 (and c-file-offsets
723 (mapc 724 (mapc
724 (lambda (langentry) 725 (lambda (langentry)
diff --git a/lisp/tar-mode.el b/lisp/tar-mode.el
index 1b3a4505cce..881c1263eeb 100644
--- a/lisp/tar-mode.el
+++ b/lisp/tar-mode.el
@@ -428,6 +428,16 @@ is visible (and the real data of the buffer is hidden)."
428 (tar-header-block-tokenize 428 (tar-header-block-tokenize
429 (buffer-substring pos (+ pos 512))))))) 429 (buffer-substring pos (+ pos 512)))))))
430 (setq pos (+ pos 512)) 430 (setq pos (+ pos 512))
431 (when (equal (tar-header-name tokens) "././@LongLink")
432 ;; This is a GNU Tar long-file-name header.
433 (let* ((size (tar-header-size tokens))
434 ;; -1 so as to strip the terminating 0 byte.
435 (name (buffer-substring pos (+ pos size -1))))
436 (setq pos (+ pos (ash (ash (+ 511 size) -9) 9)))
437 (setq tokens (tar-header-block-tokenize
438 (buffer-substring pos (+ pos 512))))
439 (tar-setf (tar-header-name tokens) name)
440 (setq pos (+ pos 512))))
431 (progress-reporter-update progress-reporter pos) 441 (progress-reporter-update progress-reporter pos)
432 (if (memq (tar-header-link-type tokens) '(20 55)) 442 (if (memq (tar-header-link-type tokens) '(20 55))
433 ;; Foo. There's an extra empty block after these. 443 ;; Foo. There's an extra empty block after these.
@@ -437,7 +447,7 @@ is visible (and the real data of the buffer is hidden)."
437 (error "%s has size %s - corrupted" 447 (error "%s has size %s - corrupted"
438 (tar-header-name tokens) size)) 448 (tar-header-name tokens) size))
439 ;; 449 ;;
440 ;; This is just too slow. Don't really need it anyway.... 450 ;; This is just too slow. Don't really ened it anyway....
441 ;;(tar-header-block-check-checksum 451 ;;(tar-header-block-check-checksum
442 ;; hblock (tar-header-block-checksum hblock) 452 ;; hblock (tar-header-block-checksum hblock)
443 ;; (tar-header-name tokens)) 453 ;; (tar-header-name tokens))
@@ -446,10 +456,8 @@ is visible (and the real data of the buffer is hidden)."
446 456
447 (and (null (tar-header-link-type tokens)) 457 (and (null (tar-header-link-type tokens))
448 (> size 0) 458 (> size 0)
449 (setq pos 459 ;; Round up to a multiple of 512.
450 (+ pos 512 (ash (ash (1- size) -9) 9)) ; this works 460 (setq pos (+ pos (ash (ash (+ 511 size) -9) 9))))))
451 ;;(+ pos (+ size (- 512 (rem (1- size) 512)))) ; this doesn't
452 ))))
453 (make-local-variable 'tar-parse-info) 461 (make-local-variable 'tar-parse-info)
454 (setq tar-parse-info (nreverse result)) 462 (setq tar-parse-info (nreverse result))
455 ;; A tar file should end with a block or two of nulls, 463 ;; A tar file should end with a block or two of nulls,