getpoint()
getpoint(void)
getpoint(){	register int c, x, y, e, lo_y = 0;	register TScreen *screen = &term->screen;	x = screen->cur.x;	y = screen->cur.y;	for( ; ; ) {		if((c = input()) < ' ') {	/* control character */			unput(c);			return(0);		}		if(c < '@') {	/* Hi X or Hi Y */			if(lo_y) {	/* seen a Lo Y, so this must be Hi X */				x &= ~HIBITS;				x |= (c & FIVEBITS) << SHIFTHI;				continue;			}			/* else Hi Y */			y &= ~HIBITS;			y |= (c & FIVEBITS) << SHIFTHI;			continue;		}		if(c < '`') {	/* Lo X */			x &= ~LOBITS;			x |= (c & FIVEBITS) << SHIFTLO;			screen->cur.x = x;			screen->cur.y = y;			return(1);	/* OK */		}		/* else Lo Y */		if(lo_y) {	/* seen a Lo Y, so other must be extra bits */			e = (y >> SHIFTLO) & EXTRABITS;			x &= ~TWOBITS;			x |= e & TWOBITS;			y &= ~TWOBITS;			y |= (e >> SHIFTLO) & TWOBITS;		}		y &= ~LOBITS;		y |= (c & FIVEBITS) << SHIFTLO;		lo_y++;	}}