@c ----------------------------------------------------------------------
@node feof, stdio
@heading @code{feof}
@subheading Syntax

@example
#include <stdio.h>

int feof(FILE *file);
@end example

@subheading Description

This function (actually a macro) can be used to indicate if the given
@var{file} is at the end-of-file or not. 

@subheading Return Value

Nonzero at end-of-file, zero otherwise.

@subheading Example

@example
while (!feof(stdin))
  gets(line);
@end example

@c ----------------------------------------------------------------------
@node ferror, stdio
@heading @code{ferror}
@subheading Syntax

@example
#include <stdio.h>

int ferror(FILE *file);
@end example

@subheading Description

This function (actually a macro) can be used to indicate if the given
@var{file} has encountered an error or not.  @xref{clearerr}

@subheading Return Value

Nonzero for an error, zero otherwize.

@subheading Example

@example
if (ferror(stdin))
  exit(1);
@end example

