Commit 2d065031 authored by Paul Eggert's avatar Paul Eggert

* decompress.c: Minor simplifications.

(Fzlib_decompress_region): Don't bother verifying
that avail_out <= UINT_MAX, as that was confusing.
Mention the restriction in a comment instead.
Prefer 'int' to 'ptrdiff_t' when 'int' is wide enough.
parent a5bd5abb
2013-08-13 Paul Eggert <eggert@cs.ucla.edu>
* decompress.c: Minor simplifications.
(Fzlib_decompress_region): Don't bother verifying
that avail_out <= UINT_MAX, as that was confusing.
Mention the restriction in a comment instead.
Prefer 'int' to 'ptrdiff_t' when 'int' is wide enough.
2013-08-13 Jan Djärv <jan.h.d@swipnet.se>
* nsmenu.m (x_activate_menubar): Check for OSX >= 10.5
......
......@@ -183,12 +183,10 @@ This function can be called only in unibyte buffers. */)
{
/* Maximum number of bytes that one 'inflate' call should read and write.
Do not make avail_out too large, as that might unduly delay C-g.
In any case zlib requires that these values not exceed UINT_MAX. */
zlib requires that avail_in and avail_out not exceed UINT_MAX. */
ptrdiff_t avail_in = min (iend - pos_byte, UINT_MAX);
enum { avail_out = 1 << 14 };
verify (avail_out <= UINT_MAX);
ptrdiff_t decompressed;
int avail_out = 16 * 1024;
int decompressed;
if (GAP_SIZE < avail_out)
make_gap (avail_out - GAP_SIZE);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment