diff --git a/.codedocs b/.codedocs index 94853e96..ef859181 100644 --- a/.codedocs +++ b/.codedocs @@ -1,4 +1,4 @@ -PROJECT_NAME = "The Final Cut" +PROJECT_NAME = "FINAL CUT" EXCLUDE = debian, doc, icon, logo, m4, scripts, examples EXCLUDE_PATTERNS = */test/* diff --git a/Makefile.am b/Makefile.am index d6c1f007..0b88c7dc 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,5 +1,5 @@ #---------------------------------------------------------------------- -# Makefile.am - The Final Cut terminal programming library +# Makefile.am - FINAL CUT terminal programming library #---------------------------------------------------------------------- AUTOMAKE_OPTIONS = foreign diff --git a/configure.ac b/configure.ac index 514a960b..7fe23f2a 100644 --- a/configure.ac +++ b/configure.ac @@ -1,5 +1,5 @@ #---------------------------------------------------------------------- -# configure.ac - the Final Cut library +# configure.ac - FINAL CUT library #---------------------------------------------------------------------- # Process this file with autoconf to produce a configure script. diff --git a/doc/Makefile.am b/doc/Makefile.am index e092c40a..90b9f8dd 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -1,5 +1,5 @@ #---------------------------------------------------------------------- -# Makefile.am - the Final Cut library +# Makefile.am - FINAL CUT library #---------------------------------------------------------------------- docdir = ${datadir}/doc/${PACKAGE} diff --git a/examples/Makefile.clang b/examples/Makefile.clang index 12856a99..3d094f1c 100644 --- a/examples/Makefile.clang +++ b/examples/Makefile.clang @@ -1,5 +1,5 @@ #----------------------------------------------------------------------------- -# Makefile for Final Cut +# Makefile for FINAL CUT #----------------------------------------------------------------------------- # This is where make install will install the executable diff --git a/examples/Makefile.gcc b/examples/Makefile.gcc index 94146f54..072db0da 100644 --- a/examples/Makefile.gcc +++ b/examples/Makefile.gcc @@ -1,5 +1,5 @@ #----------------------------------------------------------------------------- -# Makefile for Final Cut +# Makefile for FINAL CUT #----------------------------------------------------------------------------- # This is where make install will install the executable diff --git a/finalcut.pc.in b/finalcut.pc.in index 1f0e68d4..9ee1c721 100644 --- a/finalcut.pc.in +++ b/finalcut.pc.in @@ -6,7 +6,7 @@ libdir=@libdir@ includedir=${prefix}/include Name: finalcut -Description: The Final Cut text-based widget library +Description: FINAL CUT text-based widget library Version: @VERSION@ URL: https://github.com/gansm/finalcut Libs: -L${libdir} -lfinal diff --git a/finalcut.spec.in b/finalcut.spec.in index 8eaf6621..96e07370 100644 --- a/finalcut.spec.in +++ b/finalcut.spec.in @@ -21,7 +21,7 @@ BuildRequires: libtool BuildRequires: ncurses-devel %description -The Final Cut is a class library and widget toolkit with full mouse +FINAL CUT is a class library and widget toolkit with full mouse support for creating a text-based user interface. The library supports the programmer to develop an application for the text console. It allows the simultaneous handling of multiple windows on the screen. @@ -30,7 +30,7 @@ common controls like dialog windows, push buttons, check boxes, radio buttons, input lines, list boxes, status bars and so on. %package -n libfinal-devel -Summary: Development files for The Final Cut text widget library +Summary: Development files for the FINAL CUT text widget library Group: Development/Libraries/C and C++ Requires: libfinal%{sover} = %{version} Requires: bdftopcf @@ -44,7 +44,7 @@ Provides: libfinal-devel = %{version} Recommends: libfinal-examples = %{version} %description -n libfinal-devel -The Final Cut is a class library and widget toolkit with full mouse +FINAL CUT is a class library and widget toolkit with full mouse support for creating a text-based user interface. The library supports the programmer to develop an application for the text console. It allows the simultaneous handling of multiple windows on the screen. @@ -53,12 +53,12 @@ common controls like dialog windows, push buttons, check boxes, radio buttons, input lines, list boxes, status bars and so on. %package -n libfinal-examples -Summary: Example files for The Final Cut library +Summary: Example files for the FINAL CUT library Group: Development/Languages/C and C++ BuildArch: noarch %description -n libfinal-examples -The Final Cut is a class library and widget toolkit with full mouse +FINAL CUT is a class library and widget toolkit with full mouse support for creating a text-based user interface. The library supports the programmer to develop an application for the text console. It allows the simultaneous handling of multiple windows on the screen. @@ -71,7 +71,7 @@ Summary: Console widget toolkit Group: System/Libraries %description -n libfinal%{sover} -The Final Cut is a class library and widget toolkit with full mouse +FINAL CUT is a class library and widget toolkit with full mouse support for creating a text-based user interface. The library supports the programmer to develop an application for the text console. It allows the simultaneous handling of multiple windows on the screen. @@ -84,7 +84,7 @@ Summary: Console widget toolkit Group: System/Libraries %description -n libfinal-static -The Final Cut is a class library and widget toolkit with full mouse +FINAL CUT is a class library and widget toolkit with full mouse support for creating a text-based user interface. The library supports the programmer to develop an application for the text console. It allows the simultaneous handling of multiple windows on the screen. diff --git a/fonts/Makefile.am b/fonts/Makefile.am index 715a7df1..6e8e9645 100644 --- a/fonts/Makefile.am +++ b/fonts/Makefile.am @@ -1,5 +1,5 @@ #---------------------------------------------------------------------- -# Makefile.am - the Final Cut library +# Makefile.am - FINAL CUT library #---------------------------------------------------------------------- EXTRA_DIST = \ diff --git a/src/ftermdetection.cpp b/src/ftermdetection.cpp index b2e7e847..c4fb81b5 100644 --- a/src/ftermdetection.cpp +++ b/src/ftermdetection.cpp @@ -79,11 +79,7 @@ FTermDetection::FTermDetection() //---------------------------------------------------------------------- FTermDetection::~FTermDetection() // destructor { - if ( sec_da ) - delete sec_da; - - if ( answer_back ) - delete answer_back; + deallocation(); } @@ -107,6 +103,8 @@ void FTermDetection::setTtyTypeFileName (char ttytype_filename[]) //---------------------------------------------------------------------- void FTermDetection::detect() { + deallocation(); + // Set the variable 'termtype' to the predefined type of the terminal getSystemTermType(); @@ -119,6 +117,16 @@ void FTermDetection::detect() // private methods of FTermDetection +//---------------------------------------------------------------------- +void FTermDetection::deallocation() +{ + if ( sec_da ) + delete sec_da; + + if ( answer_back ) + delete answer_back; +} + //---------------------------------------------------------------------- void FTermDetection::getSystemTermType() { diff --git a/src/fvterm.cpp b/src/fvterm.cpp index 123aff64..d3e3c9de 100644 --- a/src/fvterm.cpp +++ b/src/fvterm.cpp @@ -873,11 +873,10 @@ FVTerm::covered_state FVTerm::isCovered ( int x, int y bool found = bool(area == vdesktop); auto is_covered = non_covered; - auto w = static_cast(area->widget); - if ( w->window_list && ! w->window_list->empty() ) + if ( FWidget::window_list && ! FWidget::window_list->empty() ) { - for (auto&& win_obj : *w->window_list) + for (auto& win_obj : *FWidget::window_list) { auto win = win_obj->getVWin(); @@ -1696,13 +1695,12 @@ FVTerm::charData FVTerm::generateCharacter (int x, int y) { // Generates characters for a given position considering all areas - auto widget = static_cast(vterm->widget); auto sc = &vdesktop->text[y * vdesktop->width + x]; // shown character - if ( ! widget->window_list || widget->window_list->empty() ) + if ( ! FWidget::window_list || FWidget::window_list->empty() ) return *sc; - for (auto&& win_obj : *widget->window_list) + for (auto& win_obj : *FWidget::window_list) { auto win = win_obj->getVWin(); @@ -1794,15 +1792,15 @@ FVTerm::charData FVTerm::getCharacter ( character_type char_type yy = vterm->height - 1; auto cc = &vdesktop->text[yy * vdesktop->width + xx]; // covered character - auto w = static_cast(obj); - if ( ! w->window_list || w->window_list->empty() ) + if ( ! FWidget::window_list || FWidget::window_list->empty() ) return *cc; // Get the window layer of this object + auto w = static_cast(obj); int layer = FWindow::getWindowLayer(w); - for (auto&& win_obj : *w->window_list) + for (auto&& win_obj : *FWidget::window_list) { bool significant_char; diff --git a/src/include/final/ftermdetection.h b/src/include/final/ftermdetection.h index e8d23ceb..9384cf5a 100644 --- a/src/include/final/ftermdetection.h +++ b/src/include/final/ftermdetection.h @@ -168,6 +168,7 @@ class FTermDetection private: // Methods + static void deallocation(); static void getSystemTermType(); static bool getTTYtype(); #if F_HAVE_GETTTYNAM diff --git a/test/Makefile.am b/test/Makefile.am index 6cbcb314..d68f5c4b 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -1,5 +1,5 @@ #---------------------------------------------------------------------- -# Makefile.am - The Final Cut unit tests programs +# Makefile.am - FINAL CUT unit tests programs #---------------------------------------------------------------------- if CPPUNIT_TEST