if (!clp->in_ex) {
if (!F_ISSET(clp, CL_IN_EX)) {
cl_vi_end(gp)	GS *gp;{	CL_PRIVATE *clp;	clp = GCLP(gp);	/* Restore the cursor keys to normal mode. */	(void)keypad(stdscr, FALSE);	/*	 * If we were running vi when we quit, scroll the screen up a single	 * line so we don't lose any information.	 *	 * Move to the bottom of the window (some endwin implementations don't	 * do this for you).	 */	if (!clp->in_ex) {		(void)move(0, 0);		(void)deleteln();		(void)move(LINES - 1, 0);		(void)refresh();	}	cl_freecap(clp);	/* End curses window. */	(void)endwin();	/*	 * XXX	 * The screen TE sequence just got sent.  See the comment in	 * cl_funcs.c:cl_attr().	 */	clp->ti_te = TE_SENT;	return (0);}