Eliminate references to now-deprecated definitions.
authorChris Hanson <org/chris-hanson/cph>
Sun, 15 Apr 2018 08:29:19 +0000 (01:29 -0700)
committerChris Hanson <org/chris-hanson/cph>
Sun, 15 Apr 2018 08:29:19 +0000 (01:29 -0700)
src/runtime/defstr.scm
src/runtime/graphics.scm
src/runtime/infutl.scm
src/runtime/pathname.scm
src/runtime/primitive-io.scm
src/runtime/system.scm

index 58aa5ab16f623502bea46ef23167739cd7b70b4b..76cbccb416a97fa1a115cd68d81de82b57d7d473 100644 (file)
@@ -173,9 +173,9 @@ differences:
                            slots)))))))
 \f
 (define (find-option keyword options)
-  (find-matching-item options
-    (lambda (option)
-      (eq? (option/keyword option) keyword))))
+  (find (lambda (option)
+         (eq? (option/keyword option) keyword))
+       options))
 
 (define (find-options keyword options)
   (filter (lambda (option)
@@ -192,9 +192,9 @@ differences:
          (let ((conflict
                 (let ((name (option/argument option)))
                   (and name
-                       (find-matching-item options
-                         (lambda (option*)
-                           (eq? (option/argument option*) name)))))))
+                       (find (lambda (option*)
+                               (eq? (option/argument option*) name))
+                             options)))))
            (if conflict
                (error "Conflicting constructor definitions:"
                       (option/original option)
@@ -322,13 +322,13 @@ differences:
                    (transformer (cddr entry)))
                (let ((option*
                       (and (not can-be-duplicated?)
-                           (find-matching-item options
-                             (let ((keyword (car normal-option)))
-                               (lambda (option*)
-                                 (eq? (if (pair? option*)
-                                          (car option*)
-                                          option*)
-                                      keyword)))))))
+                           (find (let ((keyword (car normal-option)))
+                                   (lambda (option*)
+                                     (eq? (if (pair? option*)
+                                              (car option*)
+                                              option*)
+                                          keyword)))
+                                 options))))
                  (if option*
                      (error "Duplicate structure option:" option option*)))
                (cons (let ((option* (transformer normal-option context)))
@@ -486,9 +486,9 @@ differences:
        ((not (pair? slots)))
       (let ((name (slot/name (caar slots))))
        (let ((slot*
-              (find-matching-item (cdr slots)
-                (lambda (slot)
-                  (eq? (slot/name (car slot)) name)))))
+              (find (lambda (slot)
+                      (eq? (slot/name (car slot)) name))
+                    (cdr slots))))
          (if slot*
              (error "Structure slots must not have duplicate names:"
                     (cdar slots)
index 575359ea0e310136894ebcf8c710c7882a67f6ae..81c8e8140b6860990bad48f9a2ffb885ce403756 100644 (file)
@@ -200,15 +200,14 @@ USA.
            ((graphics-device? object)
             (test-type (graphics-device/type object)))
            ((not object)
-            (or (list-search-positive graphics-types
-                  graphics-device-type/available?)
+            (or (find graphics-device-type/available? graphics-types)
                 (and error?
                      (error "No graphics types supported."))))
            (else
             (let ((type
-                   (list-search-positive graphics-types
-                     (lambda (type)
-                       (eq? object (graphics-device-type/name type))))))
+                   (find (lambda (type)
+                           (eq? object (graphics-device-type/name type)))
+                         graphics-types)))
               (if type
                   (test-type type)
                   (and error?
index 8a684db80a8b40f32a4c05adc404b246eb09bc07..f8020196e17264fac994076fbde5553e8f996521 100644 (file)
@@ -228,10 +228,10 @@ USA.
 (define (add-directory-rewriting-rule! match replace)
   (let ((match (pathname-as-directory (merge-pathnames match))))
     (let ((rule
-          (list-search-positive (directory-rewriting-rules)
-            (lambda (rule)
-              (equal? (pathname-directory (car rule))
-                      (pathname-directory match))))))
+          (find (lambda (rule)
+                  (equal? (pathname-directory (car rule))
+                          (pathname-directory match)))
+                (directory-rewriting-rules))))
       (if rule
          (set-cdr! rule replace)
          (directory-rewriting-rules
@@ -241,10 +241,10 @@ USA.
 
 (define (rewrite-directory pathname)
   (let ((rule
-        (list-search-positive (directory-rewriting-rules)
-          (lambda (rule)
-            (directory-prefix? (pathname-directory pathname)
-                               (pathname-directory (car rule)))))))
+        (find (lambda (rule)
+                (directory-prefix? (pathname-directory pathname)
+                                   (pathname-directory (car rule))))
+              (directory-rewriting-rules))))
     (->namestring
      (if rule
         (merge-pathnames
index 9567a01484f0d17af6516b856e9f93f84e9534d4..054de2de7d24fc9bd36270b0630d2b91dfe73b4a 100644 (file)
@@ -640,7 +640,7 @@ these rules:
 
 (define (%find-library-directory)
   (pathname-simplify
-   (or (find-matching-item library-directory-path file-directory?)
+   (or (find file-directory? library-directory-path)
        (error "Can't find library directory."))))
 
 (define (%find-library-file pathname)
index d8c60fc8f824baa55f463b86cf46a97dfca30224..7ef4f15c4d2cc88aa9e229c83c58e663f5f1796c 100644 (file)
@@ -744,7 +744,7 @@ USA.
 (define (find-dld-handle predicate)
   (with-thread-mutex-lock dld-handles-mutex
     (lambda ()
-      (find-matching-item dld-handles predicate))))
+      (find predicate dld-handles))))
 
 (define (all-dld-handles)
   (with-thread-mutex-lock dld-handles-mutex
index 805b64c07f544f91617c15a63e8e9b7c9a6e4e63..080d40c044499148f33b5a595c6c0f4887a0a96c 100644 (file)
@@ -112,9 +112,9 @@ USA.
       ""))
 
 (define (find-entry name)
-  (find-matching-item subsystem-identifications
-    (lambda (entry)
-      (match-entry? name entry))))
+  (find (lambda (entry)
+         (match-entry? name entry))
+       subsystem-identifications))
 
 (define (match-entry? name entry)
   (let ((s (car entry)))