From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,a4cd27ff921d4a46,start X-Google-Attributes: gidfee84,public X-Google-ArrivalTime: 1994-04-28 10:39:59 PST Newsgroups: comp.unix.osf.osf1 Path: gmd.de!nntp.gmd.de!xlink.net!howland.reston.ans.net!europa.eng.gtefsd.com!darwin.sura.net!cc.gatech.edu!kooper From: kooper@cc.gatech.edu (Rob Kooper) Subject: Patch for xv 3.01 Message-ID: <1994Apr28.153708.25311@cc.gatech.edu> Sender: news@cc.gatech.edu Organization: College of Computing, Georgia Tech Date: Thu, 28 Apr 1994 15:37:08 GMT 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)