/
/ Mark file for delete.
/

	.globl	fmkdl

/
/ fmkdl(fp);
/ FILE *fp;
/ This routine marks the file associated with
/ the specified file pointer for delete.
/ Returns NULL on error.
/

fmkdl:	jsr	r0,__csav	/Linkage.

	mov	12(r5),r4	/Grab pointer to file.

	mov	r4,-(sp)	/Remove name.
	add	$V_FID,(sp)
	clr	-(sp)
	clr	-(sp)
	clr	-(sp)
	clr	-(sp)
	clr	-(sp)
	mov	$IO.RNA,r0
	call	__qiow
	bcs	0f

	clr	-(sp)		/Mark file for delete.
	clr	-(sp)
	clr	-(sp)
	clr	-(sp)
	clr	-(sp)
	clr	-(sp)
	mov	$IO.DEL,r0
	call	__qiow
	bcs	0f

	mov	r4,r0		/Return fp if good.
	br	1f

0:	bis	$VF_ERR,(r4)	/Set FILE error flag.
	clr	r0		/Return NULL.

1:	jmp	__cret
