/
/ PDP-11 C.
/ Stdio.
/
/ Set FCS attributes.
/

	.globl	fattr

/
/ fattr(rtyp, ratt, rsiz, ioptr);
/ FILE *ioptr;
/
/ This routine rewrites the FCS attributes
/ of an input file.
/ It does not work on output files at the
/ moment.
/ What this lets you do is read a file
/ in a different record format from that
/ written.
/ A value of -1 implies leave this alone.
/ 

fattr:	jsr	r0,__csav
	mov	20(r5),r4
	bit	$VF_OUT,V_FLAG(r4)
	beq	0f
	mov	$-1,r0
	br	1f

0:	mov	12(r5),r0
	cmp	r0,$-1
	beq	0f
	movb	r0,V_RTYP(r4)

0:	mov	14(r5),r0
	cmp	r0,$-1
	beq	0f
	movb	r0,V_RATT(r4)

0:	mov	16(r5),r0
	cmp	r0,$-1
	beq	0f
	mov	r0,V_RSIZ(r4)

0:	clr	r0
1:	jmp	__cret
