/*
 *			f e r r o r . c
 */

/*)LIBRARY
*/

#ifdef	DOCUMENTATION

title	feof	Test for I/O error
index		Test for I/O error

synopsis
	s.nf
	ferror(iop);
	FILE		*iop;
	.s.f
Description

	Return 1 if error on iop, else zero.

Bugs

#endif

#include	<stdio.h>

#ifdef	ferror
#undef	ferror
#endif

int
ferror(fd)
FILE	*fd;
/*
 * Return TRUE on eof
 */
{
	return ((fd->_flag & _IOERR) != 0);
}
