[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] trunk r113820: Rename `zlib-decompress-gzipped-region' to
From: |
Lars Ingebrigtsen |
Subject: |
[Emacs-diffs] trunk r113820: Rename `zlib-decompress-gzipped-region' to `zlib-decompress-region'. |
Date: |
Mon, 12 Aug 2013 17:02:35 +0000 |
User-agent: |
Bazaar (2.6b2) |
------------------------------------------------------------
revno: 113820
revision-id: address@hidden
parent: address@hidden
committer: Lars Magne Ingebrigtsen <address@hidden>
branch nick: trunk
timestamp: Mon 2013-08-12 19:02:31 +0200
message:
Rename `zlib-decompress-gzipped-region' to `zlib-decompress-region'.
Also support zlib-format compression.
modified:
etc/NEWS news-20100311060928-aoit31wvzf25yr1z-1
lisp/url/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-3116
lisp/url/url-http.el urlhttp.el-20091113204419-o5vbwnq5f7feedwu-2989
lisp/url/url-vars.el urlvars.el-20091113204419-o5vbwnq5f7feedwu-3004
src/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-1438
src/decompress.c decompress.c-20130811194033-wfhl0tqmmc36jfmu-1
=== modified file 'etc/NEWS'
--- a/etc/NEWS 2013-08-12 13:54:45 +0000
+++ b/etc/NEWS 2013-08-12 17:02:31 +0000
@@ -43,7 +43,8 @@
** Emacs can be compiled with zlib support. If this library is present
(which it normally is on most systems), the function
-`zlib-decompress-gzipped-region' becomes available.
+`zlib-decompress-region' becomes available, which can decompress gzip-
+and zlib-format compressed data.
---
** Emacs for NS (OSX, GNUStep) can be built with ImageMagick support.
=== modified file 'lisp/url/ChangeLog'
--- a/lisp/url/ChangeLog 2013-08-12 13:54:45 +0000
+++ b/lisp/url/ChangeLog 2013-08-12 17:02:31 +0000
@@ -3,6 +3,8 @@
* url-http.el (url-handle-content-transfer-encoding): Renamed
`zlib-decompress-gzipped-region' and check whether it's available,
too.
+ (url-handle-content-transfer-encoding): Renamed
+ `zlib-decompress-region' again.
2013-08-11 Lars Magne Ingebrigtsen <address@hidden>
=== modified file 'lisp/url/url-http.el'
--- a/lisp/url/url-http.el 2013-08-12 13:54:45 +0000
+++ b/lisp/url/url-http.el 2013-08-12 17:02:31 +0000
@@ -860,14 +860,14 @@
(defun url-handle-content-transfer-encoding ()
(let ((encoding (mail-fetch-field "content-encoding")))
(when (and encoding
- (fboundp 'zlib-decompress-gzipped-region)
+ (fboundp 'zlib-decompress-region)
(zlib-available-p)
(equal (downcase encoding) "gzip"))
(save-restriction
(widen)
(goto-char (point-min))
(when (search-forward "\n\n")
- (zlib-decompress-gzipped-region (point) (point-max)))))))
+ (zlib-decompress-region (point) (point-max)))))))
;; Miscellaneous
(defun url-http-activate-callback ()
=== modified file 'lisp/url/url-vars.el'
--- a/lisp/url/url-vars.el 2013-08-12 13:54:45 +0000
+++ b/lisp/url/url-vars.el 2013-08-12 17:02:31 +0000
@@ -210,7 +210,8 @@
(defvar url-request-method nil "The method to use for the next request.")
-(defvar url-mime-encoding-string (and (fboundp 'zlib-decompress-gzipped-region)
+(defvar url-mime-encoding-string (and (fboundp 'zlib-decompress-region)
+ (zlib-available-p)
"gzip")
"String to send in the Accept-encoding: field in HTTP requests.")
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog 2013-08-12 16:05:58 +0000
+++ b/src/ChangeLog 2013-08-12 17:02:31 +0000
@@ -1,3 +1,8 @@
+2013-08-12 Lars Magne Ingebrigtsen <address@hidden>
+
+ * decompress.c (Fzlib_decompress_region): Support zlib
+ decompression, too, and rename.
+
2013-08-12 Paul Eggert <address@hidden>
Minor zlib configuration tweaks.
=== modified file 'src/decompress.c'
--- a/src/decompress.c 2013-08-12 16:05:58 +0000
+++ b/src/decompress.c 2013-08-12 17:02:31 +0000
@@ -119,10 +119,10 @@
#endif
}
-DEFUN ("zlib-decompress-gzipped-region", Fzlib_decompress_gzipped_region,
- Szlib_decompress_gzipped_region,
+DEFUN ("zlib-decompress-region", Fzlib_decompress_region,
+ Szlib_decompress_region,
2, 2, 0,
- doc: /* Decompress a gzip-compressed region.
+ doc: /* Decompress a gzip- or zlib-compressed region.
Replace the text in the region by the decompressed data.
On failure, return nil and leave the data in place.
This function can be called only in unibyte buffers. */)
@@ -151,8 +151,9 @@
stream.avail_in = 0;
stream.next_in = Z_NULL;
- /* This magic number apparently means "this is gzip". */
- if (fn_inflateInit2 (&stream, 16 + MAX_WBITS) != Z_OK)
+ /* The magic number 32 apparently means "autodect both the gzip and
+ zlib formats" according to zlib.h. */
+ if (fn_inflateInit2 (&stream, MAX_WBITS + 32) != Z_OK)
return Qnil;
unwind_data.start = iend;
@@ -210,7 +211,7 @@
syms_of_decompress (void)
{
DEFSYM (Qzlib_dll, "zlib");
- defsubr (&Szlib_decompress_gzipped_region);
+ defsubr (&Szlib_decompress_region);
defsubr (&Szlib_available_p);
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] trunk r113820: Rename `zlib-decompress-gzipped-region' to `zlib-decompress-region'.,
Lars Ingebrigtsen <=