#include "config.h"
#ifndef lint
static const char sccsid[] = "@(#)tk_screen.c 8.9 (Berkeley) 5/24/96";
#endif
#include <sys/types.h>
#include <sys/queue.h>
#include <bitstring.h>
#include <errno.h>
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <termios.h>
#include <unistd.h>
#include "../common/common.h"
#include "tki.h"
int
tk_screen(sp, flags)
SCR *sp;
u_int32_t flags;
{
TK_PRIVATE *tkp;
tkp = TKP(sp);
if (LF_ISSET(SC_VI) && F_ISSET(sp, SC_SCR_VI))
return (0);
if (LF_ISSET(SC_EX))
return (1);
if (tk_term_init(sp))
return (1);
if (tk_rename(sp))
return (1);
F_SET(tkp, TK_SCR_VI_INIT);
return (0);
}
int
tk_quit(gp)
GS *gp;
{
TK_PRIVATE *tkp;
int rval;
rval = tk_term_end(gp);
tkp = GTKP(gp);
F_CLR(tkp, TK_SCR_VI_INIT);
return (rval);
}