mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-01-15 11:00:04 +08:00
e71372faea
* libc/sys/linux/sys/stdio.h: New file. * libc/include/stdio.h: Add declarations for flockfile, ftrylockfile, and funlockfile. Include <sys/stdio.h>. * libc/stdio/clearerr.c: Add file locking. * libc/stdio/fclose.c: Likewise. * libc/stdio/feof.c: Likewise. * libc/stdio/ferror.c: Likewise. * libc/stdio/fflush.c: Likewise. * libc/stdio/fgetc.c: Likewise. * libc/stdio/fgetpos.c: Likewise. * libc/stdio/fgets.c: Likewise. * libc/stdio/fileno.c: Likewise. * libc/stdio/fputc.c: Likewise. * libc/stdio/fputs.c: Likewise. * libc/stdio/fread.c: Likewise. * libc/stdio/freopen.c: Likewise. * libc/stdio/fseek.c: Likewise. * libc/stdio/ftell.c: Likewise. * libc/stdio/fwrite.c: Likewise. * libc/stdio/getc.c: Likewise. * libc/stdio/putc.c: Likewise. * libc/stdio/setvbuf.c: Likewise. * libc/stdio/ungetc.c: Likewise. * libc/stdio/vfprintf.c: Likewise.
45 lines
667 B
C
45 lines
667 B
C
/*
|
|
FUNCTION
|
|
<<feof>>---test for end of file
|
|
|
|
INDEX
|
|
feof
|
|
|
|
ANSI_SYNOPSIS
|
|
#include <stdio.h>
|
|
int feof(FILE *<[fp]>);
|
|
|
|
TRAD_SYNOPSIS
|
|
#include <stdio.h>
|
|
int feof(<[fp]>)
|
|
FILE *<[fp]>;
|
|
|
|
DESCRIPTION
|
|
<<feof>> tests whether or not the end of the file identified by <[fp]>
|
|
has been reached.
|
|
|
|
RETURNS
|
|
<<feof>> returns <<0>> if the end of file has not yet been reached; if
|
|
at end of file, the result is nonzero.
|
|
|
|
PORTABILITY
|
|
<<feof>> is required by ANSI C.
|
|
|
|
No supporting OS subroutines are required.
|
|
*/
|
|
|
|
#include <stdio.h>
|
|
|
|
#undef feof
|
|
|
|
int
|
|
_DEFUN (feof, (fp),
|
|
FILE * fp)
|
|
{
|
|
int result;
|
|
_flockfile(fp);
|
|
result = __sfeof (fp);
|
|
_funlockfile(fp);
|
|
return result;
|
|
}
|