.;
.;			FNAMEPARS.CMD
.;
.;	PARSE A FILE NAME INTO VARIOUS COMPONANTS
.;
.;	FNAMEPARS FNAME DEFDEV DEFUIC DEFEXT
.;		FNAME IS THE FILE NAME TO PARSE
.;		DEFDEV IS THE DEVICE TO DEFAULT TO
.;		DEFUIC IS THE UIC TO DEFAULT TO
.;		DEFEXT IS THE FILE EXTENSION TO DEFAULT TO
.;
.;	DATA RETRUNED :
.;		DEV	DEVICE
.;		UIC	UIC
.;		FILE	FILE NAME
.;		EXT	FILE EXTENSION
.;		FILNAM	FULL DEFAULTED FILE NAME
.;
.ENABLE GLOBAL
.ENABLE SUBSTITUTION
.SETS DEV DEFDEV
.SETS UIC DEFUIC
.SETN CPOS 0
.TEST P1 ":"
.IF <STRLEN> <> 0 .GOSUB SETDEV
.TEST P1 "]"
.IF <STRLEN> <> 0 .GOSUB SETUIC
.TEST P1
.SETS FILE P1[CPOS+1:<STRLEN>]
.SETS EXT DEFEXT
.TEST P1 "."
.IF <STRLEN> <> 0 .GOTO SETFIL
.GOTO SETCOM
.SETDEV:
	.SETS DEV P1[1:<STRLEN>]
	.GOTO SETFIN
.SETUIC:
	.SETS UIC P1[CPOS+1:<STRLEN>]
.SETFIN:
	.SETN CPOS <STRLEN>
	.RETURN
.SETFIL:
	.SETS FILE P1[CPOS+1:<STRLEN>-1]
	.SETN CPOS <STRLEN>
	.TEST P1
	.SETS EXT P1[CPOS:<STRLEN>]
.SETCOM:
.SETS FILNAM DEV+UIC+FILE+EXT
;
;	DEV	'DEV'
;	UIC	'UIC'
;	FILE	'FILE'
;	EXT	'EXT'
;	FILNAM	'FILNAM'
