From f95a4a932476be2ba99e2fd081e8d2bc6ea12813 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Fri, 15 Dec 2017 09:38:53 -0500 Subject: Import newlib and create makefile --- newlib/libc/stdio/feof.c | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 newlib/libc/stdio/feof.c (limited to 'newlib/libc/stdio/feof.c') diff --git a/newlib/libc/stdio/feof.c b/newlib/libc/stdio/feof.c new file mode 100644 index 0000000..55f151b --- /dev/null +++ b/newlib/libc/stdio/feof.c @@ -0,0 +1,40 @@ +/* +FUNCTION +<>---test for end of file + +INDEX + feof + +ANSI_SYNOPSIS + #include + int feof(FILE *<[fp]>); + +TRAD_SYNOPSIS + #include + int feof(<[fp]>) + FILE *<[fp]>; + +DESCRIPTION +<> tests whether or not the end of the file identified by <[fp]> +has been reached. + +RETURNS +<> returns <<0>> if the end of file has not yet been reached; if +at end of file, the result is nonzero. + +PORTABILITY +<> is required by ANSI C. + +No supporting OS subroutines are required. +*/ + +#include + +#undef feof + +int +_DEFUN (feof, (fp), + FILE * fp) +{ + return __sfeof (fp); +} -- cgit v1.2.3