#include	"all.h"
#include	<fio.h>


Fputc(int fd, int c)
{
	Fbuffer *f;

	FIOSET(f, fd);
	if(f->next >= &f->buf[FIOBSIZE]) {
		if(_F_flush(f, fd))
			return -1;
	}
	*f->next++ = c;
	f->end = f->next;
	f->offset++;
	f->flags |= FIO_WRITING;
	return 0;
}
