(FILECREATED "22-Nov-85 01:06:16" {ERIS}<LISPCORE>DOVE>FLOPPYPATCH.;1 2276   

      changes to:  (VARS FLOPPYPATCHCOMS)
		   (FNS FLOPPY.WAIT.FOR.FLOPPY))


(* Copyright (c) 1985 by Xerox Corporation. All rights reserved.)

(PRETTYCOMPRINT FLOPPYPATCHCOMS)

(RPAQQ FLOPPYPATCHCOMS [(FNS FLOPPY.WAIT.FOR.FLOPPY)
			  (DECLARE: DONTEVAL@LOAD DOCOPY (P (CHANGENAME (QUOTE \HFLOPPY.READPAGE)
									(QUOTE \HFLOPPY.MAXPAGES)
									(QUOTE \HFLOPPY.PAGES))
							    (CHANGENAME (QUOTE \SFLOPPY.READPAGE)
									(QUOTE \HFLOPPY.MAXPAGES)
									(QUOTE \SFLOPPY.PAGES])
(DEFINEQ

(FLOPPY.WAIT.FOR.FLOPPY
  [LAMBDA (NEWFLG)                                           (* bvm: "22-Nov-85 01:01")
                                                             (* Wait until floppy drive contains 
							     (new) floppy. *)
    (WITH.MONITOR \FLOPPYLOCK (PROG NIL                    (* NOTE: Wait 2 seconds to guarantee drive door is 
							     secure. *)
				      (\FLOPPY.CLOSE)
				      (COND
					((EQ (MACHINETYPE)
					       (QUOTE DOVE))
					  (SETQ NEWFLG T)))
				      (COND
					(NEWFLG (SELECTQ (MACHINETYPE)
							   (DANDELION (DISMISS 5000)
								      (until (NOT (
										 FLOPPY.CAN.READP))
									 do (BLOCK)))
							   (DOVE 
                                                             (* GODDAMN DAYBREAK DOOROPEN BIT DOESN'T WORK *)
								 (\FLOPPY.MESSAGE 
						 "Type any character after inserting new floppy."
										    T)
								 (\GETKEY))
							   NIL)))
				  DEBOUNCE
				      (until (FLOPPY.CAN.READP) do (BLOCK))
				      (COND
					(NEWFLG (DISMISS 2000)))
				      (COND
					((NOT (\FLOPPY.CAN.READP T))
                                                             (* Drive door probably didn't stick.
							     *)
					  (GO DEBOUNCE])
)
(DECLARE: DONTEVAL@LOAD DOCOPY 
(CHANGENAME (QUOTE \HFLOPPY.READPAGE)
	    (QUOTE \HFLOPPY.MAXPAGES)
	    (QUOTE \HFLOPPY.PAGES))
(CHANGENAME (QUOTE \SFLOPPY.READPAGE)
	    (QUOTE \HFLOPPY.MAXPAGES)
	    (QUOTE \SFLOPPY.PAGES))
)
(PUTPROPS FLOPPYPATCH COPYRIGHT ("Xerox Corporation" 1985))
(DECLARE: DONTCOPY
  (FILEMAP (NIL (584 1964 (FLOPPY.WAIT.FOR.FLOPPY 594 . 1962)))))
STOP