Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.1 6/24/83; site sdcsvax.UUCP
Path: utzoo!watmath!clyde!burl!mgnetp!ihnp4!zehntel!hplabs!sdcrdcf!sdcsvax!laman
From: laman@sdcsvax.UUCP (Mike Laman)
Newsgroups: net.bugs.usg
Subject: Another bug in 5.2 curses
Message-ID: <1132@sdcsvax.UUCP>
Date: Tue, 14-Aug-84 21:33:05 EDT
Article-I.D.: sdcsvax.1132
Posted: Tue Aug 14 21:33:05 1984
Date-Received: Thu, 16-Aug-84 07:14:37 EDT
Organization: EECS Dept. U.C. San Diego
Lines: 26

After posting my ~6 bugs for 5.2 curses, I received the following bug
notification.  I thought I would share it with the net.  The wording
is mine, but FULL credit for the fix goes to "akgua!whuxle!mp (Mark Plotnick)".
Thanks Mark!

On approximately line #310 in "tparm()" (screen/tparm.c) is the following line
of code that handles the "%=" stack manipulation as documented at the top of
page 8 in the 5.2 Programmer Reference Manual concerning the parameterized
string manipulation ( inhale ).  It is supposed to COMPARE, but it ASSIGNS
instead.  ("%=" means to COMPARE for equality the top two stack elements (which
are poped) and push the result.)

	case '=': c=pop(); op=pop(); push(op = c); break;
					     ^
					     |

					This is effectively putting the
					top element back on top of the stack.
					=> This operation only removes the
					   second element.
This line should be:

	case '=': c=pop(); op=pop(); push(op == c); break;

		Mike Laman
		UUCP: {ucbvax,philabs,sdcsla}!sdcsvax!laman