Refactoring FTerm::init()
This commit is contained in:
parent
e4ec5cb8ff
commit
d13dfbcb9d
|
@ -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>
|
2015-10-05 Markus Gans <guru.mail@muenster.de>
|
||||||
* Improve compatibility with initialize_color
|
* Improve compatibility with initialize_color
|
||||||
* Better support for TeraTerm
|
* Better support for TeraTerm
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
// ▕▁▁▁▁▁▁▁▁▁▏
|
// ▕▁▁▁▁▁▁▁▁▁▏
|
||||||
// ▲
|
// ▲
|
||||||
// │
|
// │
|
||||||
// ▕▔▔▔▔▔▔▔▔▔▔▔▏ 1 *▕▔▔▔▔▔▔▔▏
|
// ▕▔▔▔▔▔▔▔▔▔▔▔▏1 *▕▔▔▔▔▔▔▔▏
|
||||||
// ▕ FMenuItem ▏-┬- - - -▕ FMenu ▏
|
// ▕ FMenuItem ▏-┬- - - -▕ FMenu ▏
|
||||||
// ▕▁▁▁▁▁▁▁▁▁▁▁▏ : ▕▁▁▁▁▁▁▁▏
|
// ▕▁▁▁▁▁▁▁▁▁▁▁▏ : ▕▁▁▁▁▁▁▁▏
|
||||||
// :
|
// :
|
||||||
|
|
|
@ -511,11 +511,14 @@ int FOptiMove::relative_move ( char*& move
|
||||||
if ( htime >= LONG_DURATION )
|
if ( htime >= LONG_DURATION )
|
||||||
return LONG_DURATION;
|
return LONG_DURATION;
|
||||||
|
|
||||||
|
if ( move )
|
||||||
|
{
|
||||||
if ( *move )
|
if ( *move )
|
||||||
strcat (move, hmove);
|
strcat (move, hmove);
|
||||||
else
|
else
|
||||||
strcpy (move, hmove);
|
strcpy (move, hmove);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return (vtime + htime);
|
return (vtime + htime);
|
||||||
}
|
}
|
||||||
|
@ -639,9 +642,12 @@ char* FOptiMove::cursor_move (int xold, int yold, int xnew, int ynew)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 2:
|
case 2:
|
||||||
|
if ( F_carriage_return.cap )
|
||||||
|
{
|
||||||
strncpy (move_ptr, F_carriage_return.cap, sizeof(move_buf) - 1);
|
strncpy (move_ptr, F_carriage_return.cap, sizeof(move_buf) - 1);
|
||||||
move_ptr += F_carriage_return.length;
|
move_ptr += F_carriage_return.length;
|
||||||
relative_move (move_ptr, 0, yold, xnew, ynew);
|
relative_move (move_ptr, 0, yold, xnew, ynew);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 3:
|
case 3:
|
||||||
|
|
|
@ -74,6 +74,8 @@ void FProgressbar::drawBar()
|
||||||
// Cygwin terminal use IBM Codepage 850
|
// Cygwin terminal use IBM Codepage 850
|
||||||
if ( isCygwinTerminal() )
|
if ( isCygwinTerminal() )
|
||||||
print (fc::FullBlock); // █
|
print (fc::FullBlock); // █
|
||||||
|
else if ( isTeraTerm() )
|
||||||
|
print (0xdb);
|
||||||
else
|
else
|
||||||
print (fc::RightHalfBlock); // ▐
|
print (fc::RightHalfBlock); // ▐
|
||||||
}
|
}
|
||||||
|
@ -230,7 +232,9 @@ bool FProgressbar::setEnable (bool on)
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
bool FProgressbar::setShadow (bool on)
|
bool FProgressbar::setShadow (bool on)
|
||||||
{
|
{
|
||||||
if ( on )
|
if ( on
|
||||||
|
&& (Encoding != fc::VT100 || isTeraTerm() )
|
||||||
|
&& Encoding != fc::ASCII )
|
||||||
flags |= SHADOW;
|
flags |= SHADOW;
|
||||||
else
|
else
|
||||||
flags &= ~SHADOW;
|
flags &= ~SHADOW;
|
||||||
|
|
1228
src/fterm.cpp
1228
src/fterm.cpp
File diff suppressed because it is too large
Load Diff
|
@ -239,10 +239,15 @@ class FTerm
|
||||||
static int setUnicodeMap (struct unimapdesc*);
|
static int setUnicodeMap (struct unimapdesc*);
|
||||||
static int getUnicodeMap ();
|
static int getUnicodeMap ();
|
||||||
static int setLightBackgroundColors (bool);
|
static int setLightBackgroundColors (bool);
|
||||||
|
static void init_console();
|
||||||
static uInt getBaudRate (const struct termios*);
|
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_termcaps();
|
||||||
static void init_vt100altChar();
|
static void init_vt100altChar();
|
||||||
static void init_consoleCharMap();
|
static void init_encoding();
|
||||||
void init();
|
void init();
|
||||||
void finish();
|
void finish();
|
||||||
static uInt charEncode (uInt);
|
static uInt charEncode (uInt);
|
||||||
|
|
Loading…
Reference in New Issue