*** inversion.el.orig	Wed Dec 11 09:56:25 2002
--- inversion.el	Wed Dec 11 16:03:22 2002
***************
*** 180,195 ****
  	     )
  	)))
  
! (defun inversion-test (package minimum &rest reserved)
!   "Test that PACKAGE meets the MINIMUM version requirement.
! PACKAGE is a symbol, similar to what is passed to `require'.
  RESERVED arguments are kept for a later user.
! MINIMUM is of similar format to return entries of
! `inversion-decode-version', or a classic version string.
! This depends on the symbol `PACKAGE-version' being defined
! in PACKAGE.
! Return nil if everything is ok.  Return an error string otherwise."
!   (let ((code (inversion-package-version package))
  	(req (if (stringp minimum)
  		 (inversion-decode-version minimum)
  	       minimum))
--- 180,200 ----
  	     )
  	)))
  
! (defun inversion-check-version (version incompatible-version
! 					minimum &rest reserved)
!   "Check that a given version meets the MINIMUM version requirement.
! VERSION, INCOMPATIBLE-VERSION and MINIMUM are of similar format to
! return entries of `inversion-decode-version', or a classic version
! string.	 INCOMPATIBLE-VERSION can be nil.
  RESERVED arguments are kept for a later user.
! Return:
! - nil if everything is ok
! - 'outdated if VERSION is less than MINIMUM.
! - 'incompatible if VERSION is not backward compatible with MINIMUM.
! - t if the check failed."
!   (let ((code (if (stringp version)
! 		  (inversion-decode-version version)
! 		version))
  	(req (if (stringp minimum)
  		 (inversion-decode-version minimum)
  	       minimum))
***************
*** 202,228 ****
        nil)
       ((inversion-< code req)
        ;; Version is too old!
!       (format "You need to upgrade package %s to %s" package minimum))
       ((inversion-< req code)
        ;; Newer is installed.  What to do?
        (let ((incompatible
! 	     (inversion-package-incompatibility-version package)))
  	(cond
  	 ((not incompatible) nil)
  	 ((or (inversion-= req incompatible)
  	      (inversion-< req incompatible))
! 	  ;; If the requested version is = or < than
! 	  ;; what the package maintainer says is incompatible,
! 	  ;; then throw that error.
! 	  (format "Package %s version is not backward compatible with %s"
! 		  package minimum))
  	 ;; Things are ok.
! 	 (t nil))
! 	)
!       )
!      (t
!       "Inversion version check failed.")
!      )))
  
  (defun inversion-require (package version file &optional directory
  				  &rest reserved)
--- 207,259 ----
        nil)
       ((inversion-< code req)
        ;; Version is too old!
!       'outdated)
       ((inversion-< req code)
        ;; Newer is installed.  What to do?
        (let ((incompatible
! 	     (if (stringp incompatible-version)
! 		 (inversion-decode-version incompatible-version)
! 	       incompatible-version)))
  	(cond
  	 ((not incompatible) nil)
  	 ((or (inversion-= req incompatible)
  	      (inversion-< req incompatible))
! 	  ;; The requested version is = or < than what the package
! 	  ;; maintainer says is incompatible.
! 	  'incompatible)
  	 ;; Things are ok.
! 	 (t nil))))
!      ;; Check failed
!      (t t))))
! 
! (defun inversion-test (package minimum &rest reserved)
!   "Test that PACKAGE meets the MINIMUM version requirement.
! PACKAGE is a symbol, similar to what is passed to `require'.
! MINIMUM is of similar format to return entries of
! `inversion-decode-version', or a classic version string.
! RESERVED arguments are kept for a later user.
! This depends on the symbols `PACKAGE-version' and optionally
! `PACKAGE-incompatible-version' being defined in PACKAGE.
! Return nil if everything is ok.	 Return an error string otherwise."
!   (let ((check (inversion-check-version
! 		(inversion-package-version package)
! 		(inversion-package-incompatibility-version package)
! 		minimum reserved)))
!     (cond
!      ((null check)
!       ;; Same version.. Yay!
!       nil)
!      ((eq check 'outdated)
!       ;; Version is too old!
!       (format "You need to upgrade package %s to %s" package minimum))
!      ((eq check 'incompatible)
!       ;; Newer is installed but the requested version is = or < than
!       ;; what the package maintainer says is incompatible, then throw
!       ;; that error.
!       (format "Package %s version is not backward compatible with %s"
! 	      package minimum))
!      ;; Check failed
!      (t "Inversion version check failed."))))
  
  (defun inversion-require (package version file &optional directory
  				  &rest reserved)

-----------------------------150031031829567--