Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
From: kooper@cc.gatech.edu (Rob Kooper)
Subject: Patch for xv 3.01
Date: Thu, 28 Apr 1994 15:37:08 GMT	[thread overview]
Message-ID: <1994Apr28.153708.25311@cc.gatech.edu> (raw)

Hi,

I compiled XV 3.01 on a dec ALPHA and it compiled without a hitch.
Offcourse there is no TIFF support yet. I found a small bug in the code
which read an SGI image file. The following patch should overcome this:

*** /sgi4b/kooper/xv-3.01/xviris.c      Wed Apr 27 18:41:42 1994
--- ./xviris.c  Wed Apr 27 18:37:33 1994
***************
*** 329,337 ****
      long *starttab, *lengthtab;
  
      rlebuflen = 2 * xsize + 10;
!     tablen    = ysize * zsize * sizeof(long);
!     starttab  = (long *) malloc(tablen);
!     lengthtab = (long *) malloc(tablen);
      rledat    = (byte *) malloc(rlebuflen);
  
      if (!starttab || !lengthtab || !rledat) 
--- 329,337 ----
      long *starttab, *lengthtab;
  
      rlebuflen = 2 * xsize + 10;
!     tablen    = ysize * zsize * 4;
!     starttab  = (long *) malloc(tablen * (sizeof(long) / 4));
!     lengthtab = (long *) malloc(tablen * (sizeof(long) / 4));
      rledat    = (byte *) malloc(rlebuflen);
  
      if (!starttab || !lengthtab || !rledat) 
***************
*** 599,608 ****
  
    /* allocate RLE compression tables & stuff */
    rlebuflen = 2*w + 10;
!   tablen    = h * zsize * sizeof(long);
  
!   starttab  = (long *) malloc(tablen);
!   lengthtab = (long *) malloc(tablen);
    rlebuf    = (byte *) malloc(rlebuflen);
    lumbuf    = (byte *) malloc(w * 4);
  
--- 599,608 ----
  
    /* allocate RLE compression tables & stuff */
    rlebuflen = 2*w + 10;
!   tablen    = h * zsize * 4;
  
!   starttab  = (long *) malloc(tablen * (sizeof(long) / 4));
!   lengthtab = (long *) malloc(tablen * (sizeof(long) / 4));
    rlebuf    = (byte *) malloc(rlebuflen);
    lumbuf    = (byte *) malloc(w * 4);

Rob
					
					-Rob Kooper (kooper@cc.gatech.edu)


                 reply	other threads:[~1994-04-28 15:37 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox