static char SCCS_ID[] = "%W%";

#include <curses.h>
#include <signal.h>

extern  char *obuf;

#define NCOLS   80
#define NLINES  24
int     gettmode();
int     die();
setup()
{
	register char   *sp


	gettmode();
	sp = getenv("TERM");
	setterm(sp);
	initscr();
	signal(SIGINT,die);

}
display(p)
register char   *p;
{
	char c;
	register int i,j;
	for ( i=0; i<NLINES; i++){
		for ( j=0; j<NCOLS; j++){
		c = *p++;
		mvaddch (i,j,c);
		}
	}
	refresh();
}

die()
{
	signal(SIGINT,SIG_IGN);
	mvcur(0,COLS-1,LINES-1,0);
	endwin();
	exit(0);
}
