Change `operation/open' to handle #F as a result from
authorChris Hanson <org/chris-hanson/cph>
Mon, 22 Jan 1990 23:39:37 +0000 (23:39 +0000)
committerChris Hanson <org/chris-hanson/cph>
Mon, 22 Jan 1990 23:39:37 +0000 (23:39 +0000)
`starbase-open-device'.

v7/src/runtime/graphics.scm
v7/src/runtime/starbase.scm

index 6b280d5021b282da3d00ac47456ac84ccb6141ca..40af5be4719b775d95c970ce3f34e3b7b9ff0718 100644 (file)
@@ -1,8 +1,8 @@
 #| -*-Scheme-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/graphics.scm,v 1.2 1989/06/27 10:18:01 cph Rel $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/graphics.scm,v 1.3 1990/01/22 23:39:37 cph Rel $
 
-Copyright (c) 1989 Massachusetts Institute of Technology
+Copyright (c) 1989, 1990 Massachusetts Institute of Technology
 
 This material was developed by the Scheme project at the Massachusetts
 Institute of Technology, Department of Electrical Engineering and
@@ -183,9 +183,10 @@ MIT in each case. |#
   (buffer? false))
 
 (define (make-graphics-device type . arguments)
-  (%make-graphics-device type
-                        (apply (graphics-device-type/operation/open type)
-                               arguments)))
+  (let ((descriptor
+        (apply (graphics-device-type/operation/open type) arguments)))
+    (and descriptor
+        (%make-graphics-device type descriptor))))
 
 (let-syntax
     ((define-graphics-operation
index 0d4c3efc95952ae15b74eded1baa250efc395c5b..3bc8f4e244936cca361239872fe40f628c0fd7aa 100644 (file)
@@ -1,6 +1,6 @@
 #| -*-Scheme-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/starbase.scm,v 1.3 1990/01/17 05:04:24 gjs Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/starbase.scm,v 1.4 1990/01/22 23:36:36 cph Rel $
 
 Copyright (c) 1989, 1990 Massachusetts Institute of Technology
 
@@ -115,15 +115,15 @@ MIT in each case. |#
   (implemented-primitive-procedure? starbase-open-device))
 
 (define (operation/open device-name driver-name)
-  (let ((device
-        (make-starbase-device
-         (starbase-open-device device-name driver-name))))
-    (operation/set-coordinate-limits device -1 -1 1 1)
-    (operation/set-text-height device 0.1)
-    (operation/set-text-aspect device 1)
-    (operation/set-text-slant device 0)
-    (operation/set-text-rotation device 0)
-    device))
+  (let ((descriptor (starbase-open-device device-name driver-name)))
+    (and descriptor
+        (let ((device (make-starbase-device descriptor)))
+          (operation/set-coordinate-limits device -1 -1 1 1)
+          (operation/set-text-height device 0.1)
+          (operation/set-text-aspect device 1)
+          (operation/set-text-slant device 0)
+          (operation/set-text-rotation device 0)
+          device))))
 
 (define (operation/close device)
   (starbase-close-device (starbase-device/descriptor device)))