403Webshell
Server IP : 217.160.0.135  /  Your IP : 216.73.217.37
Web Server : Apache
System : Linux www 6.18.52-i1-ampere #1203 SMP Mon Sep 14 18:29:59 CEST 2026 aarch64
User : sws1074145052 ( 1074145052)
PHP Version : 8.3.32
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /usr/share/emacs/28.2/lisp/emacs-lisp/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/share/emacs/28.2/lisp/emacs-lisp/bindat.elc
;ELC
;;; Compiled
;;; in Emacs version 28.2
;;; with all optimizations.



#@82 compiler-macro for inlining `cl--struct-bindat--type-p'.

(fn CL-WHOLE-ARG CL-X)
(defalias 'cl--struct-bindat--type-p--cmacro #[514 "\300\301\302\303\211\211&\207" [cl--defsubst-expand (cl-x) (cl-block cl--struct-bindat--type-p (and (memq (type-of cl-x) cl-struct-bindat--type-tags) t)) nil] 9 (#$ . 84)])
(put 'cl--struct-bindat--type-p 'compiler-macro 'cl--struct-bindat--type-p--cmacro)
#@13 

(fn CL-X)
(defalias 'cl--struct-bindat--type-p #[257 "\301!>\205	\302\207" [cl-struct-bindat--type-tags type-of t] 3 (#$ . 483)])
(byte-code "\300\301\302\303#\304\305\306\301#\207" [function-put cl--struct-bindat--type-p side-effect-free error-free put bindat--type cl-deftype-satisfies] 5)
#@72 compiler-macro for inlining `bindat--type-le'.

(fn CL-WHOLE-ARG CL-X)
(defalias 'bindat--type-le--cmacro #[514 "\300\301\302\303\211\211&\207" [cl--defsubst-expand (cl-x) (cl-block bindat--type-le (progn (or (cl--struct-bindat--type-p cl-x) (signal 'wrong-type-argument (list 'bindat--type cl-x))) (aref cl-x 1))) nil] 9 (#$ . 786)])
(put 'bindat--type-le 'compiler-macro 'bindat--type-le--cmacro)
#@60 Access slot "le" of `bindat--type' struct CL-X.

(fn CL-X)
(defalias 'bindat--type-le #[257 "\301!>\204\302\303\304D\"\210\211\305H\207" [cl-struct-bindat--type-tags type-of signal wrong-type-argument bindat--type 1] 5 (#$ . 1194)])
(byte-code "\300\301\302\303#\300\207" [function-put bindat--type-le side-effect-free t] 4)
#@72 compiler-macro for inlining `bindat--type-ue'.

(fn CL-WHOLE-ARG CL-X)
(defalias 'bindat--type-ue--cmacro #[514 "\300\301\302\303\211\211&\207" [cl--defsubst-expand (cl-x) (cl-block bindat--type-ue (progn (or (cl--struct-bindat--type-p cl-x) (signal 'wrong-type-argument (list 'bindat--type cl-x))) (aref cl-x 2))) nil] 9 (#$ . 1530)])
(put 'bindat--type-ue 'compiler-macro 'bindat--type-ue--cmacro)
#@60 Access slot "ue" of `bindat--type' struct CL-X.

(fn CL-X)
(defalias 'bindat--type-ue #[257 "\301!>\204\302\303\304D\"\210\211\305H\207" [cl-struct-bindat--type-tags type-of signal wrong-type-argument bindat--type 2] 5 (#$ . 1939)])
(byte-code "\300\301\302\303#\300\207" [function-put bindat--type-ue side-effect-free t] 4)
#@72 compiler-macro for inlining `bindat--type-pe'.

(fn CL-WHOLE-ARG CL-X)
(defalias 'bindat--type-pe--cmacro #[514 "\300\301\302\303\211\211&\207" [cl--defsubst-expand (cl-x) (cl-block bindat--type-pe (progn (or (cl--struct-bindat--type-p cl-x) (signal 'wrong-type-argument (list 'bindat--type cl-x))) (aref cl-x 3))) nil] 9 (#$ . 2275)])
(put 'bindat--type-pe 'compiler-macro 'bindat--type-pe--cmacro)
#@60 Access slot "pe" of `bindat--type' struct CL-X.

(fn CL-X)
(defalias 'bindat--type-pe #[257 "\301!>\204\302\303\304D\"\210\211\305H\207" [cl-struct-bindat--type-tags type-of signal wrong-type-argument bindat--type 3] 5 (#$ . 2684)])
(byte-code "\300\301\302\303#\304\305\306\"\207" [function-put bindat--type-pe side-effect-free t defalias copy-bindat--type copy-sequence] 4)
#@84 compiler-macro for inlining `bindat--make'.

(fn CL-WHOLE &cl-quote &key LE UE PE)
(defalias 'bindat--make--cmacro #[385 "\300\301\"A@\300\302\"A@\300\303\"A@\211\203=\211@\304>\203&\211AA\262\202\305>A@\2034\306\262\202\307\310@\"\210\202\210\311\312\313\306\306&\207" [plist-member :le :ue :pe (:le :ue :pe :allow-other-keys) :allow-other-keys nil error "Keyword argument %s not one of (:le :ue :pe)" cl--defsubst-expand (le ue pe) (cl-block bindat--make (record 'bindat--type le ue pe))] 14 (#$ . 3071)])
(put 'bindat--make 'compiler-macro 'bindat--make--cmacro)
#@69 Constructor for objects of type `bindat--type'.

(fn &key LE UE PE)
(defalias 'bindat--make #[128 "\300\301\"A@\300\302\"A@\300\303\"A@\211\203=\211@\304>\203&\211AA\262\202\305>A@\2034\306\262\202\307\310@\"\210\202\210\311\312$\207" [plist-member :le :ue :pe (:le :ue :pe :allow-other-keys) :allow-other-keys nil error "Keyword argument %s not one of (:le :ue :pe)" record bindat--type] 9 (#$ . 3669)])
(byte-code "\300\301\302\303#\304\305\306\307\310\306\311\312\305\303&	\207" [function-put bindat--make side-effect-free t cl-struct-define bindat--type nil cl-structure-object record ((cl-tag-slot) (le) (ue) (pe)) cl-struct-bindat--type-tags] 11)
(defalias 'bindat--unpack-u8 #[0 "	H	T\207" [bindat-raw bindat-idx] 2])
(byte-code "\300\301\302\303#\304\301\305\306#\207" [function-put bindat--unpack-u8 speed -1 put byte-optimizer byte-compile-inline-expand] 5)
(defalias 'bindat--unpack-u16 #[0 "\302\303	H	T\304\"	H	T\"\207" [bindat-raw bindat-idx logior ash 8] 4])
(defalias 'bindat--unpack-u24 #[0 "\302\303\304 \305\"	H	T\"\207" [bindat-raw bindat-idx logior ash bindat--unpack-u16 8] 4])
(defalias 'bindat--unpack-u32 #[0 "\300\301\302 \303\"\302 \"\207" [logior ash bindat--unpack-u16 16] 4])
(defalias 'bindat--unpack-u16r #[0 "\302	H	T\303	H	T\304\"\"\207" [bindat-raw bindat-idx logior ash 8] 5])
(defalias 'bindat--unpack-u24r #[0 "\302\303 \304	H	T\305\"\"\207" [bindat-raw bindat-idx logior bindat--unpack-u16r ash 16] 5])
(defalias 'bindat--unpack-u32r #[0 "\300\301 \302\301 \303\"\"\207" [logior bindat--unpack-u16r ash 16] 5])
#@12 

(fn LEN)
(defalias 'bindat--unpack-str #[257 "	\211\\O	\\\211;\203\207\302\303\"\207" [bindat-raw bindat-idx apply unibyte-string] 5 (#$ . 5259)])
#@12 

(fn LEN)
(defalias 'bindat--unpack-strz #[257 "\302\303\203\fW\202
\304\203!	\\H\302U\204!T\262\202	\211\\O\262	\\\211;\2033\207\305\306\"\207" [bindat-raw bindat-idx 0 nil t apply unibyte-string] 7 (#$ . 5421)])
#@12 

(fn LEN)
(defalias 'bindat--unpack-bits #[257 "\302\303_S\302\211\304Y\203G	H	T\211\262\304U\203#\303Z\262\202\305\262\304V\203\306\"\304U\204:B\262S\262\307\310\"\262\202&\207" [bindat-raw bindat-idx nil 8 0 128 logand ash -1] 8 (#$ . 5662)])
#@35 

(fn TYPE LEN &optional VECTYPE)
(defalias 'bindat--unpack-item #[770 "\302=\203\f\303\262\304\262\305\267\202t	H	T\207\306 \207\307 \207\310 \207\311 \207\312 \207\313 \207\314!\207\315!\207\316!\207\317\320\"\321:\203NA@\262\3228\262\202X\206S\323\262\324\262\320\211W\203q\325#I\210\211T\262\202Y\210\207\324\207" [bindat-raw bindat-idx ip vec 4 #s(hash-table size 16 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (byte 18 u8 18 short 25 word 25 u16 25 u24 28 long 31 dword 31 u32 31 u16r 34 u24r 37 u32r 40 bits 43 str 47 strz 51 vec 55)) bindat--unpack-u16 bindat--unpack-u24 bindat--unpack-u32 bindat--unpack-u16r bindat--unpack-u24r bindat--unpack-u32r bindat--unpack-bits bindat--unpack-str bindat--unpack-strz make-vector 0 1 2 u8 nil bindat--unpack-item] 12 (#$ . 5941)])
#@14 

(fn N LEN)
(defalias 'bindat--align #[514 "\211S\\\245_\207" [] 5 (#$ . 6783)])
(byte-code "\300\301\302\303#\304\301\305\306#\207" [function-put bindat--align speed -1 put byte-optimizer byte-compile-inline-expand] 5)
#@13 

(fn SPEC)
(defalias 'bindat--unpack-group #[257 "\305!>\203\305!>\204\306\307\310D\"\210\211\311H \207\312\211\211\211\203\200\211@\211@A@\3118\313=\2058\3148\314\312\203R:\203R@\315=\203R\315A@\316\"\262\203j:\203j@\315=\203j\315A@\316\"\262\317>\203|\311\262\262\262\312\262:\203\221@\315=\203\221\315A@\316\"\262:\203\244\315=\204\244\320\321\n#\262\204\253\322\262\323\267\202M\203\276\315\316\"\262\202b\315\316\"\210\202b\\\202b\211S\\\245_\266\202\202b\324\315\316\"!\262\202b\325\211W\203\312\324\n\233!B\262\210\211T\262\202\351\210\211\237\262\202b\233\312\211\203G@\262A\262@\262\211\f\232\204;\211\316=\204;\211:\203\315\316\"\203\324A!\262\312\262\202)\266\202b\250\203Y\326\316!\210\202b\327#\262\211\211\203w\203rB\nB\202v\330\n\"\266A\266\202\202!\210\n*\207" [cl-struct-bindat--type-tags last struct bindat-idx tag type-of signal wrong-type-argument bindat--type 2 nil vec 3 eval t (eval fill align struct union) apply bindat-get-field 1 #s(hash-table size 6 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (eval 177 fill 198 align 205 struct 221 repeat 232 union 266)) bindat--unpack-group 0 debug bindat--unpack-item append] 16 (#$ . 7013)])
#@191 Return structured data according to SPEC for binary data in RAW.
RAW is a unibyte string or vector.
Optional third arg IDX specifies the starting offset in RAW.

(fn SPEC RAW &optional IDX)
(defalias 'bindat-unpack #[770 "\302!\203\n\303\304!\210\211\206\305\306!*\207" [bindat-raw bindat-idx multibyte-string-p error "String is multibyte" 0 bindat--unpack-group] 5 (#$ . 8338)])
#@377 In structured data STRUCT, return value of field named FIELD.
If multiple field names are specified, use the field names to
lookup nested sub-structures in STRUCT, corresponding to the
C-language syntax STRUCT.FIELD1.FIELD2.FIELD3...
An integer value in the field list is taken as an array index,
e.g. corresponding to STRUCT.FIELD1[INDEX2].FIELD3...

(fn STRUCT &rest FIELD)
(defalias 'bindat-get-field #[385 "\203#\211\203#\211@\250\203@\234\202\211@\236A\262\211A\262\202\207" [] 4 (#$ . 8733)])
(defvar bindat--fixed-length-alist '((u8 . 1) (byte . 1) (u16 . 2) (u16r . 2) (word . 2) (short . 2) (u24 . 3) (u24r . 3) (u32 . 4) (u32r . 4) (dword . 4) (long . 4) (ip . 4)))
#@20 

(fn STRUCT SPEC)
(defalias 'bindat--length-group #[514 "\306!>\203\306!>\204\307\310\311D\"\210\211\312H!\207\313\211\211\205\256\211@\211@A@\3148\315=\2059\3168\316\203R:\203R@\317=\203R\317A@\320\"\262\203j:\203j@\317=\203j\317A@\320\"\262\321>\203|\314\262\262\262\313\262:\203\220@\317=\203\220\317A@\320\"\262:\203\242\317=\204\242\322\323\n#\262\204\251\312\262\315=\203\320:\203\303A@_\262\3148\262\202\251\206\310\324\262\313\262\202\251\325\267\202\210\203\350\317\320\"B\nB\266\202\247\317\320\"\266\202\247\\\266\202\247\211S\\\245_\266\202\266\202\247\326\203\323\n\"\202\n\317\320\"\"\266\202\247\327\211W\203@\326\323\n	\"8	\233\"\210\211T\262\202%\266\202\247\233\313\211\203\202@\262A\262@\262\211\f\232\204v\211\320=\204v\211:\203N\317\320\"\203N\326\nA\"\210\313\262\202N)\266	\202\247
\236\211\262\203\227A_\262\203\241\323\n\"\\\266A\266\202\202\"\262*\207" [cl-struct-bindat--type-tags last struct bindat-idx tag bindat--fixed-length-alist type-of signal wrong-type-argument bindat--type 1 nil 2 vec 3 eval t (eval fill align struct union) apply bindat-get-field u8 #s(hash-table size 6 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (eval 214 fill 241 align 250 struct 268 repeat 292 union 325)) bindat--length-group 0] 16 (#$ . 9430)])
#@86 Calculate `bindat-raw' length for STRUCT according to bindat SPEC.

(fn SPEC STRUCT)
(defalias 'bindat-length #[514 "\301\302\"\210)\207" [bindat-idx 0 bindat--length-group] 5 (#$ . 10873)])
#@10 

(fn V)
(defalias 'bindat--pack-u8 #[257 "	\302\303\"I\210	T\211\207" [bindat-raw bindat-idx logand 255] 6 (#$ . 11074)])
(byte-code "\300\301\302\303#\304\301\305\306#\207" [function-put bindat--pack-u8 speed -1 put byte-optimizer byte-compile-inline-expand] 5)
#@10 

(fn V)
(defalias 'bindat--pack-u16 #[257 "	\302\303\304\"\305\"I\210	T\302\305\"I\210	\306\\\211\207" [bindat-raw bindat-idx logand ash -8 255 2] 7 (#$ . 11347)])
#@10 

(fn V)
(defalias 'bindat--pack-u24 #[257 "\302\303\"	\304\305\"I\210	T\211\266\306!\207" [bindat-raw bindat-idx ash -16 logand 255 bindat--pack-u16] 7 (#$ . 11523)])
#@10 

(fn V)
(defalias 'bindat--pack-u32 #[257 "\300\301\302\"!\210\300!\207" [bindat--pack-u16 ash -16] 5 (#$ . 11703)])
#@10 

(fn V)
(defalias 'bindat--pack-u64 #[257 "\300\301\302\"!\210\300!\207" [bindat--pack-u32 ash -32] 5 (#$ . 11829)])
#@10 

(fn V)
(defalias 'bindat--pack-u16r #[257 "	T\302\303\304\"\305\"I\210	\302\305\"I\210	\306\\\211\207" [bindat-raw bindat-idx logand ash -8 255 2] 7 (#$ . 11955)])
#@10 

(fn V)
(defalias 'bindat--pack-u24r #[257 "\302!\210\303\304\"	\305\306\"I\210	T\211\207" [bindat-raw bindat-idx bindat--pack-u16r ash -16 logand 255] 7 (#$ . 12132)])
#@10 

(fn V)
(defalias 'bindat--pack-u32r #[257 "\300!\210\300\301\302\"!\207" [bindat--pack-u16r ash -16] 5 (#$ . 12313)])
#@10 

(fn V)
(defalias 'bindat--pack-u64r #[257 "\300!\210\300\301\302\"!\207" [bindat--pack-u32r ash -32] 5 (#$ . 12441)])
#@14 

(fn LEN V)
(defalias 'bindat--pack-str #[514 "G^\302\211W\203	\\HI\210\211T\262\202\266	\\\211\207" [bindat-raw bindat-idx 0] 8 (#$ . 12569)])
#@10 

(fn V)
(defalias 'bindat--pack-strz #[257 "\211G\302\211W\203	\\HI\210\211T\262\202\210	\\T\211\207" [bindat-raw bindat-idx 0] 7 (#$ . 12735)])
#@14 

(fn LEN V)
(defalias 'bindat--pack-bits #[514 "\302_S\303\211\304Y\205O\304\262\204\302Z\262\202=\305\262\304V\203=>\2030\306\"\262S\262\307\310\"\262\202\211	\311\312\"I\210	T\211\266\202\207" [bindat-raw bindat-idx 8 nil 0 128 logior ash -1 logand 255] 11 (#$ . 12899)])
#@37 

(fn V TYPE LEN &optional VECTYPE)
(defalias 'bindat--pack-item #[1027 "\302=\203\f\303\262\304\262\204\\\211\207\305\267\202\217	\306\307\"I\210T\211\207\310!\207\311!\207\312!\207\313!\207\314!\207\315!\207\316\"\207\317\"\207G\320:\203aA@\262\3218\262\202k\206f\322\262\323\262V\203t\262\324\211W\205\216\325H$\210\211T\262\202u\207\\\211\207" [bindat-idx bindat-raw ip vec 4 #s(hash-table size 16 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (byte 28 u8 28 short 42 word 42 u16 42 u24 46 long 50 dword 50 u32 50 u16r 54 u24r 58 u32r 62 bits 66 strz 71 str 71 vec 76)) logand 255 bindat--pack-u16 bindat--pack-u24 bindat--pack-u32 bindat--pack-u16r bindat--pack-u24r bindat--pack-u32r bindat--pack-bits bindat--pack-str 1 2 u8 nil 0 bindat--pack-item] 12 (#$ . 13211)])
#@20 

(fn STRUCT SPEC)
(defalias 'bindat--pack-group #[514 "\305!>\203\305!>\204\306\307\310D\"\210\211\311H!\207\312\211\211\205v\211@\211@A@\3138\314=\2059\3118\311\203R:\203R@\315=\203R\315A@\316\"\262\203j:\203j@\315=\203j\315A@\316\"\262\317>\203|\313\262\262\262\312\262:\203\220@\315=\203\220\315A@\316\"\262:\203\242\315=\204\242\320\321\n#\262\204\251\322\262\323\267\202a\203\301\315\316\"B\nB\266\202o\315\316\"\266\202o\\\266\202o\211S\\\245_\266\202\266\202o\324\203\362\321\n\"\202\363\n\315\316\"\"\266\202o\325\211W\203\324\321\n	\"8	\233\"\210\211T\262\202\376\266\202o\233\312\211\203[@\262A\262@\262\211\f\232\204O\211\316=\204O\211:\203'\315\316\"\203'\324\nA\"\210\312\262\202')\266	\202o\321\n\"\326	$\266A\266\202\202\"\262*\207" [cl-struct-bindat--type-tags last struct bindat-idx tag type-of signal wrong-type-argument bindat--type 3 nil 2 vec eval t (eval fill align struct union) apply bindat-get-field 1 #s(hash-table size 6 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (eval 175 fill 202 align 211 struct 229 repeat 253 union 286)) bindat--pack-group 0 bindat--pack-item] 16 (#$ . 14069)])
#@247 Return binary data packed according to SPEC for structured data STRUCT.
Optional third arg RAW is a pre-allocated unibyte string or vector to
pack into.
Optional fourth arg IDX is the starting offset into RAW.

(fn SPEC STRUCT &optional RAW IDX)
(defalias 'bindat-pack #[1026 "\302!\203\n\303\304!\210\211\206\305\206\306\307\"\\\305\"\310\"\210?\205+	*\207" [bindat-idx bindat-raw multibyte-string-p error "Pre-allocated string is multibyte" 0 make-string bindat-length bindat--pack-group] 9 (#$ . 15345)])
#@272 Format vector VECT using element format FMT and separator SEP.
Result is a string with each element of VECT formatted using FMT and
separated by the string SEP.  If optional fourth arg LEN is given, use
only that many elements from VECT.

(fn VECT FMT SEP &optional LEN)
(defalias 'bindat-format-vector #[1027 "\211\203\n\300O\262\301\302\303\"#\207" [0 mapconcat make-closure #[257 "\301\300\"\207" [V0 format] 4 "\n\n(fn X)"]] 8 (#$ . 15878)])
#@145 Format vector VECT in decimal format separated by dots.
If optional second arg SEP is a string, use that as separator.

(fn VECT &optional SEP)
(defalias 'bindat-vector-to-dec #[513 "\300\301;\203\f\202
\302#\207" [bindat-format-vector "%d" "."] 6 (#$ . 16339)])
#@143 Format vector VECT in hex format separated by colons.
If optional second arg SEP is a string, use that as separator.

(fn VECT &optional SEP)
(defalias 'bindat-vector-to-hex #[513 "\300\301;\203\f\202
\302#\207" [bindat-format-vector "%02x" ":"] 6 (#$ . 16614)])
#@124 Format vector IP as an ip address in dotted notation.
The port (if any) is omitted.  IP can be a string, as well.

(fn IP)
(defalias 'bindat-ip-to-string #[257 "\300!\203\301\302\"\207\303\304\305H\306H\307H\310H%\207" [vectorp format-network-address t format "%d.%d.%d.%d" 0 1 2 3] 8 (#$ . 16889)])
#@15 

(fn BITLEN)
(defalias 'bindat--unpack-uint #[257 "\302\211\211W\203\303\304\305\"	H	T\"\262\211\305\\\262\202\207" [bindat-raw bindat-idx 0 logior ash 8] 7 (#$ . 17203)])
#@15 

(fn BITLEN)
(defalias 'bindat--unpack-uintr #[257 "\302\211\211W\203\303\304	H	T\"\"\262\211\305\\\262\202\207" [bindat-raw bindat-idx 0 logior ash 8] 8 (#$ . 17393)])
#@17 

(fn BITLEN V)
(defalias 'bindat--pack-uint #[514 "\302\245\302S_[\303\211W\2054\304\305\306\307\"\"	\305\306\"I\210	T\211\266\302\\\262\210\211T\262\202	\207" [bindat-raw bindat-idx 8 0 nil logand 255 ash] 12 (#$ . 17581)])
#@17 

(fn BITLEN V)
(defalias 'bindat--pack-uintr #[514 "\302\245\303\211W\205+\304\305\306\"	\305\306\"I\210	T\211\266\307\310\"\262\210\211T\262\202\207" [bindat-raw bindat-idx 8 0 nil logand 255 ash -8] 11 (#$ . 17829)])
#@96 Like `pcase' but optimize the code under the assumption that it's exhaustive.

(fn &rest ARGS)
(defalias 'bindat--pcase '(macro . #[128 "\300\301\302\"B\207" [pcase append ((pcase--dontcare nil))] 5 (#$ . 18068)]))
(byte-code "\300\301\302\303#\304\301\305\306#\210\307\310\311\310\312\313#\314#\210\315\310\313\316\313\317%\210\315\310\313\320\313\321%\210\315\310\313\322\313\323%\210\315\310\313\324\313\325%\210\315\310\313\326\313\327%\210\315\310\313\330\313\331%\210\315\310\313\332\313\333%\210\315\310\313\334\313\335%\210\315\310\313\336\313\337%\210\315\310\313\340\313\341%\210\315\310\313\342\313\343%\210\315\310\313\344\313\345%\210\315\310\313\346\313\347%\210\315\310\313\350\313\351%\210\352\353\354\"\210\352\355\356\"\207" [function-put bindat--pcase lisp-indent-function 1 put edebug-form-spec pcase defalias bindat--type cl-generic-define (op head &rest args) nil "Return the code for the operation OP of the Bindat type (HEAD . ARGS).\nOP can be one of: unpack', (pack VAL), or (length VAL) where VAL\nis the name of a variable that will hold the value we need to pack.\n\n(fn OP HEAD &rest ARGS)" cl-generic-define-method (op (_ (eql 'byte))) #[514 "\300=\203\301\207\242\211\302=\203\303\207\243\304B\207" [unpack (bindat--unpack-u8) length (cl-incf bindat-idx 1) bindat--pack-u8] 6 "\n\n(fn OP _)"] (op (_ (eql 'uint)) n) #[771 "\211\300=\203\301\302\"\207\303=\203\304D\207\242\211\305=\203&\306\307\310\311BBE\207\243\312BB\207" [8 bindat--type byte unpack bindat--unpack-uint length cl-incf bindat-idx / (8) bindat--pack-uint] 9 "\n\n(fn OP _ N)"] (op (_ (eql 'uintr)) n) #[771 "\211\300=\203\301\302\"\207\303=\203\304D\207\242\211\305=\203&\306\307\310\311BBE\207\243\312BB\207" [8 bindat--type byte unpack bindat--unpack-uintr length cl-incf bindat-idx / (8) bindat--pack-uintr] 9 "\n\n(fn OP _ N)"] (op (_ (eql 'str)) len) #[771 "\300=\203\n\301D\207\242\211\302=\203\303\304E\207\243\305BB\207" [unpack bindat--unpack-str length cl-incf bindat-idx bindat--pack-str] 8 "\n\n(fn OP _ LEN)"] (op (_ (eql 'strz)) &optional len) #[770 "\300=\203\n\301D\207\242\211\302=\203:\243\211\242\243\303\304\204%\302D\2028\247\2030\2028\305\302DEE\207\243\306!\203F\202I\307\310!\311\312BB\313BF=\203[\207\314DC\"\207" [unpack bindat--unpack-strz length cl-incf bindat-idx or macroexp-const-p make-symbol "len" if bindat--pack-str bindat--pack-strz macroexp-let*] 13 "\n\n(fn OP _ &optional LEN)"] (op (_ (eql 'bits)) len) #[771 "\300=\203\n\301D\207\242\211\302=\203\303\304E\207\243\305BB\207" [unpack bindat--unpack-bits length cl-incf bindat-idx bindat--pack-bits] 8 "\n\n(fn OP _ LEN)"] (_op (_ (eql 'fill)) len) #[771 "\300\301\302E\303BB\207" [progn cl-incf bindat-idx (nil)] 7 "\n\n(fn OP _ LEN)"] (_op (_ (eql 'align)) len) #[771 "\300\301\302\303F\304BB\207" [progn cl-callf bindat--align bindat-idx (nil)] 8 "\n\n(fn OP _ LEN)"] (op (_ (eql 'type)) exp) #[771 "\300=\203\f\301\302DD\207\242\211\303=\203\243\301\304DBB\207\243\301\305DBB\207" [unpack funcall bindat--type-ue length bindat--type-le bindat--type-pe] 8 "\n\n(fn OP _ EXP)"] (op (_ (eql 'vec)) count &rest type) #[899 "\211\204\301\262\302\303!\"\304\305=\203*\306\307D\310B\311\312\313\314\315\316	DFE\317BBB\207\242\211\320=\203S\243\321\262\211:\203G\211\242\211\322=\203:\243\211:\203-\211\242\211:\203 \211\242\211\323=\203\243\211:\203\211\242\211:\203\364\211\242\243\211\204\345\243\211:\203\326\211\242\211:\203\307\211\242\211\324=\203\270\243\211:\203\251\211\242\211\325=\203\232\243\211:\203\213\211\242\211:\203|\211\242\211\326=\203m\243\211:\203^\211\242\211\325=\203O\243\211:\203@\211\242\243\211\2041\243\211\204\"
\243\211\204\243\211\203\357\242\243! #\207\327CC\"\204\330\325\331!EE\207\242\243! #\207\242\243 #\207\242\243#\207\242\243#\207\242\243#\207\242\243#\207\242\243#\207\242\243#\207\242\243#\207\242\243#\207\242\243#\207
\242\243#\207\f\242
\243#\207\242\f\243#\207\n\242\243#\207	\242\n\243
#\207\242\243#\207\242\243\n
#\207\242\243	
\f#\207\242\243\f#\207\242\243\n#\207\242\243\n	#\207\242\243	#\207\243\211\242\243#\207" [macroexpand-all-environment (byte) macroexpand-all bindat--fun #[771 "\300\301D\302\303\304BBEE\207" [dotimes bindat--i funcall elt (bindat--i)] 10 "\n\n(fn COUNT FUN VAL)"] unpack let* bindat--len ((bindat--v (make-vector bindat--len 0))) dotimes (bindat--i bindat--len) aset bindat--v bindat--i funcall (bindat--v) length nil function lambda setq bindat-idx + macroexp--fgrep cl-incf *] 39 "\n\n(fn OP ## COUNT &rest TYPE)"] (op (_ (eql 'unit)) val) #[771 "\300=\205\211\207" [unpack] 5 "\n\n(fn OP _ VAL)"] (op (_ (eql 'struct)) &rest args) #[642 "\300\301#\207" [apply bindat--type] 7 "\n\n(fn OP ## &rest ARGS)"] (op (_ (eql :pack-var)) var &rest fields) #[899 "\211A:\204\n\300\301!\210\302\303=\203\211\"\207\204\211\"\207\243\211\242\243\304DC\305\306	#E\207" [error "`:pack-var VAR' needs to be followed by fields" #[514 "\300\301#\207" [apply bindat--type] 6 "\n\n(fn OP FIELDS)"] unpack let apply bindat--type] 14 "\n\n(fn OP ## VAR &rest FIELDS)"] (op (field cons) &rest fields) #[642 "\300C\211\301\302#\240\210\211\242\262B\300\"\207" [nil make-closure #[514 "\302\204R\300\303=\203P\302\211\203D\211@\211\242\243\304=\203/\203+\305E\2029\211\2029\306\211\307DEE\262\266A\266\202\202\210\211\262\302\262\266\202\202\241\302\207:\203\232\242\211\310=\203\247\243\211:\203\233\211\242\243\211\204\216\203\201\300\303=\205\226\262\266\302\202\242\302\262	\262\266\311\202\242\312\313\"\262\302\266\202\202\242\312\313\"\262\302\262\202\223\211:\203\214\211\242\243\243\314>\211\205\304\211A@\315G\"\262\262\316\317\320G\"!\304=\203\327\211\202\353\321!\203\352\322\323!\324\302O!\202\353\325!\301\242	B\fB\"\300\303=\2031\326\327DDCE	\304=\204	\f\236\204\211\262\302\202*\330\317\331\f\"\"\262\302\262\266\205\202\205\300\243\211\242\243\326	\206T
\304=\203J\202T\332\333\307DEDDC\327\nE\205y\326	=?\205q	DC\334D	FCBBB\262\266\302\262\266\205\262\266\203\202\223\312\313\"\262\302\262\266\202\202\241\312\313\"\266\203\302\204\207" [V0 V1 nil unpack _ nconc cons quote :unpack-val :recurse error "Unrecognized format in bindat fields: %S" :pack-val butlast make-symbol format "field%d" keywordp intern symbol-name 1 bindat--fun let funcall macroexp-warn-and-return "Duplicate label: %S" cdr-safe assq ignore] 25 "\n\n(fn FIELDS LABELS)"]] 9 "\n\n(fn OP FIELD &rest FIELDS)"] def-edebug-elem-spec bindat-struct ([&rest (symbolp bindat-type &optional ":pack-val" def-form)] &optional ":unpack-val" def-form) bindat-type (&or ["uint" def-form] ["uintr" def-form] ["str" def-form] ["strz" &optional def-form] ["bits" def-form] ["fill" def-form] ["align" def-form] ["vec" def-form bindat-type] ["repeat" def-form bindat-type] ["type" def-form] ["struct" bindat-struct] ["unit" def-form] [":pack-var" symbolp bindat-type] symbolp bindat-struct)] 7)
#@1746 Return the Bindat type value to pack&unpack TYPE.
TYPE is a Bindat type expression.  It can take the following forms:

  uint BITLEN		- Big-endian unsigned integer
  uintr BITLEN		- Little-endian unsigned integer
  str LEN		- Byte string
  strz [LEN]		- Zero-terminated byte-string
  bits LEN		- Bit vector (LEN is counted in bytes)
  fill LEN		- Just a filler
  align LEN		- Fill up to the next multiple of LEN bytes
  vec COUNT TYPE	- COUNT repetitions of TYPE
  type EXP		- Indirection; EXP should return a Bindat type value
  unit EXP              - 0-width type holding the value returned by EXP
  struct FIELDS...      - A composite type

When the context makes it clear, the symbol `struct' can be omitted.
A composite type is a list of FIELDS where each FIELD is of the form

  (LABEL TYPE)

where LABEL can be `_' if the field should not deserve a name.

Composite types get normally packed/unpacked to/from alists, but this can be
controlled in the following way:
- If the list of fields ends with `:unpack-val EXP', then unpacking will
  return the value of EXP (which has the previous fields in its scope).
- If a field's TYPE is followed by `:pack-val EXP', then the value placed
  into this field will be that returned by EXP instead of looking up the alist.
- If the list of fields is preceded with `:pack-var VAR' then the object to
  be packed is bound to VAR when evaluating the EXPs of `:pack-val'.

All the above BITLEN, LEN, COUNT, and EXP are ELisp expressions evaluated
in the current lexical context extended with the previous fields.

TYPE can additionally be one of the Bindat type macros defined with
`bindat-defmacro' (and listed below) or an ELisp expression which returns
a bindat type expression.

(fn &rest TYPE)
(defalias 'bindat-type '(macro . #[128 "\300\301\302\303\304\305\"\306\304\307\"\310\304\311\n\"\257E\207" [progn (defvar bindat-idx) bindat--make :ue bindat--toplevel unpack :le length :pe pack] 12 (#$ . 25474)]))
(byte-code "\300\301\302\303#\304\301\305\306#\207" [function-put bindat-type lisp-indent-function 0 put edebug-form-spec (bindat-type)] 5)
(defconst bindat--primitives '(byte uint uintr str strz bits fill align struct type vec unit))
(defvar bindat--macroenv (mapcar #[257 "\211\300\301\"B\207" [make-closure #[128 "\301\300B!\207" [V0 bindat--makefun] 4 "\n\n(fn &rest ARGS)"]] 5 "\n\n(fn S)"] bindat--primitives))
#@65 Define a new Bindat type as a macro.

(fn NAME ARGS &rest BODY)
(defalias 'bindat-defmacro '(macro . #[642 "\300A\203!@;\204@\242\301>\203!\211A\262\242B\262\202\302\303\304\305D\306BB\307\310\237\311\312\n!DC\"BBED\207" [nil (:documentation declare) eval-and-compile setf alist-get quote (bindat--macroenv) lambda append bindat--fun macroexp-progn] 14 (#$ . 27865)]))
(byte-code "\300\301\302\303#\300\301\304\305#\306\301\307\310#\210\306\311\312\313#\207" [function-put bindat-defmacro lisp-indent-function 2 doc-string-elt 3 put edebug-form-spec (&define name sexp def-body) bindat-type function-documentation (bindat--make-docstring)] 6)
(defalias 'bindat--make-docstring #[0 "\302\303K\304\"\305\303\"\306\307!\210\310\311\312\"r\211q\210\313\314\"\216A\206 c\210\315!\211\203[\211@\211\242\243	>\204R\302\304\"\316c\210\317\320!\321%\262\322\206N\323\261\266\266A\266\202\202%\210\324 \203j\325@\"\202k\211\262*\207" [bindat--macroenv bindat--primitives documentation bindat-type raw help-split-fundoc require help-fns generate-new-buffer " *temp*" t make-closure #[0 "\301\300!\205	\302\300!\207" [V0 buffer-name kill-buffer] 2] reverse "\n\n-- " help-fns--signature indirect-function nil "\n" "Not documented." buffer-string help-add-fundoc-usage] 14])
(byte-code "\301\236\302\203\241\266\202\301B\211\262B\266\303\236\304\203+\241\266\2026\303B\211\262B\266\305\236\306\203D\241\266\207\305B\211\262B\210\207" [bindat--macroenv u8 #[0 "\300\301!\207" [bindat--fun (byte)] 2 "Unsigned 8bit integer."] sint #[514 "\300\301\302!\301\303!\301\304!\305D\306\307\310DED\311\211EDE\312\313\314\315\316\317D\320\fD\321\316\322\311\314E\323BBB\257\324\316\325\315E\326\315E\327BBB\257E\266\203!\207" [bindat--fun make-symbol "bitlen" "max" "wrap" let* ash 1 1- + struct :pack-var v n if uintr uint :pack-val (< v 0) (v) :unpack-val >= - (n)] 22 "Signed integer of size BITLEN.\nBigendian if R is nil and little endian if not.\n\n(fn BITLEN R)"] repeat #[385 "\300\301\302\211\303\304\305\"BBB\306BBB!\207" [bindat--fun :pack-var v vec append (:pack-val v) (:unpack-val (append v nil))] 11 "Like `vec', but unpacks to a list rather than a vector.\n\n(fn COUNT &rest TYPE)"]] 4)
#@341 The operation we're currently building.
This is a simple symbol and can be one of: `unpack', `pack', or `length'.
This is used during macroexpansion of `bindat-type' so that the
macros know which code to generate.
FIXME: this is closely related and very similar to the `op' argument passed
to `bindat--type', yet it's annoyingly different.
(defvar bindat--op nil (#$ . 30164))
#@13 

(fn TYPE)
(defalias 'bindat--fun #[257 "\300@!\204
\211@:\203\301B\207\207" [keywordp struct] 3 (#$ . 30547)])
#@13 

(fn TYPE)
(defalias 'bindat--makefun #[257 "\301\302!\303=?\205\f\211C\304\305\306\303=\203\303\202\211B\262#\211:\203T\211\242\211\307=\203O\243\211:\203J\211\242\243\232\203C\207\"\207\"\207\"\207\"\207" [bindat--op make-symbol "v" unpack #[514 "\300E\207" [lambda] 5 "\n\n(fn ARGS EXP)"] apply bindat--type funcall] 12 (#$ . 30671)])
#@16 

(fn OP TYPE)
(defalias 'bindat--toplevel #[514 "\303	\n\"\304\305!\")\207" [bindat--op bindat--macroenv macroexpand-all-environment append macroexpand-all bindat--fun] 6 (#$ . 31054)])
(provide 'bindat)

Youez - 2016 - github.com/yon3zu
LinuXploit