failed attempts to intercept copy command when the cursor is in the empty text field...
[LeanCalc.git] / help / feof
1 NAME
2     feof - determine if end-of-file flag is set
3
4 SYNOPSIS
5     feof(fd)
6
7 TYPES
8     fd          file stream open for reading
9
10     return      0 or 1
11
12 DESCRIPTION
13     The function feof(fd) returns 1 or 0 according as the end-of-file flag
14     is set or clear.
15
16     The end-of-file flag for the stream fd is set if reading at the
17     end-of-file position is attempted.  The flag is cleared by
18     positioning operations (fseek, rewind, fsetpos) and by freopen.
19
20 EXAMPLE
21     > fd1 = fopen("/tmp/newfile", "w")
22     > fputs(fd1, "Chongo was here\n")
23     > fflush(fd1)
24     > fd2 = fopen("/tmp/newfile", "r")
25     > feof(fd2)
26             0
27     > fgetline(fd2)
28             "Chongo was here"
29     > feof(fd2)
30             0
31     > fgetline(fd2)
32     > feof(fd2)
33             1
34
35 LIMITS
36     none
37
38 LINK LIBRARY
39     none
40
41 SEE ALSO
42     errno, fclose, feof, ferror, fflush, fgetc, fgetline, fgets, files, fopen,
43     fprintf, fputc, fputs, fseek, fsize, ftell, isfile, printf, prompt
44
45