#| -*-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
(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
#| -*-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
(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)))