public inbox for bzip2-devel@sourceware.org
 help / color / mirror / Atom feed
From: Mark Wielaard <mark@klomp.org>
To: Vanessa McHale <vamchale@gmail.com>
Cc: bzip2-devel@sourceware.org
Subject: Re: Infelicity in manual bundled with bzip2 1.0.9
Date: Sun, 17 May 2020 15:46:35 +0200	[thread overview]
Message-ID: <20200517134635.GM13278@wildebeest.org> (raw)
In-Reply-To: <d25da1fd-fc1f-addb-f82b-5746c913d26c@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 490 bytes --]

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




[-- Attachment #2: 0001-manual.xml-Add-BZ_SEQUENCE_ERROR-to-return-values-of.patch --]
[-- Type: text/x-diff, Size: 863 bytes --]

From 4022613462968382ad707a67d2a1c4daf99a6cec Mon Sep 17 00:00:00 2001
From: Mark Wielaard <mark@klomp.org>
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 <vamchale@gmail.com>
---
 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
 </programlisting>
-- 
2.20.1


      reply	other threads:[~2020-05-17 13:47 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-01  0:00 Vanessa McHale
2020-05-17 13:46 ` Mark Wielaard [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200517134635.GM13278@wildebeest.org \
    --to=mark@klomp.org \
    --cc=bzip2-devel@sourceware.org \
    --cc=vamchale@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).