Hubert Figuiere wrote:
>
> At 11:23 +0100 20/01/01, Hubert Figuiere wrote:
>
> >Lines 266-267 are
> > if
> >(decode_byte(lev+3,off+len+datanr,*result,&pixelnr,temp,bits_per_pixel,
> > linelen,&linepos,picsize)) {
> >
> >decodebyte take a int * as a last parameter while picsize is
> >declared as psiconv_u32.
> >
> >Basically, this is a type problem, and since there is no guarantee
> >that 'int' be a 32-bits value (it is in the present case, ie PowerPC
> >code, but in 68k it may not be), I think that this should be
> >avoided. What shall I do (instead of a mad wild typecase) ?
>
> I messed up. It is not picsize but pixelnr. But the problem is still the same.
Ah. That's exactly the kind of problem that only turns up when you compile
on an entirely different architecture. I have attached a small patch
that fixes this; but you may encounter more of these problems. I tried to
keep it as type-clean as possible, but without a rigorous test like yours,
it is very difficult to catch all cases.
Good luck,
Frodo
--
Frodo Looijaard <[EMAIL PROTECTED]> PGP key and more: http://huizen.dds.nl/~frodol
Defenestration n. (formal or joc.):
The act of removing Windows from your computer in disgust, usually followed
by the installation of Linux or some other Unix-like operating system.
? config.log
? config.h
? config.cache
? libtool
? config.status
? stamp-h
? Makefile
? compat/Makefile
? compat/.deps
? compat/dummy.lo
? compat/.libs
? compat/libcompat.la
? psiconv/Makefile
? psiconv/general.h
? psiconv/.deps
? psiconv/error.lo
? psiconv/misc.lo
? psiconv/checkuid.lo
? psiconv/list.lo
? psiconv/buffer.lo
? psiconv/data.lo
? psiconv/parse_common.lo
? psiconv/parse_driver.lo
? psiconv/parse_layout.lo
? psiconv/parse_image.lo
? psiconv/parse_page.lo
? psiconv/parse_simple.lo
? psiconv/parse_texted.lo
? psiconv/parse_word.lo
? psiconv/generate_simple.lo
? psiconv/generate_layout.lo
? psiconv/generate_driver.lo
? psiconv/generate_common.lo
? psiconv/generate_texted.lo
? psiconv/generate_page.lo
? psiconv/generate_word.lo
? psiconv/generate_image.lo
? psiconv/.libs
? psiconv/libpsiconv.la
Index: compat/Makefile.am
===================================================================
RCS file: /cvsroot/psiconv/compat/Makefile.am,v
retrieving revision 1.1.1.1
diff -u -2 -r1.1.1.1 Makefile.am
--- compat/Makefile.am 2001/01/19 05:17:36 1.1.1.1
+++ compat/Makefile.am 2001/01/20 12:30:40
@@ -5,3 +5,3 @@
libcompat_la_LDFLAGS = -static
-EXTRA_DIST=getopt.h compat.h
+EXTRA_DIST=getopt.h compat.h getopt.c getopt1.c
Index: compat/Makefile.in
===================================================================
RCS file: /cvsroot/psiconv/compat/Makefile.in,v
retrieving revision 1.2
diff -u -2 -r1.2 Makefile.in
--- compat/Makefile.in 2001/01/19 23:29:03 1.2
+++ compat/Makefile.in 2001/01/20 12:30:40
@@ -81,5 +81,5 @@
libcompat_la_LDFLAGS = -static
-EXTRA_DIST = getopt.h compat.h
+EXTRA_DIST = getopt.h compat.h getopt.c getopt1.c
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = ../config.h
Index: psiconv/parse_image.c
===================================================================
RCS file: /cvsroot/psiconv/psiconv/parse_image.c,v
retrieving revision 1.1.1.1
diff -u -2 -r1.1.1.1 parse_image.c
--- psiconv/parse_image.c 2001/01/19 05:17:31 1.1.1.1
+++ psiconv/parse_image.c 2001/01/20 12:30:42
@@ -78,5 +78,5 @@
static int decode_byte(int lev, psiconv_u32 off,
- psiconv_paint_data_section data, int *pixelnr,
+ psiconv_paint_data_section data, psiconv_u32 *pixelnr,
psiconv_u8 byte, int bits_per_pixel, int linelen,
int *linepos,int picsize)