patch 1 for PBMPLUS of 22nov89: pgmtops -rle
Jef Poskanzer
jef at well.UUCP
Wed Nov 29 04:29:04 AEST 1989
Juha Sarlin noticed that pgmtops -rle doesn't work at all in this
release, which seems like a pretty serious bug. He also provided the
simple fix appended below.
I think this is my first patch ever. I hope it doesn't get to be a habit.
---
Jef
Jef Poskanzer jef at well.sf.ca.us {ucbvax, apple, hplabs}!well!jef
"Let's do it." -- Gary Gilmore
*** pgmtops.c.orig Mon Nov 27 17:54:25 1989
--- pgmtops.c Mon Nov 27 22:46:56 1989
***************
*** 385,391 ****
rleitem = 0;
rlebitsperitem = 0;
! rlebitshift = 8 - bitsperitem;
}
rleputgray( g )
--- 385,391 ----
rleitem = 0;
rlebitsperitem = 0;
! rlebitshift = 8 - bitspersample;
}
rleputgray( g )
***************
*** 392,403 ****
gray g;
{
if ( rlebitsperitem == 8 )
- {
rleputitem( );
- }
rleitem += g << rlebitshift;
! rlebitsperitem += bitsperitem;
! rlebitshift -= bitsperitem;
}
rleputrest( )
--- 392,401 ----
gray g;
{
if ( rlebitsperitem == 8 )
rleputitem( );
rleitem += g << rlebitshift;
! rlebitsperitem += bitspersample;
! rlebitshift -= bitspersample;
}
rleputrest( )
More information about the Comp.sources.bugs
mailing list