 |
fwrite |
Function (tigcc.a) |
Writes data to a stream.
fwrite writes n items of data, each of length size bytes, to the output
file associated with the structure pointed to by stream. The data written begins at ptr.
The total number of bytes written is n x size. ptr in the declarations
is a pointer to any object. fwrite returns the number of items (not bytes) actually written.
If the operation was sucessful,
the returned result should be equal to n. In a case of error, returned result will
be smaller (possibly zero).
Note: fwrite is proposed to be used in "binary" mode (see fopen).
Although this is not strictly necessary, it is is highly recommended opening stream
in "binary" mode if you want to use this function. Anyway,
there will not be any character translations during writing, 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.
Uses: fputc