From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gnu.wildebeest.org (wildebeest.demon.nl [212.238.236.112]) by sourceware.org (Postfix) with ESMTPS id 85786385BF81 for ; Sun, 17 May 2020 13:47:03 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 85786385BF81 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=klomp.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mark@klomp.org Received: from librem (deer0x15.wildebeest.org [172.31.17.151]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by gnu.wildebeest.org (Postfix) with ESMTPSA id CDE93300043C; Sun, 17 May 2020 15:47:01 +0200 (CEST) Received: by librem (Postfix, from userid 1000) id 5A264C0C62; Sun, 17 May 2020 15:46:35 +0200 (CEST) Date: Sun, 17 May 2020 15:46:35 +0200 From: Mark Wielaard To: Vanessa McHale Cc: bzip2-devel@sourceware.org Subject: Re: Infelicity in manual bundled with bzip2 1.0.9 Message-ID: <20200517134635.GM13278@wildebeest.org> References: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="r5Pyd7+fXNt84Ff3" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-Spam-Status: No, score=-13.5 required=5.0 tests=BAYES_00, GIT_PATCH_0, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, KAM_NUMSUBJECT, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: bzip2-devel@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Bzip2-devel mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 May 2020 13:47:06 -0000 --r5Pyd7+fXNt84Ff3 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi Vanessa, On Sat, Jan 18, 2020 at 02:35:15PM -0600, Vanessa McHale wrote: > According to the PDF manual (page 17), BZ2_bzDecompress can return one > of BZ_PARAM_ERROR, BZ_DATA_ERROR, BZ_DATA_ERROR_MAGIC, BZ_MEM_ERROR, > BZ_STREAM_END, or BZ_OK. However, in attempting to write bindings, I get > BZ_SEQUENCE_ERROR as a return value! > > In fact, looking at the source code, (line 818 of bzlib.c), it returns > BZ_SEQUENCE_ERROR. You are right. I fixed it as attached. Thanks, Mark --r5Pyd7+fXNt84Ff3 Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="0001-manual.xml-Add-BZ_SEQUENCE_ERROR-to-return-values-of.patch" >From 4022613462968382ad707a67d2a1c4daf99a6cec Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Sun, 17 May 2020 15:43:45 +0200 Subject: [PATCH] manual.xml: Add BZ_SEQUENCE_ERROR to return values of BZ2_bzDecompress BZ_SEQUENCE_ERROR can be returned if BZ2_bzDecompress is called after an earlier call already returned BZ_STREAM_END. Reported-by: Vanessa McHale --- manual.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/manual.xml b/manual.xml index 7c9e4ec..ba0480e 100644 --- a/manual.xml +++ b/manual.xml @@ -1583,6 +1583,8 @@ BZ_MEM_ERROR BZ_STREAM_END if the logical end of the data stream was detected and all output in has been consumed, eg s-->avail_out > 0 +BZ_SEQUENCE_ERROR + if called after an earlier call already returned BZ_STREAM_END BZ_OK otherwise -- 2.20.1 --r5Pyd7+fXNt84Ff3--