[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] trunk r113858: * decompress.c: Minor simplifications.
From: |
Paul Eggert |
Subject: |
[Emacs-diffs] trunk r113858: * decompress.c: Minor simplifications. |
Date: |
Tue, 13 Aug 2013 21:17:18 +0000 |
User-agent: |
Bazaar (2.6b2) |
------------------------------------------------------------
revno: 113858
revision-id: address@hidden
parent: address@hidden
committer: Paul Eggert <address@hidden>
branch nick: trunk
timestamp: Tue 2013-08-13 14:17:09 -0700
message:
* 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.
modified:
src/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-1438
src/decompress.c decompress.c-20130811194033-wfhl0tqmmc36jfmu-1
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog 2013-08-13 20:18:30 +0000
+++ b/src/ChangeLog 2013-08-13 21:17:09 +0000
@@ -1,3 +1,11 @@
+2013-08-13 Paul Eggert <address@hidden>
+
+ * 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 <address@hidden>
* nsmenu.m (x_activate_menubar): Check for OSX >= 10.5
=== modified file 'src/decompress.c'
--- a/src/decompress.c 2013-08-13 16:20:39 +0000
+++ b/src/decompress.c 2013-08-13 21:17:09 +0000
@@ -183,12 +183,10 @@
{
/* 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);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] trunk r113858: * decompress.c: Minor simplifications.,
Paul Eggert <=