;ELC ;;; Compiled ;;; in Emacs version 28.0.50 ;;; with all optimizations. (require 'cl-lib) #@30 The length of a newc header. (defconst *cpio-newc-header-length* 110 (#$ . 105)) #@49 RE to match the magic number of a newc archive. (defconst *cpio-newc-magic-re* "070701" (#$ . 192)) (byte-code "\301\302\207" [*cpio-newc-magic-re* "070701" nil] 1) #@47 RE to match the c_ino field in a newc header. (defconst *cpio-newc-ino-re* "[[:xdigit:]]\\{8\\}" (#$ . 364)) (byte-code "\301\302\207" [*cpio-newc-ino-re* "[[:xdigit:]]\\{8\\}" nil] 1) #@48 RE to match the c_mode field in a newc header. (defconst *cpio-newc-mode-re* "[[:xdigit:]]\\{8\\}" (#$ . 556)) (byte-code "\301\302\207" [*cpio-newc-mode-re* "[[:xdigit:]]\\{8\\}" nil] 1) #@47 RE to match the c_uid field in a newc header. (defconst *cpio-newc-uid-re* "[[:xdigit:]]\\{8\\}" (#$ . 751)) (byte-code "\301\302\207" [*cpio-newc-uid-re* "[[:xdigit:]]\\{8\\}" nil] 1) #@47 RE to match the c_gid field in a newc header. (defconst *cpio-newc-gid-re* "[[:xdigit:]]\\{8\\}" (#$ . 943)) (byte-code "\301\302\207" [*cpio-newc-gid-re* "[[:xdigit:]]\\{8\\}" nil] 1) #@49 RE to match the c_nlink field in a newc header. (defconst *cpio-newc-nlink-re* "[[:xdigit:]]\\{8\\}" (#$ . 1135)) (byte-code "\301\302\207" [*cpio-newc-nlink-re* "[[:xdigit:]]\\{8\\}" nil] 1) #@49 RE to match the c_mtime field in a newc header. (defconst *cpio-newc-mtime-re* "[[:xdigit:]]\\{8\\}" (#$ . 1334)) (byte-code "\301\302\207" [*cpio-newc-mtime-re* "[[:xdigit:]]\\{8\\}" nil] 1) #@52 RE to match the c_filesize field in a newc header. (defconst *cpio-newc-filesize-re* "[[:xdigit:]]\\{8\\}" (#$ . 1533)) (byte-code "\301\302\207" [*cpio-newc-filesize-re* "[[:xdigit:]]\\{8\\}" nil] 1) #@47 RE to match the c_dev field in a newc header. (defconst *cpio-newc-dev-maj-re* "[[:xdigit:]]\\{8\\}" (#$ . 1741)) (byte-code "\301\302\207" [*cpio-newc-dev-maj-re* "[[:xdigit:]]\\{8\\}" nil] 1) #@47 RE to match the c_dev field in a newc header. (defconst *cpio-newc-dev-min-re* "[[:xdigit:]]\\{8\\}" (#$ . 1942)) (byte-code "\301\302\207" [*cpio-newc-dev-min-re* "[[:xdigit:]]\\{8\\}" nil] 1) #@48 RE to match the c_rdev field in a newc header. (defconst *cpio-newc-rdev-maj-re* "[[:xdigit:]]\\{8\\}" (#$ . 2143)) (byte-code "\301\302\207" [*cpio-newc-rdev-maj-re* "[[:xdigit:]]\\{8\\}" nil] 1) #@48 RE to match the c_rdev field in a newc header. (defconst *cpio-newc-rdev-min-re* "[[:xdigit:]]\\{8\\}" (#$ . 2347)) (byte-code "\301\302\207" [*cpio-newc-rdev-min-re* "[[:xdigit:]]\\{8\\}" nil] 1) #@48 RE to match the c_rdev field in a newc header. (defconst *cpio-newc-rdev-min-re* "[[:xdigit:]]\\{8\\}" (#$ . 2551)) (byte-code "\301\302\207" [*cpio-newc-rdev-min-re* "[[:xdigit:]]\\{8\\}" nil] 1) #@52 RE to match the c_namesize field in a newc header. (defconst *cpio-newc-namesize-re* "[[:xdigit:]]\\{8\\}" (#$ . 2755)) (byte-code "\301\302\207" [*cpio-newc-namesize-re* "[[:xdigit:]]\\{8\\}" nil] 1) #@48 RE to match the CRC checksum in a newc header. (defconst *cpio-newc-chksum-re* "[[:xdigit:]]\\{8\\}" (#$ . 2963)) (byte-code "\301\302\207" [*cpio-newc-chksum-re* "[[:xdigit:]]\\{8\\}" nil] 1) #@52 RE to match the c_filename field in a newc header. (defconst *cpio-newc-filename-re* "[[:print:]]+" (#$ . 3163)) (byte-code "\301\302\207" [*cpio-newc-filename-re* "[[:print:]]+" nil] 1) #@47 RE to match newc header format cpio archives. (defconst *cpio-newc-header-re* nil (#$ . 3357)) (byte-code "\306\307 \307\n\307 \307\f\307 \307\307\307\307\307\307\307\307 \307!\310\260\"\311#\312\311!\210#T\211#$\313\311!\210#T\211#%\314\311!\210#T\211#&\315\311!\210#T\211#'\316\311!\210#T\211#(\317\311!\210#T\211#)\320\311!\210#T\211#*\321\311!\210#T\211#+\322\311!\210#T\211#,\323\311!\210#T\211#-\324\311!\210#T\211#.\325\311!\210#T\211#/\326\311!\210#T\211#0\327\311!\210#T\211#1\330\311!\210#T\211#2)\311\207" [*cpio-newc-magic-re* *cpio-newc-ino-re* *cpio-newc-mode-re* *cpio-newc-uid-re* *cpio-newc-gid-re* *cpio-newc-nlink-re* "\\(" "\\)\\(" "\\)" 0 (lambda (#1=#:def-tmp-var) (defconst *cpio-newc-magic-re-idx* #1# "RE to match the magic number in a newc header.")) (lambda (#1#) (defconst *cpio-newc-ino-re-idx* #1# "Index of the sub RE from *cpio-newc-header-re* to parse the inode.")) (lambda (#1#) (defconst *cpio-newc-mode-re-idx* #1# "Index of the sub RE from *cpio-newc-header-re* to parse the mode.")) (lambda (#1#) (defconst *cpio-newc-uid-re-idx* #1# "Index of the sub RE from *cpio-newc-header-re* to parse the UID.")) (lambda (#1#) (defconst *cpio-newc-gid-re-idx* #1# "Index of the sub RE from *cpio-newc-header-re* to parse the GID.")) (lambda (#1#) (defconst *cpio-newc-nlink-re-idx* #1# "Index of the sub RE from *cpio-newc-header-re* to parse the nlink.")) (lambda (#1#) (defconst *cpio-newc-mtime-re-idx* #1# "Index of the sub RE from *cpio-newc-header-re* to parse the mtime.")) (lambda (#1#) (defconst *cpio-newc-filesize-re-idx* #1# "Index of the sub RE from *cpio-newc-header-re* to parse the filesize.")) (lambda (#1#) (defconst *cpio-newc-dev-maj-re-idx* #1# "Index of the sub RE from *cpio-newc-header-re* to parse the dev.")) (lambda (#1#) (defconst *cpio-newc-dev-min-re-idx* #1# "Index of the sub RE from *cpio-newc-header-re* to parse the dev.")) (lambda (#1#) (defconst *cpio-newc-rdev-maj-re-idx* #1# "Index of the sub RE from *cpio-newc-header-re* to parse the rdev.")) (lambda (#1#) (defconst *cpio-newc-rdev-min-re-idx* #1# "Index of the sub RE from *cpio-newc-header-re* to parse the rdev.")) (lambda (#1#) (defconst *cpio-newc-namesize-re-idx* #1# "Index of the sub RE from *cpio-newc-header-re* to parse the namesize.")) (lambda (#1#) (defconst *cpio-newc-chksum-re-idx* #1# "Index of the sub RE from *cpio-newc-header-re* to parse the chksum.")) (lambda (#1#) (defconst *cpio-newc-filename-re-idx* #1# "Index of the sub RE from *cpio-newc-header-re* to parse the namesize.")) *cpio-newc-mtime-re* *cpio-newc-filesize-re* *cpio-newc-dev-maj-re* *cpio-newc-dev-min-re* *cpio-newc-rdev-maj-re* *cpio-newc-rdev-min-re* *cpio-newc-namesize-re* *cpio-newc-chksum-re* *cpio-newc-filename-re* *cpio-newc-header-re* i *cpio-newc-magic-re-idx* *cpio-newc-ino-re-idx* *cpio-newc-mode-re-idx* *cpio-newc-uid-re-idx* *cpio-newc-gid-re-idx* *cpio-newc-nlink-re-idx* *cpio-newc-mtime-re-idx* *cpio-newc-filesize-re-idx* *cpio-newc-dev-maj-re-idx* *cpio-newc-dev-min-re-idx* *cpio-newc-rdev-maj-re-idx* *cpio-newc-rdev-min-re-idx* *cpio-newc-namesize-re-idx* *cpio-newc-chksum-re-idx* *cpio-newc-filename-re-idx*] 31) #@68 The string that identifies an entry as a NEWC style cpio(1) entry. (defconst *cpio-newc-magic* *cpio-newc-magic-re* (#$ . 6580)) (byte-code "\302\207" [*cpio-newc-magic-re* *cpio-newc-magic* nil] 1) #@50 The width of all of the fields in a newc header. (defconst *cpio-newc-field-width* 8 (#$ . 6787)) (byte-code "\301\211\207" [*cpio-newc-field-width* 8] 2) #@69 The modulus to which some things are padded in a NEWC cpio archive. (defconst *cpio-newc-padding-modulus* 4 (#$ . 6949)) (byte-code "\301\211\207" [*cpio-newc-padding-modulus* 4] 2) #@87 A character to be used for padding headers and entry contents in a newc cpio archive. (defconst *cpio-newc-padding-char* 0 (#$ . 7138)) (byte-code "\301\211\207" [*cpio-newc-padding-char* 0] 2) #@118 A single character string of the character to be used for padding headers and entry contents in a newc cpio archive. (defconst *cpio-newc-padding-str* "" (#$ . 7340)) (byte-code "\306\307 G\310 !\210  T\311\n _\\!\210\n S_\\ T\312\n _\\!\210\n S_\\ T\313\n _\\!\210\n S_\\ T\314\n _\\!\210\n S_\\ T\315\n _\\!\210\n S_\\ T\316\n _\\!\210\n S_\\ T\317\n _\\!\210\n S_\\ T\320\n _\\!\210\n S_\\ T\321\n _\\!\210\n S_\\ T\322\n _\\!\210\n S_\\ T\323\n _\\!\210\n S_\\! T\324\n _\\!\210\n S_\\\" T\325\n _\\!\210\n S_\\# T\326\n _\\!\210\n S_\\$*\307\207" [*cpio-newc-padding-str* *cpio-newc-magic-re* l i *cpio-newc-magic-field-offset* *cpio-newc-field-width* "" 0 (lambda (#1=#:def-tmp-var) (defconst *cpio-newc-magic-field-offset* #1#)) (lambda (#1#) (defconst *cpio-newc-ino-field-offset* #1#)) (lambda (#1#) (defconst *cpio-newc-mode-field-offset* #1#)) (lambda (#1#) (defconst *cpio-newc-uid-field-offset* #1#)) (lambda (#1#) (defconst *cpio-newc-gid-field-offset* #1#)) (lambda (#1#) (defconst *cpio-newc-nlink-field-offset* #1#)) (lambda (#1#) (defconst *cpio-newc-mtime-field-offset* #1#)) (lambda (#1#) (defconst *cpio-newc-filesize-field-offset* #1#)) (lambda (#1#) (defconst *cpio-newc-dev-maj-field-offset* #1#)) (lambda (#1#) (defconst *cpio-newc-dev-min-field-offset* #1#)) (lambda (#1#) (defconst *cpio-newc-rdev-maj-field-offset* #1#)) (lambda (#1#) (defconst *cpio-newc-rdev-min-field-offset* #1#)) (lambda (#1#) (defconst *cpio-newc-namesize-field-offset* #1#)) (lambda (#1#) (defconst *cpio-newc-chksum-field-offset* #1#)) (lambda (#1#) (defconst *cpio-newc-name-field-offset* #1#)) *cpio-newc-ino-field-offset* *cpio-newc-mode-field-offset* *cpio-newc-uid-field-offset* *cpio-newc-gid-field-offset* *cpio-newc-nlink-field-offset* *cpio-newc-mtime-field-offset* *cpio-newc-filesize-field-offset* *cpio-newc-dev-maj-field-offset* *cpio-newc-dev-min-field-offset* *cpio-newc-rdev-maj-field-offset* *cpio-newc-rdev-min-field-offset* *cpio-newc-namesize-field-offset* *cpio-newc-chksum-field-offset* *cpio-newc-name-field-offset*] 4) #@40 The TRAILER string for a newc archive. (defconst *cpio-newc-trailer* "07070100000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000B00000000TRAILER!!!" (#$ . 9464)) #@82 The default block size for this cpio archive. Taken from cpio-2.12/src/global.c. (custom-declare-variable '*cpio-newc-blocksize* 512 '(#$ . 9679) :type 'integer :group 'cpio) #@369 Return the header string at or following point WHERE. If WHERE is not given, then use point. CAVEATS: 1. This searches for the magic number at the begining of the header; if WHERE is inside the magic number, then the search will fail. This works best if you are (looking-at) a header. 2. This returns the pure header; it does not provide the filename itself. (defalias 'cpio-newc-header-at-point #[(&optional where) "\204`\306\307\310 \311\216\312\f!\203\313\314!\2026 Gu\210\315 e\316#\203/\312\f!\211\203 \2056\313\314!,\207" [where found fname save-match-data-internal *cpio-newc-header-re* *cpio-newc-magic-re* "cpio-newc-header-at-point" nil match-data #[nil "\301\302\"\207" [save-match-data-internal set-match-data evaporate] 3] looking-at match-string-no-properties 0 re-search-backward t] 4 (#$ . 9861)]) #@262 Return the internal entry header structure encoded in HEADER-STRING. The optional argument WHERE should be a buffer location at the beginning of a known cpio newc header. If WHERE is not given, then take point and hope. This function does NOT get the contents. (defalias 'cpio-newc-parse-header #[(header-string) "\306\307\211\211\310 \311\216\312 \"\210\313\314!\315!\316!\317!\320!\321!\322!\211\323!\324!\325!\326!\327!\211\330!\331\n\"&*\332!\205\\,\207" [result filesize namesize fname save-match-data-internal *cpio-newc-header-re* "cpio-newc-parse-header" nil match-data #[nil "\301\302\"\207" [save-match-data-internal set-match-data evaporate] 3] string-match vector cpio-newc-parse-ino cpio-newc-parse-mode cpio-newc-parse-uid cpio-newc-parse-gid cpio-newc-parse-nlink cpio-newc-parse-mtime cpio-newc-parse-filesize cpio-newc-parse-dev-maj cpio-newc-parse-dev-min cpio-newc-parse-rdev-maj cpio-newc-parse-rdev-min cpio-newc-parse-namesize cpio-newc-parse-chksum cpio-newc-parse-name cpio-entry-name header-string] 17 (#$ . 10707)]) #@72 Determine the length of the header implied by the given HEADER-STRING. (defalias 'cpio-newc-header-size #[(header-string namesize) "\306S\307\310\fT\n\\\211 \"\311U\203 T\312 \"+\207" [namesize total local-namesize fname *cpio-newc-name-field-offset* *cpio-newc-padding-modulus* "cpio-newc-header-size" -1 mod 0 cg-round-up] 3 (#$ . 11798)]) #@41 Get the magic field from HEADER-STRING. (defalias 'cpio-newc-parse-magic #[(header-string) "\306 \211 G\\ \n\fO+\207" [fname *cpio-newc-magic-field-offset* this-offset *cpio-newc-magic-re* end-offset header-string "cpio-newc-parse-magic"] 4 (#$ . 12155)]) #@39 Get the ino field from HEADER-STRING. (defalias 'cpio-newc-parse-ino #[(header-string) "\306 \211 \\\307 \n\fO\310\"+\207" [fname *cpio-newc-ino-field-offset* this-offset *cpio-newc-field-width* end-offset header-string "cpio-newc-parse-ino" string-to-number 16] 5 (#$ . 12420)]) #@40 Get the mode field from HEADER-STRING. (defalias 'cpio-newc-parse-mode #[(header-string) "\306 \211 \\\307 \n\fO\310\"+\207" [fname *cpio-newc-mode-field-offset* this-offset *cpio-newc-field-width* end-offset header-string "cpio-newc-parse-mode" string-to-number 16] 5 (#$ . 12709)]) #@39 Get the uid field from HEADER-STRING. (defalias 'cpio-newc-parse-uid #[(header-string) "\306 \211 \\\307 \n\fO\310\"+\207" [fname *cpio-newc-uid-field-offset* this-offset *cpio-newc-field-width* end-offset header-string "cpio-newc-parse-uid" string-to-number 16] 5 (#$ . 13002)]) #@39 Get the gid field from HEADER-STRING. (defalias 'cpio-newc-parse-gid #[(header-string) "\306 \211 \\\307 \n\fO\310\"+\207" [fname *cpio-newc-gid-field-offset* this-offset *cpio-newc-field-width* end-offset header-string "cpio-newc-parse-gid" string-to-number 16] 5 (#$ . 13291)]) #@41 Get the nlink field from HEADER-STRING. (defalias 'cpio-newc-parse-nlink #[(header-string) "\306 \211 \\\307 \n\fO\310\"+\207" [fname *cpio-newc-nlink-field-offset* this-offset *cpio-newc-field-width* end-offset header-string "cpio-newc-parse-nlink" string-to-number 16] 5 (#$ . 13580)]) #@41 Get the mtime field from HEADER-STRING. (defalias 'cpio-newc-parse-mtime #[(header-string) "\306 \211 \\\307\310\n\fO\311\"\312\313\314 \"\315\"\316D\211,\207" [fname *cpio-newc-mtime-field-offset* this-offset *cpio-newc-field-width* end-offset time-value "cpio-newc-parse-mtime" nil string-to-number 16 lsh logand 4294901760 -16 65535 header-string] 5 (#$ . 13877)]) #@42 Get the filesize from the HEADER-STRING. (defalias 'cpio-newc-parse-filesize #[(header-string) "\306 \211 \\\307 \n\fO\310\"+\207" [fname *cpio-newc-filesize-field-offset* this-offset *cpio-newc-field-width* end-offset header-string "cpio-newc-parse-filesize" string-to-number 16] 5 (#$ . 14259)]) #@43 Get the dev-maj field from HEADER-STRING. (defalias 'cpio-newc-parse-dev-maj #[(header-string) "\306 \211 \\\307 \n\fO\310\"+\207" [fname *cpio-newc-dev-maj-field-offset* this-offset *cpio-newc-field-width* end-offset header-string "cpio-newc-parse-dev-maj" string-to-number 16] 5 (#$ . 14566)]) #@43 Get the dev-min field from HEADER-STRING. (defalias 'cpio-newc-parse-dev-min #[(header-string) "\306 \211 \\\307 \n\fO\310\"+\207" [fname *cpio-newc-dev-min-field-offset* this-offset *cpio-newc-field-width* end-offset header-string "cpio-newc-parse-dev-min" string-to-number 16] 5 (#$ . 14871)]) #@44 Get the rdev-maj field from HEADER-STRING. (defalias 'cpio-newc-parse-rdev-maj #[(header-string) "\306 \211 \\\307 \n\fO\310\"+\207" [fname *cpio-newc-rdev-maj-field-offset* this-offset *cpio-newc-field-width* end-offset header-string "cpio-newc-parse-rdev-maj" string-to-number 16] 5 (#$ . 15176)]) #@44 Get the rdev-min field from HEADER-STRING. (defalias 'cpio-newc-parse-rdev-min #[(header-string) "\306 \211 \\\307 \n\fO\310\"+\207" [fname *cpio-newc-rdev-min-field-offset* this-offset *cpio-newc-field-width* end-offset header-string "cpio-newc-parse-rdev-min" string-to-number 16] 5 (#$ . 15485)]) #@44 Get the namesize field from HEADER-STRING. (defalias 'cpio-newc-parse-namesize #[(header-string) "\306 \211 \\\307 \n\fO\310\"+\207" [fname *cpio-newc-namesize-field-offset* this-offset *cpio-newc-field-width* end-offset header-string "cpio-newc-parse-namesize" string-to-number 16] 5 (#$ . 15794)]) #@42 Get the chksum field from HEADER-STRING. (defalias 'cpio-newc-parse-chksum #[(header-string) "\306 \211 \\\307 \n\fO\310\"+\207" [fname *cpio-newc-chksum-field-offset* this-offset *cpio-newc-field-width* end-offset header-string "cpio-newc-parse-chksum" string-to-number 16] 5 (#$ . 16103)]) #@118 Get the name field from HEADER-STRING. N.B. When called with the correct namesize, this includes the terminating 0. (defalias 'cpio-newc-parse-name #[(header-string namesize) "\306  \n\211\f\\SO\211\307\230?\205 +\207" [fname *cpio-newc-name-field-offset* this-offset header-string namesize tmp-string "cpio-newc-parse-name" "TRAILER!!!"] 5 (#$ . 16405)]) #@230 Return the contents implied by point and HEADER-STRING. CAVEATS: See `cpio-newc-parse-magic'. This requires the point to be at the start of HEADER-STRING in the buffer. After all that's where the contents are, not in the header. (defalias 'cpio-newc-parse-contents #[(header-string where namesize filesize) "\304\305 \n\\ \n\\ \\\")\207" [fname where namesize filesize "cpio-newc-parse-contents" buffer-substring-no-properties] 4 (#$ . 16774)]) #@109 Make a NEWC style padded cpio header for the given ATTRibuteS. This function does NOT include the contents. (defalias 'cpio-newc-make-header-string #[(attrs &optional contents) "\306\307!\310\311!\312!\313!\314!\315!\316!\317!\320!\321!\322!\323!\324!\325\326\nGT\"\327!\n\330\260\331 \332 G\f\"\330# \310\333\334#)\266\203\203Y \202^\335\336 #+\207" [attrs header-string name fname *cpio-newc-padding-modulus* *cpio-newc-header-re* "cpio-newc-make-header-string" cpio-entry-name nil cpio-newc-make-magic cpio-newc-make-ino cpio-newc-make-mode cpio-newc-make-uid cpio-newc-make-gid cpio-newc-make-nlink cpio-newc-make-mtime cpio-newc-make-filesize cpio-newc-make-dev-maj cpio-newc-make-dev-min cpio-newc-make-rdev-maj cpio-newc-make-rdev-min format "%08X" cpio-newc-make-chksum "" cg-pad-right cg-round-up t string-match error "%s(): I built a bad header: [[%s]]" inhibit-changing-match-data] 16 (#$ . 17227)]) #@37 Return the NEWC magic header string (defalias 'cpio-newc-make-magic #[(attrs) "\302 )\207" [fname *cpio-newc-magic* "cpio-newc-make-magic"] 1 (#$ . 18174)]) #@69 Return a string value for the inode from the file attributes ATTRS. (defalias 'cpio-newc-make-ino #[(attrs) "\303\304!\305\306 \"*\207" [attrs ino fname "cpio-newc-make-ino" cpio-ino format "%08X"] 3 (#$ . 18338)]) #@68 Return a string value for the mode from the file attributes ATTRS. (defalias 'cpio-newc-make-mode #[(attrs) "\302\303\304\305 !\")\207" [fname attrs "cpio-newc-make-mode" format "%08X" cpio-mode-value] 4 (#$ . 18562)]) #@76 Return an integer string value for the UID from the file attributes ATTRS. (defalias 'cpio-newc-make-uid #[(attrs) "\303\304!\305\306 \"*\207" [attrs uid fname "cpio-newc-make-uid" cpio-uid format "%08X"] 3 (#$ . 18788)]) #@76 Return an integer string value for the GID from the file attributes ATTRS. (defalias 'cpio-newc-make-gid #[(attrs) "\303\304!\305\306 \"*\207" [attrs gid fname "cpio-newc-make-gid" cpio-gid format "%08X"] 3 (#$ . 19019)]) #@88 Return an integer string value for the number of links from the file attributes ATTRS. (defalias 'cpio-newc-make-nlink #[(attrs) "\302\303\304\305 !\")\207" [fname attrs "cpio-newc-make-nlink" format "%08X" cpio-nlink] 4 (#$ . 19250)]) #@72 Return a string value for the mod time from the file attributes ATTRS. (defalias 'cpio-newc-make-mtime #[(attrs) "\303\304!\305\306\307 !\"*\207" [attrs mod-time fname "cpio-newc-make-mtime" cpio-mtime format "%08X" float-time] 4 (#$ . 19493)]) #@80 Return an 8 digit hex string for the filesize attribute among the given ATTRs. (defalias 'cpio-newc-make-filesize #[(attrs) "\302\303\304\305 !\")\207" [fname attrs "cpio-newc-make-filesize" format "%08X" cpio-entry-size] 4 (#$ . 19747)]) #@76 Return a string value for the major device from the file attributes ATTRS. (defalias 'cpio-newc-make-dev-maj #[(attrs) "\303\304!\305\306 \"*\207" [attrs dev fname "cpio-newc-make-dev-maj" cpio-dev-maj format "%08X"] 3 (#$ . 19993)]) #@76 Return a string value for the minor device from the file attributes ATTRS. (defalias 'cpio-newc-make-dev-min #[(attrs) "\303\304!\305\306 \"*\207" [attrs dev fname "cpio-newc-make-dev-min" cpio-dev-min format "%08X"] 3 (#$ . 20236)]) #@74 Return a string value for the major rdev from the file attributes ATTRS. (defalias 'cpio-newc-make-rdev-maj #[(attrs) "\301\302\210)\303\207" [rdev "cpio-newc-make-rdev-maj" nil "00000000"] 2 (#$ . 20479)]) #@74 Return a string value for the minor rdev from the file attributes ATTRS. (defalias 'cpio-newc-make-rdev-min #[(attrs) "\300\207" ["00000000"] 1 (#$ . 20693)]) #@79 Return a string value for the newc cpio entry from the file attributes ATTRS. (defalias 'cpio-newc-make-chksum #[(attrs) "\300\207" ["00000000"] 1 (#$ . 20858)]) #@101 Parse the newc cpio header that begins at point. If there is no header there, then signal an error. (defalias 'cpio-newc-parse-header-at-point #[nil "\303 \304\305!)\262\204\306\307\"\210\310\311\312!!)\207" [fname *cpio-newc-header-re* inhibit-changing-match-data "cpio-newc-parse-header-at-point" t looking-at error "%s(): point is not looking at a newc header." cpio-newc-parse-header match-string-no-properties 0] 3 (#$ . 21027)]) #@379 Move the point to the beginning of the next newc cpio header. If point is looking-at such a header, then that is the next one and there is no movement. (Thus, a caller may have to make sure that point has moved.) This returns the a marker for point where the header is found, if one is found. It returns NIL otherwise. This sets match-data for the entire header and each field. (defalias 'cpio-newc-goto-next-header #[nil "\304\305\211\306 d\307#\203\310\224b\311\310!\312 B\202\305+\207" [header-string header-start fname *cpio-newc-header-re* "cpio-newc-goto-next-header" nil re-search-forward t 0 match-string-no-properties point-marker] 4 (#$ . 21476)]) #@210 Build an internal structure reflecting the contents of the newc cpio archive in the current buffer. See the variable *cpio-catalog* for more information. CAVEAT: This respects neither narrowing nor the point. (defalias 'cpio-newc-build-catalog #[nil "\306\307\211\211\211\310\307\211\211\211\211~\210eb\210\311 \211\203}@\211\203}A\211\203} \203}\312 \211\203 \313 !Gu\210`\314S\"Tb\210\315 \316 \"\210\317 !\320  \321$BB \f\\S\211b\210\202 \237. \207" [catalog those-contents contents-end contents-start filesize parsed-header "cpio-newc-build-catalog" nil t cpio-newc-goto-next-header cpio-newc-parse-header-at-point cpio-entry-size cg-round-up point-marker set-marker-insertion-type cpio-entry-name vector cpio-mode-entry-unmodified header-info that-header-string header-end header-start fname *cpio-padding-modulus* *cg-insert-after*] 12 (#$ . 22151)]) #@102 Return the character position of the (ostensible) start of the trailer for the current cpio archive. (defalias 'cpio-newc-start-of-trailer #[nil "\303\304\305\306\n\"\210*\207" [end-of-contents fname *cpio-catalog* "cpio-newc-start-of-trailer" 0 mapc #[(ce) "\303!\304 !\305!\\\211)\207" [ce attrs end-of-contents cpio-entry-attrs-from-catalog-entry cpio-entry-size cpio-contents-start] 3]] 3 (#$ . 23066)]) #@98 Calculate the location of the end of the current archive once the TRAILER is written and padded. (defalias 'cpio-newc-end-of-archive #[nil "\304\305 \306\nG\\ \"*\207" [end-of-contents fname *cpio-newc-trailer* *cpio-newc-blocksize* "cpio-newc-end-of-archive" cpio-newc-start-of-trailer cg-round-up] 3 (#$ . 23487)]) #@64 Replace thed current trailer in the current cpio newc archive. (defalias 'cpio-newc-adjust-trailer #[nil "\301\302 \210\303 )\207" [fname "cpio-newc-adjust-trailer" cpio-newc-delete-trailer cpio-newc-insert-trailer] 1 (#$ . 23813)]) #@44 Insert a newc trailer into a cpio archive. (defalias 'cpio-newc-insert-trailer #[nil "\306 G\307\f\307 c\210db\210\310`S \"\211`ZT\311 \312\"c\210 \211,\207" [fname *cpio-newc-trailer* base-len len buffer-read-only bro-before "cpio-newc-insert-trailer" nil cg-round-up make-string 0 *cpio-newc-blocksize*] 4 (#$ . 24053)]) #@54 Delete the trailer in the current cpio newc archive. (defalias 'cpio-newc-delete-trailer #[nil "\305 \306=\204 \307\310\"\210eb\210\311\312\n\"\210 \313`d|\210\f\211*\207" [fname major-mode *cpio-catalog* buffer-read-only bro-before "cpio-newc-delete-trailer" cpio-mode error "%s(): Called outside of a cpio archive buffer." mapc #[(e) "@\304 !\305 !\306\n!\\\211b\210\307\310w+\207" [e ename attrs entry-end cpio-entry-attrs cpio-contents-start cpio-entry-size "" nil] 4] nil] 3 (#$ . 24391)]) #@35 Return the checksum for FILENAME. (defalias 'cpio-newc-make-chksum-for-file #[(filename) "\300\207" [0] 1 (#$ . 24903)]) #@111 Parse the HEADER-STRING and present its fields nicely. That is show their names and octal and decimal values. (defalias 'cpio-newc-present-header #[(header-string) "\304\305!\306\307\310\311\312\313\314\315\316\317\320\321\322\323\324\257\325\326\327\330 \n#\"+\207" [header-string header-fields header-contents fname "cpio-newc-present-header" cpio-newc-parse-header "magic" "ino" "mode" "uid" "gid" "nlink" "mtime" "filesize" "dev-maj" "dev-min" "rdev-maj" "rdev-min" "namesize" "chksum" "name" apply concat cl-mapcar #[(name value) "\302\303\304 \305\306#\307 \310\"\307 \310\"%\207" [name value format "%s %s %o %d\n" cg-pad-right 8 " " string-to-number 16] 8]] 17 (#$ . 25031)]) #@67 The number of seconds to wait at certain points in M-x locations. (defconst *locations-delay* 0.05 (#$ . 25729)) #@201 Put locations and location related data into the buffer *Locations*. This is not done properly; it is somewhat brute force. However, it is intended to help figure out what the proper way to do it is. (defalias 'locations #[nil "\306\307\310!\311\312\311\211\211\211\211\312\311\211\211\313\312\211#$%&'()*+*\2037\314*!\204;\315\316!\210r*q\210\317 \210)eb\210\320,d\321#\203\312\224b\210\322-!\210`(\323 .\324\216\325/!\210\312\225b\210*\326u\210\322-!\210\327\330``\331\\\"!#\332u\210\322-!\210\327\330``\331\\\"!)\333u\210\322-!\210`'\322-!\210\330``)\\S\"\322-!\210`&)u\210`%\334\311w$`\320\335d\321#\210\312\224b\210\322-!\210`\322-!\210\334\311wr*q\210\336 !\210\337\340\n)('&%$# \f &\fc\210) T\202Gr*q\210db\210\341c\210eb\210)\342*!.\207" [interval ct name cpad eoc soc "locations" get-buffer-create "*Locations*" nil 0 "" buffer-live-p error "Could not get buffer *Locations*." erase-buffer re-search-forward t sit-for match-data #[nil "\301\302\"\207" [save-match-data-internal set-match-data evaporate] 3] looking-at 48 string-to-number buffer-substring-no-properties 8 40 16 "" "\\|070701" insert-table-header-maybe format "%5s %5d %5d %5d %5d %5d %5d %5d %5d %5d %5d \n" "Notes: 1. Name length includes the terminating NULL.\n 2. SOH is calculated via a search for the magic number.\n 3. EOH and SON are equal; each calculation is via the point.\n 4. hpad and cpad are each calculated by motion.\n" pop-to-buffer filesize hpad eon eoh sofn soh namesize lbuf fname *cpio-newc-header-re* *locations-delay* save-match-data-internal *cpio-newc-magic*] 16 (#$ . 25849) nil]) #@41 Insert a table header for a cpio entry. (defalias 'insert-table-header-maybe #[(ct) "\302\303\304 #\210\305\306!\210\307 \310\"\311U\203U\312c\210\313c\210\314c\210\315\316\317\"\315\316\317\"\315\316\317\"\315\316\317\"\315\316\317\"\315\316\317\"\315\316\317\"\315\316\317\"\315\316\317\"\315\316\317\"\315\316\317\"\315\316\317\"\312\260 c\202V\320)\207" [fname ct "insert-table-header-maybe" message "%s(): ct is [[%s]]" sit-for 0.2 mod 40 0 "\n" " Name Name SOH SOFN EOH EON hpad File SOC EOC cpad\n" " length size \n" make-string 8 61 t] 14 (#$ . 27538)]) (provide 'cpio-newc)