backward-driver.lisp - clic - Clic is an command line interactive client for gopher written in Common LISP
 (HTM) git clone git://bitreich.org/clic/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/clic/
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) Tags
 (DIR) README
 (DIR) LICENSE
       ---
       backward-driver.lisp (3432B)
       ---
            1 ;;; -------------------------------------------------------------------------
            2 ;;; Hacks for backward-compatibility with older versions of UIOP
            3 
            4 (uiop/package:define-package :uiop/backward-driver
            5   (:recycle :uiop/backward-driver :asdf/backward-driver :uiop)
            6   (:use :uiop/common-lisp :uiop/package :uiop/utility :uiop/version
            7    :uiop/pathname :uiop/stream :uiop/os :uiop/image
            8    :uiop/run-program :uiop/lisp-build :uiop/configuration)
            9   (:export
           10    #:coerce-pathname
           11    #:user-configuration-directories #:system-configuration-directories
           12    #:in-first-directory #:in-user-configuration-directory #:in-system-configuration-directory
           13    #:version-compatible-p))
           14 (in-package :uiop/backward-driver)
           15 
           16 (eval-when (:compile-toplevel :load-toplevel :execute)
           17 (with-deprecation ((version-deprecation *uiop-version* :style-warning "3.2" :warning "3.4"))
           18   ;; Backward compatibility with ASDF 2.000 to 2.26
           19 
           20   ;; For backward-compatibility only, for people using internals
           21   ;; Reported users in quicklisp 2015-11: hu.dwim.asdf (removed in next release)
           22   ;; Will be removed after 2015-12.
           23   (defun coerce-pathname (name &key type defaults)
           24     "DEPRECATED. Please use UIOP:PARSE-UNIX-NAMESTRING instead."
           25     (parse-unix-namestring name :type type :defaults defaults))
           26 
           27   ;; Backward compatibility for ASDF 2.27 to 3.1.4
           28   (defun user-configuration-directories ()
           29     "Return the current user's list of user configuration directories
           30 for configuring common-lisp.
           31 DEPRECATED. Use UIOP:XDG-CONFIG-PATHNAMES instead."
           32     (xdg-config-pathnames "common-lisp"))
           33   (defun system-configuration-directories ()
           34     "Return the list of system configuration directories for common-lisp.
           35 DEPRECATED. Use UIOP:SYSTEM-CONFIG-PATHNAMES (with argument \"common-lisp\"),
           36 instead."
           37     (system-config-pathnames "common-lisp"))
           38   (defun in-first-directory (dirs x &key (direction :input))
           39     "Finds the first appropriate file named X in the list of DIRS for I/O
           40 in DIRECTION \(which may be :INPUT, :OUTPUT, :IO, or :PROBE).
           41 If direction is :INPUT or :PROBE, will return the first extant file named
           42 X in one of the DIRS.
           43 If direction is :OUTPUT or :IO, will simply return the file named X in the
           44 first element of DIRS that exists. DEPRECATED."
           45     (find-preferred-file
           46      (mapcar #'(lambda (dir) (subpathname (ensure-directory-pathname dir) x)) dirs)
           47      :direction direction))
           48   (defun in-user-configuration-directory (x &key (direction :input))
           49     "Return the file named X in the user configuration directory for common-lisp.
           50 DEPRECATED."
           51     (xdg-config-pathname `("common-lisp" ,x) direction))
           52   (defun in-system-configuration-directory (x &key (direction :input))
           53     "Return the pathname for the file named X under the system configuration directory
           54 for common-lisp. DEPRECATED."
           55     (find-preferred-file (system-config-pathnames "common-lisp" x) :direction direction))
           56 
           57 
           58   ;; Backward compatibility with ASDF 1 to ASDF 2.32
           59 
           60   (defun version-compatible-p (provided-version required-version)
           61     "Is the provided version a compatible substitution for the required-version?
           62 If major versions differ, it's not compatible.
           63 If they are equal, then any later version is compatible,
           64 with later being determined by a lexicographical comparison of minor numbers.
           65 DEPRECATED."
           66     (let ((x (parse-version provided-version nil))
           67           (y (parse-version required-version nil)))
           68       (and x y (= (car x) (car y)) (lexicographic<= '< (cdr y) (cdr x)))))))
           69