Esempio n. 1
0
VInit ()
{
# ifdef MSDOS
	DOSgetinfo (&LINES, &COLS, &DOSstdattr);
	scrool = 1;
# else
	CapGet (outtab);
	if (LINES <= 6 || COLS <= 30)
		return (0);
	if (! CM)
		return (0);
	scrool = AL && DL;
	if (! (rscrool = SF && SR))
		SF = SR = 0;
	if (NF)
		initcolor ();
	else if (ME)
		initbold ();
	if (G1 || G2 || GT)
		initgraph ();
# endif
	if (curscr.y)
		delwin (&curscr);
	if (VScreen.y)
		delwin (&VScreen);
	if (! newwin (&curscr) || ! newwin (&VScreen)) {
		VClose ();
		return (0);
	}
	curscr.flgs = curscr.clear = 1;
	resetattr (0);
	return (1);
}
Esempio n. 2
0
void
avatar::setattr(int ch)
{
  if (arg1 == -1)         // No DLE
  {
    if (ch == AVT_DLE)    // Got a DLE
    {
      arg1 = 0;           // Call with next byte, and do ESC
      return;
    }
    resetattr(ch);
  }
  else    // Previous char was DLE escaped
  {
    if (ch & 0x80)        // This has a hi-bit
      resetattr(ch);      // So displaying is ok
    else
    {
      resetattr(AVT_DLE); // Else use DLE as attribute
      putch(ch);          // And redisplay this character
    }
  }
}