;;; Code:
-(eval-and-compile
- (defalias 'binhex-char-int
- (if (fboundp 'char-int)
- 'char-int
- 'identity)))
-
(defgroup binhex nil
"Decoding of BinHex (binary-to-hexadecimal) data."
:group 'mail
(defun binhex-string-big-endian (string)
(let ((ret 0) (i 0) (len (length string)))
(while (< i len)
- (setq ret (+ (ash ret 8) (binhex-char-int (aref string i)))
+ (setq ret (+ (ash ret 8) (aref string i))
i (1+ i)))
ret))
(defun binhex-string-little-endian (string)
(let ((ret 0) (i 0) (shift 0) (len (length string)))
(while (< i len)
- (setq ret (+ ret (ash (binhex-char-int (aref string i)) shift))
+ (setq ret (+ ret (ash (aref string i) shift))
i (1+ i)
shift (+ shift 8)))
ret))
(let ((pos (point-min)) len)
(vector
(prog1
- (setq len (binhex-char-int (char-after pos)))
+ (setq len (char-after pos))
(setq pos (1+ pos)))
(buffer-substring pos (setq pos (+ pos len)))
(prog1
- (setq len (binhex-char-int (char-after pos)))
+ (setq len (char-after pos))
(setq pos (1+ pos)))
(buffer-substring pos (setq pos (+ pos 4)))
(buffer-substring pos (setq pos (+ pos 4)))
(binhex-decode-region-external start end)
(binhex-decode-region-internal start end)))
+(define-obsolete-function-alias 'binhex-char-int #'identity)
+
(provide 'binhex)
;;; binhex.el ends here
;;; Code:
-(defalias 'uudecode-char-int
- (if (fboundp 'char-int)
- 'char-int
- 'identity))
-
(defgroup uudecode nil
"Decoding of uuencoded data."
:group 'mail
((> (skip-chars-forward uudecode-alphabet end) 0)
(setq lim (point))
(setq remain
- (logand (- (uudecode-char-int (char-after inputpos)) 32)
+ (logand (- (char-after inputpos) 32)
63))
(setq inputpos (1+ inputpos))
(if (= remain 0) (setq done t))
(setq bits (+ bits
(logand
(-
- (uudecode-char-int (char-after inputpos)) 32)
+ (char-after inputpos) 32)
63)))
(if (/= counter 0) (setq remain (1- remain)))
(setq counter (1+ counter)
(uudecode-decode-region-external start end file-name)
(uudecode-decode-region-internal start end file-name)))
+(define-obsolete-function-alias 'uudecode-char-int #'identity "28.1")
+
(provide 'uudecode)
;;; uudecode.el ends here