NAME
    feof - determine if a file has reached EOF

SYNOPSIS
    feof(fd)

TYPES
    fd		file

    return	int

DESCRIPTION
    This function determines whether the end of file was detected
    while reading the file associated with fd.

    If the file is at EOF 1 will be returned, otherwise 0 is returned.

    Opening an empty file will not cause feof to return TRUE (1).
    The EOF condition will only be reported after an attempt to
    read beyond EOF is made.

EXAMPLE
    > fd = fopen("/etc/motd", "r")
    > feof(fd)
    	    0

    > fd2 = fopen("/dev/null", "r")
    > feof(fd2)
            0
    > fgetc(fd2)
    > feof(fd2)
            1

    > fd3 = fopen("/tmp/newfile", "w")
    > fputs(fd3, "chongo was here\n")
    > fd4 = fopen("/tmp/newfile", "r")
    > feof(fd4)
            0
    > fgetc(fd4)
	    "c"
    > feof(fd4)
            0
    > fgetc(fd4)
    > feof(fd4)
            1

LIMITS
    fd must be associaed with an open file

LIBRARY
    none

SEE ALSO
    errno, fclose, feof, ferror, fflush, fgetc, fgetline, fgets, files, fopen,
    fprintf, fputc, fputs, fseek, fsize, ftell, isfile, printf, prompt
