Exemplo n.º 1
0
void
SetForExit (void)
{
  setconnmode (0);
#if defined TN3270
  if (In3270)
    {
      Finish3270 ();
    }
#else /* defined(TN3270) */
  do
    {
      telrcv ();		/* Process any incoming data */
      EmptyTerminal ();
    }
  while (ring_full_count (&netiring));	/* While there is any */
#endif /* defined(TN3270) */
  setcommandmode ();
  fflush (stdout);
  fflush (stderr);
#if defined TN3270
  if (In3270)
    {
      StopScreen (1);
    }
#endif /* defined(TN3270) */
  setconnmode (0);
  EmptyTerminal ();		/* Flush the path to the tty */
  setcommandmode ();
}
Exemplo n.º 2
0
    void
SetIn3270(void)
{
    if (Sent3270TerminalType && my_want_state_is_will(TELOPT_BINARY)
		&& my_want_state_is_do(TELOPT_BINARY) && !donebinarytoggle) {
	if (!In3270) {
	    In3270 = 1;
	    Init3270();		/* Initialize 3270 functions */
	    /* initialize terminal key mapping */
	    InitTerminal();	/* Start terminal going */
	    setconnmode(0);
	}
    } else {
	if (In3270) {
	    StopScreen(1);
	    In3270 = 0;
	    Stop3270();		/* Tell 3270 we aren't here anymore */
	    setconnmode(0);
	}
    }
}