r10451: add digital cameras
[cl-photo.git] / cameras.lisp
index e55f5bfb07ab44590bcf0646e2b837c3fc106d97..c084fec013014d84e4b17cd20e6014a7247577f1 100644 (file)
@@ -1,4 +1,4 @@
-;;;; -*-a Mode: LISP; Syntax: ANSI-Common-Lisp; Base: 10; Package: photo -*-
+;;;; -*- Mode: LISP; Syntax: ANSI-Common-Lisp; Base: 10; Package: photo -*-
 ;;;; *************************************************************************
 ;;;; FILE IDENTIFICATION
 ;;;;
@@ -47,7 +47,7 @@
    (:format :300d :make "Canon" :pixels (3072 . 2048) :imager (22.7 . 15.1) :name "300D")
    (:format :10d :make "Canon" :pixels (3072 . 2048) :imager (22.7 . 15.1) :name "10D")
    (:format :d30 :make "Canon" :pixels (0 . 0) :imager (22.7 . 15.1) :name "D30")
-   (:format :d60 :make "Canon" :pixels (0 . 0) :imager (22.7 . 15.1) :name "D60")
+    (:format :d60 :make "Canon" :pixels (3072 . 2048) :imager (22.7 . 15.1) :name "D60")
    (:format :350d :make "Canon" :pixels (3456 . 2304) :imager (22.2 . 14.8) :name "350D")
    (:format :1d :make "Canon" :pixels (2464 . 1648) :imager (27 . 17.8) :name "1D")
    (:format :20d :make "Canon" :pixels (3456 . 2304) :imager (22.5 . 15) :name "20D")
    #.(make-output-format 24 36)
   ))
 
+(defvar *digital-cameras*
+  (sort (loop for format in +format-db+
+             when (getf format :pixels)
+             collect format)
+       (lambda (a b)
+         (block nil
+           (when (and (getf a :make) (getf b :make))
+             (cond
+               ((string-greaterp (getf a :make) (getf b :make))
+                (return t))
+               ((string-lessp (getf a :make) (getf b :make))
+                (return nil))))
+           (when (and (getf a :name) (getf b :name))
+             (cond
+               ((string-lessp (getf a :name) (getf b :name))
+                (return t))
+               ((string-greaterp (getf a :name) (getf b :name))
+                (return nil))))))))
+  
+
 (defun format-match-p (format-spec format)
   (when (or (eql format-spec (getf format :format))
             (member format-spec (getf format :nicks)))