.key english/A,check/A,asn/A
.bra {
.ket }

; :ts=3
; DiskMount - Ask user for a diskette.
;
; Asks the user to put a given diskette into df0:, and then gives it
; a name which won't conflict with any standard assignments.
;
; Inputs:
;	english  What to ask the user for
;	check		The volume name the diskette must have
;	asn	 The Assign name to give it

; If we already know how to find the requested disk, don't specifically
; ask for it again in df0:.
; Use ASSIGN EXISTS because we only care whether the name is known, not
; whether the diskette is accessible at the moment (if it isn't a DOS
; requester will remedy the situation).

ASSIGN >NIL: {asn} exists
if NOT WARN
	SKIP havedisk
ENDIF

LAB volagain

ECHO "Please insert the Professional Draw *E[;1m{english}*E[m disk " NOLINE
ECHO "into *E[;1mdrive 0*E[m."
INSTUTIL ASK "Hit RETURN when ready, or N to abort: "
IF WARN
	SKIP wrapup
ENDIF

ASSIGN PDrawInstVCheck: ""
CD df0:
CD >RAM:PDrawInstall/VolumeCheck
CD PDrawInstVCheck:
ASSIGN PDrawInstVCheck:

; We need to check this because in OS V2.0 C:SETENV, and SETENV
;     behave differently!!!
IF EXISTS C:SETENV
   ; V1.3
   C:SETENV >NIL: <RAM:PDrawInstall/VolumeCheck PDrawInstVC ?
ELSE
   ; V2.0
   IF EXISTS ENV:PDrawInstVC
      ; BUG in SETENV:
      DELETE ENV:PDrawInstVC QUIET
   ENDIF
   SETENV >NIL: <RAM:PDrawInstall/VolumeCheck PDrawInstVC ?
ENDIF

IF NOT $PDrawInstVC eq {check}
   ECHO "*NWrong disk.  Try again."
   SKIP BACK volagain
ENDIF

ASSIGN {asn} df0:		; Hook we can use when disk has been removed

LAB havedisk
