aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2009-10-17 04:36:11 +0000
committerStefan Monnier2009-10-17 04:36:11 +0000
commit4062011e2f2b45c85cdafd27a30179d7e9f19778 (patch)
treee1c1ab06743eb7b0b942f68f095055705bdbb257
parent67d3ffe4989e99079a69e1f7358b758c14cb519a (diff)
downloademacs-4062011e2f2b45c85cdafd27a30179d7e9f19778.tar.gz
emacs-4062011e2f2b45c85cdafd27a30179d7e9f19778.zip
(tar-data-swapped-p): Make the assertion a bit more
permissive for when the buffer is empty. (tar-header-block-tokenize): Decode the username and groupname. (tar-chown-entry, tar-chgrp-entry): Encode the names (bug#4730).
-rw-r--r--lisp/ChangeLog26
-rw-r--r--lisp/tar-mode.el22
2 files changed, 32 insertions, 16 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index bb119085989..434dcbaff89 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,10 @@
12009-10-17 Stefan Monnier <monnier@iro.umontreal.ca>
2
3 * tar-mode.el (tar-data-swapped-p): Make the assertion a bit more
4 permissive for when the buffer is empty.
5 (tar-header-block-tokenize): Decode the username and groupname.
6 (tar-chown-entry, tar-chgrp-entry): Encode the names (bug#4730).
7
12009-10-17 Chong Yidong <cyd@stupidchicken.com> 82009-10-17 Chong Yidong <cyd@stupidchicken.com>
2 9
3 * cedet/srecode/srt.el: 10 * cedet/srecode/srt.el:
@@ -13,8 +20,8 @@
13 (semantic-analyze-scoped-inherited-tag-map): Wrap calculation of 20 (semantic-analyze-scoped-inherited-tag-map): Wrap calculation of
14 tmpscope so that the regular scope will continue to work. 21 tmpscope so that the regular scope will continue to work.
15 22
16 * cedet/semantic/idle.el (semantic-idle-tag-highlight): Use 23 * cedet/semantic/idle.el (semantic-idle-tag-highlight):
17 semantic-idle-summary-highlight-face as the highlighting. 24 Use semantic-idle-summary-highlight-face as the highlighting.
18 25
19 * emacs-lisp/eieio-base.el (eieio-persistent-save): If buffer 26 * emacs-lisp/eieio-base.el (eieio-persistent-save): If buffer
20 contains multibyte characters, choose first applicable coding 27 contains multibyte characters, choose first applicable coding
@@ -40,12 +47,11 @@
40 47
41 * cedet/ede/proj-prog.el (project-run-target): New method. 48 * cedet/ede/proj-prog.el (project-run-target): New method.
42 49
43 * cedet/ede/proj-obj.el (ede-cc-linker): Rename from 50 * cedet/ede/proj-obj.el (ede-cc-linker): Rename from ede-gcc-linker.
44 ede-gcc-linker.
45 (ede-g++-linker): Change Change link lines. 51 (ede-g++-linker): Change Change link lines.
46 52
47 * cedet/ede/pmake.el (ede-pmake-insert-variable-shared): When 53 * cedet/ede/pmake.el (ede-pmake-insert-variable-shared):
48 searching for old variables, go to the end of the buffer and 54 When searching for old variables, go to the end of the buffer and
49 search backward from there. 55 search backward from there.
50 (ede-proj-makefile-automake-insert-subdirs) 56 (ede-proj-makefile-automake-insert-subdirs)
51 (ede-proj-makefile-automake-insert-extradist): New methods. 57 (ede-proj-makefile-automake-insert-extradist): New methods.
@@ -56,16 +62,16 @@
56 check that it exists. 62 check that it exists.
57 63
58 * cedet/ede/linux.el (ede-linux-version): Don't call "head". 64 * cedet/ede/linux.el (ede-linux-version): Don't call "head".
59 (ede-linux-load): Wrap dir in file-name-as-directory. Set 65 (ede-linux-load): Wrap dir in file-name-as-directory.
60 :version slot. 66 Set :version slot.
61 67
62 * cedet/ede/files.el (ede-get-locator-object): When enabling 68 * cedet/ede/files.el (ede-get-locator-object): When enabling
63 locate, do so on "top". 69 locate, do so on "top".
64 70
65 * cedet/ede/emacs.el (ede-emacs-file-existing): Wrap "dir" in 71 * cedet/ede/emacs.el (ede-emacs-file-existing): Wrap "dir" in
66 file-name-as-directory during compare. 72 file-name-as-directory during compare.
67 (ede-emacs-version): Return Emacs/XEmacs differentiator. Get 73 (ede-emacs-version): Return Emacs/XEmacs differentiator.
68 version number from different places. Don't call egrep. 74 Get version number from different places. Don't call egrep.
69 (ede-emacs-load): Set :version slot. Call file-name-as-directory 75 (ede-emacs-load): Set :version slot. Call file-name-as-directory
70 to set the directory. 76 to set the directory.
71 77
diff --git a/lisp/tar-mode.el b/lisp/tar-mode.el
index 762ecc07284..0e681f56702 100644
--- a/lisp/tar-mode.el
+++ b/lisp/tar-mode.el
@@ -171,8 +171,9 @@ This information is useful, but it takes screen space away from file names."
171 ;; state correctly: the raw data is expected to be always larger than 171 ;; state correctly: the raw data is expected to be always larger than
172 ;; the summary. 172 ;; the summary.
173 (progn 173 (progn
174 (assert (eq tar-data-swapped 174 (assert (or (= (buffer-size tar-data-buffer) (buffer-size))
175 (> (buffer-size tar-data-buffer) (buffer-size)))) 175 (eq tar-data-swapped
176 (> (buffer-size tar-data-buffer) (buffer-size)))))
176 tar-data-swapped))) 177 tar-data-swapped)))
177 178
178(defun tar-swap-data () 179(defun tar-swap-data ()
@@ -312,8 +313,12 @@ write-date, checksum, link-type, and link-name."
312 link-p 313 link-p
313 linkname 314 linkname
314 uname-valid-p 315 uname-valid-p
315 (and uname-valid-p (substring string tar-uname-offset uname-end)) 316 (when uname-valid-p
316 (and uname-valid-p (substring string tar-gname-offset gname-end)) 317 (decode-coding-string
318 (substring string tar-uname-offset uname-end) coding))
319 (when uname-valid-p
320 (decode-coding-string
321 (substring string tar-gname-offset gname-end) coding))
317 (tar-parse-octal-integer string tar-dmaj-offset tar-dmin-offset) 322 (tar-parse-octal-integer string tar-dmaj-offset tar-dmin-offset)
318 (tar-parse-octal-integer string tar-dmin-offset tar-prefix-offset) 323 (tar-parse-octal-integer string tar-dmin-offset tar-prefix-offset)
319 )))))) 324 ))))))
@@ -1013,7 +1018,10 @@ for this to be permanent."
1013 (read-string "New UID string: " (tar-header-uname descriptor)))))) 1018 (read-string "New UID string: " (tar-header-uname descriptor))))))
1014 (cond ((stringp new-uid) 1019 (cond ((stringp new-uid)
1015 (setf (tar-header-uname (tar-current-descriptor)) new-uid) 1020 (setf (tar-header-uname (tar-current-descriptor)) new-uid)
1016 (tar-alter-one-field tar-uname-offset (concat new-uid "\000"))) 1021 (tar-alter-one-field tar-uname-offset
1022 (concat (encode-coding-string
1023 new-uid tar-file-name-coding-system)
1024 "\000")))
1017 (t 1025 (t
1018 (setf (tar-header-uid (tar-current-descriptor)) new-uid) 1026 (setf (tar-header-uid (tar-current-descriptor)) new-uid)
1019 (tar-alter-one-field tar-uid-offset 1027 (tar-alter-one-field tar-uid-offset
@@ -1039,7 +1047,9 @@ for this to be permanent."
1039 (cond ((stringp new-gid) 1047 (cond ((stringp new-gid)
1040 (setf (tar-header-gname (tar-current-descriptor)) new-gid) 1048 (setf (tar-header-gname (tar-current-descriptor)) new-gid)
1041 (tar-alter-one-field tar-gname-offset 1049 (tar-alter-one-field tar-gname-offset
1042 (concat new-gid "\000"))) 1050 (concat (encode-coding-string
1051 new-gid tar-file-name-coding-system)
1052 "\000")))
1043 (t 1053 (t
1044 (setf (tar-header-gid (tar-current-descriptor)) new-gid) 1054 (setf (tar-header-gid (tar-current-descriptor)) new-gid)
1045 (tar-alter-one-field tar-gid-offset 1055 (tar-alter-one-field tar-gid-offset