Exemplo n.º 1
0
void suspend_curses()
{
#if ANY_UNIX && !UNIXV
	struct tchars	tbuf;
# ifdef TIOCSLTC
	struct ltchars	ltbuf;
# endif
#endif
#ifndef NO_CURSORSHAPE
	if (has_CQ)
	{
		do_CQ();
	}
#endif
	if (has_TE)					/* GB */
	{
		do_TE();
	}
	if (has_KE)
	{
		do_KE();
	}
	/*refresh();*/	/* removed by grh, overwrites error msg then crashes*/

	/* change the terminal mode back the way it was */
#if ANY_UNIX
# if UNIXV
	/*ioctl(2, TCSETS, &oldtermios);*/
	tcsetattr(2, TCSANOW, &oldtermios);
# else
	ioctl(2, TIOCSETP, &oldsgttyb);

	ioctl(2, TIOCGETC, &tbuf);
	tbuf.t_intrc = oldint;
	ioctl(2, TIOCSETC, &tbuf);

#  ifdef TIOCSLTC
	ioctl(2, TIOCGLTC, &ltbuf);
	ltbuf.t_suspc = oldswitch;
	ltbuf.t_lnextc = oldquote;
	ioctl(2, TIOCSLTC, &ltbuf);
#  endif
# endif
#endif
#if OSK
	_ss_opt(0, &oldsgttyb);
#endif
	curses_active = FALSE;
}
Exemplo n.º 2
0
/* Send any required termination strings.  Turn off "raw" mode. */
void suspend_curses()
{
#ifndef NO_CURSORSHAPE
	if (has_CQ)
	{
		do_CQ();
	}
#endif
	if (has_TE)					/* GB */
	{
		do_TE();
	}
	if (has_KE)
	{
		do_KE();
	}
#ifndef NO_COLOR
	quitcolor();
#endif
	refresh();

	/* change the terminal mode back the way it was */
#if ANY_UNIX
	tcsetattr(2, TCSADRAIN, &oldtermio);
#endif
#if OSK
	_ss_opt(0, &oldsgttyb);
#endif
#if AMIGA
	ttyshutdown();
#endif
#if MSDOS
	raw_set_stdio(FALSE);
#endif

#if VMS
	VMS_read_raw = 0;
#endif
	curses_active = FALSE;
}
Exemplo n.º 3
0
/* Send any required termination strings.  Turn off "raw" mode. */
void suspend_curses()
{
#if ANY_UNIX && !UNIXV
	struct tchars	tbuf;
# ifdef TIOCSLTC
	struct ltchars	ltbuf;
# endif
#endif
#ifndef NO_CURSORSHAPE
	if (has_CQ)
	{
		do_CQ();
	}
#endif
	if (has_TE)					/* GB */
	{
		do_TE();
	}
	if (has_KE)
	{
		do_KE();
	}
#ifndef NO_COLOR
	quitcolor();
#endif
	refresh();

	/* change the terminal mode back the way it was */
#if ANY_UNIX
# if UNIXV
#  if TERMIOS
	tcsetattr(2, TCSADRAIN, &oldtermio);
#  else
	ioctl(2, TCSETAW, &oldtermio);
#  endif
# else
	ioctl(2, TIOCSETP, &oldsgttyb);

	ioctl(2, TIOCGETC, (struct sgttyb *) &tbuf);
	tbuf.t_intrc = oldint;
	ioctl(2, TIOCSETC, (struct sgttyb *) &tbuf);

#  ifdef TIOCSLTC
	ioctl(2, TIOCGLTC, &ltbuf);
	ltbuf.t_suspc = oldswitch;
	ltbuf.t_dsuspc = olddswitch;
	ltbuf.t_lnextc = oldquote;
	ioctl(2, TIOCSLTC, &ltbuf);
#  endif
# endif
#endif
#if OSK
	_ss_opt(0, &oldsgttyb);
#endif
#if AMIGA
	ttyshutdown();
#endif
#if MSDOS
	raw_set_stdio(FALSE);
#endif

#if VMS
	VMS_read_raw = 0;
#endif
	curses_active = FALSE;
}