r10534: remote warnings, add units capability to make-output-format
authorKevin M. Rosenberg <kevin@rosenberg.net>
Thu, 12 May 2005 18:59:09 +0000 (18:59 +0000)
committerKevin M. Rosenberg <kevin@rosenberg.net>
Thu, 12 May 2005 18:59:09 +0000 (18:59 +0000)
cameras.lisp
fov.lisp
tables.lisp

index 57ef380e87aededf638e654fda678e0fea8abd72..7eb8b6700bbb96fac819e61f19c3541cf5b2e9bd 100644 (file)
 
 (eval-when (:compile-toplevel :load-toplevel :execute)
   (defun make-output-format (w h &key (units :inches))
-    (let ((name (format nil "~Dx~Din" w h)))
+    (let ((name (format nil "~Dx~D~A" w h
+                       (ecase units
+                         (:inches "in")
+                         (:mm "mm")
+                         (:cm "cm")
+                         (:m "m")
+                         (:feet "ft")))))
       (list :format (kmrcl:ensure-keyword name)
-            :output (cons (inches->mm w) (inches->mm h))
+            :output (cons (length->mm w units) (length->mm h units))
             :name name
             :nicks (list (kmrcl:ensure-keyword (format nil "~Dx~D" w h)))))))
 
index fba5ce9d91109b423173720ab17f099105406917..80c8f5bc105e1cb5faec4de7bd0eb4455e555905 100644 (file)
--- a/fov.lisp
+++ b/fov.lisp
@@ -159,7 +159,7 @@ focal-length and image-distance are in mm, object-distance is in units"
    (t
     (error "Must set two, and only two, of the parameters: image-distance, object-distance, and focal-length."))))
 
-(defun close-up (&key focal-length object-distance image-distance magnification (units :feet) &aux bellows-factor)
+(defun close-up (&key focal-length object-distance image-distance magnification (units :feet))
   "Computes the parameters for focusing closer than infinity.
 Requires two, and only two, of the input parameters.
 Returns: focal-length object-distance image-distance magnification bellows-factor."
index 0b256a514bd23f4e48424a862c0bf0be370b605c..228a0ed831e7a7e98972a63fdfef028b3b086870 100644 (file)
@@ -71,6 +71,7 @@
       (dolist (distance distances)
         (multiple-value-bind (near far dof mag blur) (dof focal-length f-stop distance coc
                                                           :units units)
+         (declare (ignorable dof mag blur))
           (when (minusp far) (setq far "Inf  "))
           (format output "~5F/~5F " near far)))
       (format output "~%")))