[Main]
Name=fread
Type=Function
Subtype=tigcc.a
Header Files=stdio.h
Definition=unsigned short fread (void *ptr, unsigned short size, unsigned short n, FILE *stream);

[Description]
Reads data from a stream.

[Explanation]
fread reads <I>n</I> items of data, each of length <I>size</I> bytes, from the input
stream associated with the structure pointed to by <I>stream</I> into a block pointed to
by <I>ptr</I>. The total number of bytes read is <I>n</I>&nbsp;x&nbsp;<I>size</I>. fread
fread returns the number of items (not bytes) actually read. If the operation was sucessful,
the returned result should be equal to <I>n</I>. In a case of error, returned result will
be smaller (possibly zero).
<BR><BR>
<B>Note:</B> fread is proposed to be used in "binary" mode (see <A HREF="$$LINK(stdio.h/fopen)">fopen</A>).
Although this is not strictly necessary, it is is highly recommended opening <I>stream</I>
in "binary" mode if you want to use this function. Anyway,
there will not be any character translations during reading, even if the file is opened in
"text" mode. This function was buggy in releases of TIGCCLIB prior to 2.2; this is now fixed.

[References]
Out=stdio.h/fgetc
