Mercurial > emacs
comparison lisp/arc-mode.el @ 51158:00d0f607793b
(archive-lzh-summarize): Calculate correct total
header size for LZH level 1 header.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Fri, 23 May 2003 12:45:49 +0000 |
parents | b7770bea6205 |
children | 695cf19ef79e |
comparison
equal
deleted
inserted
replaced
51157:aa7ae88aeb60 | 51158:00d0f607793b |
---|---|
1414 files | 1414 files |
1415 visual) | 1415 visual) |
1416 (while (progn (goto-char p) ;beginning of a base header. | 1416 (while (progn (goto-char p) ;beginning of a base header. |
1417 (looking-at "\\(.\\|\n\\)\\(.\\|\n\\)-l[hz][0-9ds]-")) | 1417 (looking-at "\\(.\\|\n\\)\\(.\\|\n\\)-l[hz][0-9ds]-")) |
1418 (let* ((hsize (char-after p)) ;size of the base header (level 0 and 1) | 1418 (let* ((hsize (char-after p)) ;size of the base header (level 0 and 1) |
1419 (csize (archive-l-e (+ p 7) 4)) ;size of a compressed file to follow. | 1419 (csize (archive-l-e (+ p 7) 4)) ;size of a compressed file to follow (level 0 and 2), |
1420 ;size of extended headers + the compressed file to follow (level 1). | |
1420 (ucsize (archive-l-e (+ p 11) 4)) ;size of an uncompressed file. | 1421 (ucsize (archive-l-e (+ p 11) 4)) ;size of an uncompressed file. |
1421 (time1 (archive-l-e (+ p 15) 2)) ;date/time (MSDOS format in level 0, 1 headers | 1422 (time1 (archive-l-e (+ p 15) 2)) ;date/time (MSDOS format in level 0, 1 headers |
1422 (time2 (archive-l-e (+ p 17) 2)) ;and UNIX format in level 2 header.) | 1423 (time2 (archive-l-e (+ p 17) 2)) ;and UNIX format in level 2 header.) |
1423 (hdrlvl (char-after (+ p 20))) ;header level | 1424 (hdrlvl (char-after (+ p 20))) ;header level |
1424 thsize ;total header size (base + extensions) | 1425 thsize ;total header size (base + extensions) |
1513 visual (cons (vector text | 1514 visual (cons (vector text |
1514 (- (length text) (length prname)) | 1515 (- (length text) (length prname)) |
1515 (length text)) | 1516 (length text)) |
1516 visual) | 1517 visual) |
1517 files (cons (vector prname ifnname fiddle mode (1- p)) | 1518 files (cons (vector prname ifnname fiddle mode (1- p)) |
1518 files) | 1519 files)) |
1519 p (+ p thsize 2 csize)))) | 1520 (cond ((= hdrlvl 1) |
1521 (setq p (+ p hsize 2 csize))) | |
1522 ((or (= hdrlvl 2) (= hdrlvl 0)) | |
1523 (setq p (+ p thsize 2 csize)))) | |
1524 )) | |
1520 (goto-char (point-min)) | 1525 (goto-char (point-min)) |
1521 (set-buffer-multibyte default-enable-multibyte-characters) | 1526 (set-buffer-multibyte default-enable-multibyte-characters) |
1522 (let ((dash (concat (if archive-alternate-display | 1527 (let ((dash (concat (if archive-alternate-display |
1523 "- -------- ----- ----- " | 1528 "- -------- ----- ----- " |
1524 "- ---------- -------- ----------- -------- ") | 1529 "- ---------- -------- ----------- -------- ") |