🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: net.bugs.usg
Article #236

bug in libcurses.a

#236
From: Rick Wessman
Date: Sun, 06 Oct 1985 21:14
38 lines
1501 bytes
There is a bug in the "getsh" function in the setupterm.c module
that affects machines whose characters are signed. In fact, "pg"
will dump core every time with this bug.

VAXes and PDP-11 don't have this problem, because they use a define
instead of the function.

Ironically, the comment before the function states that this
function works on machines that have sign extension.

Here are the diffs:
*** setupterm.c	Mon Jul  1 12:14:30 1985
--- setupterm.c.old	Thu Sep 19 17:19:59 1985
***************
*** 44,51
  	register int rv;
  	if (*p == 0377)
  		return -1;
! 	rv = (unsigned char) *p++;
! 	rv += (unsigned char) *p * 256;
  	return rv;
  }
  #endif
--- 44,51 -----
  	register int rv;
  	if (*p == 0377)
  		return -1;
! 	rv = *p++;
! 	rv += *p * 256;
  	return rv;
  }
  #endif


			Rick Wessman
			..!seismo!rochester!ccice5!ccice1!rrw
					or
			..!ccicpg!ccice5!ccice1!rrw
Technical Details
Message-ID: <371@ccice1.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!think!harvard!seismo!rochester!ritcv!ccice5!ccice1!rrw

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.2 9/18/84; site ccice1.UUCP
Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!think!harvard!seismo!rochester!ritcv!ccice5!ccice1!rrw
From: rrw@ccice1.UUCP (Rick Wessman)
Newsgroups: net.bugs.usg
Subject: bug in libcurses.a
Message-ID: <371@ccice1.UUCP>
Date: Sun, 6-Oct-85 17:14:34 EDT
Article-I.D.: ccice1.371
Posted: Sun Oct  6 17:14:34 1985
Date-Received: Tue, 8-Oct-85 04:20:52 EDT
Distribution: net
Organization: CCI Central Engineering, Rochester, NY
Lines: 38