home *** CD-ROM | disk | FTP | other *** search
- ;;; compiled by jwz@thalidomide on Thu Jul 2 16:35:56 1992
- ;;; from file /u/jwz/emacs19/lisp/packages/hexl.el
- ;;; emacs version 19.2.1 Lucid.
- ;;; bytecomp version 2.07; 17-jun-92.
- ;;; optimization is on.
- ;;; this file uses opcodes which do not exist in Emacs18.
-
- (if (and (boundp 'emacs-version)
- (or (and (boundp 'epoch::version) epoch::version)
- (string-lessp emacs-version "19")))
- (error "This file was compiled for Emacs19."))
-
- (defvar hexl-program "hexl" "\
- The program that will hexlify and de-hexlify its stdin. hexl-program
- will always be concated with hexl-options and " -de " when dehexlfying a\nbuffer.")
- (defvar hexl-iso "" "\
- If your emacs can handle ISO characters, this should be set to
- \"-iso\" otherwise it should be \"\".")
- (defvar hexl-options (format "-hex %s" hexl-iso) "\
- Options to hexl-program that suit your needs.")
- (defvar hexlify-command (format "%s %s" hexl-program hexl-options) "\
- The command to use to hexlify a buffer. It is the concatination of
- `hexl-program' and `hexl-options'.")
- (defvar dehexlify-command (format "%s -de %s" hexl-program hexl-options) "\
- The command to use to unhexlify a buffer. It is the concatination of
- `hexl-program', the option \"-de\", and `hexl-options'.")
- (defvar hexl-max-address 0 "\
- Maximum offset into hexl buffer.")
- (byte-code "└┴!¼é┬┬ç" [boundp hexl-mode-map nil] 2)
- (fset 'hexl-mode #[(&optional arg) "┴=½ä┬├!ç─ ê┼╞!ê╟ ╚ !ê┼╩!ê\n╠┼═!ê┴╬ `S╘=¼Æ½Ä╒ S╓Ñ╫_╪\\ë¬ÿ┌╒ S█ ê▄!ê▌!+ç" [major-mode hexl-mode error "You are already in hexl mode." kill-all-local-variables make-local-variable hexl-mode-old-local-map current-local-map use-local-map hexl-mode-map hexl-mode-old-mode-name mode-name "Hexl" hexl-mode-old-major-mode buffer-modified-p buffer-read-only original-point read-only modified arg 1 buffer-size 68 16 15 hexl-max-address nil hexlify-buffer set-buffer-modified-p hexl-goto-address] 3 "\
- \\<hexl-mode-map>
- A major mode for editting binary files in hex dump format.
-
- This function automatically converts a buffer into the hexl format
- using the function `hexlify-buffer'.
-
- Each line in the buffer has an `address' (displayed in hexadecimal)
- representing the offset into the file that the characters on this line
- are at and 16 characters from the file (displayed as hexadecimal
- values grouped every 16 bits) and as their ASCII values.
-
- If any of the characters (displayed as ASCII characters) are
- unprintable (control or meta characters) they will be replaced as
- periods.
-
- If hexl-mode is invoked with an argument the buffer is assumed to be
- in hexl-format.
-
- A sample format:
-
- HEX ADDR: 0001 0203 0405 0607 0809 0a0b 0c0d 0e0f ASCII-TEXT
- -------- ---- ---- ---- ---- ---- ---- ---- ---- ----------------
- 00000000: 5468 6973 2069 7320 6865 786c 2d6d 6f64 This is hexl-mod
- 00000010: 652e 2020 4561 6368 206c 696e 6520 7265 e. Each line re
- 00000020: 7072 6573 656e 7473 2031 3620 6279 7465 presents 16 byte
- 00000030: 7320 6173 2068 6578 6164 6563 696d 616c s as hexadecimal
- 00000040: 2041 5343 4949 0a61 6e64 2070 7269 6e74 ASCII.and print
- 00000050: 6162 6c65 2041 5343 4949 2063 6861 7261 able ASCII chara
- 00000060: 6374 6572 732e 2020 416e 7920 636f 6e74 cters. Any cont
- 00000070: 726f 6c20 6f72 206e 6f6e 2d41 5343 4949 rol or non-ASCII
- 00000080: 2063 6861 7261 6374 6572 730a 6172 6520 characters.are
- 00000090: 6469 7370 6c61 7965 6420 6173 2070 6572 displayed as per
- 000000a0: 696f 6473 2069 6e20 7468 6520 7072 696e iods in the prin
- 000000b0: 7461 626c 6520 6368 6172 6163 7465 7220 table character
- 000000c0: 7265 6769 6f6e 2e0a region..
-
- Movement is as simple as movement in a normal emacs text buffer. Most
- cursor movement bindings are the same (ie. Use \\[hexl-backward-char], \\[hexl-forward-char], \\[hexl-next-line], and \\[hexl-previous-line]
- to move the cursor left, right, down, and up).
-
- Advanced cursor movement commands (ala \\[hexl-beginning-of-line], \\[hexl-end-of-line], \\[hexl-beginning-of-buffer], and \\[hexl-end-of-buffer]) are
- also supported.
-
- There are several ways to change text in hexl mode:
-
- ASCII characters (character between space (0x20) and tilde (0x7E)) are
- bound to self-insert so you can simply type the character and it will
- insert itself (actually overstrike) into the buffer.
-
- \\[hexl-quoted-insert] followed by another keystroke allows you to insert the key even if
- it isn't bound to self-insert. An octal number can be supplied in place
- of another key to insert the octal number's ASCII representation.
-
- \\[hexl-insert-hex-char] will insert a given hexadecimal value (if it is between 0 and 0xFF)
- into the buffer at the current point.
-
- \\[hexl-insert-octal-char] will insert a given octal value (if it is between 0 and 0377)
- into the buffer at the current point.
-
- \\[hexl-insert-decimal-char] will insert a given decimal value (if it is between 0 and 255)
- into the buffer at the current point.
-
- \\[hexl-save-buffer] will save the buffer in is binary format.
-
- \\[hexl-mode-exit] will exit hexl-mode.
-
- Note: \\[write-file] will write the file out in HEXL FORMAT.
-
- You can use \\[hexl-find-file] to visit a file in hexl-mode.
-
- \\[describe-bindings] for advanced commands." "p"])
- (fset 'hexl-save-buffer #[nil "└┴ ½╔è┬├!─ ┼ ed╞ \nëqê═ #êqê╬ ê╧ ê┴ ed|ê═ #ê╨!ê.¬à╤╥!ê╞!ç" [set-buffer-modified-p buffer-modified-p generate-new-buffer " hexl" buffer-name buffer-file-name nil modified end start file-name name buf insert-buffer-substring dehexlify-buffer save-buffer kill-buffer message "(No changes need to be saved)"] 8 "\
- Save a hexl format buffer as binary in visited file if modified." nil])
- (fset 'hexl-find-file #[(filename) "└ !ê\n├=?¡é├ ç" [find-file filename major-mode hexl-mode] 2 "\
- Edit file FILENAME in hexl-mode.
-
- Switch to a buffer visiting file FILENAME, creating one in none exists." "fFilename: "])
- (fset 'hexl-mode-exit #[(&optional arg) "┴=¼â¼£┬ ─ T╚╔ ê╩!êbê+═!ê╤p!ç" [arg 1 buffer-modified-p buffer-read-only hexl-current-address original-point read-only modified nil dehexlify-buffer set-buffer-modified-p hexl-mode-old-mode-name mode-name use-local-map hexl-mode-old-local-map hexl-mode-old-major-mode major-mode switch-to-buffer] 3 "\
- Exit hexl-mode returning to previous mode.
- With arg, don't unhexlify buffer." "p"])
- (fset 'hexl-current-address #[nil "`└ª┴Z┬`└Ñ┼_ë╞ÑZ╟Ñ\\ë*ç" [68 11 0 hexl-address current-column 16 5 2] 5 "\
- Return current hexl-address." nil])
- (fset 'hexl-address-to-marker #[(address) "┴Ñ┬_┴ª├_─Ñ┼\\\\ç" [address 16 68 5 2 11] 3 "\
- Return marker for ADDRESS." "nAddress: "])
- (fset 'hexl-goto-address #[(address) "┴W¼à\nV½ä├─!ê┼!bç" [address 0 hexl-max-address error "Out of hexl region." hexl-address-to-marker] 2 "\
- Goto hexl-mode (decimal) address ADDRESS.
-
- Signal error if ADDRESS out of range." "nAddress: "])
- (fset 'hexl-goto-hex-address #[(hex-address) "└┴\n!!ç" [hexl-goto-address hexl-hex-string-to-integer hex-address] 3 "\
- Goto hexl-mode address (hex string) HEX-ADDRESS.
-
- Signal error if HEX-ADDRESS is out of range." "sHex Address: "])
- (fset 'hexl-hex-string-to-integer #[(hex-string) "└\n├Ü¼Æ ─_┼╞\n!!\\\n╟╚Oë¬j )ç" [0 hex-num hex-string "" 16 hexl-hex-char-to-integer string-to-char 1 nil] 5 "\
- Return decimal integer for HEX-STRING." "sHex number: "])
- (fset 'hexl-octal-string-to-integer #[(octal-string) "└\n├Ü¼Æ ─_┼╞\n!!\\\n╟╚Oë¬j )ç" [0 oct-num octal-string "" 8 hexl-oct-char-to-integer string-to-char 1 nil] 5 "\
- Return decimal integer for OCTAL-STRING." "sOctal number: "])
- (fset 'hexl-backward-char #[(arg) "└┴ \nZ!ç" [hexl-goto-address hexl-current-address arg] 3 "\
- Move to left ARG bytes (right if ARG negative) in hexl-mode." "p"])
- (fset 'hexl-forward-char #[(arg) "└┴ \n\\!ç" [hexl-goto-address hexl-current-address arg] 3 "\
- Move right ARG bytes (left if ARG negative) in hexl-mode." "p"])
- (fset 'hexl-backward-short #[(arg) "└┴ ─W½╒[ë─V½╖\n┼\n╞\"ܼû\nV½ë╚╔!ê¬Ü┼\n╞\"¬ô\nV½ë╚╔!ê¬ä\n╩\\Së¬E\nV½ë╚╔!ê¬░┼\n╞\"¬⌐─V½ñ\n╦\n╠\"ܼç╦\n╠\"¬Å\n─ܼå\n╩Z¬ä╚═!êSë¬X\n)!ç" [hexl-goto-address hexl-current-address address arg 0 logior 3 hexl-max-address message "End of buffer." 4 logand -4 "Beginning of buffer."] 6 "\
- Move to left ARG shorts (right if ARG negative) in hexl-mode." "p"])
- (fset 'hexl-forward-short #[(arg) "└ [!ç" [hexl-backward-short arg] 2 "\
- Move right ARG shorts (left if ARG negative) in hexl-mode." "p"])
- (fset 'hexl-backward-word #[(arg) "└┴ ─W½╒[ë─V½╖\n┼\n╞\"ܼû\nV½ë╚╔!ê¬Ü┼\n╞\"¬ô\nV½ë╚╔!ê¬ä\n╩\\Së¬E\nV½ë╚╔!ê¬░┼\n╞\"¬⌐─V½ñ\n╦\n╠\"ܼç╦\n╠\"¬Å\n─ܼå\n╩Z¬ä╚═!êSë¬X\n)!ç" [hexl-goto-address hexl-current-address address arg 0 logior 7 hexl-max-address message "End of buffer." 8 logand -8 "Beginning of buffer."] 6 "\
- Move to left ARG words (right if ARG negative) in hexl-mode." "p"])
- (fset 'hexl-forward-word #[(arg) "└ [!ç" [hexl-backward-word arg] 2 "\
- Move right ARG words (left if ARG negative) in hexl-mode." "p"])
- (fset 'hexl-previous-line #[(arg) "└ [!ç" [hexl-next-line arg] 2 "\
- Move vertically up ARG lines [16 bytes] (down if ARG negative) in
- hexl-mode.
-
- If there is byte at the target address move to the last byte in that
- line." "p"])
- (fset 'hexl-next-line #[(arg) "└┴ \n├_\\\n┼W½É┼W½ï╞╟!ê┴ ├ª¬¬V½Å├ª├ªW½à¬òV½Å╞╟!ê╔╩\"┴ ├ª\\)!ç" [hexl-goto-address hexl-current-address arg 16 address 0 message "Out of hexl region." hexl-max-address logand -16] 4 "\
- Move vertically down ARG lines [16 bytes] (up if ARG negative) in
- hexl-mode.
-
- If there is no byte at the target address move to the last byte in that
- line." "p"])
- (fset 'hexl-beginning-of-buffer #[(arg) "└`!ê┴\nS!ç" [push-mark hexl-goto-address arg] 2 "\
- Move to the beginning of the hexl buffer; leave hexl-mark at previous
- posistion.
-
- With arg N, put point N bytes of the way from the true beginning." "p"])
- (fset 'hexl-end-of-buffer #[(arg) "└`!ê┴\nSZ!ç" [push-mark hexl-goto-address hexl-max-address arg] 3 "\
- Goto hexl-max-address minus ARG." "p"])
- (fset 'hexl-beginning-of-line #[nil "`└Ñ└_┴\\bç" [68 11] 2 "\
- Goto beginning of line in hexl mode." nil])
- (fset 'hexl-end-of-line #[nil "└┴┬ ├\"ëV½é)!ç" [hexl-goto-address logior hexl-current-address 15 address hexl-max-address] 5 "\
- Goto end of line in hexl mode." nil])
- (fset 'hexl-scroll-down #[(arg) "¼å┴ S¬ä┬!├[!ç" [arg window-height prefix-numeric-value hexl-scroll-up] 2 "\
- Scroll hexl buffer window upward ARG lines; or near full window if no ARG." "P"])
- (fset 'hexl-scroll-up #[(arg) "¼å┴ S¬ä┬!├_─ \\V¼ê\\╚W½à╔╩!¬è╦\\!ê╠╚!*ç" [arg window-height prefix-numeric-value 16 hexl-current-address address movement hexl-max-address 0 message "Out of hexl region." hexl-goto-address recenter] 3 "\
- Scroll hexl buffer window upward ARG lines; or near full window if no ARG." "P"])
- (fset 'hexl-beginning-of-1k-page #[nil "└┴┬ ├\"!ç" [hexl-goto-address logand hexl-current-address -1024] 4 "\
- Goto to beginning of 1k boundry." nil])
- (fset 'hexl-end-of-1k-page #[nil "└┴┬ ├\"ëV½é)!ç" [hexl-goto-address logior hexl-current-address 1023 address hexl-max-address] 5 "\
- Goto to end of 1k boundry." nil])
- (fset 'hexl-beginning-of-512b-page #[nil "└┴┬ ├\"!ç" [hexl-goto-address logand hexl-current-address -512] 4 "\
- Goto to beginning of 512 byte boundry." nil])
- (fset 'hexl-end-of-512b-page #[nil "└┴┬ ├\"ëV½é)!ç" [hexl-goto-address logior hexl-current-address 511 address hexl-max-address] 5 "\
- Goto to end of 512 byte boundry." nil])
- (fset 'hexl-quoted-insert #[(arg) "└┴ \n\"ç" [hexl-insert-char read-quoted-char arg] 3 "\
- Read next input character and insert it.
- Useful for inserting control characters.
- You may also type up to 3 octal digits, to insert a character with that code" "p"])
- (fset 'hexlify-buffer #[nil "└ed ┬$ç" [shell-command-on-region hexlify-command t] 5 "\
- Convert a binary buffer to hexl format" nil])
- (fset 'dehexlify-buffer #[nil "└ed ┬$ç" [shell-command-on-region dehexlify-command t] 5 "\
- Convert a hexl format buffer to binary." nil])
- (fset 'hexl-char-after-point #[nil "`f`Tf┬ \"ç" [lh rh hexl-htoi] 3 "\
- Return char for ASCII hex digits at point."])
- (fset 'hexl-htoi #[(lh rh) "└ !┬_└!\\ç" [hexl-hex-char-to-integer lh 16 rh] 3 "\
- Hex (char) LH (char) RH to integer."])
- (fset 'hexl-hex-char-to-integer #[(character) "┴Y½ë┬X½ä┴Zç├─\"ë╞Y½è╟X½à╚Z¬å╔╩╦\"!)ç" [character 48 57 logior 32 ch 97 102 87 error format "Invalid hex digit `%c'."] 5 "\
- Take a char and return its value as if it was a hex digit."])
- (fset 'hexl-oct-char-to-integer #[(character) "┴Y½ë┬X½ä┴Zç├─┼\"!ç" [character 48 55 error format "Invalid octal digit `%c'."] 4 "\
- Take a char and return its value as if it was a octal digit."])
- (fset 'hexl-printable-character #[(ch) "└┴\n½ò─W¼è┼Y½ê╞W½â╟¬æ¬Ä─W¼à┼Y½â╟¬ü\"ç" [format "%c" hexl-iso ch 32 127 160 46] 4 "\
- Return a displayable string for character CH."])
- (fset 'hexl-self-insert-command #[(arg) "└ \n\"ç" [hexl-insert-char last-command-char arg] 3 "\
- Insert this character." "p"])
- (fset 'hexl-insert-char #[(ch num) "└ \n├V¡╣─┼!ê╞╟\"cê ╔Ñ╩_ ╔ª╦\\\\bê─╠!ê═!cê =½å╧ !ê¬à╧ T!ê\nSë¬C)ç" [hexl-current-address address num 0 delete-char 2 format "%02x" ch 16 68 52 1 hexl-printable-character hexl-max-address hexl-goto-address] 4 "\
- Insert a character in a hexl buffer."])
- (fset 'hexl-insert-hex-char #[(arg) "└┴┬!!ë─V¼à┼W½à╞╟!¬à╚ \")ç" [hexl-hex-string-to-integer read-string "Hex number: " num 255 0 error "Hex number out of range." hexl-insert-char arg] 4 "\
- Insert a ASCII char ARG times at point for a given hexadecimal number." "p"])
- (fset 'hexl-insert-decimal-char #[(arg) "└┴┬!!ë─V¼à┼W½à╞╟!¬à╚ \")ç" [string-to-int read-string "Decimal Number: " num 255 0 error "Decimal number out of range." hexl-insert-char arg] 4 "\
- Insert a ASCII char ARG times at point for a given decimal number." "p"])
- (fset 'hexl-insert-octal-char #[(arg) "└┴┬!!ë─V¼à┼W½à╞╟!¬à╚ \")ç" [hexl-octal-string-to-integer read-string "Octal Number: " num 255 0 error "Decimal number out of range." hexl-insert-char arg] 4 "\
- Insert a ASCII char ARG times at point for a given octal number." "p"])
- (byte-code "ä5┴ ┬├─#ê┬┼╞#ê┬╟╚#ê┬╔╩#ê┬╦╠#ê═╬!╧=¼å┬╬╚#ê┬╨╤#ê┬╥╤#ê┬╙╚#ê┬╘╤#ê┬╒╓#ê┬╫╚#ê┬╪┘#ê┬┌█#ê┬▄╚#ê┬▌▐#ê┬▀╚#ê┬α╚#êß\"ßπW½Æ┬Σσ\"\"╤#ê\"Të\"¬j)┬µτ#ê┬ΦΘ#ê┬Ω╚#ê┬δ∞#ê┬φε#ê┬∩≡#ê┬±╚#ê┬≥╚#ê┬≤╚#ê┬⌠╚#ê┬⌡╚#ê┬÷╚#ê┬≈╚#ê┬°╚#ê┬∙·#ê┬√╚#ê┬ⁿ╚#ê┬²╚#ê┬■╚#ê┬ ╚#ê┬ü@ ╚#ê┬üA ╚#ê┬üB üC #ê┬üD ╚#ê┬üE üF #ê┬üG üH #ê┬üI ╚#ê┬üJ ╚#ê┬üK üL #ê┬üM üN #ê┬üO üP #ê┬üQ ╚#ê┬üR ╚#ê┬üS üT #ê┬üU ╚#ê┬üV ╚#ê┬üW ╚#ê┬üX ╚#ê┬üY ╚#ê┬üZ ╚#ê┬ü[ ╚#ê┬ü\\ ╚#ê┬ü] ╚#ê┬ü^ ╚#ê┬ü_ ╚#ê┬ü` üa #ê┬üb ╚#ê┬üc ╚#ê┬üd üe #ê┬üf üg #ê┬üh üi #ê┬üj ╚#ê┬ük ül #ê┬üm ╚#ê┴ç" [hexl-mode-map make-sparse-keymap define-key "" hexl-beginning-of-line "" hexl-backward-char "" undefined "" hexl-end-of-line "" hexl-forward-char key-binding "" help-command " " hexl-self-insert-command "\n" "" "" "" hexl-next-line "" "" hexl-previous-line "" hexl-quoted-insert "" "" hexl-scroll-up "" "" 32 ch 127 format "%c" "" hexl-beginning-of-512b-page "" hexl-backward-short "" "" hexl-insert-decimal-char "" hexl-end-of-512b-page "" hexl-forward-short "" "" " " "\n" "" "" "" "" "" hexl-insert-octal-char "" "" "" "" "" "" "" "" hexl-insert-hex-char "" "a" hexl-beginning-of-1k-page "b" hexl-backward-word "c" "d" "e" hexl-end-of-1k-page "f" hexl-forward-word "g" hexl-goto-hex-address "h" "i" "j" hexl-goto-address "k" "l" "m" "n" "o" "p" "q" "r" "s" "t" "u" "v" hexl-scroll-down "y" "z" "<" hexl-beginning-of-buffer ">" hexl-end-of-buffer "" hexl-mode-exit "" "" hexl-save-buffer ""] 6)
-