diff options
author | Mark Adler <madler@alumni.caltech.edu> | 2016-12-04 18:29:43 -0800 |
---|---|---|
committer | Mark Adler <madler@alumni.caltech.edu> | 2016-12-04 18:47:34 -0800 |
commit | 77bc4f8944c0e1a1fd4689eddbcead6e93bef58a (patch) | |
tree | 4de4ee562e63d8ec74878d58041b53a291ffc443 /zlib.h | |
parent | 44dfd831d24f9b627ab666cf0973b0dce98fabba (diff) | |
download | zlib-77bc4f8944c0e1a1fd4689eddbcead6e93bef58a.tar.gz zlib-77bc4f8944c0e1a1fd4689eddbcead6e93bef58a.tar.bz2 zlib-77bc4f8944c0e1a1fd4689eddbcead6e93bef58a.zip |
Add gzfwrite(), duplicating the interface of fwrite().
Diffstat (limited to 'zlib.h')
-rw-r--r-- | zlib.h | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -1427,6 +1427,20 @@ ZEXTERN int ZEXPORT gzwrite OF((gzFile file, | |||
1427 | error. | 1427 | error. |
1428 | */ | 1428 | */ |
1429 | 1429 | ||
1430 | ZEXTERN z_size_t ZEXPORT gzfwrite OF((voidpc buf, z_size_t size, | ||
1431 | z_size_t nitems, gzFile file)); | ||
1432 | /* | ||
1433 | gzfwrite() writes nitems items of size size from buf to file, duplicating | ||
1434 | the interface of stdio's fwrite(), with size_t request and return types. If | ||
1435 | the library defines size_t, then z_size_t is identical to size_t. If not, | ||
1436 | then z_size_t is an unsigned integer type that can contain a pointer. | ||
1437 | |||
1438 | gzfwrite() returns the number of full items written of size size, or zero | ||
1439 | if there was an error. If the multiplication of size and nitems overflows, | ||
1440 | i.e. the product does not fit in a z_size_t, then nothing is written, zero | ||
1441 | is returned, and the error state is set to Z_STREAM_ERROR. | ||
1442 | */ | ||
1443 | |||
1430 | ZEXTERN int ZEXPORTVA gzprintf Z_ARG((gzFile file, const char *format, ...)); | 1444 | ZEXTERN int ZEXPORTVA gzprintf Z_ARG((gzFile file, const char *format, ...)); |
1431 | /* | 1445 | /* |
1432 | Converts, formats, and writes the arguments to the compressed file under | 1446 | Converts, formats, and writes the arguments to the compressed file under |