From bdb5cd8978b8ec6f0e616bdb1810c8d753e4d84b Mon Sep 17 00:00:00 2001 From: solar Date: Thu, 22 Jan 2004 06:33:18 +0000 Subject: [PATCH] Reviewed / implemented. --- functions/stdio/clearerr.c | 12 +++++++----- functions/stdio/feof.c | 10 ++++++---- functions/stdio/ferror.c | 10 ++++++---- 3 files changed, 19 insertions(+), 13 deletions(-) diff --git a/functions/stdio/clearerr.c b/functions/stdio/clearerr.c index d54e559..7fcdf8e 100644 --- a/functions/stdio/clearerr.c +++ b/functions/stdio/clearerr.c @@ -5,12 +5,14 @@ // This code is Public Domain. Use, modify, and redistribute at will. // ---------------------------------------------------------------------------- -void clearerr( FILE * stream ) { /* TODO */ }; +#ifndef __FILE_H +#define __FILE_H __FILE_H +#include <__FILE.h> +#endif // __FILE_H -/* PDPC code - unreviewed +void clearerr( FILE * fh ) { - stream->errorInd = 0; - stream->eofInd = 0; + fh->ErrorIndicator = 0; + fh->EOFIndicator = 0; return; } -*/ diff --git a/functions/stdio/feof.c b/functions/stdio/feof.c index dd19dcb..93203d0 100644 --- a/functions/stdio/feof.c +++ b/functions/stdio/feof.c @@ -5,10 +5,12 @@ // This code is Public Domain. Use, modify, and redistribute at will. // ---------------------------------------------------------------------------- -int feof( FILE * stream ) { /* TODO */ }; +#ifndef __FILE_H +#define __FILE_H __FILE_H +#include <__FILE.h> +#endif // __FILE_H -/* PDPC code - unreviewed +int feof( FILE * fh ) { - return (stream->eofInd); + return fh->EOFIndicator; } -*/ diff --git a/functions/stdio/ferror.c b/functions/stdio/ferror.c index 7006510..71bd737 100644 --- a/functions/stdio/ferror.c +++ b/functions/stdio/ferror.c @@ -5,10 +5,12 @@ // This code is Public Domain. Use, modify, and redistribute at will. // ---------------------------------------------------------------------------- -int ferror( FILE * stream ) { /* TODO */ }; +#ifndef __FILE_H +#define __FILE_H __FILE_H +#include <__FILE.h> +#endif // __FILE_H -/* PDPC code - unreviewed +int ferror( FILE * fh ) { - return (stream->errorInd); + return fh->ErrorIndicator; } -*/ -- 2.40.0