diff --git a/ChangeLog b/ChangeLog index a9d0f134..18b3819d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,180 +1,183 @@ -2017-08-08 Markus Gans +2018-08-31 Markus Gans + * Fixed a problem for a non-debug compilation + +2018-08-08 Markus Gans * Added unit test for FTermcapQuirks -2017-07-29 Markus Gans +2018-07-29 Markus Gans * Added numeric Keypad [/], [*], [-], [+] support * Handling of keys that are substrings of other keys * More tests in FKeyboard unit test -2017-07-27 Markus Gans +2018-07-27 Markus Gans * The array for keyboard input of UTF-8 characters was not long enough for 4 bytes of UTF-8 codes. * More tests in FKeyboard unit test -2017-07-22 Markus Gans +2018-07-22 Markus Gans * Added unit test for FKeyboard -2017-07-15 Markus Gans +2018-07-15 Markus Gans * Keyboard functions are now in a separate class * Fix Parameter passing in term::init_OptiAttr -2017-07-08 Markus Gans +2018-07-08 Markus Gans * Extension of the unit test of FOptiMove -2017-07-01 Markus Gans +2018-07-01 Markus Gans * All in FOptiMove required termcap values can now be passed with a single struct -2017-06-25 Markus Gans +2018-06-25 Markus Gans * All termcap values required in FOptiAttr can now be passed with a single struct -2017-06-17 Markus Gans +2018-06-17 Markus Gans * Added special console options for FreeBSD, NetBSD and OpenBSD -2017-06-12 Markus Gans +2018-06-12 Markus Gans * Linux functions from FTerm moved into the FTermLinux class -2017-05-27 Markus Gans +2018-05-27 Markus Gans * Move FreeBSD, NetBSD and OpenBSD functions to separate classes -2017-05-20 Markus Gans +2018-05-20 Markus Gans * Methods outsourcing from FTerm to FTermXTerminal -2017-05-06 Markus Gans +2018-05-06 Markus Gans * Some protected data members in FTerm moved to private -2017-05-03 Markus Gans +2018-05-03 Markus Gans * Fix resetColorMap in FTerm -2017-05-02 Markus Gans +2018-05-02 Markus Gans * Outsourcing of data from FTerm to the classes FTermios, FTermDetection and FTermcapQuirks -2017-04-19 Markus Gans +2018-04-19 Markus Gans * Placing the terminal types in FTerm in a separate structure -2017-04-15 Markus Gans +2018-04-15 Markus Gans * Fake-reverse bugfix in FOptiAttr * Strict use of fc::colornames in FOptiAttr * Stream support for FPoint and FRect -2017-04-11 Markus Gans +2018-04-11 Markus Gans * Remove Cygwin bold color quirks fix in FOptiAttr * Added unit test for FOptiAttr -2017-04-08 Markus Gans +2018-04-08 Markus Gans * Improved Linux terminal quirks * Improvement in class FOptiAttr -2017-04-02 Markus Gans +2018-04-02 Markus Gans * Improved cygwin terminal quirks * Optimized character set switching in FOptiAttr -2017-03-30 Markus Gans +2018-03-30 Markus Gans * Added unit test for FOptiMove -2017-03-28 Markus Gans +2018-03-28 Markus Gans * Add boundary check to FOptiMove -2017-03-25 Markus Gans +2018-03-25 Markus Gans * Added unit test for the mouse classes * Fixed small parsing errors with mouse events -2017-03-17 Markus Gans +2018-03-17 Markus Gans * Added unit test for FObject * Some minor bug fixes in FObject -2017-03-13 Markus Gans +2018-03-13 Markus Gans * Added unit test for FRect -2017-03-11 Markus Gans +2018-03-11 Markus Gans * Added unit test for FPoint -2017-03-10 Markus Gans +2018-03-10 Markus Gans * Unit tests for the FString class completed * Minor bug fixes in FString -2017-02-25 Markus Gans +2018-02-25 Markus Gans * First CppUnit tests implemented -2017-02-22 Markus Gans +2018-02-22 Markus Gans * Generalize mouse event passing in FMenuItem -2017-02-19 Markus Gans +2018-02-19 Markus Gans * Refactoring FTerm::init_termcaps * Refactoring FTerm::init_encoding -2017-02-18 Markus Gans +2018-02-18 Markus Gans * Avoid scroll bar overshooting * Refactoring FListView::onMouseMove * Refactoring FDialog::initDialogMenu -2017-02-17 Markus Gans +2018-02-17 Markus Gans * Generalize scroll functions in FTextView * Refactoring FButtonGroup::drawLabel * Refactoring FToggleButton::drawLabel -2017-02-11 Markus Gans +2018-02-11 Markus Gans * Refactoring FWidget::focusNextChild and FWidget::focusPrevChild * Refactoring FListView::onWheel * Refactoring FListView::drawColumnLabels * Refactoring FTerm::getSystemTermType * Rename getTermName() to getTermFileName() -2017-02-10 Markus Gans +2018-02-10 Markus Gans * Refactoring FOptiMove::verticalMove and FOptiMove::horizontalMove * Refactoring FVTerm::getCharacter * Refactoring FWidget::drawBorder -2017-02-02 Markus Gans +2018-02-02 Markus Gans * Avoids flickering when redrawing a focused widget -2017-01-31 Markus Gans +2018-01-31 Markus Gans * Refactoring FSwitch::drawCheckButton * Refactoring FWidget::redraw * Refactoring FMessageBox::init * Refactoring FFileDialog::init -2017-01-30 Markus Gans +2018-01-30 Markus Gans * Refactoring FLabel::draw * Refactoring FFileDialog::readDir -2017-01-28 Markus Gans +2018-01-28 Markus Gans * Refactoring FApplication::processKeyboardEvent * Shorter methods and a fix for recreating new windows in the window example -2017-01-25 Markus Gans +2018-01-25 Markus Gans * UTF-8 fix for Solaris -2017-01-24 Markus Gans +2018-01-24 Markus Gans * Fixes compiler errors for latest Cygwin versions * Widget color scheme settings moved to a separate class * The color palette redefinition now has its own class -2017-01-21 Markus Gans +2018-01-21 Markus Gans * The Final Cut can now also be compiled under Cygwin * Fixed bug in FScrollView::scrollTo * Refactoring FStatusBar::drawKeys * Refactoring FListView::drawListLine -2017-01-17 Markus Gans +2018-01-17 Markus Gans * Small array optimizations in the examples -2017-01-14 Markus Gans +2018-01-14 Markus Gans * Mouse functions are now in a separate class -2017-01-05 Markus Gans +2018-01-05 Markus Gans * Refactoring FVTerm::restoreVTerm * Fixed buffer size in FOptiMove -2017-01-03 Markus Gans +2018-01-03 Markus Gans * Refactoring FOptiMove::relativeMove * Refactoring attribute settings in FOptiAttr * Refactoring FTerm::parseKeyString and timeout settings -2017-01-02 Markus Gans +2018-01-02 Markus Gans * Refactoring of secondary device attributes parsing * Small menu improvements diff --git a/include/final/ftermlinux.h b/include/final/ftermlinux.h index 02b15479..86752010 100644 --- a/include/final/ftermlinux.h +++ b/include/final/ftermlinux.h @@ -179,9 +179,7 @@ class FTermLinux static unimapdesc screen_unicode_map; static ColorMap saved_color_map; static ColorMap cmap; -#if DEBUG static int framebuffer_bpp; -#endif #endif // defined(__linux__) }; #pragma pack(pop) diff --git a/src/fterm.cpp b/src/fterm.cpp index 44ef602a..0b18e04e 100644 --- a/src/fterm.cpp +++ b/src/fterm.cpp @@ -2063,9 +2063,13 @@ void FTerm::initOSspecifics() #if defined(__linux__) linux->setFTermDetection(term_detection); linux->init(); // Initialize Linux console + +#if DEBUG framebuffer_bpp = linux->getFramebufferBpp(); #endif +#endif + #if defined(__FreeBSD__) || defined(__DragonFly__) if ( init_values.meta_sends_escape ) freebsd->enableMetaSendsEscape(); diff --git a/src/ftermlinux.cpp b/src/ftermlinux.cpp index 2787a822..ec5fc6dc 100644 --- a/src/ftermlinux.cpp +++ b/src/ftermlinux.cpp @@ -45,10 +45,7 @@ fc::linuxConsoleCursorStyle FTermLinux::linux_console_cursor_style; FTermLinux::ColorMap FTermLinux::saved_color_map; FTermLinux::ColorMap FTermLinux::cmap; -#if DEBUG - int FTermLinux::framebuffer_bpp = -1; -#endif - + int FTermLinux::framebuffer_bpp = -1; #endif // defined(__linux__) @@ -172,15 +169,11 @@ void FTermLinux::init() setCursorStyle (fc::underscore_cursor, true); // Framebuffer color depth in bits per pixel - int bpp = getFramebuffer_bpp(); + framebuffer_bpp = getFramebuffer_bpp(); // More than 4 bits per pixel and the font uses the blink-bit - if ( bpp >= 4 && screen_font.charcount <= 256 ) + if ( framebuffer_bpp >= 4 && screen_font.charcount <= 256 ) FTermcap::max_color = 16; - -#if DEBUG - framebuffer_bpp = bpp; -#endif } FTerm::detectTermSize(); diff --git a/src/test/ftermcapquirks-test.cpp b/src/test/ftermcapquirks-test.cpp index 3c96cc3d..4b3b5463 100644 --- a/src/test/ftermcapquirks-test.cpp +++ b/src/test/ftermcapquirks-test.cpp @@ -227,7 +227,6 @@ void FTermcapQuirksTest::classNameTest() //---------------------------------------------------------------------- void FTermcapQuirksTest::generalTest() { - const int last_item = int(sizeof(test::tcap) / sizeof(test::tcap[0])) - 1; test::tcap_map* caps = new test::tcap_map[last_item]; @@ -287,6 +286,7 @@ void FTermcapQuirksTest::generalTest() , C_STR(CSI "29m") ); delete[] caps; } + //---------------------------------------------------------------------- void FTermcapQuirksTest::xtermTest() { @@ -304,13 +304,6 @@ void FTermcapQuirksTest::xtermTest() quirks.setFTermDetection (&detect); quirks.terminalFixup(); -/* - printf ("\n(%s)\n", printSequence(caps[fc::t_initialize_color].string).c_str()); - printf ("\n(%s)\n", printSequence(C_STR(OSC "4;%p1%d;rgb:" - "%p2%{255}%*%{1000}%/%2.2X/" - "%p3%{255}%*%{1000}%/%2.2X/" - "%p4%{255}%*%{1000}%/%2.2X" ESC "\\")).c_str()); -*/ CPPUNIT_ASSERT_CSTRING ( caps[fc::t_initialize_color].string , C_STR(OSC "4;%p1%d;rgb:" "%p2%{255}%*%{1000}%/%2.2X/"