home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
vis-ftp.cs.umass.edu
/
vis-ftp.cs.umass.edu.tar
/
vis-ftp.cs.umass.edu
/
pub
/
Software
/
ASCENDER
/
ascendMar8.tar
/
UMass
/
ISR
/
obsolete-patch.lisp
< prev
next >
Wrap
Lisp/Scheme
|
1995-04-11
|
2KB
|
55 lines
;;; -*- Mode:Common-Lisp; Package:ISR2; Base:10; Patch-file:T -*-
;;;
;;; Well, you have to break something, don't you. We have fixed create
;;; frame, on the load band it is wrong. 6/18/91
(defun create-frame (fdescr-handle frame-features token-features)
"Helper function: create a new frame and define some features for it."
(unless (and (= (fdescr-type (handle-fdescr fdescr-handle)) *handle*)
(eq (if (eq (handle-type fdescr-handle) :frame-feature)
(fdescr-value (handle-fdescr fdescr-handle))
(vvref (fdescr-value (handle-fdescr fdescr-handle))
(handle-token fdescr-handle)))
*ptr-undefined*))
(error "Attempt to create a frame in a non-handle feature or in a bound feature: ~S"
fdescr-handle))
(let* ((new-frame-name (handle-feature fdescr-handle))
(new-frame
(make-frame new-frame-name
:parent (if (eq (handle-type fdescr-handle) :token-feature)
(make-handle :type :token
:frame (handle-frame fdescr-handle)
:token (handle-token fdescr-handle))
(make-handle :type :frame
:frame (handle-frame fdescr-handle)))))
(new-frame-handle (make-handle :type :frame :frame new-frame))
(new-any-token-index-handle
(make-handle :type :token
:frame new-frame
:token :?))
(success? nil)
)
(setf (value fdescr-handle) new-frame-handle)
(unwind-protect
(progn
(map nil #'(lambda (frame-feature-def)
(apply #'define-feature
(list new-frame-handle
(first frame-feature-def))
(rest frame-feature-def)))
frame-features)
(map nil #'(lambda (token-feature-def)
(apply #'define-feature
(list new-any-token-index-handle
(first token-feature-def))
(rest token-feature-def)))
token-features)
(setf success? t))
(unless success?
(destroy new-frame-handle)))
(if success?
new-frame-handle
nil))
)