More const references

This commit is contained in:
Markus Gans 2021-05-09 21:03:59 +02:00
parent d12875682d
commit f5b4537223
9 changed files with 115 additions and 205 deletions

View File

@ -43,7 +43,7 @@ fi
# Build commands # Build commands
case "$1" in case "$1" in
"--release"|"release") "--release"|"release")
if ! ./configure --prefix="$PREFIX" CXXFLAGS="-O2" # "-O3 -fno-rtti" if ! ./configure --prefix="$PREFIX" CXXFLAGS="-O3" # "-fno-rtti"
then then
echo "${RED}Configure failed!${NORMAL}" 1>&2 echo "${RED}Configure failed!${NORMAL}" 1>&2
exit 255 exit 255

View File

@ -694,7 +694,7 @@ void FApplication::mouseTracking() const
//---------------------------------------------------------------------- //----------------------------------------------------------------------
inline void FApplication::performKeyboardAction() inline void FApplication::performKeyboardAction()
{ {
auto& keyboard = FTerm::getFKeyboard(); const auto& keyboard = FTerm::getFKeyboard();
if ( keyboard.getKey() == FKey::Ctrl_l ) // Ctrl-L (redraw the screen) if ( keyboard.getKey() == FKey::Ctrl_l ) // Ctrl-L (redraw the screen)
{ {
@ -761,7 +761,7 @@ inline void FApplication::sendEscapeKeyPressEvent() const
inline bool FApplication::sendKeyDownEvent (FWidget* widget) const inline bool FApplication::sendKeyDownEvent (FWidget* widget) const
{ {
// Send key down event // Send key down event
auto& keyboard = FTerm::getFKeyboard(); const auto& keyboard = FTerm::getFKeyboard();
FKeyEvent k_down_ev (Event::KeyDown, keyboard.getKey()); FKeyEvent k_down_ev (Event::KeyDown, keyboard.getKey());
sendEvent (widget, &k_down_ev); sendEvent (widget, &k_down_ev);
return k_down_ev.isAccepted(); return k_down_ev.isAccepted();
@ -771,7 +771,7 @@ inline bool FApplication::sendKeyDownEvent (FWidget* widget) const
inline bool FApplication::sendKeyPressEvent (FWidget* widget) const inline bool FApplication::sendKeyPressEvent (FWidget* widget) const
{ {
// Send key press event // Send key press event
auto& keyboard = FTerm::getFKeyboard(); const auto& keyboard = FTerm::getFKeyboard();
FKeyEvent k_press_ev (Event::KeyPress, keyboard.getKey()); FKeyEvent k_press_ev (Event::KeyPress, keyboard.getKey());
sendEvent (widget, &k_press_ev); sendEvent (widget, &k_press_ev);
return k_press_ev.isAccepted(); return k_press_ev.isAccepted();
@ -781,7 +781,7 @@ inline bool FApplication::sendKeyPressEvent (FWidget* widget) const
inline bool FApplication::sendKeyUpEvent (FWidget* widget) const inline bool FApplication::sendKeyUpEvent (FWidget* widget) const
{ {
// Send key up event // Send key up event
auto& keyboard = FTerm::getFKeyboard(); const auto& keyboard = FTerm::getFKeyboard();
FKeyEvent k_up_ev (Event::KeyUp, keyboard.getKey()); FKeyEvent k_up_ev (Event::KeyUp, keyboard.getKey());
sendEvent (widget, &k_up_ev); sendEvent (widget, &k_up_ev);
return k_up_ev.isAccepted(); return k_up_ev.isAccepted();
@ -818,8 +818,8 @@ inline void FApplication::sendKeyboardAccelerator()
//---------------------------------------------------------------------- //----------------------------------------------------------------------
inline bool FApplication::hasDataInQueue() const inline bool FApplication::hasDataInQueue() const
{ {
auto& keyboard = FTerm::getFKeyboard(); const auto& keyboard = FTerm::getFKeyboard();
auto& mouse = FTerm::getFMouseControl(); const auto& mouse = FTerm::getFMouseControl();
if ( keyboard.hasDataInQueue() if ( keyboard.hasDataInQueue()
|| mouse.hasDataInQueue() || mouse.hasDataInQueue()
@ -890,7 +890,7 @@ void FApplication::processMouseEvent() const
//---------------------------------------------------------------------- //----------------------------------------------------------------------
bool FApplication::processDialogSwitchAccelerator() const bool FApplication::processDialogSwitchAccelerator() const
{ {
auto& keyboard = FTerm::getFKeyboard(); const auto& keyboard = FTerm::getFKeyboard();
if ( keyboard.getKey() >= FKey::Meta_1 if ( keyboard.getKey() >= FKey::Meta_1
&& keyboard.getKey() <= FKey::Meta_9 ) && keyboard.getKey() <= FKey::Meta_9 )

View File

@ -108,8 +108,7 @@ FTerm::~FTerm() // destructor
//---------------------------------------------------------------------- //----------------------------------------------------------------------
std::size_t FTerm::getLineNumber() std::size_t FTerm::getLineNumber()
{ {
auto& data = FTerm::getFTermData(); const auto& term_geometry = FTerm::getFTermData().getTermGeometry();
const auto& term_geometry = data.getTermGeometry();
if ( term_geometry.getHeight() == 0 ) if ( term_geometry.getHeight() == 0 )
detectTermSize(); detectTermSize();
@ -120,8 +119,7 @@ std::size_t FTerm::getLineNumber()
//---------------------------------------------------------------------- //----------------------------------------------------------------------
std::size_t FTerm::getColumnNumber() std::size_t FTerm::getColumnNumber()
{ {
auto& data = FTerm::getFTermData(); const auto& term_geometry = FTerm::getFTermData().getTermGeometry();
const auto& term_geometry = data.getTermGeometry();
if ( term_geometry.getWidth() == 0 ) if ( term_geometry.getWidth() == 0 )
detectTermSize(); detectTermSize();
@ -139,29 +137,25 @@ FString FTerm::getKeyName (FKey keynum)
//---------------------------------------------------------------------- //----------------------------------------------------------------------
charSubstitution& FTerm::getCharSubstitutionMap() charSubstitution& FTerm::getCharSubstitutionMap()
{ {
auto& data = FTerm::getFTermData(); return FTerm::getFTermData().getCharSubstitutionMap();
return data.getCharSubstitutionMap();
} }
//---------------------------------------------------------------------- //----------------------------------------------------------------------
int FTerm::getTTYFileDescriptor() int FTerm::getTTYFileDescriptor()
{ {
auto& data = FTerm::getFTermData(); return FTerm::getFTermData().getTTYFileDescriptor();
return data.getTTYFileDescriptor();
} }
//---------------------------------------------------------------------- //----------------------------------------------------------------------
std::string FTerm::getTermType() std::string FTerm::getTermType()
{ {
auto& data = FTerm::getFTermData(); return FTerm::getFTermData().getTermType();
return data.getTermType();
} }
//---------------------------------------------------------------------- //----------------------------------------------------------------------
std::string FTerm::getTermFileName() std::string FTerm::getTermFileName()
{ {
auto& data = FTerm::getFTermData(); return FTerm::getFTermData().getTermFileName();
return data.getTermFileName();
} }
//---------------------------------------------------------------------- //----------------------------------------------------------------------
@ -284,169 +278,145 @@ bool FTerm::isNormal (const FChar& ch)
//---------------------------------------------------------------------- //----------------------------------------------------------------------
bool FTerm::hasUTF8() bool FTerm::hasUTF8()
{ {
auto& data = FTerm::getFTermData(); return FTerm::getFTermData().hasUTF8Console();
return data.hasUTF8Console();
} }
//---------------------------------------------------------------------- //----------------------------------------------------------------------
bool FTerm::isMonochron() bool FTerm::isMonochron()
{ {
auto& data = FTerm::getFTermData(); return FTerm::getFTermData().isMonochron();
return data.isMonochron();
} }
//---------------------------------------------------------------------- //----------------------------------------------------------------------
bool FTerm::isAnsiTerminal() bool FTerm::isAnsiTerminal()
{ {
auto& term_detection = FTerm::getFTermDetection(); return FTerm::getFTermDetection().isAnsiTerminal();
return term_detection.isAnsiTerminal();
} }
//---------------------------------------------------------------------- //----------------------------------------------------------------------
bool FTerm::isXTerminal() bool FTerm::isXTerminal()
{ {
auto& term_detection = FTerm::getFTermDetection(); return FTerm::getFTermDetection().isXTerminal();
return term_detection.isXTerminal();
} }
//---------------------------------------------------------------------- //----------------------------------------------------------------------
bool FTerm::isRxvtTerminal() bool FTerm::isRxvtTerminal()
{ {
auto& term_detection = FTerm::getFTermDetection(); return FTerm::getFTermDetection().isRxvtTerminal();
return term_detection.isRxvtTerminal();
} }
//---------------------------------------------------------------------- //----------------------------------------------------------------------
bool FTerm::isUrxvtTerminal() bool FTerm::isUrxvtTerminal()
{ {
auto& term_detection = FTerm::getFTermDetection(); return FTerm::getFTermDetection().isUrxvtTerminal();
return term_detection.isUrxvtTerminal();
} }
//---------------------------------------------------------------------- //----------------------------------------------------------------------
bool FTerm::isKdeTerminal() bool FTerm::isKdeTerminal()
{ {
auto& term_detection = FTerm::getFTermDetection(); return FTerm::getFTermDetection().isKdeTerminal();
return term_detection.isKdeTerminal();
} }
//---------------------------------------------------------------------- //----------------------------------------------------------------------
bool FTerm::isGnomeTerminal() bool FTerm::isGnomeTerminal()
{ {
auto& term_detection = FTerm::getFTermDetection(); return FTerm::getFTermDetection().isGnomeTerminal();
return term_detection.isGnomeTerminal();
} }
//---------------------------------------------------------------------- //----------------------------------------------------------------------
bool FTerm::isPuttyTerminal() bool FTerm::isPuttyTerminal()
{ {
auto& term_detection = FTerm::getFTermDetection(); return FTerm::getFTermDetection().isPuttyTerminal();
return term_detection.isPuttyTerminal();
} }
//---------------------------------------------------------------------- //----------------------------------------------------------------------
bool FTerm::isWindowsTerminal() bool FTerm::isWindowsTerminal()
{ {
auto& term_detection = FTerm::getFTermDetection(); return FTerm::getFTermDetection().isWindowsTerminal();
return term_detection.isWindowsTerminal();
} }
//---------------------------------------------------------------------- //----------------------------------------------------------------------
bool FTerm::isTeraTerm() bool FTerm::isTeraTerm()
{ {
auto& term_detection = FTerm::getFTermDetection(); return FTerm::getFTermDetection().isTeraTerm();
return term_detection.isTeraTerm();
} }
//---------------------------------------------------------------------- //----------------------------------------------------------------------
bool FTerm::isCygwinTerminal() bool FTerm::isCygwinTerminal()
{ {
auto& term_detection = FTerm::getFTermDetection(); return FTerm::getFTermDetection().isCygwinTerminal();
return term_detection.isCygwinTerminal();
} }
//---------------------------------------------------------------------- //----------------------------------------------------------------------
bool FTerm::isMinttyTerm() bool FTerm::isMinttyTerm()
{ {
auto& term_detection = FTerm::getFTermDetection(); return FTerm::getFTermDetection().isMinttyTerm();
return term_detection.isMinttyTerm();
} }
//---------------------------------------------------------------------- //----------------------------------------------------------------------
bool FTerm::isLinuxTerm() bool FTerm::isLinuxTerm()
{ {
auto& term_detection = FTerm::getFTermDetection(); return FTerm::getFTermDetection().isLinuxTerm();
return term_detection.isLinuxTerm();
} }
//---------------------------------------------------------------------- //----------------------------------------------------------------------
bool FTerm::isFreeBSDTerm() bool FTerm::isFreeBSDTerm()
{ {
auto& term_detection = FTerm::getFTermDetection(); return FTerm::getFTermDetection().isFreeBSDTerm();
return term_detection.isFreeBSDTerm();
} }
//---------------------------------------------------------------------- //----------------------------------------------------------------------
bool FTerm::isNetBSDTerm() bool FTerm::isNetBSDTerm()
{ {
auto& term_detection = FTerm::getFTermDetection(); return FTerm::getFTermDetection().isNetBSDTerm();
return term_detection.isNetBSDTerm();
} }
//---------------------------------------------------------------------- //----------------------------------------------------------------------
bool FTerm::isOpenBSDTerm() bool FTerm::isOpenBSDTerm()
{ {
auto& term_detection = FTerm::getFTermDetection(); return FTerm::getFTermDetection().isOpenBSDTerm();
return term_detection.isOpenBSDTerm();
} }
//---------------------------------------------------------------------- //----------------------------------------------------------------------
bool FTerm::isSunTerminal() bool FTerm::isSunTerminal()
{ {
auto& term_detection = FTerm::getFTermDetection(); return FTerm::getFTermDetection().isSunTerminal();
return term_detection.isSunTerminal();
} }
//---------------------------------------------------------------------- //----------------------------------------------------------------------
bool FTerm::isScreenTerm() bool FTerm::isScreenTerm()
{ {
auto& term_detection = FTerm::getFTermDetection(); return FTerm::getFTermDetection().isScreenTerm();
return term_detection.isScreenTerm();
} }
//---------------------------------------------------------------------- //----------------------------------------------------------------------
bool FTerm::isTmuxTerm() bool FTerm::isTmuxTerm()
{ {
auto& term_detection = FTerm::getFTermDetection(); return FTerm::getFTermDetection().isTmuxTerm();
return term_detection.isTmuxTerm();
} }
//---------------------------------------------------------------------- //----------------------------------------------------------------------
bool FTerm::isKtermTerminal() bool FTerm::isKtermTerminal()
{ {
auto& term_detection = FTerm::getFTermDetection(); return FTerm::getFTermDetection().isKtermTerminal();
return term_detection.isKtermTerminal();
} }
//---------------------------------------------------------------------- //----------------------------------------------------------------------
bool FTerm::isMltermTerminal() bool FTerm::isMltermTerminal()
{ {
auto& term_detection = FTerm::getFTermDetection(); return FTerm::getFTermDetection().isMltermTerminal();
return term_detection.isMltermTerminal();
} }
//---------------------------------------------------------------------- //----------------------------------------------------------------------
bool FTerm::isKittyTerminal() bool FTerm::isKittyTerminal()
{ {
auto& term_detection = FTerm::getFTermDetection(); return FTerm::getFTermDetection().isKittyTerminal();
return term_detection.isKittyTerminal();
} }
//---------------------------------------------------------------------- //----------------------------------------------------------------------
bool FTerm::isNewFont() bool FTerm::isNewFont()
{ {
auto& data = FTerm::getFTermData(); return FTerm::getFTermData().isNewFont();
return data.isNewFont();
} }
//---------------------------------------------------------------------- //----------------------------------------------------------------------
@ -469,29 +439,25 @@ bool FTerm::isCursorHideable()
//---------------------------------------------------------------------- //----------------------------------------------------------------------
bool FTerm::hasChangedTermSize() bool FTerm::hasChangedTermSize()
{ {
auto& data = FTerm::getFTermData(); return FTerm::getFTermData().hasTermResized();
return data.hasTermResized();
} }
//---------------------------------------------------------------------- //----------------------------------------------------------------------
bool FTerm::hasShadowCharacter() bool FTerm::hasShadowCharacter()
{ {
auto& data = FTerm::getFTermData(); return FTerm::getFTermData().hasShadowCharacter();
return data.hasShadowCharacter();
} }
//---------------------------------------------------------------------- //----------------------------------------------------------------------
bool FTerm::hasHalfBlockCharacter() bool FTerm::hasHalfBlockCharacter()
{ {
auto& data = FTerm::getFTermData(); return FTerm::getFTermData().hasHalfBlockCharacter();
return data.hasHalfBlockCharacter();
} }
//---------------------------------------------------------------------- //----------------------------------------------------------------------
bool FTerm::hasAlternateScreen() bool FTerm::hasAlternateScreen()
{ {
auto& data = FTerm::getFTermData(); return FTerm::getFTermData().hasAlternateScreen();
return data.hasAlternateScreen();
} }
//---------------------------------------------------------------------- //----------------------------------------------------------------------
@ -513,8 +479,7 @@ bool FTerm::canChangeColorPalette()
//---------------------------------------------------------------------- //----------------------------------------------------------------------
void FTerm::setTermType (const std::string& term_name) void FTerm::setTermType (const std::string& term_name)
{ {
auto& data = FTerm::getFTermData(); FTerm::getFTermData().setTermType(term_name);
data.setTermType(term_name);
} }
//---------------------------------------------------------------------- //----------------------------------------------------------------------
@ -754,9 +719,7 @@ std::string FTerm::moveCursorString (int xold, int yold, int xnew, int ynew)
{ {
// Returns the cursor move string // Returns the cursor move string
auto& data = FTerm::getFTermData(); if ( FTerm::getFTermData().hasCursorOptimisation() )
if ( data.hasCursorOptimisation() )
{ {
auto& opti_move = FTerm::getFOptiMove(); auto& opti_move = FTerm::getFOptiMove();
return opti_move.moveCursor (xold, yold, xnew, ynew); return opti_move.moveCursor (xold, yold, xnew, ynew);
@ -802,9 +765,8 @@ void FTerm::detectTermSize()
{ {
// Detect the terminal width and height // Detect the terminal width and height
auto& data = FTerm::getFTermData();
struct winsize win_size{}; struct winsize win_size{};
auto& term_geometry = data.getTermGeometry(); auto& term_geometry = FTerm::getFTermData().getTermGeometry();
int ret{}; int ret{};
errno = 0; errno = 0;
@ -938,20 +900,17 @@ void FTerm::setPalette (FColor index, int r, int g, int b)
#if defined(__linux__) || defined(UNIT_TEST) #if defined(__linux__) || defined(UNIT_TEST)
void FTerm::setBeep (int Hz, int ms) void FTerm::setBeep (int Hz, int ms)
{ {
auto& linux_console = FTerm::getFTermLinux(); FTerm::getFTermLinux().setBeep (Hz, ms);
linux_console.setBeep (Hz, ms);
} }
#elif defined(__FreeBSD__) || defined(__DragonFly__) || defined(UNIT_TEST) #elif defined(__FreeBSD__) || defined(__DragonFly__) || defined(UNIT_TEST)
void FTerm::setBeep (int Hz, int ms) void FTerm::setBeep (int Hz, int ms)
{ {
auto& freebsd_console = FTerm::getFTermFreeBSD(); FTerm::getFTermFreeBSD().setBeep (Hz, ms);
freebsd_console.setBeep (Hz, ms);
} }
#elif defined(__NetBSD__) || defined(__OpenBSD__) || defined(UNIT_TEST) #elif defined(__NetBSD__) || defined(__OpenBSD__) || defined(UNIT_TEST)
void FTerm::setBeep (int Hz, int ms) void FTerm::setBeep (int Hz, int ms)
{ {
auto& openbsd_console = FTerm::getFTermOpenBSD(); FTerm::getFTermOpenBSD().setBeep (Hz, ms);
openbsd_console.setBeep (Hz, ms);
} }
#else #else
void FTerm::setBeep (int, int) void FTerm::setBeep (int, int)
@ -962,18 +921,15 @@ void FTerm::setBeep (int, int)
void FTerm::resetBeep() void FTerm::resetBeep()
{ {
#if defined(__linux__) || defined(UNIT_TEST) #if defined(__linux__) || defined(UNIT_TEST)
auto& linux_console = FTerm::getFTermLinux(); FTerm::getFTermLinux().resetBeep();
linux_console.resetBeep();
#endif #endif
#if defined(__FreeBSD__) || defined(__DragonFly__) || defined(UNIT_TEST) #if defined(__FreeBSD__) || defined(__DragonFly__) || defined(UNIT_TEST)
auto& freebsd_console = FTerm::getFTermFreeBSD(); FTerm::getFTermFreeBSD().resetBeep();
freebsd_console.resetBeep();
#endif #endif
#if defined(__NetBSD__) || defined(__OpenBSD__) || defined(UNIT_TEST) #if defined(__NetBSD__) || defined(__OpenBSD__) || defined(UNIT_TEST)
auto& openbsd_console = FTerm::getFTermOpenBSD(); FTerm::getFTermOpenBSD().resetBeep();
openbsd_console.resetBeep();
#endif #endif
} }
@ -987,8 +943,7 @@ void FTerm::beep()
//---------------------------------------------------------------------- //----------------------------------------------------------------------
void FTerm::setEncoding (Encoding enc) void FTerm::setEncoding (Encoding enc)
{ {
auto& data = FTerm::getFTermData(); FTerm::getFTermData().setTermEncoding (enc);
data.setTermEncoding (enc);
assert ( enc == Encoding::UTF8 assert ( enc == Encoding::UTF8
|| enc == Encoding::VT100 // VT100 line drawing || enc == Encoding::VT100 // VT100 line drawing
@ -1006,7 +961,7 @@ void FTerm::setEncoding (Encoding enc)
case Encoding::VT100: case Encoding::VT100:
case Encoding::PC: case Encoding::PC:
if ( isXTerminal() && data.hasUTF8Console() ) if ( isXTerminal() && FTerm::getFTermData().hasUTF8Console() )
putchar() = &FTerm::putchar_UTF8; putchar() = &FTerm::putchar_UTF8;
else else
putchar() = &FTerm::putchar_ASCII; putchar() = &FTerm::putchar_ASCII;
@ -1035,8 +990,7 @@ void FTerm::setEncoding (Encoding enc)
//---------------------------------------------------------------------- //----------------------------------------------------------------------
Encoding FTerm::getEncoding() Encoding FTerm::getEncoding()
{ {
auto& data = FTerm::getFTermData(); return FTerm::getFTermData().getTermEncoding();
return data.getTermEncoding();
} }
//---------------------------------------------------------------------- //----------------------------------------------------------------------
@ -1064,7 +1018,7 @@ bool FTerm::charEncodable (wchar_t c)
//---------------------------------------------------------------------- //----------------------------------------------------------------------
wchar_t FTerm::charEncode (wchar_t c) wchar_t FTerm::charEncode (wchar_t c)
{ {
auto& data = FTerm::getFTermData(); const auto& data = FTerm::getFTermData();
return charEncode (c, data.getTermEncoding()); return charEncode (c, data.getTermEncoding());
} }
@ -1190,11 +1144,9 @@ void FTerm::initScreenSettings()
#if defined(__linux__) #if defined(__linux__)
// Important: Do not use setNewFont() or setVGAFont() after // Important: Do not use setNewFont() or setVGAFont() after
// the console character mapping has been initialized // the console character mapping has been initialized
auto& linux_console = FTerm::getFTermLinux(); FTerm::getFTermLinux().initCharMap();
linux_console.initCharMap();
#elif defined(__FreeBSD__) || defined(__DragonFly__) || defined(UNIT_TEST) #elif defined(__FreeBSD__) || defined(__DragonFly__) || defined(UNIT_TEST)
auto& freebsd_console = FTerm::getFTermFreeBSD(); FTerm::getFTermFreeBSD().initCharMap();
freebsd_console.initCharMap();
#endif #endif
// set xterm underline cursor // set xterm underline cursor
@ -1214,8 +1166,7 @@ const char* FTerm::changeAttribute (FChar& term_attr, FChar& next_attr)
//---------------------------------------------------------------------- //----------------------------------------------------------------------
void FTerm::changeTermSizeFinished() void FTerm::changeTermSizeFinished()
{ {
auto& data = FTerm::getFTermData(); FTerm::getFTermData().setTermResized(false);
data.setTermResized(false);
} }
@ -1231,15 +1182,11 @@ void FTerm::init_global_values()
{ {
// Initialize global values // Initialize global values
auto& data = FTerm::getFTermData(); FTerm::getFTermData().setNewFont(false); // Preset to false
// Preset to false
data.setNewFont(false);
if ( ! getStartOptions().terminal_detection ) if ( ! getStartOptions().terminal_detection )
{ {
auto& term_detection = FTerm::getFTermDetection(); FTerm::getFTermDetection().setTerminalDetection (false);
term_detection.setTerminalDetection (false);
} }
} }
@ -1252,8 +1199,7 @@ void FTerm::init_terminal_device_path()
if ( ttyname_r(stdout_no, termfilename.data(), termfilename.size()) ) if ( ttyname_r(stdout_no, termfilename.data(), termfilename.size()) )
termfilename[0] = '\0'; termfilename[0] = '\0';
auto& data = FTerm::getFTermData(); FTerm::getFTermData().setTermFileName(termfilename.data());
data.setTermFileName(termfilename.data());
} }
//---------------------------------------------------------------------- //----------------------------------------------------------------------
@ -1333,12 +1279,10 @@ void FTerm::init_pc_charset()
if ( isGnomeTerminal() || isLinuxTerm() ) if ( isGnomeTerminal() || isLinuxTerm() )
{ {
auto& data = FTerm::getFTermData();
// Fallback if tcap "S2" is not found // Fallback if tcap "S2" is not found
if ( ! TCAP(t_enter_pc_charset_mode) ) if ( ! TCAP(t_enter_pc_charset_mode) )
{ {
if ( data.hasUTF8Console() ) if ( FTerm::getFTermData().hasUTF8Console() )
{ {
// Select iso8859-1 + null mapping // Select iso8859-1 + null mapping
TCAP(t_enter_pc_charset_mode) = ESC "%@" ESC "(U"; TCAP(t_enter_pc_charset_mode) = ESC "%@" ESC "(U";
@ -1357,7 +1301,7 @@ void FTerm::init_pc_charset()
// Fallback if tcap "S3" is not found // Fallback if tcap "S3" is not found
if ( ! TCAP(t_exit_pc_charset_mode) ) if ( ! TCAP(t_exit_pc_charset_mode) )
{ {
if ( data.hasUTF8Console() ) if ( FTerm::getFTermData().hasUTF8Console() )
{ {
// Select ascii mapping + utf8 // Select ascii mapping + utf8
TCAP(t_exit_pc_charset_mode) = ESC "(B" ESC "%G"; TCAP(t_exit_pc_charset_mode) = ESC "(B" ESC "%G";
@ -1575,8 +1519,7 @@ void FTerm::init_locale()
{ {
// Init current locale // Init current locale
auto& data = FTerm::getFTermData(); const auto& termtype = FTerm::getFTermData().getTermType();
const auto& termtype = data.getTermType();
const char* locale_name = std::setlocale (LC_ALL, ""); const char* locale_name = std::setlocale (LC_ALL, "");
std::setlocale (LC_NUMERIC, ""); std::setlocale (LC_NUMERIC, "");
@ -1750,8 +1693,7 @@ void FTerm::init_tab_quirks()
// on the terminal and does not move the cursor to the next tab stop // on the terminal and does not move the cursor to the next tab stop
// position // position
auto& data = FTerm::getFTermData(); const auto& enc = FTerm::getFTermData().getTermEncoding();
const auto& enc = data.getTermEncoding();
if ( enc == Encoding::VT100 || enc == Encoding::PC ) if ( enc == Encoding::VT100 || enc == Encoding::PC )
{ {
@ -2227,7 +2169,7 @@ bool FTerm::init_terminal() const
// Terminal detection // Terminal detection
FTermDetection::detect(); FTermDetection::detect();
auto& term_detection = FTerm::getFTermDetection(); const auto& term_detection = FTerm::getFTermDetection();
setTermType (term_detection.getTermType()); setTermType (term_detection.getTermType());
return true; return true;
} }
@ -2360,7 +2302,7 @@ void FTerm::finish() const
disableKeypad(); disableKeypad();
finish_encoding(); finish_encoding();
auto& data = FTerm::getFTermData(); const auto& data = FTerm::getFTermData();
if ( data.isNewFont() || data.isVGAFont() ) if ( data.isNewFont() || data.isVGAFont() )
resetFont(); resetFont();
@ -2370,14 +2312,11 @@ void FTerm::finish() const
void FTerm::finishOSspecifics() const void FTerm::finishOSspecifics() const
{ {
#if defined(__linux__) #if defined(__linux__)
auto& linux_console = FTerm::getFTermLinux(); FTerm::getFTermLinux().finish();
linux_console.finish();
#elif defined(__FreeBSD__) || defined(__DragonFly__) || defined(UNIT_TEST) #elif defined(__FreeBSD__) || defined(__DragonFly__) || defined(UNIT_TEST)
auto& freebsd_console = FTerm::getFTermFreeBSD(); FTerm::getFTermFreeBSD().finish();
freebsd_console.finish();
#elif defined(__NetBSD__) || defined(__OpenBSD__) || defined(UNIT_TEST) #elif defined(__NetBSD__) || defined(__OpenBSD__) || defined(UNIT_TEST)
auto& openbsd_console = FTerm::getFTermOpenBSD(); FTerm::getFTermOpenBSD().finish();
openbsd_console.finish();
#endif #endif
} }
@ -2394,8 +2333,7 @@ void FTerm::finish_encoding() const
void FTerm::printExitMessage() void FTerm::printExitMessage()
{ {
// Print exit message // Print exit message
auto& data = FTerm::getFTermData(); const auto& exit_message = FTerm::getFTermData().getExitMessage();
const auto& exit_message = data.getExitMessage();
if ( ! exit_message.isEmpty() ) if ( ! exit_message.isEmpty() )
std::cerr << "Exit: " << exit_message << std::endl; std::cerr << "Exit: " << exit_message << std::endl;
@ -2404,10 +2342,8 @@ void FTerm::printExitMessage()
//---------------------------------------------------------------------- //----------------------------------------------------------------------
void FTerm::terminalSizeChange() void FTerm::terminalSizeChange()
{ {
auto& data = FTerm::getFTermData();
// Initialize a resize event to the root element // Initialize a resize event to the root element
data.setTermResized(true); FTerm::getFTermData().setTermResized(true);
} }
//---------------------------------------------------------------------- //----------------------------------------------------------------------
@ -2418,11 +2354,10 @@ void FTerm::processTermination (int signum)
std::fflush (stderr); std::fflush (stderr);
std::fflush (stdout); std::fflush (stdout);
auto& data = FTerm::getFTermData();
FStringStream msg{}; FStringStream msg{};
msg << "Program stopped: signal " << signum msg << "Program stopped: signal " << signum
<< " (" << strsignal(signum) << ")"; << " (" << strsignal(signum) << ")";
data.setExitMessage(msg.str()); FTerm::getFTermData().setExitMessage(msg.str());
printExitMessage(); printExitMessage();
std::terminate(); std::terminate();
} }

View File

@ -252,7 +252,7 @@ void FTermcap::termcap()
std::vector<std::string> terminals{}; std::vector<std::string> terminals{};
int status = uninitialized; int status = uninitialized;
auto& fterm_data = FTerm::getFTermData(); auto& fterm_data = FTerm::getFTermData();
auto& term_detection = FTerm::getFTermDetection(); const auto& term_detection = FTerm::getFTermDetection();
const bool color256 = term_detection.canDisplay256Colors(); const bool color256 = term_detection.canDisplay256Colors();
baudrate = int(fterm_data.getBaudrate()); baudrate = int(fterm_data.getBaudrate());
@ -301,8 +301,7 @@ void FTermcap::termcapError (int status)
if ( status == no_entry || status == uninitialized ) if ( status == no_entry || status == uninitialized )
{ {
auto& fterm_data = FTerm::getFTermData(); const auto& termtype = FTerm::getFTermData().getTermType();
const auto& termtype = fterm_data.getTermType();
std::clog << FLog::LogLevel::Error std::clog << FLog::LogLevel::Error
<< "Unknown terminal: \"" << termtype << "\". " << "Unknown terminal: \"" << termtype << "\". "
<< "Check the TERM environment variable. " << "Check the TERM environment variable. "

View File

@ -42,7 +42,7 @@ namespace finalcut
//---------------------------------------------------------------------- //----------------------------------------------------------------------
void FTermcapQuirks::terminalFixup() void FTermcapQuirks::terminalFixup()
{ {
auto& td = FTerm::getFTermDetection(); const auto& td = FTerm::getFTermDetection();
if ( td.isCygwinTerminal() ) if ( td.isCygwinTerminal() )
{ {
@ -228,9 +228,7 @@ void FTermcapQuirks::xterm()
void FTermcapQuirks::rxvt() void FTermcapQuirks::rxvt()
{ {
// Set enter/exit alternative charset mode for rxvt terminal // Set enter/exit alternative charset mode for rxvt terminal
auto& fterm_data = FTerm::getFTermData(); const auto& termtype = FTerm::getFTermData().getTermType();
const auto& termtype = fterm_data.getTermType();
auto& term_detection = FTerm::getFTermDetection();
if ( termtype.substr(0,12) == "rxvt-16color" ) if ( termtype.substr(0,12) == "rxvt-16color" )
{ {
@ -239,7 +237,7 @@ void FTermcapQuirks::rxvt()
} }
// Set ansi foreground and background color // Set ansi foreground and background color
if ( ! term_detection.isUrxvtTerminal() ) if ( ! FTerm::getFTermDetection().isUrxvtTerminal() )
{ {
TCAP(t_set_a_foreground) = \ TCAP(t_set_a_foreground) = \
CSI "%?%p1%{8}%<%t%p1%{30}%+%e%p1%'R'%+%;%dm"; CSI "%?%p1%{8}%<%t%p1%{30}%+%e%p1%'R'%+%;%dm";
@ -251,7 +249,7 @@ void FTermcapQuirks::rxvt()
//---------------------------------------------------------------------- //----------------------------------------------------------------------
void FTermcapQuirks::vte() void FTermcapQuirks::vte()
{ {
auto& term_detection = FTerm::getFTermDetection(); const auto& term_detection = FTerm::getFTermDetection();
// gnome-terminal has NC=16 however, it can use the dim attribute // gnome-terminal has NC=16 however, it can use the dim attribute
FTermcap::attr_without_color = 0; FTermcap::attr_without_color = 0;
@ -445,14 +443,12 @@ void FTermcapQuirks::sunConsole()
//---------------------------------------------------------------------- //----------------------------------------------------------------------
void FTermcapQuirks::screen() void FTermcapQuirks::screen()
{ {
auto& term_detection = FTerm::getFTermDetection();
// Fallback if "Ic" is not found // Fallback if "Ic" is not found
if ( ! TCAP(t_initialize_color) ) if ( ! TCAP(t_initialize_color) )
{ {
FTermcap::can_change_color_palette = true; FTermcap::can_change_color_palette = true;
if ( term_detection.isTmuxTerm() ) if ( FTerm::getFTermDetection().isTmuxTerm() )
{ {
TCAP(t_initialize_color) = \ TCAP(t_initialize_color) = \
ESC "Ptmux;" ESC OSC "4;%p1%d;rgb:" ESC "Ptmux;" ESC OSC "4;%p1%d;rgb:"

View File

@ -159,8 +159,7 @@ void FTermDetection::getSystemTermType()
{ {
// Import the untrusted environment variable TERM // Import the untrusted environment variable TERM
const auto& term_env = std::getenv("TERM"); const auto& term_env = std::getenv("TERM");
auto& fterm_data = FTerm::getFTermData(); const auto& termfilename = FTerm::getFTermData().getTermFileName();
const auto& termfilename = fterm_data.getTermFileName();
if ( term_env ) if ( term_env )
{ {
@ -198,8 +197,7 @@ bool FTermDetection::getTTYtype()
// vt100 ttys0 // vt100 ttys0
// Get term basename // Get term basename
auto& fterm_data = FTerm::getFTermData(); const auto& termfilename = FTerm::getFTermData().getTermFileName();
const auto& termfilename = fterm_data.getTermFileName();
const char* term_basename = std::strrchr(termfilename.data(), '/'); const char* term_basename = std::strrchr(termfilename.data(), '/');
if ( term_basename == nullptr ) if ( term_basename == nullptr )
@ -254,8 +252,7 @@ bool FTermDetection::getTTYSFileEntry()
// Analyse /etc/ttys and get the term name // Analyse /etc/ttys and get the term name
// get term basename // get term basename
auto& fterm_data = FTerm::getFTermData(); const auto& termfilename = FTerm::getFTermData().getTermFileName();
const auto& termfilename = fterm_data.getTermFileName();
const char* term_basename = std::strrchr(termfilename.data(), '/'); const char* term_basename = std::strrchr(termfilename.data(), '/');
if ( term_basename == nullptr ) if ( term_basename == nullptr )

View File

@ -85,14 +85,12 @@ bool FTermLinux::setCursorStyle (CursorStyle style)
{ {
// Set cursor style in linux console // Set cursor style in linux console
auto& fterm_data = FTerm::getFTermData();
if ( ! FTerm::isLinuxTerm() ) if ( ! FTerm::isLinuxTerm() )
return false; return false;
linux_console_cursor_style = style; linux_console_cursor_style = style;
if ( fterm_data.isCursorHidden() ) if ( FTerm::getFTermData().isCursorHidden() )
return false; return false;
setLinuxCursorStyle(style); setLinuxCursorStyle(style);
@ -153,7 +151,6 @@ void FTermLinux::init()
// Initialize Linux console // Initialize Linux console
auto& fterm_data = FTerm::getFTermData(); auto& fterm_data = FTerm::getFTermData();
auto& term_detection = FTerm::getFTermDetection();
screen_unicode_map.entries = nullptr; screen_unicode_map.entries = nullptr;
screen_font.data = nullptr; screen_font.data = nullptr;
fterm_data.supportShadowCharacter (true); fterm_data.supportShadowCharacter (true);
@ -166,7 +163,7 @@ void FTermLinux::init()
if ( FTerm::openConsole() == 0 ) if ( FTerm::openConsole() == 0 )
{ {
term_detection.setLinuxTerm (isLinuxConsole()); FTerm::getFTermDetection().setLinuxTerm (isLinuxConsole());
if ( FTerm::isLinuxTerm() ) if ( FTerm::isLinuxTerm() )
{ {

View File

@ -241,9 +241,7 @@ void FTermXTerminal::resetHighlightBackground()
//---------------------------------------------------------------------- //----------------------------------------------------------------------
void FTermXTerminal::resetDefaults() void FTermXTerminal::resetDefaults()
{ {
auto& term_detection = FTerm::getFTermDetection(); if ( FTerm::getFTermDetection().isPuttyTerminal() )
if ( term_detection.isPuttyTerminal() )
return; return;
// Redefines the cursor color if resetCursorColor() doesn't work // Redefines the cursor color if resetCursorColor() doesn't work
@ -274,7 +272,7 @@ void FTermXTerminal::resetTitle()
//---------------------------------------------------------------------- //----------------------------------------------------------------------
void FTermXTerminal::captureFontAndTitle() void FTermXTerminal::captureFontAndTitle()
{ {
auto& term_detection = FTerm::getFTermDetection(); const auto& term_detection = FTerm::getFTermDetection();
if ( ( term_detection.isXTerminal() if ( ( term_detection.isXTerminal()
|| term_detection.isUrxvtTerminal() ) || term_detection.isUrxvtTerminal() )
@ -312,7 +310,7 @@ void FTermXTerminal::setXTermCursorStyle()
return; return;
#endif #endif
auto& term_detection = FTerm::getFTermDetection(); const auto& term_detection = FTerm::getFTermDetection();
if ( term_detection.isGnomeTerminal() if ( term_detection.isGnomeTerminal()
&& ! term_detection.hasSetCursorStyleSupport() ) && ! term_detection.hasSetCursorStyleSupport() )
@ -336,7 +334,7 @@ void FTermXTerminal::setXTermCursorStyle()
void FTermXTerminal::setXTermTitle() void FTermXTerminal::setXTermTitle()
{ {
// Set the xterm title // Set the xterm title
auto& term_detection = FTerm::getFTermDetection(); const auto& term_detection = FTerm::getFTermDetection();
if ( term_detection.isXTerminal() if ( term_detection.isXTerminal()
|| term_detection.isScreenTerm() || term_detection.isScreenTerm()
@ -361,15 +359,13 @@ void FTermXTerminal::setXTermTitle()
//---------------------------------------------------------------------- //----------------------------------------------------------------------
void FTermXTerminal::setXTermSize() const void FTermXTerminal::setXTermSize() const
{ {
auto& term_detection = FTerm::getFTermDetection(); if ( ! FTerm::getFTermDetection().isXTerminal() )
return;
if ( term_detection.isXTerminal() )
{
FTerm::putstringf ( CSI "8;%lu;%lut" FTerm::putstringf ( CSI "8;%lu;%lut"
, uLong(term_height) , uLong(term_height)
, uLong(term_width) ); , uLong(term_width) );
std::fflush(stdout); std::fflush(stdout);
}
} }
//---------------------------------------------------------------------- //----------------------------------------------------------------------
@ -377,7 +373,7 @@ void FTermXTerminal::setXTermFont()
{ {
// Change the XTerm font (needs the allowFontOps resource) // Change the XTerm font (needs the allowFontOps resource)
auto& term_detection = FTerm::getFTermDetection(); const auto& term_detection = FTerm::getFTermDetection();
if ( term_detection.isXTerminal() if ( term_detection.isXTerminal()
|| term_detection.isScreenTerm() || term_detection.isScreenTerm()
@ -395,7 +391,7 @@ void FTermXTerminal::setXTermForeground()
{ {
// Set the XTerm text foreground color // Set the XTerm text foreground color
auto& term_detection = FTerm::getFTermDetection(); const auto& term_detection = FTerm::getFTermDetection();
if ( term_detection.isXTerminal() if ( term_detection.isXTerminal()
|| term_detection.isScreenTerm() || term_detection.isScreenTerm()
@ -415,7 +411,7 @@ void FTermXTerminal::setXTermBackground()
{ {
// Set the XTerm text background color // Set the XTerm text background color
auto& term_detection = FTerm::getFTermDetection(); const auto& term_detection = FTerm::getFTermDetection();
if ( term_detection.isXTerminal() if ( term_detection.isXTerminal()
|| term_detection.isScreenTerm() || term_detection.isScreenTerm()
@ -435,7 +431,7 @@ void FTermXTerminal::setXTermCursorColor()
{ {
// Set the text cursor color // Set the text cursor color
auto& term_detection = FTerm::getFTermDetection(); const auto& term_detection = FTerm::getFTermDetection();
if ( term_detection.isXTerminal() if ( term_detection.isXTerminal()
|| term_detection.isScreenTerm() || term_detection.isScreenTerm()
@ -455,7 +451,7 @@ void FTermXTerminal::setXTermMouseForeground()
{ {
// Set the mouse foreground color // Set the mouse foreground color
auto& term_detection = FTerm::getFTermDetection(); const auto& term_detection = FTerm::getFTermDetection();
if ( term_detection.isXTerminal() if ( term_detection.isXTerminal()
|| term_detection.isScreenTerm() || term_detection.isScreenTerm()
@ -474,7 +470,7 @@ void FTermXTerminal::setXTermMouseBackground()
{ {
// Set the mouse background color // Set the mouse background color
auto& term_detection = FTerm::getFTermDetection(); const auto& term_detection = FTerm::getFTermDetection();
if ( term_detection.isXTerminal() if ( term_detection.isXTerminal()
|| term_detection.isScreenTerm() || term_detection.isScreenTerm()
@ -492,7 +488,7 @@ void FTermXTerminal::setXTermHighlightBackground()
{ {
// Set the highlight background color // Set the highlight background color
auto& term_detection = FTerm::getFTermDetection(); const auto& term_detection = FTerm::getFTermDetection();
if ( term_detection.isXTerminal() if ( term_detection.isXTerminal()
|| term_detection.isScreenTerm() || term_detection.isScreenTerm()
@ -512,9 +508,7 @@ void FTermXTerminal::setXTerm8ColorDefaults()
// Redefinition of the XTerm default colors // Redefinition of the XTerm default colors
// for the final cut 8 color theme // for the final cut 8 color theme
auto& term_detection = FTerm::getFTermDetection(); if ( FTerm::getFTermDetection().isPuttyTerminal() )
if ( term_detection.isPuttyTerminal() )
return; return;
setXTermDefaultsMouseCursor(); setXTermDefaultsMouseCursor();
@ -534,9 +528,7 @@ void FTermXTerminal::setXTerm16ColorDefaults()
// Redefinition of the XTerm default colors // Redefinition of the XTerm default colors
// for the final cut 16 color theme // for the final cut 16 color theme
auto& term_detection = FTerm::getFTermDetection(); if ( FTerm::getFTermDetection().isPuttyTerminal() )
if ( term_detection.isPuttyTerminal() )
return; return;
setXTermDefaultsMouseCursor(); setXTermDefaultsMouseCursor();
@ -556,16 +548,14 @@ inline void FTermXTerminal::setXTermDefaultsMouseCursor()
setMouseBackground("rgb:ffff/ffff/ffff"); // white setMouseBackground("rgb:ffff/ffff/ffff"); // white
setMouseForeground ("rgb:0000/0000/0000"); // black setMouseForeground ("rgb:0000/0000/0000"); // black
auto& term_detection = FTerm::getFTermDetection(); if ( ! FTerm::getFTermDetection().isGnomeTerminal() )
if ( ! term_detection.isGnomeTerminal() )
setCursorColor("rgb:ffff/ffff/ffff"); // white setCursorColor("rgb:ffff/ffff/ffff"); // white
} }
//---------------------------------------------------------------------- //----------------------------------------------------------------------
inline bool FTermXTerminal::canSetXTermBackground() const inline bool FTermXTerminal::canSetXTermBackground() const
{ {
auto& term_detection = FTerm::getFTermDetection(); const auto& term_detection = FTerm::getFTermDetection();
if ( xterm_default_colors if ( xterm_default_colors
&& ! (term_detection.isMinttyTerm() && ! (term_detection.isMinttyTerm()
@ -582,9 +572,7 @@ void FTermXTerminal::resetXTermColorMap() const
{ {
// Reset the entire color table // Reset the entire color table
auto& term_detection = FTerm::getFTermDetection(); if ( FTerm::getFTermDetection().isMinttyTerm() )
if ( term_detection.isMinttyTerm() )
{ {
FTerm::putstring (ESC "c"); // Full Reset (RIS) FTerm::putstring (ESC "c"); // Full Reset (RIS)
} }
@ -684,7 +672,7 @@ void FTermXTerminal::resetXTermHighlightBackground() const
//---------------------------------------------------------------------- //----------------------------------------------------------------------
bool FTermXTerminal::canResetColor() const bool FTermXTerminal::canResetColor() const
{ {
auto& term_detection = FTerm::getFTermDetection(); const auto& term_detection = FTerm::getFTermDetection();
if ( term_detection.isGnomeTerminal() if ( term_detection.isGnomeTerminal()
&& term_detection.getGnomeTerminalID() < 3502 ) && term_detection.getGnomeTerminalID() < 3502 )
@ -705,7 +693,7 @@ bool FTermXTerminal::canResetColor() const
//---------------------------------------------------------------------- //----------------------------------------------------------------------
void FTermXTerminal::oscPrefix() const void FTermXTerminal::oscPrefix() const
{ {
auto& term_detection = FTerm::getFTermDetection(); const auto& term_detection = FTerm::getFTermDetection();
if ( term_detection.isTmuxTerm() ) if ( term_detection.isTmuxTerm() )
{ {
@ -722,7 +710,7 @@ void FTermXTerminal::oscPrefix() const
//---------------------------------------------------------------------- //----------------------------------------------------------------------
void FTermXTerminal::oscPostfix() const void FTermXTerminal::oscPostfix() const
{ {
auto& term_detection = FTerm::getFTermDetection(); const auto& term_detection = FTerm::getFTermDetection();
if ( term_detection.isScreenTerm() if ( term_detection.isScreenTerm()
|| term_detection.isTmuxTerm() ) || term_detection.isTmuxTerm() )
@ -735,7 +723,7 @@ void FTermXTerminal::oscPostfix() const
//---------------------------------------------------------------------- //----------------------------------------------------------------------
FString FTermXTerminal::captureXTermFont() const FString FTermXTerminal::captureXTermFont() const
{ {
auto& term_detection = FTerm::getFTermDetection(); const auto& term_detection = FTerm::getFTermDetection();
if ( ! term_detection.isXTerminal() if ( ! term_detection.isXTerminal()
&& ! term_detection.isScreenTerm() && ! term_detection.isScreenTerm()
@ -797,9 +785,7 @@ FString FTermXTerminal::captureXTermFont() const
//---------------------------------------------------------------------- //----------------------------------------------------------------------
FString FTermXTerminal::captureXTermTitle() const FString FTermXTerminal::captureXTermTitle() const
{ {
auto& term_detection = FTerm::getFTermDetection(); if ( FTerm::getFTermDetection().isKdeTerminal() )
if ( term_detection.isKdeTerminal() )
return {}; return {};
fd_set ifds{}; fd_set ifds{};

View File

@ -1886,7 +1886,7 @@ void FVTerm::init()
//---------------------------------------------------------------------- //----------------------------------------------------------------------
void FVTerm::init_characterLengths() void FVTerm::init_characterLengths()
{ {
auto& opti_move = FTerm::getFOptiMove(); const auto& opti_move = FTerm::getFOptiMove();
cursor_address_length = opti_move.getCursorAddressLength(); cursor_address_length = opti_move.getCursorAddressLength();
erase_char_length = opti_move.getEraseCharsLength(); erase_char_length = opti_move.getEraseCharsLength();
repeat_char_length = opti_move.getRepeatCharLength(); repeat_char_length = opti_move.getRepeatCharLength();
@ -1920,7 +1920,7 @@ void FVTerm::init_combined_character()
if ( FTerm::getEncoding() != Encoding::UTF8 ) if ( FTerm::getEncoding() != Encoding::UTF8 )
return; return;
auto& term_detection = FTerm::getFTermDetection(); const auto& term_detection = FTerm::getFTermDetection();
if ( term_detection.isCygwinTerminal() ) if ( term_detection.isCygwinTerminal() )
return; return;