# include "../portc1/ciodec.c"
rew(fn)
{
struct fileps *fp;
if(fn<0 || fn>14) return;
fp = &IEH3fpts[fn];
if (fp==0 || fp->wrflag < 1)
	return;
 /* change append to normal open */
switch (fp->wrflag)
	{
	case 3: /* append, change to write */
		fp->wrflag = 2; return;
	case 2: /* write */
		cflush(fn);
	case 1: /* read */
		fp->nchars = 0;
		fp->eoferr = 0;
		seek(fn, 0, 0);
		return;
	}
}
