From 1e9192602a4c7c42c692d2d3eaf3711c01b88f5e Mon Sep 17 00:00:00 2001 From: solar <> Date: Mon, 13 Mar 2006 16:15:20 +0000 Subject: [PATCH] Documented the direct I/O functions. --- includes/stdio.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/includes/stdio.h b/includes/stdio.h index 01c9073..2f73462 100644 --- a/includes/stdio.h +++ b/includes/stdio.h @@ -204,7 +204,23 @@ int puts( const char * s ); int ungetc( int c, FILE * stream ); /* Direct input/output functions */ + +/* Read up to nmemb elements of given size from given stream into the buffer + pointed to by ptr. Returns the number of elements successfully read, which + may be less than nmemb if a read error or EOF is encountered. If a read + error is encountered, the value of the file position indicator is + indeterminate. If a partial element is read, its value is indeterminate. + If size or nmemb are zero, the function does nothing and returns zero. +*/ size_t fread( void * _PDCLIB_restrict ptr, size_t size, size_t nmemb, FILE * _PDCLIB_restrict stream ); + +/* Write up to nmemb elements of given size from buffer pointed to by ptr to + the given stream. Returns the number of elements successfully written, which + will be less than nmemb only if a write error is encountered. If a write + error is encountered, the value of the file position indicator is + indeterminate. If size or nmemb are zero, the function does nothing and + returns zero. +*/ size_t fwrite( const void * _PDCLIB_restrict ptr, size_t size, size_t nmemb, FILE * _PDCLIB_restrict stream ); /* File positioning functions */ -- 2.40.0