Bug#354310: zlib1g-dev: doc gzclose versus gzerror
tag 354310 + patch thanks On Sat, Feb 25, 2006 at 11:48:10AM +1100, Kevin Ryde wrote: > The thing that made me go to gzerror was of course that it gives a > string description. Maybe gzclose could note that you can't get a > string for its error (assuming that's in fact the case). I've sent this patch upstream which hopefully clarifies this (it will appear in the next Debian version too): --- zlib-1.2.3/zlib.h.orig 2006-02-18 08:37:38.0 + +++ zlib-1.2.3/zlib.h 2006-02-25 12:02:18.0 + @@ -1230,7 +1230,8 @@ /* Flushes all pending output if necessary, closes the compressed file and deallocates all the (de)compression state. The return value is the zlib - error number (see function gzerror below). + error number (see function gzerror below). Note that even when an error + is returned the file will be closed so gzerror cannot be called. */ ZEXTERN const char * ZEXPORT gzerror OF((gzFile file, int *errnum)); -- "You grabbed my hand and we fell into it, like a daydream - or a fever." signature.asc Description: Digital signature
Bug#354310: zlib1g-dev: doc gzclose versus gzerror
Package: zlib1g-dev Version: 1:1.2.3-9 Severity: wishlist In /usr/include/zlib.h, the description of gzclose says The return value is the zlib error number (see function gzerror below). This confused me into thinking I could call gzerror after gzclose to get a string description for the error code, but if I'm not mistaken that's not allowed (gzclose obviously frees everything of the gzFile pointer). It'd be nice if the wording was clearer. I guess it's trying to say that the return from gzclose is the same sort of error code number as you get back from gzerror, not that you can or should use the latter. The thing that made me go to gzerror was of course that it gives a string description. Maybe gzclose could note that you can't get a string for its error (assuming that's in fact the case). -- System Information: Debian Release: testing/unstable APT prefers unstable APT policy: (500, 'unstable') Architecture: i386 (i586) Shell: /bin/sh linked to /bin/dash Kernel: Linux 2.6.15-1-486 Locale: LANG=en_AU, LC_CTYPE=en_AU (charmap=ISO-8859-1) Versions of packages zlib1g-dev depends on: ii libc6-dev [libc-dev] 2.3.5-12.1 GNU C Library: Development Librari ii zlib1g1:1.2.3-9 compression library - runtime zlib1g-dev recommends no packages. -- no debconf information -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]