Function: inversion-decode-version

inversion-decode-version is a byte-compiled function defined in inversion.el.gz.

Signature

(inversion-decode-version VERSION-STRING)

Documentation

Decode VERSION-STRING into an encoded list.

Return value is of the form:
  (RELEASE MAJOR MINOR ...)
where RELEASE is a symbol such as full, or beta.

Source Code

;; Defined in /usr/src/emacs/lisp/obsolete/inversion.el.gz
;;; Version Checking
;;
(defun inversion-decode-version (version-string)
  "Decode VERSION-STRING into an encoded list.
Return value is of the form:
  (RELEASE MAJOR MINOR ...)
where RELEASE is a symbol such as `full', or `beta'."
  (let ((decoders inversion-decoders)
	(result nil))
    (while (and decoders (not result))
      (if (string-match (nth 1 (car decoders)) version-string)
	  (let ((ver nil)
		(num-left (nth 2 (car decoders)))
		(count 1))
	    (while (<= count num-left)
	      (setq ver (cons
			 (if (match-beginning count)
			     (string-to-number
			      (substring version-string
					 (match-beginning count)
					 (match-end count)))
			   1)
			 ver)
		    count (1+ count)))
	    (setq result (cons (caar decoders) (nreverse ver))))
        (setq decoders (cdr decoders))))
    result))