🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sources.bugs
Article #253

patch 1 for PBMPLUS of 22nov89: pgmtops -rle

#253
From: Jef Poskanzer
Date: Tue, 28 Nov 1989 17:29
55 lines
1680 bytes
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@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( )
Technical Details
Message-ID: <14746@well.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!wuarchive!brutus.cs.uiuc.edu!apple!well!jef

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!wuarchive!brutus.cs.uiuc.edu!apple!well!jef
From: jef@well.UUCP (Jef Poskanzer)
Newsgroups: comp.sources.bugs
Subject: patch 1 for PBMPLUS of 22nov89:  pgmtops -rle
Message-ID: <14746@well.UUCP>
Date: 28 Nov 89 17:29:04 GMT
Reply-To: Jef Poskanzer <jef@well.sf.ca.us>
Organization: Paratheo-Anametamystikhood Of Eris Esoteric, Ada Lovelace Cabal
Lines: 55