Function: archive-l-e

archive-l-e is a byte-compiled function defined in arc-mode.el.gz.

Signature

(archive-l-e STR &optional LEN)

Documentation

Convert little endian string/vector STR to integer.

Alternatively, STR may be a buffer position in the current buffer in which case a second argument, length LEN, should be supplied.

Source Code

;; Defined in /usr/src/emacs/lisp/arc-mode.el.gz
(defun archive-l-e (str &optional len)
  "Convert little endian string/vector STR to integer.
Alternatively, STR may be a buffer position in the current buffer
in which case a second argument, length LEN, should be supplied."
  (if (stringp str)
      (setq len (length str))
    (setq str (buffer-substring str (+ str len))))
  (if (multibyte-string-p str)
      (setq str (encode-coding-string str 'utf-8-emacs-unix)))
  (let ((result 0)
        (i 0))
    (while (< i len)
      (setq i (1+ i)
            result (+ (ash result 8)
		      (aref str (- len i)))))
    result))