;ELC ;;; Compiled ;;; in Emacs version 28.0.50 ;;; with all optimizations. (byte-code "\300\301!\210\300\302!\210\300\303!\210\300\304!\210\300\305!\210\300\306!\210\300\307!\210\300\310!\210\300\311!\210\300\312!\210\300\313!\207" [require dired cpio-generic cpio-modes cpio-affiliated-buffers cpio-bin cpio-newc cpio-crc cpio-hpbin cpio-hpodc cpio-odc cpio-dired] 2) #@95 The format of the cpio archive in the current-buffer. Takes the values 'bin, 'newc, 'odc etc. (defvar *cpio-format* nil (#$ . 381)) (byte-code "\301\302\300!\207" [*cpio-format* nil make-variable-buffer-local] 2) #@39 RE to match tar format cpio archives. (defvar *cpio-tar-header-re* "not yet set" (#$ . 601)) (byte-code "\301\302\207" [*cpio-tar-header-re* "not yet set" nil] 1) #@41 RE to match ustar format cpio archives. (defvar *cpio-ustar-header-re* "not yet set" (#$ . 771)) (byte-code "\301\302\207" [*cpio-ustar-header-re* "not yet set" nil] 1) #@41 RE to match hpbin format cpio archives. (defvar *cpio-hpbin-header-re* "not yet set" (#$ . 947)) (byte-code "\301\302\207" [*cpio-hpbin-header-re* "not yet set" nil] 1) #@41 RE to match hpodc format cpio archives. (defvar *cpio-hpodc-header-re* "not yet set" (#$ . 1123)) (byte-code "\301\302\207" [*cpio-hpodc-header-re* "not yet set" nil] 1) #@210 Association list matching REs defining cpio entry header types with their corresponding archive types. The archive types are symbols: 'bin, 'newc, 'odc, etc. See `cpio-discern-archive-type' for the full list. (defvar *cpio-re-type-alist* (byte-code "\306B \307B\n\310B \311B\f\312B \313B\314B\315B\257\207" [*cpio-bin-header-re* *cpio-crc-header-re* *cpio-hpbin-header-re* *cpio-hpodc-header-re* *cpio-newc-header-re* *cpio-odc-header-re* bin crc hpbin hpodc newc odc tar ustar *cpio-tar-header-re* *cpio-ustar-header-re*] 9) (#$ . 1301)) (byte-code "\306B \307B\n\310B \311B\f\312B \313B\314B\315B\257\306\207" [*cpio-bin-header-re* *cpio-crc-header-re* *cpio-hpbin-header-re* *cpio-hpodc-header-re* *cpio-newc-header-re* *cpio-odc-header-re* bin crc hpbin hpodc newc odc tar ustar *cpio-tar-header-re* *cpio-ustar-header-re* *cpio-re-type-alist*] 9) #@69 The function for building the catalog of a specific archive format. (defvar cpio-build-catalog-func nil (#$ . 2173)) (byte-code "\301\211\207" [cpio-build-catalog-func nil] 2) #@2  (defvar cpio-parse-header-func nil (#$ . 2355)) (byte-code "\301\211\207" [cpio-parse-header-func nil] 2) #@2  (defvar cpio-header-at-point-func nil (#$ . 2468)) (byte-code "\301\211\207" [cpio-header-at-point-func nil] 2) #@2  (defvar OBS-cpio-get-magic-func nil (#$ . 2587)) (byte-code "\301\211\207" [OBS-cpio-get-magic-func nil] 2) #@2  (defvar OBS-cpio-get-ino-func nil (#$ . 2702)) (byte-code "\301\211\207" [OBS-cpio-get-ino-func nil] 2) #@2  (defvar OBS-cpio-get-mode-func nil (#$ . 2813)) (byte-code "\301\211\207" [OBS-cpio-get-mode-func nil] 2) #@2  (defvar OBS-cpio-get-uid-func nil (#$ . 2926)) (byte-code "\301\211\207" [OBS-cpio-get-uid-func nil] 2) #@2  (defvar OBS-cpio-get-gid-func nil (#$ . 3037)) (byte-code "\301\211\207" [OBS-cpio-get-gid-func nil] 2) #@2  (defvar OBS-cpio-get-nlink-func nil (#$ . 3148)) (byte-code "\301\211\207" [OBS-cpio-get-nlink-func nil] 2) #@2  (defvar OBS-cpio-get-mtime-min-func nil (#$ . 3263)) (byte-code "\301\211\207" [OBS-cpio-get-mtime-min-func nil] 2) #@2  (defvar OBS-cpio-get-filesize-func nil (#$ . 3386)) (byte-code "\301\211\207" [OBS-cpio-get-filesize-func nil] 2) #@2  (defvar OBS-cpio-get-dev-maj-func nil (#$ . 3507)) (byte-code "\301\211\207" [OBS-cpio-get-dev-maj-func nil] 2) #@2  (defvar OBS-cpio-get-dev-min-func nil (#$ . 3626)) (byte-code "\301\211\207" [OBS-cpio-get-dev-min-func nil] 2) #@2  (defvar OBS-cpio-get-rdev-maj-func nil (#$ . 3745)) (byte-code "\301\211\207" [OBS-cpio-get-rdev-maj-func nil] 2) #@2  (defvar OBS-cpio-get-rdev-min-func nil (#$ . 3866)) (byte-code "\301\211\207" [OBS-cpio-get-rdev-min-func nil] 2) #@2  (defvar OBS-cpio-get-namesize-func nil (#$ . 3987)) (byte-code "\301\211\207" [OBS-cpio-get-namesize-func nil] 2) #@2  (defvar OBS-cpio-get-chksum-func nil (#$ . 4108)) (byte-code "\301\211\207" [OBS-cpio-get-chksum-func nil] 2) #@2  (defvar OBS-cpio-get-name-func nil (#$ . 4225)) (byte-code "\301\211\207" [OBS-cpio-get-name-func nil] 2) #@2  (defvar OBS-cpio-get-contents-func nil (#$ . 4338)) (byte-code "\301\211\207" [OBS-cpio-get-contents-func nil] 2) #@2  (defvar cpio-make-header-string-func nil (#$ . 4459)) (byte-code "\301\211\207" [cpio-make-header-string-func nil] 2) #@2  (defvar cpio-adjust-trailer-func nil (#$ . 4584)) #@2  (defvar cpio-insert-trailer-func nil (#$ . 4640)) #@2  (defvar cpio-delete-trailer-func nil (#$ . 4696)) #@2  (defvar cpio-make-chksum-for-file-func nil (#$ . 4752)) #@288 A list of variables peculiar to the different headers and their fields. The design here is that package-wide variables have the prefix `cpio-' and the corresponding functions for a specific format FMT have the form `cpio-FMT-'. All of this can then be calculated via (symbol-name), etc. (defvar *cpio-local-funcs* nil (#$ . 4816)) (byte-code "\301\302\303\304\305\306\307\310\311\257 \301\207" [*cpio-local-funcs* cpio-build-catalog-func cpio-make-chksum-for-file-func cpio-end-of-archive-func cpio-start-of-trailer-func cpio-make-chksum-func cpio-make-header-string-func cpio-adjust-trailer-func cpio-insert-trailer-func cpio-delete-trailer-func] 9) #@729 The variable that holds the catalog of entries in cpio-mode. Each entry has the following form: name [parsed-header header-start content-start modified-flag]. • name is the name of the entry • parsed-header has the description below. • header-start and content-start are markers, so they should be automatically updated with modifications to the buffer. • Don't use (aref) to get at these; use an accessor function. The last entry should is always be the TRAILER entry. A parsed header is a vector of the following form: [inode mode uid gid nlink mtime filesize dev-maj dev-min rdev-maj rdev-min name-size chksum name]. (defvar *cpio-catalog* nil (#$ . 5475)) (byte-code "\306\300!\210\307\310\311 !\210  T\312 !\210  T\313 !\210  T\314 !\210  T\315 !\210 )\307\207" [*cpio-catalog* i *cpio-catalog-entry-attrs-idx* *cpio-catalog-entry-header-start-idx* *cpio-catalog-entry-contents-start-idx* *cpio-catalog-entry-modified-flag-idx* make-variable-buffer-local nil 0 (lambda (#1=#:def-tmp-var) (defvar *cpio-catalog-entry-attrs-idx* #1#)) (lambda (#1#) (defvar *cpio-catalog-entry-header-start-idx* #1#)) (lambda (#1#) (defvar *cpio-catalog-entry-contents-start-idx* #1#)) (lambda (#1#) (defvar *cpio-catalog-entry-modified-flag-idx* #1#)) (lambda (#1#) (defvar *cpio-catalog-entry-length* #1#)) *cpio-catalog-entry-length*] 2) #@47 The name of the cpio archive being processed. (defvar *cpio-archive-name* nil (#$ . 6928)) (byte-code "\306\307\310!\210\311\312 !\210  T\313 !\210  T\314 !\210  T\315 !\210  T\316 !\210  T\317 !\210  T\320 !\210  T\321 !\210  T\322 !\210  T\323 !\210  T\324 !\210  T\325 !\210  T\326 !\210 ! T\327 !\210 \" T\330 !\210 #)\306\207" [*cpio-archive-name* i *cpio-ino-parsed-idx* *cpio-mode-parsed-idx* *cpio-uid-parsed-idx* *cpio-gid-parsed-idx* nil make-variable-buffer-local *cpio-archive-names* 0 (lambda (#1=#:def-tmp-var) (defvar *cpio-ino-parsed-idx* #1#)) (lambda (#1#) (defvar *cpio-mode-parsed-idx* #1#)) (lambda (#1#) (defvar *cpio-uid-parsed-idx* #1#)) (lambda (#1#) (defvar *cpio-gid-parsed-idx* #1#)) (lambda (#1#) (defvar *cpio-nlink-parsed-idx* #1#)) (lambda (#1#) (defvar *cpio-mtime-parsed-idx* #1#)) (lambda (#1#) (defvar *cpio-entry-size-parsed-idx* #1#)) (lambda (#1#) (defvar *cpio-dev-maj-parsed-idx* #1#)) (lambda (#1#) (defvar *cpio-dev-min-parsed-idx* #1#)) (lambda (#1#) (defvar *cpio-rdev-maj-parsed-idx* #1#)) (lambda (#1#) (defvar *cpio-rdev-min-parsed-idx* #1#)) (lambda (#1#) (defvar *cpio-namesize-parsed-idx* #1#)) (lambda (#1#) (defvar *cpio-chksum-parsed-idx* #1#)) (lambda (#1#) (defvar *cpio-name-parsed-idx* #1#)) (lambda (#1#) (defvar *cpio-parsed-header-length* #1# "The length of a parsed header (attribute vector).")) *cpio-nlink-parsed-idx* *cpio-mtime-parsed-idx* *cpio-entry-size-parsed-idx* *cpio-dev-maj-parsed-idx* *cpio-dev-min-parsed-idx* *cpio-rdev-maj-parsed-idx* *cpio-rdev-min-parsed-idx* *cpio-namesize-parsed-idx* *cpio-chksum-parsed-idx* *cpio-name-parsed-idx* *cpio-parsed-header-length*] 2) #@53 The modulus to be used for building padded strings. (defvar *cpio-padding-modulus* nil (#$ . 8621)) (byte-code "\301\211\207" [*cpio-padding-modulus* nil] 2) #@55 The character to be used for building padded strings. (defvar *cpio-padding-char* nil (#$ . 8786)) (byte-code "\301\211\207" [*cpio-padding-char* nil] 2) #@84 A single character string of the character to be used for building padded strings. (defvar *cpio-padding-str* nil (#$ . 8947)) (byte-code "\301\211\207" [*cpio-padding-str* nil] 2) #@52 Every character in a cpio archive has word syntax. (defvar *cpio-archive-syntax-table* nil (#$ . 9135)) (byte-code "\301\211\207" [*cpio-archive-syntax-table* nil] 2) #@100 A buffer-local variable to hold the length of the header for a cpio archive of the current format. (defvar *cpio-header-length* nil (#$ . 9310)) (byte-code "\301\302\303\301\304\305\306%\210\307\310\311\312\313\314\305\303&\207" [*cpio-header-length* nil custom-declare-group cpio "Customizations for cpio-mode." :group data custom-declare-variable cpio-default-format "newc" "The default cpio format to use for a new or empty archive." :type string] 8) #@101 find-file hook to detect if a file is likely a cpio archive. If it is, then put it under cpio-mode. (defalias 'cpio-mode-find-file-hook #[nil "\301\302 \205 \303 )\207" [fname "cpio-mode-find-file-hook" cpio-discern-archive-type cpio-mode] 1 (#$ . 9773)]) #@224 Return a symbol reflecting the type of the cpio archive in the current buffer. Values are `bin', `newc', `odc', `crc', `tar', `ustar', `hpbin', `hpodc', or nil if the current buffer does not begin with a cpio entry header. (defalias 'cpio-discern-archive-type #[nil "\306\307\n\204!\310 \311\211\312W\203 \313 \314\n#\210 T\211\202)\315 p\316\216\317\n!\210\212~\210eb\210\3202<\321\322\"0\210,*\207" [this-archive-type fname *cpio-archive-syntax-table* i #1=#:buffer #2=#:table "cpio-discern-archive-type" nil make-syntax-table 0 256 modify-syntax-entry "w" syntax-table #[nil "rq\210\302 !)\207" [#1# #2# set-syntax-table] 2] set-syntax-table found-it mapc #[(archive-spec) "@\303\304!)\262\203A\305\306\303\"\207\303\207" [archive-spec inhibit-changing-match-data this-archive-type t looking-at throw found-it] 3] *cpio-re-type-alist*] 5 (#$ . 10038)]) #@67 Return the internal entry header structure encoded in HEADER-STR. (defalias 'cpio-parse-header #[(header-str) "\303 \n!)\207" [fname cpio-parse-header-func header-str "cpio-parse-header"] 2 (#$ . 10924)]) #@232 Return the header string at or following point WHERE. If WHERE is not given, then use point. CAVEAT: This searches for the magic number at the begining of the header; if WHERE is inside the magic number, then the search will fail. (defalias 'OBS-cpio-header-at-point #[(&optional where) "\204`\303\n!)\207" [where fname cpio-header-at-point-func "cpio-header-at-point"] 2 (#$ . 11137)]) #@62 Return the inode in PARSED-HEADER. CAVEAT: See `cpio-magic'. (defalias 'cpio-ino #[(parsed-header) "\303 \nH)\207" [fname parsed-header *cpio-ino-parsed-idx* "cpio-ino"] 2 (#$ . 11536)]) #@77 Return the mode (as an integer) in PARSED-HEADER. CAVEAT: See `cpio-magic'. (defalias 'cpio-mode-value #[(parsed-header) "\303 \nH)\207" [fname parsed-header *cpio-mode-parsed-idx* "cpio-mode"] 2 (#$ . 11730)]) #@76 Return the UID (as an integer) in PARSED-HEADER. CAVEAT: See `cpio-magic'. (defalias 'cpio-uid #[(parsed-header) "\303 \nH)\207" [fname parsed-header *cpio-uid-parsed-idx* "cpio-uid"] 2 (#$ . 11948)]) #@76 Return the GID (as an integer) in PARSED-HEADER. CAVEAT: See `cpio-magic'. (defalias 'cpio-gid #[(parsed-header) "\303 \nH)\207" [fname parsed-header *cpio-gid-parsed-idx* "cpio-gid"] 2 (#$ . 12156)]) #@72 Return the number of links in PARSED-HEADER. CAVEAT: See `cpio-magic'. (defalias 'cpio-nlink #[(parsed-header) "\303 \nH)\207" [fname parsed-header *cpio-nlink-parsed-idx* "cpio-nlink"] 2 (#$ . 12364)]) #@88 Return the mod time (emacs time structure) in PARSED-HEADER. CAVEAT: See `cpio-magic'. (defalias 'cpio-mtime #[(parsed-header) "\303 \nH)\207" [fname parsed-header *cpio-mtime-parsed-idx* "cpio-mtime"] 2 (#$ . 12574)]) #@77 Return the size of the contents in PARSED-HEADER. CAVEAT: See `cpio-magic'. (defalias 'cpio-entry-size #[(parsed-header) "\303 \nH)\207" [fname parsed-header *cpio-entry-size-parsed-idx* "cpio-entry-size"] 2 (#$ . 12800)]) #@64 Return the dev maj in PARSED-HEADER. CAVEAT: See `cpio-magic'. (defalias 'cpio-dev-maj #[(parsed-header) "\303 \nH)\207" [fname parsed-header *cpio-dev-maj-parsed-idx* "cpio-dev"] 2 (#$ . 13030)]) #@60 Return the dev in PARSED-HEADER. CAVEAT: See `cpio-magic'. (defalias 'cpio-dev-min #[(parsed-header) "\303 \nH)\207" [fname parsed-header *cpio-dev-min-parsed-idx* "cpio-dev-min"] 2 (#$ . 13234)]) #@65 Return the rdev maj in PARSED-HEADER. CAVEAT: See `cpio-magic'. (defalias 'cpio-rdev-maj #[(parsed-header) "\303 \nH)\207" [fname parsed-header *cpio-rdev-maj-parsed-idx* "cpio-rdev-maj"] 2 (#$ . 13438)]) #@61 Return the rdev in PARSED-HEADER. CAVEAT: See `cpio-magic'. (defalias 'cpio-rdev-min #[(parsed-header) "\303 \nH)\207" [fname parsed-header *cpio-rdev-min-parsed-idx* "cpio-rdev-min"] 2 (#$ . 13650)]) #@73 Return the size of the name in PARSED-HEADER. CAVEAT: See `cpio-magic'. (defalias 'cpio-namesize #[(parsed-header) "\303 \nH)\207" [fname parsed-header *cpio-namesize-parsed-idx* "cpio-namesize"] 2 (#$ . 13858)]) #@61 Return the name in PARSED-HEADER. CAVEAT: See `cpio-magic'. (defalias 'cpio-entry-name #[(parsed-header) "\303 \nH)\207" [fname parsed-header *cpio-name-parsed-idx* "cpio-name"] 2 (#$ . 14078)]) #@38 Return the checksum in PARSE-HEADER. (defalias 'cpio-chksum #[(parsed-header) "\303 \nH)\207" [fname *cpio-chksum-parsed-idx* parsed-header "cpio-chksum"] 2 (#$ . 14280)]) #@43 Return the contents start for ENTRY-NAME. (defalias 'cpio-contents-start #[(entry-name) "\304\305! H*\207" [entry-name catalog-entry fname *cpio-catalog-entry-contents-start-idx* "cpio-contents-start" cpio-entry] 3 (#$ . 14459)]) #@47 Retrieve the entry attributes for ENTRY-NAME. (defalias 'cpio-entry-attrs #[(entry-name) "\304 \203r q\210\305\n!)\202\306\n! H)\207" [fname *cab-parent* entry-name *cpio-catalog-entry-attrs-idx* "cpio-entry-attrs" cpio-entry-attrs cpio-entry] 2 (#$ . 14699)]) #@51 Return the start of the entry specified in ENTRY. (defalias 'cpio-entry-header-start #[(entry) "\303 \nH)\207" [fname entry *cpio-catalog-entry-header-start-idx* "cpio-entry-header-start"] 2 (#$ . 14971)]) #@59 Return the end of the unpadded header specified in ENTRY. (defalias 'cpio-entry-header-end #[(entry) "\305 H\306!\f\\\307\n!\\*\207" [entry *cpio-catalog-entry-attrs-idx* attrs fname *cpio-header-length* "cpio-entry-header-end" cpio-entry-header-start cpio-namesize] 3 (#$ . 15184)]) #@67 Return the start of the contents of the entry specified in ENTRY. (defalias 'cpio-entry-contents-start #[(entry) "\303 \nH)\207" [fname entry *cpio-catalog-entry-contents-start-idx* "cpio-entry-contents-start"] 2 (#$ . 15478)]) #@65 Return the end of the contents of the entry specified in ENTRY. (defalias 'cpio-entry-contents-end #[(entry) "\305 \nH\306 !\307 !\310 !\\+\207" [fname entry *cpio-catalog-entry-attrs-idx* attrs entry-name "cpio-entry-contents-end" cpio-entry-name cpio-entry-contents-start cpio-entry-size] 3 (#$ . 15713)]) #@61 Set the header start marker in ENTRY to the location WHERE. (defalias 'cpio-set-header-start #[(entry where) "\305\250\203\306 \307\223\202\310!\203\202\311\312C\" \f I*\207" [where where-marker fname entry *cpio-catalog-entry-header-start-idx* "cpio-set-header-start" make-marker nil markerp signal wrong-type-error] 4 (#$ . 16030)]) #@98 Set the contents start marker in ENTRY to the location WHERE. WHERE can be an integer or marker. (defalias 'cpio-set-contents-start #[(entry where) "\305\250\203\306 \307\223\202\310!\203\202\311\312C\" \f I*\207" [where where-marker fname entry *cpio-catalog-entry-contents-start-idx* "cpio-set-contents-start" make-marker nil markerp signal wrong-type-error] 4 (#$ . 16386)]) #@58 Return a string that is the contents of the named entry. (defalias 'cpio-contents #[(entry-name &optional archive-buffer) "\306 \203r q\210\307\n!)\202a \203 r q\210\307\n!)\202a\f\310=\203]\311\n!\312\n!\313 !\\\314 \204H\315\316\n#\210b\210u\210\317\"\211-\202a\315\320\")\207" [fname archive-buffer entry-name *cab-parent* major-mode entry-attrs "cpio-contents" cpio-contents cpio-mode cpio-entry-attrs cpio-contents-start cpio-entry-size nil error "%s(): Could not get entry attributes for [[%s]]." buffer-substring-no-properties "%s(): Could not find the archive buffer." contents-start contents-size contents-end result] 4 (#$ . 16785)]) #@52 Return the catalog relevant to the current buffer. (defalias 'cpio-catalog #[nil "\304 \305=\204 \306=\204\307\310\"\210\n\203 r\nq\210 )\202! )\207" [fname major-mode *cab-parent* *cpio-catalog* "cpio-catalog" cpio-dired-mode cpio-mode error "%s(): only makes sense in a cpio buffer."] 3 (#$ . 17469)]) #@69 Build a padded cpio header string based on the given PARSED-HEADER. (defalias 'cpio-make-header-string #[(parsed-header &optional contents) "\304 \n \")\207" [fname cpio-make-header-string-func parsed-header contents "cpio-make-header-string"] 3 (#$ . 17787)]) #@54 Set the entry-size element of PARSED-HEADER to SIZE. (defalias 'cpio-set-entry-size #[(parsed-header size) "\304 \n I)\207" [fname parsed-header *cpio-entry-size-parsed-idx* size "cpio-set-entry-size"] 3 (#$ . 18055)]) #@122 Set the entry-name element of the PARSED-HEADER to ENTRY-NAME. To be consistent, this also sets the name's size element. (defalias 'cpio-set-entry-name #[(parsed-header entry-name) "\305 \n I\210 \f GTI)\207" [fname parsed-header *cpio-name-parsed-idx* entry-name *cpio-namesize-parsed-idx* "cpio-set-entry-name"] 3 (#$ . 18282)]) #@114 Set the uid field in the PARSED-HEADER to UID. UID can be either a string (representing a number) or an integer. (defalias 'cpio-set-uid #[(parsed-header uid) "\304 \250\204 \305 !\n I)\207" [fname uid parsed-header *cpio-uid-parsed-idx* "cpio-set-uid" string-to-number] 3 (#$ . 18621)]) #@114 Set the gid field in the PARSED-HEADER to GID. GID can be either a string (representing a number) or an integer. (defalias 'cpio-set-gid #[(parsed-header gid) "\304 \250\204 \305 !\n I)\207" [fname gid parsed-header *cpio-gid-parsed-idx* "cpio-set-gid" string-to-number] 3 (#$ . 18920)]) #@113 Set the mode field in the PARSED-HEADER to MODE. MODE is either an integer or a string representing an integer. (defalias 'cpio-set-mode #[(parsed-header mode) "\305\250\203\n\202;\203\306!\202\307\310C\"\311 !\204(\312\313\n#\210 \f I*\207" [mode integer-mode fname parsed-header *cpio-mode-parsed-idx* "cpio-set-mode" string-to-number signal wrong-type-error cpio-valid-numeric-mode error "%s(): Invalid mode [[%s]]."] 4 (#$ . 19219)]) #@82 Set the modification time in the PARSED-HEADER to MTIME. MTIME is an emacs time. (defalias 'cpio-set-mtime #[(parsed-header mtime) "\304 \n I)\207" [fname parsed-header *cpio-mtime-parsed-idx* mtime "cpio-set-mtime"] 3 (#$ . 19679)]) #@74 Extract all entries from the cpio archive related to the current buffer. (defalias 'cpio-extract-all #[nil "\303 \203r q\210\304 )\202\305\306\n\")\207" [fname *cab-parent* *cpio-catalog* "cpio-extract-all" cpio-extract-all mapc #[(e) "@\302 !)\207" [e entry-name cpio-extract-entry] 2]] 3 (#$ . 19920)]) #@165 Ask a user who is trying to save ENTRY-NAME what to do if a file named ENTRY-NAME already exists or if there is a modified buffer containing that entry's contents. (defalias 'cpio-ask-user-about-supersession-threat #[(entry-name) "\306\307 !\310\n!\311 \312\313 !!\314 !\203,\315 !\203,\316\317\320 \"!\203,\321\202@\322 !\203?\316\317\323 \"!\203?\321\202@\321-\207" [fname entry-name intermediate-buffer-name intermediate-buffer archive-mod-time entry-mod-time "cpio-ask-user-about-supersession-threat" cpio-contents-buffer-name get-buffer cpio-get-archive-mod-time cpio-mtime cpio-entry-attrs buffer-live-p buffer-modified-p yes-or-no-p format "A buffer for entry %s exists and is modified. Save? " t file-exists-p "File %s already exists. Overwrite? "] 4 (#$ . 20239)]) #@86 Return the modification time of the cpio archive affiliated with the current buffer. (defalias 'cpio-get-archive-mod-time #[nil "\303\203 \202\npr q\210\304\305\n\"+\207" [*cab-parent* archive-buffer fname "cpio-get-archive-mod-time" message "%s(): is not implemented."] 3 (#$ . 21031)]) #@751 Extract the archive entry ENTRY-NAME. If that file already exists (and this is called interactively), then prompt the user about overwriting it. If a buffer is already visiting that entry, then leave that buffer in place; otherwise kill the intermediate buffer. The optional argument FORCE indicates if this was called from a lisp program. If it is, then the extraction occurs no matter what. CAVEAT: Extracting the same ENTRY-NAME from different archives will create a conflict. CONTRACT: This can only be invoked in a cpio archive under cpio-mode or a buffer affiliated with such a buffer. NOTE: FORCE is not currently used anywhere in cpio-mode. It is present so that any applications that are built on cpio-mode can have predictable results. (defalias 'cpio-extract-entry #[(entry-name &optional force) "\306\307!\310! \f\230\203\311\312 \"\202z \230\203#\313!\202z \230\2030\314!\202z \230\203>\311\315 \"\202z \230\203L\311\316 \"\202z \230\203Z\311\317 \"\202z \230\203h\311\320 \"\202z \230\203v\311\321 \"\202z\322\323 \"+\207" [entry-name entry-type attrs fname *cpio-modes-link* *cpio-modes-reg* "cpio-extract-entry" cpio-entry-attrs cpio-entry-type warn "%s(): Symlink extraction is not yet implemented." cpio-extract-regular-file cpio-extract-directory "%s(): Character special files cannot be extracted with cpio-mode." "%s(): Block special files cannot be extracted with cpio-mode." "%s(): FIFOs (pipes) cannot be extracted with cpio-mode." "%s(): Sockets cannot be extracted with cpio-mode." "%s(): Unknown entry type -- not extracting." error "%s(): Impossible condition." *cpio-modes-dir* *cpio-modes-char* *cpio-modes-block* *cpio-modes-fifo* *cpio-modes-sock* *cpio-modes-unknown*] 4 (#$ . 21332) "sName: \nP"]) #@104 Extract the regular file entry ENTRY-NAME. CONTRACT: ENTRY-NAME is in fact an entry of a regular file. (defalias 'cpio-extract-regular-file #[(entry-name &optional from-lisp) "\306 \203\n\307\202 \310\n!\311\n!\312\f!\313 !\314\203(\202)p \205~ \203Y\315\n\"\316 \"\210r q\210c\210\317\n!\210)?\205~\320 !\202~\321\322\307\"rq\210\323\216\315\n\"c\210\317\n!\210\204z\320 !\210+\324\n!.\207" [fname from-lisp entry-name do-it buffer-name temp-buffer "cpio-extract-regular-file" t cpio-ask-user-about-supersession-threat cpio-contents-buffer-name get-buffer buffer-live-p nil cpio-contents cab-register write-file kill-buffer generate-new-buffer " *temp*" #[nil "\301!\205 \302!\207" [#1=#:temp-buffer buffer-name kill-buffer] 2] cpio-set-file-attrs restore contents *cab-parent* archive-buffer #1#] 3 (#$ . 23112)]) #@91 Extract the directory entry ENTRY-NAME. CONTRACT: ENTRY-NAME really is a directory entry. (defalias 'cpio-extract-directory #[(entry-name) "\303\304!\305\306\"\210\307!*\207" [entry-name attrs fname "cpio-extract-directory" cpio-entry-attrs make-directory t cpio-set-file-attrs] 3 (#$ . 23979)]) #@332 Return the type of the entry with the given ENTRY-NAME. The type is the single character that would be displayed in the initial mode slot of 'ls -l'. That is, 'l' is a link, '-' is a regular file, etc. See (cpio-int-mode-to-file-type) in cpio-modes.el for more detail. If ENTRY-NAME is not in the current archive, then return NIL. (defalias 'cpio-entry-type #[(entry-name) "\304\305\211 \203 \306 !\211\203 \307 !\211\203 \310!\202!\305+\207" [entry-mode entry-attrs fname entry-name "cpio-entry-type" nil cpio-entry-attrs cpio-mode-value cpio-int-mode-to-file-type] 3 (#$ . 24287)]) #@58 Return the numeric entry type of the given NUMERIC MODE. (defalias 'cpio-numeric-entry-type #[(numeric-mode) "\306\307 \n\"\310U\203 \202u\307 \n\"\311U\203 \202u\307\f\n\"\312U\203)\f\202u\307 \n\"\313U\2046 \202u\307\f\n\"\313U\204E\f\202u \307 \n\"U\204U \202u\307\n\"\313U\204d\202u\307\n\"\313U\204s\202u)\207" [fname s-ifmt numeric-mode s-ifsock s-iflnk s-ifreg "cpio-numeric-entry-type" logand 61440 49152 40960 0 s-ifdir s-ifblk s-ifchr s-ififo s-ifunk] 4 (#$ . 24887)]) #@73 Set the attributes on FILE-NAME based on its attributes in the catalog. (defalias 'cpio-set-file-attrs #[(file-name) "\306\307 !\310\n!\311\n!\312\n!\313\314\n!!\315 \"\210\316 \"\210\317 \"\210\320 \f\".\207" [fname file-name attrs mode-value modtime uid "cpio-set-file-attrs" cpio-entry-attrs cpio-mode-value cpio-mtime cpio-uid cpio-gid-to-gid-string cpio-gid cpio-set-file-owner cpio-set-file-group cpio-set-file-mode cpio-set-file-modtime gid] 3 (#$ . 25406)]) #@203 Change the owner of [the file] FILE-NAME to USER. USER is an either a numeric uid or a user's name. If USER is a string, but that user doesn't exist, then fail and return NIL. Otherwise return non-NIL. (defalias 'cpio-set-file-owner #[(file-name user) "\304\250\203\n\202;\203\305!\202\306\307 !\204#\310\311\n\"\210\312\313\306\211\211 &*\207" [user uid fname file-name "cpio-set-file-owner" cpio-uid-string-to-uid nil file-exists-p error "%s(): requires the name of an existing file." call-process "chown"] 7 (#$ . 25891)]) #@204 Change the group of [the file] FILE-NAME to group USER is an either a numeric gid or a group's name. If USER is a string, but that user doesn't exist, then fail and return NIL. Otherwise return non-NIL. (defalias 'cpio-set-file-group #[(file-name group) "\304\250\203\n\202;\203\305!\202\306\307 !\204#\310\311\n\"\210\312\313\306\211\211 &*\207" [group gid fname file-name "cpio-set-file-group" cpio-gid-string-to-gid nil file-exists-p error "%s(): requires the name of an existing file." call-process "chgrp"] 7 (#$ . 26440)]) #@259 Set the mode of the [the file] FILE-NAME to MODE. MODE may be a complete symbolic mode or an appropriate integer. If FILE-NAME doesn't exist, then fail and return NIL. If MODE is not a valid mode value (either symbolic or numeric), then fail and return NIL. (defalias 'cpio-set-file-mode #[(file-name mode) "\304;\203\f\305!\202\250\203\202\306\307 !\2042\250\203,\310\311\n #\210\2022\310\312\n #\210\313 \"*\207" [mode mode-num fname file-name "cpio-set-file-mode" cpio-mode-string-to-int-mode nil cpio-valid-numeric-mode error "%s(): [[%d]] is not a valid mode." "%s(): [[%s]] is not a valid mode." chmod] 4 (#$ . 26992)]) #@81 Set the modtime of [the file] FILE-NAME to MOD-TIME. MOD-TIME is an emacs time. (defalias 'cpio-set-file-modtime #[(file-name mod-time) "\304\305!\306\307\310\211\211\311 &*\207" [mod-time modtime-string fname file-name "cpio-set-file-modtime" cpio-mtime-to-touch-string call-process "touch" nil "-t"] 8 (#$ . 27642)]) #@139 Convert the given MTIME to a time that touch(1) understands. MTIME is an emacs time. Touch understands times of the form YYYYMMDDhhmm.ss. (defalias 'cpio-mtime-to-touch-string #[(mtime) "\302\303\304 \")\207" [fname mtime "cpio-mtime-to-touch-string" format-time-string "%Y%m%d%M%H.%S"] 3 (#$ . 27973)]) #@92 Replace the trailer in the current buffer with one with the correct size fot its contents. (defalias 'cpio-adjust-trailer #[nil "\303 \203r q\210\n )\202\n )\207" [fname *cab-parent* cpio-adjust-trailer-func "cpio-adjust-trailer"] 1 (#$ . 28284)]) #@37 Insert a trailer in a cpio archive. (defalias 'cpio-insert-trailer #[nil "\303 \203r q\210\n )\202\n )\207" [fname *cab-parent* cpio-insert-trailer-func "cpio-insert-trailer"] 1 (#$ . 28543)]) #@83 Delete the trailer in the cpio archive buffer affiliated with the current buffer. (defalias 'cpio-delete-trailer #[nil "\303 \203r q\210\n )\202\n )\207" [fname *cab-parent* cpio-delete-trailer-func "cpio-delete-trailer"] 1 (#$ . 28747)]) #@84 Delete the entry in the cpio archive specified by ENTRY. ENTRY is a catalog entry. (defalias 'cpio-delete-archive-entry #[(entry) "\306 \203r q\210\307\n!)\202E\n\310H\311 !\312\n!\313\314 !!\315S\311 !\\\"T\316 |\210\211.)\207" [fname *cab-parent* entry attrs size entry-start "cpio-delete-archive-entry" cpio-delete-archive-entry 0 cpio-entry-size cpio-entry-header-start cpio-contents-start cpio-entry-name cg-round-up nil contents-start *cpio-padding-modulus* entry-end buffer-read-only bro-before] 4 (#$ . 28997)]) #@102 Insert an appropriately padded version of HEADER-STRING. CONTRACT: You're at the point of insertion. (defalias 'cpio-insert-padded-header #[(header-string) "\306\307\n\203r\nq\210\310 !)\202$\f\307\311 \n #c\210 \211)*\207" [padding fname *cab-parent* header-string buffer-read-only bro-before "cpio-insert-padded-header" nil cpio-insert-padded-header cpio-pad *cpio-padding-modulus* *cpio-padding-char*] 4 (#$ . 29552)]) #@123 Insert an appropriately padded version of CONTENTS into the archive buffer. CONTRACT: Point is at the point of insertion. (defalias 'cpio-insert-padded-contents #[(contents) "\306 \203r q\210\307\n!)\202! \310\311\n \n#c\210\f\211))\207" [fname *cab-parent* contents buffer-read-only bro-before *cpio-padding-modulus* "cpio-insert-padded-contents" cpio-insert-padded-contents nil cpio-pad *cpio-padding-char*] 4 (#$ . 29991)]) #@77 Return a copy of the catalog sorted by entry name (car cpio-catalog-entry). (defalias 'cpio-sort-catalog #[nil "\302\303 \304\")\207" [fname *cpio-catalog* "cpio-sort-catalog" sort cpio-entry-less-p] 3 (#$ . 30432)]) #@166 Return non-nil if [the car of] entry L precedes [the car of] entry L. CONTRACT: L and R should be entries: (entry-name [inode mode uid ...] entry-start entry-end). (defalias 'cpio-entry-less-p #[(l r) "\303 @\n@\231)\207" [fname l r "cpio-entry-less-p"] 2 (#$ . 30657)]) #@98 Convert the given UID, an integer, to a string, either a user name or a string representing UID. (defalias 'cpio-uid-to-uid-string #[(uid) "\303 \203\304\n!\206\305\n!\202\305\n!)\207" [fname cpio-try-names uid "cpio-uid-to-uid-string" user-login-name number-to-string] 2 (#$ . 30936)]) #@57 Return the system UID, an integer, for the string USER. (defalias 'cpio-uid-string-to-uid #[(user) "\303 ;\204 \304\305 C\"\210\306\307\310\"r\nq\210\311\216\312\313!\210\314\315 \316d\310\260!\205-\317\320\321!!,\207" [fname user #1=#:temp-buffer "cpio-uid-string-to-uid" signal wrong-type-error generate-new-buffer " *temp*" t #[nil "\301!\205 \302!\207" [#1# buffer-name kill-buffer] 2] insert-file-contents "/etc/passwd" re-search-forward "^" ":[^:]*:\\([0-9]+\\):" string-to-number match-string 1] 6 (#$ . 31236)]) #@49 Convert the given GID, an integer, to a string. (defalias 'cpio-gid-to-gid-string #[(gid) "\303 \203\304\n!\206\305\n!\202\305\n!)\207" [fname cpio-try-names gid "cpio-gid-to-gid-string" user-login-name number-to-string] 2 (#$ . 31770)]) #@57 Return the system gid, an integer, for the given GROUP. (defalias 'cpio-gid-string-to-gid #[(group) "\303 ;\204 \304\305 C\"\210\306\307\310\"r\nq\210\311\216\312\313!\210\314\315 \316d\310\260!\205-\317\320\321!!,\207" [fname group #1=#:temp-buffer "cpio-gid-string-to-gid" signal wrong-type-error generate-new-buffer " *temp*" t #[nil "\301!\205 \302!\207" [#1# buffer-name kill-buffer] 2] insert-file-contents "/etc/group" re-search-forward "^" ":[^:]*:\\([0-9]+\\):" string-to-number match-string 1] 6 (#$ . 32021)]) #@51 Convert the given NLINK, an integer, to a string. (defalias 'cpio-nlink-to-nlink-string #[(nlink) "\302\303 !)\207" [fname nlink "cpio-nlink-to-nlink-string" number-to-string] 2 (#$ . 32556)]) #@157 Convert the given MTIME, an emacs internal time, to a string. CAUTION: This depends on your emacs being able to handle a UNIX/GNU/Linux time as an integer. (defalias 'cpio-mtime-to-mtime-string #[(mtime &optional long) "\306\307\310\311 !\310! \203\312\313\"\202+\n Z W\203'\312\314\"\202+\312\315\",\207" [mtime tmp-time now six-months fname long "cpio-mtime-to-mtime-string" 15552000 time-to-seconds current-time format-time-string "%F %T" "%b %d %H:%M" "%b %d %Y "] 5 (#$ . 32757)]) #@54 Convert the given FILESIZE, an integer, to a string. (defalias 'cpio-filesize-to-filesize-string #[(filesize) "\302\303 !)\207" [fname filesize "cpio-filesize-to-filesize-string" number-to-string] 2 (#$ . 33262)]) #@56 Do Convert the given DEV-MAJ, an integer, to a string. (defalias 'cpio-dev-maj-to-dev-maj-string #[(dev-maj) "\302\303 !)\207" [fname dev-maj "cpio-dev-maj-to-dev-maj-string" number-to-string] 2 (#$ . 33483)]) #@56 Do Convert the given DEV-MIN, an integer, to a string. (defalias 'cpio-dev-min-to-dev-min-string #[(dev-min) "\302\303 !)\207" [fname dev-min "cpio-dev-min-to-dev-min-string" number-to-string] 2 (#$ . 33700)]) #@51 DConvert the given NAME, an integer, to a string. (defalias 'cpio-entry-name-to-entry-name-string #[(name) "\302 )\207" [fname name "cpio-entry-name-to-entry-name-string"] 1 (#$ . 33917)]) #@71 Find the given ENTRY-NAME and return the buffer holding its contents. (defalias 'cpio-find-entry #[(entry-name) "\306\307!\310 \f\2042\311r\312!\211q\210\313\f\n\"\210\314\315 \316Q!\317\320!\210)r\fq\210 \203U\321 \322U\203U\310\323!c\210)eb\210\324\310!\210)\f,\207" [entry-name *cab-parent* local-parent just-created target-buffer fname "cpio-find-entry" get-file-buffer nil t get-buffer-create cab-register abbreviate-file-name cpio-archive-name "/" make-local-variable cpio-entry-name buffer-size 0 cpio-contents set-buffer-modified-p buffer-file-name buffer-file-truename buffer-read-only bro-before] 4 (#$ . 34113)]) #@80 Return [the full path to] the cpio archive associated with the current buffer. (defalias 'cpio-archive-name #[nil "\303 \204\n\304=\204\305\306\"\210 \203\307 !\202\307 )\207" [fname *cab-parent* major-mode "cpio-archive-name" cpio-mode error "%s(): You're not in a cpio-archive affiliated buffer." buffer-file-name] 3 (#$ . 34775)]) #@366 Return the name of the buffer that would/does hold the contents of entry NAME. CAVEAT: Yes, there's a possibility of a collision here. However, that would mean that you're editing more than one archive, each containing entries of the same name more than one of whose contents you are currently editing. Run more than one instance of emacs to avoid such collisions. (defalias 'cpio-contents-buffer-name #[(name) "\302 )\207" [fname name "cpio-contents-buffer-name"] 1 (#$ . 35126)]) #@66 Create an entry attribute structure based on the given FILENAME. (defalias 'cpio-create-entry-attrs #[(filename) "\306\307 !\310\n8\311\312\n8!\313\n8\314\n8\315\316\317\n8!\320\n8\321\n8\315\322\211 G \323 !!\324\325\326\"\211\"# I\210\"$\fI\210\"% I\210\"&I\210\"'I\210\"(\327!I\210\")I\210\"*I\210\"+I\210\",I\210\"-I\210\". I\210\"/!I\210\"0 I\210\".\207" [fname filename attrs ino mode uid "cpio-create-entry-attrs" file-attributes 10 cpio-mode-string-to-int-mode 8 2 3 1 time-to-seconds 5 7 11 0 cpio-make-chksum-for-file make-vector 14 nil seconds-to-time gid nlink mtime entry-size dev-maj dev-min rdev-maj rdev-min namesize chksum result *cpio-ino-parsed-idx* *cpio-mode-parsed-idx* *cpio-uid-parsed-idx* *cpio-gid-parsed-idx* *cpio-nlink-parsed-idx* *cpio-mtime-parsed-idx* *cpio-entry-size-parsed-idx* *cpio-dev-maj-parsed-idx* *cpio-dev-min-parsed-idx* *cpio-rdev-maj-parsed-idx* *cpio-rdev-min-parsed-idx* *cpio-namesize-parsed-idx* *cpio-chksum-parsed-idx* *cpio-name-parsed-idx*] 5 (#$ . 35615)]) #@35 Return the checksum for FILENAME. (defalias 'cpio-make-chksum-for-file #[(filename) "\303 \n!)\207" [fname cpio-make-chksum-for-file-func filename "cpio-make-chksum-for-file"] 2 (#$ . 36704)]) #@177 Create attributes appropriate for adding a directory entry to a cpio-archive. CAVEAT: While many attributes are derived from a best guess of reality, many are simply invented. (defalias 'cpio-create-faux-directory-attrs #[(name) "\306\307\310!\311\312 \f $\313 \314 \311\315 \211@A@D\316\311\211\316\211GT\316 \317\320\321\"\211!\"\nI\210!#I\210!$I\210!%I\210!&I\210!'I\210!(I\210!)I\210!*I\210!+I\210!,I\210!-I\210!. I\210!/I\210!.\207" [fname local-attrs ino s-ifdir s-irwxu s-irusr "cpio-create-faux-directory-attrs" file-attributes "." 1 logior user-uid group-gid current-time 0 make-vector 14 nil s-ixusr mode uid gid nlink now mtime entry-size dev-maj dev-min rdev-maj rdev-min name namesize chksum result *cpio-ino-parsed-idx* *cpio-mode-parsed-idx* *cpio-uid-parsed-idx* *cpio-gid-parsed-idx* *cpio-nlink-parsed-idx* *cpio-mtime-parsed-idx* *cpio-entry-size-parsed-idx* *cpio-dev-maj-parsed-idx* *cpio-dev-min-parsed-idx* *cpio-rdev-maj-parsed-idx* *cpio-rdev-min-parsed-idx* *cpio-namesize-parsed-idx* *cpio-chksum-parsed-idx* *cpio-name-parsed-idx*] 6 (#$ . 36905)]) #@80 Return non-nil if there's already an entry called NAME in the current archive. (defalias 'cpio-entry-exists-p #[(name) "\304 \305=\204 \306=\204\307\310\"\210\n\203\"r\nq\210\311 !)\202'\312 \313 \")\207" [fname major-mode *cab-parent* name "cpio-entry-exists-p" cpio-mode cpio-dired-mode error "%s(): You're not in a cpio-dired buffer." cpio-entry-exists-p assoc cpio-catalog] 3 (#$ . 38077)]) #@31 Move the point to ENTRY-NAME. (defalias 'cpio-move-to-entry #[(entry-name) "\305\306\n\307=\204\310\311 \"\210\212\312 \210 \313P\314\315!)\262\204(\316\317!\210\202 \313P\314\315!)\262\2038`)\205?b*\207" [where fname major-mode entry-name inhibit-changing-match-data "cpio-move-to-entry" nil cpio-dired-mode error "%s(): You're not in a cpio-dired buffer." cpio-dired-move-to-first-entry "$" t looking-at cpio-dired-next-line 1] 3 (#$ . 38486)]) #@47 Mark the given CATALOG-ENTRY as not modified. (defalias 'cpio-set-entry-unmodified #[(catalog-entry) "\303\304 !\210 \n\305I)\207" [fname catalog-entry *cpio-catalog-entry-modified-flag-idx* "cpio-set-entry-unmodified" cpio-validate-catalog-entry cpio-mode-entry-unmodified] 3 (#$ . 38957)]) #@43 Mark the given CATALOG-ENTRY as modified. (defalias 'cpio-set-entry-modified #[(catalog-entry) "\303\304 !\210 \n\305I)\207" [fname catalog-entry *cpio-catalog-entry-modified-flag-idx* "cpio-set-entry-modified" cpio-validate-catalog-entry cpio-mode-entry-modified] 3 (#$ . 39256)]) #@56 Return non-NIL if CATALOG-ENTRY is marked as modified. (defalias 'cpio-entry-modified-p #[(catalog-entry) "\304\305\306\n!\210\n H\211\307=\203\310\202%\n\311=\203 \305\202%\312\313 #*\207" [modified-flag fname catalog-entry *cpio-catalog-entry-modified-flag-idx* "cpio-entry-modified-p" nil cpio-validate-catalog-entry cpio-mode-modified t cpio-mode-unmodified error "%s(): Invalid modified flag value [[%s]]."] 4 (#$ . 39545)]) #@103 Verify that the given CATALOG-ENTRY is (could be) a valid catalog entry. Signal an error if it isn't. (defalias 'cpio-validate-catalog-entry #[(catalog-entry) "\306\307\310\n!\204\311\312\nC\"\210 \nGU\204\313\314 #\210\310\n\fH!\204+\311\312\nC\"\210 \n\fHGU\204J\313\315 \n\fH#\210\316\317!\210\313\320 \n\fHG $\210\321\nH!\205Y\321\nH!?\205b\313\322 \n#*\207" [modified-flag fname catalog-entry *cpio-catalog-entry-length* *cpio-catalog-entry-attrs-idx* *cpio-parsed-header-length* "validate-catalog-entry" nil vectorp signal wrong-type-error error "%(): The catalog entry [[%d]] is not the right length." "%s(): The parsed header in [[%s]] is not the right length." sit-for 1 "%s(): Found [[%d]], expected [[%d]]." markerp "%s(): The marker fields in [[%s]] are not markers." *cpio-catalog-entry-header-start-idx* *cpio-catalog-entry-contents-start-idx*] 5 (#$ . 39991)]) #@248 Return coding system for the current buffer. See `cpio-find-auto-coding' for how the coding system is found. Return nil if an invalid coding system is found. The variable `set-auto-coding-function' (which see) is set to this function by default. (defalias 'cpio-set-auto-coding #[(contents) "\303 \"\211\205\304\n@!\205\n@)\207" [cpio-entry-name contents found cpio-find-auto-coding coding-system-p] 4 (#$ . 40889)]) #@1033 Find a coding system for an archive entry ENTRY-NAME. The function checks ENTRY-NAME against the variable `auto-coding-alist'. If ENTRY-NAME doesn't match any entries in the variable, it checks the contents of the current buffer following point against `auto-coding-regexp-alist'. If no match is found, it checks for a `coding:' tag in the first one or two lines following point. If no `coding:' tag is found, it checks any local variables list in the last 3K bytes out of the SIZE bytes. Finally, if none of these methods succeed, it checks to see if any function in `auto-coding-functions' gives a match. If a coding system is specified, the return value is a cons (CODING . SOURCE), where CODING is the specified coding system and SOURCE is a symbol `auto-coding-alist', `auto-coding-regexp-alist', `:coding', or `auto-coding-functions' indicating by what CODING is specified. Note that the validity of CODING is not checked; it's the caller's responsibility to check it. If nothing is specified, the return value is nil. (defalias 'cpio-find-auto-coding #[(entry-name contents) "\306\307\310\"\210\311!\211\205 \312B)\206\313\n!\211\205 \314B)\206\315\nG\316\211\f\317^\\*\n *O+\320\211,\320\211-.\321\322\n\"\206U\321\323\n\"\206U\321\324\n\"\211,\203\334*\203\247,*W\203\247 b\210/\203\204\321\325\n\"\203\204\326\327\330\331\332!\"\333#\210\334 \204\247\321\335\n\"\203\247\336\337\340\n\"!\211\203\247\321\341\n\"\203\247\337\340\n\". \203\306\342 !\2110\211GSH\343U\203\305\3360\316\344O!\345.).\203\334\336.!\211.\204\334\346\347!\210\320')\32011\203 \204\3501\212eb\2101\211A1\242\f!)0\202\210\320\202\342* \205 \351B. \207" [entry-name coding-system contents case-fold-search size head-start error "%s() is not yet implemented" "cpio-find-auto-coding" auto-coding-alist-lookup auto-coding-alist cpio-auto-coding-regexp-alist-lookup auto-coding-regexp-alist t 0 1024 nil string-match "coding:" "unibyte:" "enable-character-translation:" "\\(.*;\\)?[ ]*unibyte:[ ]*\\([^ ;]+\\)" display-warning mule format "\"unibyte: t\" (in %s) is obsolete; use \"coding: 'raw-text\" instead." file-relative-name :warning raw-text "\\(.*;\\)?[ ]*coding:[ ]*\\([^ ;]+\\)" intern match-string 2 "\\(.*;\\)?[ ]*enable-character-translation:[ ]*\\([^ ;]+\\)" symbol-name 33 -1 "nil" make-local-variable enable-character-translation (error) auto-coding-functions head-end head head-found tail-found char-trans set-auto-coding-for-load name funcs] 7 (#$ . 41321)]) #@116 Lookup `auto-coding-regexp-alist' for CONTENTS. The value is a coding system is specified for the CONTENTS or nil. (defalias 'cpio-auto-coding-regexp-alist-lookup #[(contents) "\306\307\310\311 \"\210\n\2035 \2045\n@@ \203\312\f!\313\f\f\"\203.\n@A\2021\nA)\202 +\207" [auto-coding-regexp-alist coding-system alist fname regexp enable-multibyte-characters "cpio-auto-coding-regexp-alist-lookup" nil error "%s() is not yet implemented" string-to-multibyte string-match contents] 3 (#$ . 43867)]) #@93 Set the coding system for the current buffer based on the contents of the entry-ENTRY-NAME. (defalias 'cpio-set-coding-system #[(entry-name) "\304\305\306\"\210 \203r q\210\307\n!)\202\310 \311\312#)\207" [fname *cab-parent* entry-name last-coding-system-used "cpio-set-coding-system" error "%s() is not yet implemented" cpio-set-coding-system set-buffer-file-coding-system force nomodify] 4 (#$ . 44385)]) #@70 Mark the current cpio-dired-style and archive buffersfas unmodified. (defalias 'cpio-not-modified #[nil "\303 \203\304 \210r q\210\304 )\202\304 \210\305\306\n\")\207" [fname *cab-parent* *cab-subordinates* "cpio-not-modified" not-modified mapc #[(b) "\301!\205 rq\210\302 )\207" [b buffer-live-p not-modified] 2]] 3 (#$ . 44804)]) #@72 Switch to the dired style buffer corresponding to this archive buffer. (defalias 'cpio-view-dired-style-buffer #[nil "\303\304 \n\305=\204\306\307 \"\210\310 \210\311\312!!*\207" [archive-file-name fname major-mode "cpio-view-dired-style-buffer" buffer-file-name cpio-mode error "%s(): You're not in a cpio archive buffer under cpio-mode." bury-buffer switch-to-buffer cpio-dired-buffer-name] 3 (#$ . 45150) nil]) (defvar cpio-mode-hook nil) (byte-code "\300\301N\204\f\302\300\301\303#\210\304\305!\204\302\305\306\307#\210\300\207" [cpio-mode-hook variable-documentation put "Hook run after entering cpio-mode mode.\nNo problems result if this variable is not bound.\n`add-hook' automatically binds it. (This is true for all hook variables.)" boundp cpio-mode-map definition-name cpio-mode] 4) (defvar cpio-mode-map (make-sparse-keymap)) (byte-code "\301\302N\204\303\301\302\304\305!#\210\306\307!\204\303\307\310\311#\210\312\313 !\210\307\302N\204-\303\307\302\304\314!#\210\306\300!\204B\303\300\310\311#\210\315\316\300\317\"\210!\210\300\302N\204P\303\300\302\304\320!#\210\303\311\321\317#\207" [cpio-mode-abbrev-table cpio-mode-map variable-documentation put purecopy "Keymap for `cpio-mode'." boundp cpio-mode-syntax-table definition-name cpio-mode (lambda (#1=#:def-tmp-var) (defvar cpio-mode-syntax-table #1#)) make-syntax-table "Syntax table for `cpio-mode'." (lambda (#1#) (defvar cpio-mode-abbrev-table #1#)) define-abbrev-table nil "Abbrev table for `cpio-mode'." derived-mode-parent] 5) #@173 Treat cpio archives like file systems with a dired UI. This mode runs the hook `cpio-mode-hook', as the final or penultimate step during initialization. \{cpio-mode-map} (defalias 'cpio-mode #[nil "\306\300!\210\307\310 \210\311\312\313 !\210\314\f!\210  \315 \211!\204(\316\317\320\321\322\"\"\210\323 \210p\324\"#\314$!\210\307%\325!!\210\326 \327 \210r\330p!\211\"q\210\306\331!\210\332 \210)\333 \210\334 \210\335\"!\210+\336\337!\207" [delay-mode-hooks major-mode mode-name cpio-mode-map cpio-mode-syntax-table cpio-mode-abbrev-table make-local-variable t kill-all-local-variables cpio-mode "cpio-mode" use-local-map set-syntax-table cpio-discern-archive-type error "You're not in a supported CPIO buffer. It begins [[%s]]." buffer-substring-no-properties 1 8 cpio-backup-during-development nil cpio-set-locals buffer-file-name cpio-build-catalog cpio-present-ala-dired *cpio-archive-name* cpio-dired-set-unmodified cpio-create-keymap bury-buffer switch-to-buffer run-mode-hooks cpio-mode-hook local-abbrev-table *cpio-format* cpio-dired-buffer archive-buffer *cpio-archive-syntax-table* buffer-read-only] 5 (#$ . 46679) nil]) #@132 Create a time-stamped backup of the file in the current-buffer. There's an implied CONTRACT there: The buffer must contain a file. (defalias 'cpio-backup-during-development #[nil "\303\304 \305\306 \307\310!#\311 \n\312\313\314\315&+\207" [fname filename backup-file "cpio-backup-during-development" buffer-file-name format "%s-%s" format-time-string "%Y%m%d%H%H%M%S.%3N" copy-file nil keep-time preserve-uid-gid preserve-permissions] 7 (#$ . 47835)]) #@108 A flag to record if any archive-modifying events have occured since either the beginning or the last save. (defvar *cpio-dired-modified* nil (#$ . 48298)) (byte-code "\301\302\300!\207" [*cpio-dired-modified* nil make-variable-buffer-local] 2) #@86 Return non-NIL if the catalog has been modified and, thus, the archive can be saved. (defalias 'cpio-dired-modified-p #[nil "\304 \305=\204 \306=\204\307\310\"\210\n\203!r\nq\210\311 )\202\" )\207" [fname major-mode *cab-parent* *cpio-dired-modified* "cpio-dired-modified-p" cpio-dired-mode cpio-mode error "%s(): only makes sense in a cpio-dired buffer." cpio-dired-modified-p] 3 (#$ . 48549)]) #@31 Flag the catalog as modified. (defalias 'cpio-dired-set-modified #[nil "\304 \305=\204 \306=\204\307\310\"\210\n\203!r\nq\210\311 )\202$\312\211)\207" [fname major-mode *cab-parent* *cpio-dired-modified* "cpio-dired-set-modified" cpio-dired-mode cpio-mode error "%s(): only makes sense in a cpio-dired buffer." cpio-dired-set-modified t] 3 (#$ . 48959)]) #@35 Flag the catalog as not modified. (defalias 'cpio-dired-set-unmodified #[nil "\304 \305=\204 \306=\204\307\310\"\210\n\203!r\nq\210\311 )\2022\312\313\312!\210r\314\315 !q\210\313\312!))\207" [fname major-mode *cab-parent* *cpio-dired-modified* "cpio-dired-set-unmodified" cpio-dired-mode cpio-mode error "%s(): only makes sense in a cpio-dired buffer." cpio-dired-set-unmodified nil set-buffer-modified-p cpio-dired-buffer-name buffer-name] 3 (#$ . 49329)]) #@65 Flag to indicate that the cpio-mode-map has already been built. (defvar *cpio-have-made-keymap* nil (#$ . 49803)) (byte-code "\301\211\207" [*cpio-have-made-keymap* nil] 2) (defalias 'cpio-create-keymap #[nil "\304\305  ?\205\306\n\307\310#\210\306\n\311\312#*\207" [keymap fname cpio-mode-map *cpio-have-made-keymap* "cpio-create-keymap" make-keymap define-key "" cpio-view-dired-style-buffer "q" cpio-quit] 4]) #@53 Quit cpio mode and kill all the affiliated buffers. (defalias 'cpio-quit #[nil "\302 \205r q\210\303 \210\304 ?\205\305\306p#))\207" [fname *cab-parent* "cpio-quit" cpio-quit kill-buffer warn "%s(): Could not kill [[%s]]."] 4 (#$ . 50231) nil]) #@64 Return the entry in the catalog for the entry with ENTRY-NAME. (defalias 'cpio-entry #[(entry-name) "\304 \203\305\nr q\210 )\"A\202\305\n \"A)\207" [fname *cab-parent* entry-name *cpio-catalog* "cpio-entry" assoc] 3 (#$ . 50488)]) #@10 Do that. (defalias 'cpio-entry-attrs-from-catalog-entry #[(catalog-entry) "\303 \nH)\207" [fname catalog-entry *cpio-catalog-entry-attrs-idx* "cpio-entry c-attrs-from-catalog"] 2 (#$ . 50731)]) #@133 Build the catalog that tracks the entries in this cpio-mode buffer. cpio-mode maintains the catalog in the *cpio-catalog* variable. (defalias 'cpio-build-catalog #[nil "\303eb\210 \211)\207" [fname cpio-build-catalog-func *cpio-catalog* "cpio-build-catalog"] 2 (#$ . 50933)]) #@113 Establish certain variables as local to the current buffer and give them good values. ARCHIVE-TYPE is a symbol. (defalias 'cpio-set-locals #[(archive-type) "\303 \203r q\210\304\n!)\202\304\n!\210\305\n!)\207" [fname *cab-parent* archive-type "cpio-set-locals" cpio-set-local-vars cpio-set-local-funcs] 2 (#$ . 51219)]) #@424 Establish the functions for the given archive type. The functions are assigned to the elements of *cpio-local-funcs*, a string of symbols. Thus, to use them as functions you need to (funcall) them or to (apply) them. CAVEAT: No checking is done. This function doesn't care /why/ you are asking for functions that are appropriate for ARCHIVE-TYPE. That's the caller's business. See *cpio-local-funcs* for more information. (defalias 'cpio-set-local-funcs #[(archive-type) "\304\305!\306\307 \"\210\306\310 \"*\207" [archive-type archive-type-name fname *cpio-local-funcs* "cpio-set-local-funcs" symbol-name mapc make-local-variable #[(local-func-var) "\304\305!\306\"\211@\306\305\n!Q\307\310 \"A\311\312 \"\210\313 !L\210 *\207" [local-func-var name-parts archive-type target-name split-string symbol-name "-" remove "func" mapc #[(part) "\302 Q\211\207" [target-name part "-"] 3] read] 5]] 3 (#$ . 51551)]) #@72 Set all the necessary local variables for the CPIO archive type given. (defalias 'cpio-set-local-vars #[(archive-type) "\304\305\301!\210\306\307  \310\267\2029\311 \202>\312 \202>\313 \202>\314 \202>\315 \202>\316 \202>\317 \202>\320 \202>\321\322 #)\207" [fname *cpio-catalog* *cpio-archive-name* archive-type "cpio-set-local-vars" make-local-variable nil buffer-file-name #s(hash-table size 8 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (bin 17 newc 22 odc 27 crc 32 tar 37 ustar 42 hpbin 47 hpodc 52)) cpio-set-local-bin-vars cpio-set-local-newc-vars cpio-set-local-odc-vars cpio-set-local-crc-vars cpio-set-local-tar-vars cpio-set-local-ustar-vars cpio-set-local-hpbin-vars cpio-set-local-hpodc-vars error "%s(): Unknown archive type [[%s]]"] 4 (#$ . 52476)]) #@71 Set buffer local variables appropriate for a BIN format CPIO archive. (defalias 'cpio-set-local-bin-vars #[nil "\306\307\302!\210 \307\304!\210 \307\310!\210 \307\311!\210\n\211 )\207" [fname *cpio-bin-padding-modulus* *cpio-padding-modulus* *cpio-bin-padding-char* *cpio-padding-char* *cpio-bin-padding-str* "cpio-set-local-bin-vars" make-local-variable *cpio-padding-str* *cpio-header-length* *cpio-bin-header-length*] 2 (#$ . 53280)]) #@72 Set buffer local variables appropriate for a NEWC format CPIO archive. (defalias 'cpio-set-local-newc-vars #[nil "\306\307\302!\210 \307\304!\210 \307\310!\210 \307\311!\210\n\211 )\207" [fname *cpio-newc-padding-modulus* *cpio-padding-modulus* *cpio-newc-padding-char* *cpio-padding-char* *cpio-newc-padding-str* "cpio-set-local-newc-vars" make-local-variable *cpio-padding-str* *cpio-header-length* *cpio-newc-header-length*] 2 (#$ . 53731)]) #@71 Set buffer local variables appropriate for a ODC format CPIO archive. (defalias 'cpio-set-local-odc-vars #[nil "\306\307\302!\210 \307\304!\210 \307\310!\210 \307\311!\210\n\211 )\207" [fname *cpio-odc-padding-modulus* *cpio-padding-modulus* *cpio-odc-padding-char* *cpio-padding-char* *cpio-odc-padding-str* "cpio-set-local-odc-vars" make-local-variable *cpio-padding-str* *cpio-header-length* *cpio-odc-header-length*] 2 (#$ . 54189)]) #@71 Set buffer local variables appropriate for a CRC format CPIO archive. (defalias 'cpio-set-local-crc-vars #[nil "\306\307\302!\210 \307\304!\210 \307\310!\210 \307\311!\210\n\211 )\207" [fname *cpio-crc-padding-modulus* *cpio-padding-modulus* *cpio-crc-padding-char* *cpio-padding-char* *cpio-crc-padding-str* "cpio-set-local-crc-vars" make-local-variable *cpio-padding-str* *cpio-header-length* *cpio-crc-header-length*] 2 (#$ . 54640)]) #@71 Set buffer local variables appropriate for a TAR format CPIO archive. (defalias 'cpio-set-local-tar-vars #[nil "\301\302\303\")\207" [fname "cpio-set-local-tar-vars" error "%s() is not yet implemented"] 3 (#$ . 55091)]) #@73 Set buffer local variables appropriate for a USTAR format CPIO archive. (defalias 'cpio-set-local-ustar-vars #[nil "\301\302\303\")\207" [fname "cpio-set-local-ustar-vars" error "%s() is not yet implemented"] 3 (#$ . 55319)]) #@73 Set buffer local variables appropriate for a HPBIN format CPIO archive. (defalias 'cpio-set-local-hpbin-vars #[nil "\301\302\303\")\207" [fname "cpio-set-local-hpbin-vars" error "%s() is not yet implemented"] 3 (#$ . 55553)]) #@73 Set buffer local variables appropriate for a HPODC format CPIO archive. (defalias 'cpio-set-local-hpodc-vars #[nil "\301\302\303\")\207" [fname "cpio-set-local-hpodc-vars" error "%s() is not yet implemented"] 3 (#$ . 55787)]) (provide 'cpio-mode)