	/* see description of xconv */
	yp =+ 2048;
	return (yp / yscale);
}

inplot()
{
	stty(OUTF, PTTY);
	spew(ESC);
	spew (INPLOT);
}

outplot()
{
	extern struct {
		int fildes, nunused; 
		char *nxtfree, buff[512];
	} 
	fout;
	spew(ESC);
	spew(ACK);
	spew(ESC);
	spew(ACK);
	fflush(&fout);
	stty (OUTF, ITTY);
}

spew(ch)
{
	extern struct {
		int fildes, nunused; 
		char *nxtfree, buff[512];
	} 
	fout;
	putc(ch, &fout);
}

tobotleft ()
{
	move(-2048,-2048);
}
reset()
{
	outplot();
	exit();
}

float
dist2 (x1, y1, x2,