From: solar Date: Thu, 22 Jan 2004 06:33:18 +0000 (+0000) Subject: Reviewed / implemented. X-Git-Tag: OLD~6 X-Git-Url: https://pd.if.org/git/?p=pdclib;a=commitdiff_plain;h=bdb5cd8978b8ec6f0e616bdb1810c8d753e4d84b;hp=98e6058f0fe852143c4ec0d5c243cbeda6e32c4c Reviewed / implemented. --- 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; } -*/