Re: PATCH: wv patch


Subject: Re: PATCH: wv patch
From: Dom Lachowicz (doml@appligent.com)
Date: Thu Jan 17 2002 - 15:09:16 CST


Committed.

Dom

On Thu, 2002-01-17 at 15:58, Robert Wilhelm wrote:
> On Wed, Jan 16, 2002 at 10:03:42AM -0500, Dom Lachowicz wrote:
> > >From RIES (rvt@dds.nl)
> >
> > work on escher.c and picf.c - pictures inside of word docs should be
> > absolutely fine now.
> >
>
> Well, no more crashes, but also sometimes no picture at all :-(
>
> If you look e.g. at the Dokument from Bug #2584, there is a new style
> bitmap. Unfortunately in this case wvGetPICF returns 0 at the very end
> and we get a "DEBUG: Couldn't import graphic!".
>
> Following patch fixes the return values and the bitmap is loaded
> and displayed ( it seems to be too large, but this is another topic).
>
> Robert
>
> RCS file: /cvsroot/wv/picf.c,v
> retrieving revision 1.25
> diff -u -r1.25 picf.c
> --- picf.c 2002/01/16 15:04:12 1.25
> +++ picf.c 2002/01/17 20:51:49
> @@ -7,10 +7,10 @@
> #endif
> #include "wv.h"
>
> +/* return value: 1 == success 0 == failure */
> int
> wvGetPICF (wvVersion ver, PICF * apicf, wvStream * fd)
> {
> - int ret = 0;
> FILE *f;
> U8 temp;
> U32 i;
> @@ -69,7 +69,7 @@
> {
> wvError (("Couldnt create tmpfile: %s\n", strerror (errno)));
> apicf->rgb = NULL;
> - return (ret);
> + return 0;
> }
> /*
> sprintf(buffer,"/tmp/newtest-%d",s++);
> @@ -87,7 +87,6 @@
> U16 bpp;
>
> wvTrace (("test\n"));
> - ret = 1;
> len = apicf->lcb - apicf->cbHeader;
>
> i = wvEatOldGraphicHeader (fd, len);
> @@ -96,7 +95,7 @@
> {
> wvTrace (("all read ok methinks\n"));
> apicf->rgb = NULL;
> - return (ret);
> + return 1;
> }
> len -= i;
>
> @@ -166,7 +165,7 @@
>
> rewind (f);
> wvStream_FILE_create (&apicf->rgb, f);
> - return (ret);
> + return 1;
> }
>
> U32
>
>



This archive was generated by hypermail 2b25 : Thu Jan 17 2002 - 15:10:14 CST