Changeset 14614


Ignore:
Timestamp:
01/26/14 11:25:50 (8 years ago)
Author:
Mark Evenson
Message:

abcl-contrib: Fix whitespace.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/abcl/src/org/armedbear/lisp/abcl-contrib.lisp

    r14610 r14614  
    33(require :asdf)
    44
    5 (defconstant +get-classloader+ (java:jmethod "java.lang.Class" "getClassLoader"))
     5(defconstant +get-classloader+
     6  (java:jmethod "java.lang.Class" "getClassLoader"))
     7
    68(defun boot-classloader ()
    79  (let ((boot-class (java:jclass "org.armedbear.lisp.Main")))
    8   (java:jcall +get-classloader+ boot-class)))
     10    (java:jcall +get-classloader+ boot-class)))
    911
    1012(defun system-jar-p (p)
     
    1719  (and (pathnamep p)
    1820       (equal (pathname-type p) "jar")
    19      (or
    20     (java:jstatic "matches"
    21             "java.util.regex.Pattern"
    22             (concatenate 'string name "(-[0-9]\\.[0-9]\\.[0-9]([+~-].+)?)?")
    23             (pathname-name p))
    24     (java:jstatic "matches"
    25             "java.util.regex.Pattern"
    26             (concatenate 'string name "(-[0-9]\\.[0-9]\\.[0-9]\\.[0-9]([+~-]+)?)?")
    27             (pathname-name p)))
    28      (make-pathname :defaults p :name name)))
     21       (or
     22        (java:jstatic "matches"
     23                      "java.util.regex.Pattern"
     24                      (concatenate 'string name "(-[0-9]\\.[0-9]\\.[0-9]([+~-].+)?)?")
     25                      (pathname-name p))
     26        (java:jstatic "matches"
     27                      "java.util.regex.Pattern"
     28                      (concatenate 'string name "(-[0-9]\\.[0-9]\\.[0-9]\\.[0-9]([+~-]+)?)?")
     29                      (pathname-name p)))
     30       (make-pathname :defaults p :name name)))
    2931
    3032(defun find-system ()
     
    3436  (or
    3537   (ignore-errors
    36   (find-system-jar))
     38    (find-system-jar))
    3739   (ignore-errors
    38   (some
    39     (lambda (u)
    40     (probe-file (make-pathname
    41           :defaults  (java:jcall "toString" u)
    42           :name "abcl")))
    43     (java:jcall "getURLs" (boot-classloader))))
     40    (some
     41      (lambda (u)
     42        (probe-file (make-pathname
     43                    :defaults  (java:jcall "toString" u)
     44                    :name "abcl")))
     45      (java:jcall "getURLs" (boot-classloader))))
    4446   (ignore-errors
    45   #p"http://abcl.org/releases/current/abcl.jar")))
     47    #p"http://abcl.org/releases/current/abcl.jar")))
    4648
    4749(defun find-system-jar ()
     
    5456(defvar *abcl-contrib* nil
    5557  "Pathname of the ABCL contrib.
    56 Initialized via SYSTEM:FIND-CONTRIB")
     58Initialized via SYSTEM:FIND-CONTRIB.")
    5759
    5860(defparameter *verbose* t)
     
    6163  "Introspects ABCL-CONTRIB-JAR for asdf systems to add to ASDF:*CENTRAL-REGISTRY*"
    6264  (when abcl-contrib-jar
    63   (dolist (asdf-file
    64         (directory (make-pathname :device (list abcl-contrib-jar)
    65                     :directory '(:absolute :wild)
    66                     :name :wild
    67                     :type "asd")))
    68     (let ((asdf-directory (make-pathname :defaults asdf-file :name nil :type nil)))
    69     (unless (find asdf-directory asdf:*central-registry* :test #'equal)
    70       (push asdf-directory asdf:*central-registry*)
    71       (format *verbose* "~&Added ~A to ASDF.~&" asdf-directory))))))
     65    (dolist (asdf-file
     66              (directory (make-pathname :device (list abcl-contrib-jar)
     67                                        :directory '(:absolute :wild)
     68                                        :name :wild
     69                                        :type "asd")))
     70      (let ((asdf-directory (make-pathname :defaults asdf-file :name nil :type nil)))
     71        (unless (find asdf-directory asdf:*central-registry* :test #'equal)
     72          (push asdf-directory asdf:*central-registry*)
     73          (format *verbose* "~&Added ~A to ASDF.~&" asdf-directory))))))
    7274
    7375
     
    7678Returns the pathname of the contrib if it can be found."
    7779  (if *abcl-contrib*
    78     (format verbose "~&Using already initialized value of abcl-contrib:~&'~A'.~%"
    79         *abcl-contrib*)
    80     (progn
    81     (setf *abcl-contrib* (find-contrib))
    82     (format verbose "~&Using probed value of abcl-contrib:~&'~A'.~%"
    83         *abcl-contrib*)))
     80      (format verbose "~&Using already initialized value of abcl-contrib:~&'~A'.~%"
     81              *abcl-contrib*)
     82      (progn
     83        (setf *abcl-contrib* (find-contrib))
     84        (format verbose "~&Using probed value of abcl-contrib:~&'~A'.~%"
     85                *abcl-contrib*)))
    8486  (add-contrib *abcl-contrib*))
    8587
    8688(defun find-contrib ()
    8789  "Introspect runtime classpaths to find a loadable ABCL-CONTRIB."
    88   (or
    89    (ignore-errors (when (find-system-jar)
    90           (probe-file
    91           (make-pathname :defaults (find-system-jar)
    92                   :name "abcl-contrib"))))
    93    (some
    94   (lambda (u)
    95     (probe-file (make-pathname
    96            :defaults  (java:jcall "toString" u)
    97            :name "abcl-contrib")))
    98   (java:jcall "getURLs" (boot-classloader)))))
     90  (or (ignore-errors
     91    (when (find-system-jar)
     92      (probe-file
     93      (make-pathname :defaults (find-system-jar)
     94              :name "abcl-contrib"))))
     95    (some
     96     (lambda (u)
     97    (probe-file (make-pathname
     98            :defaults  (java:jcall "toString" u)
     99            :name "abcl-contrib")))
     100     (java:jcall "getURLs" (boot-classloader)))))
    99101
    100102(export `(find-system
    101       find-contrib
    102       *abcl-contrib*))
     103          find-contrib
     104          *abcl-contrib*))
    103105(when (find-and-add-contrib :verbose t)
    104106  (provide :abcl-contrib))
     
    110112
    111113
    112        
     114           
    113115 
Note: See TracChangeset for help on using the changeset viewer.