[net.games] hack fix

emr@hal.UUCP (Edward M. "Harold" Rynes) (01/09/85)

> One mild complaint:  Hack insists that your terminal have the termcap
> parameter 'ce', clear until end of line.  Not all otherwise usable
> terminals have this capability.  The old Infoton I'm using now, for
> instance, works fine with vi and our other four versions of rogue, but
> I can't play hack on it.  This is silly.  I can see using the parameter
> if it's present for display speed, but give us old timers a break as
> well.  I guess I'll have to hack it myself.

I had the same problem with an adm3a clone.  The fix is quite simple.
in hack.termcaps.c find where it tests for CE and take it out of the
if statement.  (Be sure to put it in somewhere else)


	.
	.
	.
	HO = tgetstr("ho", &tbufptr);
	if(tgetnum("co") < COLNO || tgetnum("li") < ROWNO+2)
		error("Screen must be at least %d by %d!",
			ROWNO+2, COLNO);
>>>>	if(!(CL = tgetstr("cl",&tbufptr)) || 
		!(ND = tgetstr("nd", &tbufptr)) ||
		!(UP = tgetstr("up",&tbufptr)) || tgetflag("os"))
		error("Hack needs CL, CE, UP, ND, and no OS.");
>>>>	CE = tgetstr("ce",&tbufptr);
	if(!(CM = tgetstr("cm",&tbufptr)))
		printf("Use of hack on terminals without CM is suspect...\n");
	XD = tgetstr("xd",&tbufptr);
	.
	.
	.


  Then modify cl_end() to look like this.



cl_end() {
register i;

	if(CE)
		xputs(CE);
	else{
		for(i=COLNO - curx; i>0; --i)
			xputc(' ');
		cmov(curx,cury);
		}
}


  That's all!   Happy hacking!

			"Harold"
		  decvax!cwruecmp!hal!emr