From: Chris Hanson Date: Mon, 22 Jan 1990 23:39:37 +0000 (+0000) Subject: Change `operation/open' to handle #F as a result from X-Git-Tag: 20090517-FFI~11572 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=ca101973ac24965674b04528236bb785e1f14beb;p=mit-scheme.git Change `operation/open' to handle #F as a result from `starbase-open-device'. --- diff --git a/v7/src/runtime/graphics.scm b/v7/src/runtime/graphics.scm index 6b280d502..40af5be47 100644 --- a/v7/src/runtime/graphics.scm +++ b/v7/src/runtime/graphics.scm @@ -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 diff --git a/v7/src/runtime/starbase.scm b/v7/src/runtime/starbase.scm index 0d4c3efc9..3bc8f4e24 100644 --- a/v7/src/runtime/starbase.scm +++ b/v7/src/runtime/starbase.scm @@ -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)))