Refactoring FTerm::init()

This commit is contained in:
Markus Gans 2015-10-07 02:36:38 +02:00
parent e4ec5cb8ff
commit d13dfbcb9d
6 changed files with 681 additions and 585 deletions

View File

@ -1,3 +1,6 @@
2015-10-06 Markus Gans <guru.mail@muenster.de>
* Refactoring FTerm::init()
2015-10-05 Markus Gans <guru.mail@muenster.de>
* Improve compatibility with initialize_color
* Better support for TeraTerm

View File

@ -16,7 +16,7 @@
// ▕▁▁▁▁▁▁▁▁▁▏
// ▲
// │
// ▕▔▔▔▔▔▔▔▔▔▔▔▏ 1 *▕▔▔▔▔▔▔▔▏
// ▕▔▔▔▔▔▔▔▔▔▔▔▏1 *▕▔▔▔▔▔▔▔▏
// ▕ FMenuItem ▏-┬- - - -▕ FMenu ▏
// ▕▁▁▁▁▁▁▁▁▁▁▁▏ : ▕▁▁▁▁▁▁▁▏
// :

View File

@ -511,11 +511,14 @@ int FOptiMove::relative_move ( char*& move
if ( htime >= LONG_DURATION )
return LONG_DURATION;
if ( move )
{
if ( *move )
strcat (move, hmove);
else
strcpy (move, hmove);
}
}
return (vtime + htime);
}
@ -639,9 +642,12 @@ char* FOptiMove::cursor_move (int xold, int yold, int xnew, int ynew)
break;
case 2:
if ( F_carriage_return.cap )
{
strncpy (move_ptr, F_carriage_return.cap, sizeof(move_buf) - 1);
move_ptr += F_carriage_return.length;
relative_move (move_ptr, 0, yold, xnew, ynew);
}
break;
case 3:

View File

@ -74,6 +74,8 @@ void FProgressbar::drawBar()
// Cygwin terminal use IBM Codepage 850
if ( isCygwinTerminal() )
print (fc::FullBlock); // █
else if ( isTeraTerm() )
print (0xdb);
else
print (fc::RightHalfBlock); // ▐
}
@ -230,7 +232,9 @@ bool FProgressbar::setEnable (bool on)
//----------------------------------------------------------------------
bool FProgressbar::setShadow (bool on)
{
if ( on )
if ( on
&& (Encoding != fc::VT100 || isTeraTerm() )
&& Encoding != fc::ASCII )
flags |= SHADOW;
else
flags &= ~SHADOW;

File diff suppressed because it is too large Load Diff

View File

@ -239,10 +239,15 @@ class FTerm
static int setUnicodeMap (struct unimapdesc*);
static int getUnicodeMap ();
static int setLightBackgroundColors (bool);
static void init_console();
static uInt getBaudRate (const struct termios*);
static void init_consoleCharMap();
static char* init_256colorTerminal(char[]);
static char* parseAnswerbackMsg(char*&);
static char* parseSecDA(char*&);
static void init_termcaps();
static void init_vt100altChar();
static void init_consoleCharMap();
static void init_encoding();
void init();
void finish();
static uInt charEncode (uInt);