diff --git a/examples/calculator.cpp b/examples/calculator.cpp index 7668cc49..7e5253bc 100644 --- a/examples/calculator.cpp +++ b/examples/calculator.cpp @@ -381,9 +381,9 @@ void Calc::drawDispay() } else { - wchar_t vertical_and_right = wchar_t(finalcut::fc::BoxDrawingsVerticalAndRight); - wchar_t horizontal = wchar_t(finalcut::fc::BoxDrawingsHorizontal); - wchar_t vertical_and_left = wchar_t(finalcut::fc::BoxDrawingsVerticalAndLeft); + wchar_t vertical_and_right = wchar_t(finalcut::fc::BoxDrawingsVerticalAndRight); + wchar_t horizontal = wchar_t(finalcut::fc::BoxDrawingsHorizontal); + wchar_t vertical_and_left = wchar_t(finalcut::fc::BoxDrawingsVerticalAndLeft); finalcut::FString separator = finalcut::FString(vertical_and_right) + finalcut::FString(35, horizontal) + finalcut::FString(vertical_and_left); @@ -416,7 +416,6 @@ void Calc::zero (lDouble&) input += '0'; else input = '0'; - } //---------------------------------------------------------------------- @@ -550,8 +549,8 @@ void Calc::subtract (lDouble&) //---------------------------------------------------------------------- void Calc::multiply (lDouble&) { - if ( ! isOperatorKey(last_key) ) - calcInfixOperator(); + if ( ! isOperatorKey(last_key) ) + calcInfixOperator(); setDisplay(a); setInfixOperator('*'); @@ -734,7 +733,7 @@ void Calc::arcus (lDouble& x) //---------------------------------------------------------------------- void Calc::sine (lDouble& x) { - if ( hyperbolic_mode ) + if ( hyperbolic_mode ) { if ( arcus_mode ) { @@ -830,6 +829,7 @@ void Calc::tangent (lDouble& x) if ( arcus_mode ) x = std::atan(x) * 180.0L / PI; else + { // Test if (x / 180) != 0 and x / 90 == 0 if ( std::fabs(std::fmod(x, 180.0L)) > LDBL_EPSILON && std::fabs(std::fmod(x, 90.0L)) < LDBL_EPSILON ) @@ -838,6 +838,7 @@ void Calc::tangent (lDouble& x) x = 0.0L; else x = std::tan(x * PI / 180.0L); + } } if ( errno == EDOM ) diff --git a/examples/checklist.cpp b/examples/checklist.cpp index 45bd96e9..b2581cc6 100644 --- a/examples/checklist.cpp +++ b/examples/checklist.cpp @@ -131,7 +131,8 @@ void CheckList::populate() { const finalcut::FStringList line (&list[i][0], &list[i][0] + 2); finalcut::FObject::FObjectIterator iter = listView.insert (line); - finalcut::FListViewItem* item = static_cast(*iter); + finalcut::FListViewItem* item = \ + static_cast(*iter); item->setCheckable(true); } } @@ -167,10 +168,12 @@ void CheckList::cb_showList (finalcut::FWidget*, data_ptr) while ( iter != listView.endOfList() ) { - const finalcut::FListViewItem* item = static_cast(*iter); + const finalcut::FListViewItem* item = \ + static_cast(*iter); if ( item->isChecked() ) - shopping_list << wchar_t(finalcut::fc::Bullet) << ' ' << item->getText(1) << '\n'; + shopping_list << wchar_t(finalcut::fc::Bullet) << ' ' + << item->getText(1) << '\n'; ++iter; } diff --git a/examples/choice.cpp b/examples/choice.cpp index 53c08f7a..738ead13 100644 --- a/examples/choice.cpp +++ b/examples/choice.cpp @@ -20,6 +20,7 @@ * . * ***********************************************************************/ +#include #include diff --git a/examples/listbox.cpp b/examples/listbox.cpp index 4daaf2be..5543ecda 100644 --- a/examples/listbox.cpp +++ b/examples/listbox.cpp @@ -35,7 +35,7 @@ static finalcut::FString* temp_str = 0; // Function prototypes void doubleToItem ( finalcut::FListBoxItem& , finalcut::FWidget::data_ptr container - , int index) ; + , int index); finalcut::FString& doubleToString (std::list::const_iterator iter); finalcut::FString& mapToString ( std::map::const_iterator iter ); diff --git a/examples/mouse.cpp b/examples/mouse.cpp index 1892f333..e2f19958 100644 --- a/examples/mouse.cpp +++ b/examples/mouse.cpp @@ -372,7 +372,7 @@ MouseDraw::MouseDraw (finalcut::FWidget* parent) brush.setPos (1, 12); - finalcut::FPoint no_shadow(0,0); + finalcut::FPoint no_shadow(0, 0); finalcut::FRect scroll_geometry(0, 0, 1, 1); createArea (scroll_geometry, no_shadow, canvas); } @@ -382,12 +382,13 @@ MouseDraw::~MouseDraw() { } //---------------------------------------------------------------------- -void MouseDraw::setGeometry (int x, int y, std::size_t w, std::size_t h, bool adjust) +void MouseDraw::setGeometry ( int x, int y + , std::size_t w, std::size_t h + , bool adjust ) { int old_w, old_h; finalcut::FDialog::setGeometry (x, y, w, h, adjust); - - finalcut::FPoint no_shadow(0,0); + finalcut::FPoint no_shadow(0, 0); finalcut::FRect scroll_geometry (0, 0, w - 11, h - 3); old_w = canvas->width; old_h = canvas->height; diff --git a/examples/opti-move.cpp b/examples/opti-move.cpp index 208c317c..4e083225 100644 --- a/examples/opti-move.cpp +++ b/examples/opti-move.cpp @@ -157,7 +157,7 @@ int main (int argc, char* argv[]) finalcut::FString line(std::size_t(xmax) + 1, '-'); // Place the cursor in the upper left corner - TermApp.setTermXY(0,0); + TermApp.setTermXY(0, 0); // Reset all terminal attributes TermApp.setNormal(); // Clear the screen diff --git a/examples/scrollview.cpp b/examples/scrollview.cpp index 505f7a08..34cdefa3 100644 --- a/examples/scrollview.cpp +++ b/examples/scrollview.cpp @@ -84,7 +84,8 @@ Scrollview::Scrollview (finalcut::FWidget* parent) // Sets the navigation button geometry go_east.setGeometry (1, 1, 5, 1); go_south.setGeometry (int(getScrollWidth()) - 5, 1, 5, 1); - go_west.setGeometry (int(getScrollWidth()) - 5, int(getScrollHeight()) - 2, 5, 1); + go_west.setGeometry ( int(getScrollWidth()) - 5 + , int(getScrollHeight()) - 2, 5, 1); go_north.setGeometry (1, int(getScrollHeight()) - 2, 5, 1); // Add scroll function callbacks to the buttons diff --git a/examples/string-operations.cpp b/examples/string-operations.cpp index 6708b460..5c4812ec 100644 --- a/examples/string-operations.cpp +++ b/examples/string-operations.cpp @@ -512,7 +512,8 @@ void convertToNumberExample() try { - const double double_num = finalcut::FString("2.7182818284590452353").toDouble(); + const double double_num = \ + finalcut::FString("2.7182818284590452353").toDouble(); std::ios_base::fmtflags save_flags = std::cout.flags(); std::cout << " toDouble: " << std::setprecision(11) << double_num << std::endl; diff --git a/examples/term-attributes.cpp b/examples/term-attributes.cpp index a66ceca2..92a14cae 100644 --- a/examples/term-attributes.cpp +++ b/examples/term-attributes.cpp @@ -169,8 +169,10 @@ void AttribDlg::adjustSize() y = 1; setGeometry(x, y, 69, 21, false); - next_button.setGeometry(int(getWidth()) - 13, int(getHeight()) - 4, 10, 1, false); - back_button.setGeometry(int(getWidth()) - 25, int(getHeight()) - 4, 10, 1, false); + next_button.setGeometry ( int(getWidth()) - 13, int(getHeight()) - 4 + , 10, 1, false ); + back_button.setGeometry ( int(getWidth()) - 25, int(getHeight()) - 4 + , 10, 1, false ); finalcut::FDialog::adjustSize(); } @@ -258,7 +260,7 @@ void AttribDemo::printAltCharset() if ( ! isMonochron() ) setColor (wc.label_fg, wc.label_bg); - setPrintPos (1,1); + setPrintPos (1, 1); print("alternate charset: "); if ( parent->bgcolor == finalcut::fc::Default ) diff --git a/examples/timer.cpp b/examples/timer.cpp index 8c3f5250..47c7610c 100644 --- a/examples/timer.cpp +++ b/examples/timer.cpp @@ -59,7 +59,7 @@ Timer::Timer (finalcut::FWidget* parent) //---------------------------------------------------------------------- void Timer::draw() { - setPrintPos (1,1); + setPrintPos (1, 1); print() << "---------------\n" << "Press Q to quit\n" << "---------------\n"; diff --git a/src/Makefile.am b/src/Makefile.am index cce0959f..e1a89737 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -119,6 +119,7 @@ finalcutinclude_HEADERS = \ include/final/ftermdetection.h \ include/final/ftermios.h \ include/final/fterm.h \ + include/final/ftermdata.h \ include/final/fvterm.h \ include/final/ftextview.h \ include/final/ftogglebutton.h \ diff --git a/src/Makefile.clang b/src/Makefile.clang index bf25e0e2..e150ef3b 100644 --- a/src/Makefile.clang +++ b/src/Makefile.clang @@ -45,6 +45,7 @@ INCLUDE_HEADERS = \ fkeyboard.h \ ftermcap.h \ fterm.h \ + ftermdata.h \ ftermios.h \ ftermdetection.h \ ftermcapquirks.h \ diff --git a/src/Makefile.gcc b/src/Makefile.gcc index d0f3de3c..ac12f727 100644 --- a/src/Makefile.gcc +++ b/src/Makefile.gcc @@ -45,6 +45,7 @@ INCLUDE_HEADERS = \ fkeyboard.h \ ftermcap.h \ fterm.h \ + ftermdata.h \ ftermios.h \ ftermdetection.h \ ftermcapquirks.h \ diff --git a/src/fbutton.cpp b/src/fbutton.cpp index 6f85e795..adf3692c 100644 --- a/src/fbutton.cpp +++ b/src/fbutton.cpp @@ -217,12 +217,12 @@ bool FButton::setShadow (bool on) && getEncoding() != fc::ASCII ) { flags.shadow = true; - setShadowSize(1,1); + setShadowSize(1, 1); } else { flags.shadow = false; - setShadowSize(0,0); + setShadowSize(0, 0); } return flags.shadow; @@ -665,7 +665,7 @@ inline void FButton::drawButtonTextLine (wchar_t button_text[]) , 1 + int(vcenter_offset) ); // hotkey if ( ! flags.active && isMonochron() ) - setReverse(true); // Light background + setReverse(true); // Light background if ( active_focus && (isMonochron() || getMaxColor() < 16) ) setBold(); diff --git a/src/fcheckbox.cpp b/src/fcheckbox.cpp index 2361391d..270a6667 100644 --- a/src/fcheckbox.cpp +++ b/src/fcheckbox.cpp @@ -72,7 +72,7 @@ void FCheckBox::drawCheckButton() if ( ! isVisible() ) return; - setPrintPos (1,1); + setPrintPos (1, 1); setColor(); if ( isMonochron() ) diff --git a/src/fcheckmenuitem.cpp b/src/fcheckmenuitem.cpp index d508bb21..a0fd2bb4 100644 --- a/src/fcheckmenuitem.cpp +++ b/src/fcheckmenuitem.cpp @@ -75,7 +75,7 @@ void FCheckMenuItem::processToggle() //---------------------------------------------------------------------- void FCheckMenuItem::processClicked() { - checked = not checked; + checked = ! checked; processToggle(); emitCallback("clicked"); } diff --git a/src/fdialog.cpp b/src/fdialog.cpp index bd6c4a77..672c2928 100644 --- a/src/fdialog.cpp +++ b/src/fdialog.cpp @@ -528,7 +528,7 @@ void FDialog::onMouseDown (FMouseEvent* ev) && ms.mouse_y == 1 ) titlebar_click_pos.setPoint (ev->getTermX(), ev->getTermY()); else - titlebar_click_pos.setPoint (0,0); + titlebar_click_pos.setPoint (0, 0); // Click on titlebar menu button if ( ms.mouse_x < 4 && ms.mouse_y == 1 ) @@ -1578,7 +1578,7 @@ void FDialog::resizeMouseDown (mouseStates& ms) drawBorder(); } else - resize_click_pos.setPoint (0,0); + resize_click_pos.setPoint (0, 0); } //---------------------------------------------------------------------- @@ -1622,7 +1622,7 @@ void FDialog::resizeMouseUpMove (mouseStates& ms, bool mouse_up) if ( mouse_up ) { // Reset the border color - resize_click_pos.setPoint (0,0); + resize_click_pos.setPoint (0, 0); // redraw() is required to draw the standard (black) border // and client objects with ignorePadding() option. @@ -1639,7 +1639,7 @@ void FDialog::cancelMouseResize() if ( resize_click_pos.isNull() ) return; - resize_click_pos.setPoint (0,0); + resize_click_pos.setPoint (0, 0); drawBorder(); updateTerminal(); } diff --git a/src/ffiledialog.cpp b/src/ffiledialog.cpp index 02094097..54551339 100644 --- a/src/ffiledialog.cpp +++ b/src/ffiledialog.cpp @@ -912,7 +912,7 @@ void FFileDialog::cb_processOpen (FWidget*, data_ptr) //---------------------------------------------------------------------- void FFileDialog::cb_processShowHidden (FWidget*, data_ptr) { - setShowHiddenFiles(not show_hidden); + setShowHiddenFiles(! show_hidden); } } // namespace finalcut diff --git a/src/fkeyboard.cpp b/src/fkeyboard.cpp index 4cf6008a..b42a08dd 100644 --- a/src/fkeyboard.cpp +++ b/src/fkeyboard.cpp @@ -234,10 +234,9 @@ inline int FKeyboard::getTermcapKey() if ( ! key_map ) return -1; - fc::fkeymap* keymap = reinterpret_cast(key_map); - for (int i = 0; keymap[i].tname[0] != 0; i++) + for (int i = 0; key_map[i].tname[0] != 0; i++) { - char* k = keymap[i].string; + char* k = key_map[i].string; std::size_t len = ( k ) ? std::strlen(k) : 0; if ( k && std::strncmp(k, fifo_buf, len) == 0 ) // found @@ -486,17 +485,17 @@ int FKeyboard::parseKeyString() { int keycode = getMouseProtocolKey(); - if ( keycode > 0 ) + if ( keycode != -1 ) return keycode; keycode = getTermcapKey(); - if ( keycode > 0 ) + if ( keycode != -1 ) return keycode; keycode = getMetaKey(); - if ( keycode > 0 ) + if ( keycode != -1 ) return keycode; if ( ! isKeypressTimeout() ) diff --git a/src/flineedit.cpp b/src/flineedit.cpp index 059186f5..f6193d8b 100644 --- a/src/flineedit.cpp +++ b/src/flineedit.cpp @@ -240,12 +240,12 @@ bool FLineEdit::setShadow (bool on) && getEncoding() != fc::ASCII ) { flags.shadow = true; - setShadowSize(1,1); + setShadowSize(1, 1); } else { flags.shadow = false; - setShadowSize(0,0); + setShadowSize(0, 0); } return flags.shadow; @@ -645,7 +645,8 @@ void FLineEdit::adjustLabel() break; case label_left: - label->setGeometry(getX() - int(label_length) - 1, getY(), label_length, 1); + label->setGeometry(getX() - int(label_length) - 1, getY() + , label_length, 1); break; } } @@ -853,7 +854,7 @@ inline void FLineEdit::keyBackspace() //---------------------------------------------------------------------- inline void FLineEdit::keyInsert() { - insert_mode = not insert_mode; + insert_mode = ! insert_mode; if ( insert_mode ) setInsertCursor(); diff --git a/src/flistbox.cpp b/src/flistbox.cpp index b9f238a2..8b59e0b1 100644 --- a/src/flistbox.cpp +++ b/src/flistbox.cpp @@ -1564,7 +1564,7 @@ void FListBox::nextListItem (int distance) //---------------------------------------------------------------------- void FListBox::scrollToX (int val) { - static const std::size_t padding_space = 2; // 1 leading space + 1 trailing space + static const std::size_t padding_space = 2; // 1 leading + 1 trailing space std::size_t xoffset_end = max_line_width - getClientWidth() + padding_space; if ( xoffset == val ) @@ -1621,7 +1621,7 @@ void FListBox::scrollLeft (int distance) //---------------------------------------------------------------------- void FListBox::scrollRight (int distance) { - static const std::size_t padding_space = 2; // 1 leading space + 1 trailing space + static const std::size_t padding_space = 2; // 1 leading + 1 trailing space std::size_t xoffset_end = max_line_width - getClientWidth() + padding_space; xoffset += distance; diff --git a/src/flistview.cpp b/src/flistview.cpp index e2f2ce42..8b979149 100644 --- a/src/flistview.cpp +++ b/src/flistview.cpp @@ -2492,7 +2492,7 @@ void FListView::stepForward (int distance) void FListView::stepBackward (int distance) { if ( current_iter.getPosition() == 0 ) - return; + return; if ( current_iter.getPosition() - distance >= 0 ) { diff --git a/src/fmenubar.cpp b/src/fmenubar.cpp index 16323b4a..1aa4540f 100644 --- a/src/fmenubar.cpp +++ b/src/fmenubar.cpp @@ -519,7 +519,7 @@ void FMenuBar::drawItems() if ( item_list.empty() ) return; - setPrintPos (1,1); + setPrintPos (1, 1); if ( isMonochron() ) setReverse(true); diff --git a/src/fmouse.cpp b/src/fmouse.cpp index efece03e..e2ef488c 100644 --- a/src/fmouse.cpp +++ b/src/fmouse.cpp @@ -47,8 +47,8 @@ FMouse::FMouse() , max_width(80) , max_height(25) , time_mousepressed() - , zero_point(0,0) // zero point (x=0, y=0) - , mouse(0,0) // mouse click position + , zero_point(0, 0) // zero point (x=0, y=0) + , mouse(0, 0) // mouse click position , new_mouse_position() { time_mousepressed.tv_sec = 0; @@ -1200,7 +1200,7 @@ void FMouseUrxvt::setButtonState (int btn, struct timeval* time) FMouseControl::FMouseControl() : mouse_protocol() , iter() - , zero_point(0,0) + , zero_point(0, 0) , use_gpm_mouse(false) , use_xterm_mouse(false) { @@ -1575,7 +1575,7 @@ bool FMouseControl::getGpmKeyPressed (bool) if ( gpm_mouse ) return gpm_mouse->getGpmKeyPressed(pending); -#endif // F_HAVE_LIBGPM +#endif // F_HAVE_LIBGPM return false; } diff --git a/src/foptiattr.cpp b/src/foptiattr.cpp index afcb5da1..12516e62 100644 --- a/src/foptiattr.cpp +++ b/src/foptiattr.cpp @@ -794,7 +794,7 @@ inline bool FOptiAttr::unsetTermBlink (charData*& term) if ( F_exit_blink_mode.caused_reset ) reset(term); else - term->attr.bit.blink = false; + term->attr.bit.blink = false; if ( append_sequence(F_exit_blink_mode.cap) ) return true; diff --git a/src/fprogressbar.cpp b/src/fprogressbar.cpp index 5f343833..b68d14a0 100644 --- a/src/fprogressbar.cpp +++ b/src/fprogressbar.cpp @@ -68,7 +68,9 @@ void FProgressbar::setPercentage (std::size_t percentage_value) } //---------------------------------------------------------------------- -void FProgressbar::setGeometry (int x, int y, std::size_t w, std::size_t h, bool adjust) +void FProgressbar::setGeometry ( int x, int y + , std::size_t w, std::size_t h + , bool adjust ) { // Set the progress bar geometry @@ -84,12 +86,12 @@ bool FProgressbar::setShadow (bool on) && getEncoding() != fc::ASCII ) { flags.shadow = true; - setShadowSize(1,1); + setShadowSize(1, 1); } else { flags.shadow = false; - setShadowSize(0,0); + setShadowSize(0, 0); } return on; @@ -193,7 +195,7 @@ void FProgressbar::drawBar() { std::size_t i = 0; double length; - setPrintPos (1,1); + setPrintPos (1, 1); setColor ( wc.progressbar_bg , wc.progressbar_fg ); diff --git a/src/fradiobutton.cpp b/src/fradiobutton.cpp index 0e1e4421..cde97b36 100644 --- a/src/fradiobutton.cpp +++ b/src/fradiobutton.cpp @@ -73,7 +73,7 @@ void FRadioButton::drawRadioButton() if ( ! isVisible() ) return; - setPrintPos (1,1); + setPrintPos (1, 1); setColor(); if ( isMonochron() ) diff --git a/src/fscrollbar.cpp b/src/fscrollbar.cpp index 21d4324f..e8c24d40 100644 --- a/src/fscrollbar.cpp +++ b/src/fscrollbar.cpp @@ -174,7 +174,9 @@ void FScrollbar::setOrientation (int o) } //---------------------------------------------------------------------- -void FScrollbar::setGeometry (int x, int y, std::size_t w, std::size_t h, bool adjust) +void FScrollbar::setGeometry ( int x, int y + , std::size_t w, std::size_t h + , bool adjust ) { // Set the scrollbar geometry @@ -419,10 +421,12 @@ void FScrollbar::onMouseDown (FMouseEvent* ev) if ( bar_orientation == fc::vertical ) slider_click_stop_pos = mouse_y - 2; else + { if ( isNewFont() ) slider_click_stop_pos = mouse_x - 3; else slider_click_stop_pos = mouse_x - 2; + } } else slider_click_stop_pos = -1; @@ -605,7 +609,7 @@ void FScrollbar::drawButtons() if ( isNewFont() ) { - setPrintPos (1,1); + setPrintPos (1, 1); if ( bar_orientation == fc::vertical ) { @@ -626,7 +630,7 @@ void FScrollbar::drawButtons() } else { - setPrintPos (1,1); + setPrintPos (1, 1); if ( isMonochron() ) setReverse(true); diff --git a/src/fscrollview.cpp b/src/fscrollview.cpp index 3ace1b1a..befa79cb 100644 --- a/src/fscrollview.cpp +++ b/src/fscrollview.cpp @@ -72,7 +72,7 @@ void FScrollView::setScrollWidth (std::size_t width) if ( viewport ) { - FPoint no_shadow(0,0); + FPoint no_shadow(0, 0); scroll_geometry.setWidth (width); resizeArea (scroll_geometry, no_shadow, viewport); @@ -100,7 +100,7 @@ void FScrollView::setScrollHeight (std::size_t height) if ( viewport ) { - FPoint no_shadow(0,0); + FPoint no_shadow(0, 0); scroll_geometry.setHeight (height); resizeArea (scroll_geometry, no_shadow, viewport); addPreprocessingHandler @@ -133,7 +133,7 @@ void FScrollView::setScrollSize (std::size_t width, std::size_t height) if ( viewport ) { - FPoint no_shadow(0,0); + FPoint no_shadow(0, 0); scroll_geometry.setSize (width, height); resizeArea (scroll_geometry, no_shadow, viewport); addPreprocessingHandler @@ -548,7 +548,7 @@ void FScrollView::onChildFocusIn (FFocusEvent*) widget_geometry = focus_widget->getGeometryWithShadow(); vp_geometry = viewport_geometry; - vp_geometry.move(1,1); + vp_geometry.move(1, 1); if ( ! vp_geometry.contains(widget_geometry) ) { @@ -749,7 +749,7 @@ void FScrollView::init (FWidget* parent) setBottomPadding (1 - (yoffset_end - getScrollY())); setRightPadding (1 - (xoffset_end - getScrollX()) + nf_offset); - FPoint no_shadow(0,0); + FPoint no_shadow(0, 0); std::size_t w = getViewportWidth(); std::size_t h = getViewportHeight(); diff --git a/src/ftermcap.cpp b/src/ftermcap.cpp index 728222b3..f9a875ce 100644 --- a/src/ftermcap.cpp +++ b/src/ftermcap.cpp @@ -20,6 +20,9 @@ * . * ***********************************************************************/ +#include +#include + #include "final/ftermcap.h" namespace finalcut @@ -336,10 +339,10 @@ void FTermcap::termcapKeysVt100 (char*& buffer) //---------------------------------------------------------------------- FTermcap::tcap_map FTermcap::tcap[] = { - // .------------- term string - // | .-------- Tcap-code - // | | // variable name -> description - //----------------------------------------------------------------------------- +// .------------- term string +// | .-------- Tcap-code +// | | // variable name -> description +//------------------------------------------------------------------------------ { 0, "bl" }, // bell -> audible signal (bell) (P) { 0, "ec" }, // erase_chars -> erase #1 characters (P) { 0, "cl" }, // clear_screen -> clear screen and home cursor (P*) diff --git a/src/ftermios.cpp b/src/ftermios.cpp index ff0ca2ac..06dd6d5b 100644 --- a/src/ftermios.cpp +++ b/src/ftermios.cpp @@ -20,6 +20,8 @@ * . * ***********************************************************************/ +#include + #include "final/ftermios.h" #include "final/fterm.h" diff --git a/src/ftogglebutton.cpp b/src/ftogglebutton.cpp index d812245d..e2064be0 100644 --- a/src/ftogglebutton.cpp +++ b/src/ftogglebutton.cpp @@ -88,7 +88,9 @@ FToggleButton::~FToggleButton() // destructor // public methods of FToggleButton //---------------------------------------------------------------------- -void FToggleButton::setGeometry (int x, int y, std::size_t w, std::size_t h, bool adjust) +void FToggleButton::setGeometry ( int x, int y + , std::size_t w, std::size_t h + , bool adjust ) { // Set the toggle button geometry @@ -286,7 +288,7 @@ void FToggleButton::onMouseUp (FMouseEvent* ev) } else { - checked = not checked; + checked = ! checked; processToggle(); } @@ -332,7 +334,7 @@ void FToggleButton::onAccel (FAccelEvent* ev) } else { - checked = not checked; + checked = ! checked; processToggle(); } @@ -550,7 +552,7 @@ void FToggleButton::onKeyPress (FKeyEvent* ev) } else { - checked = not checked; + checked = ! checked; processToggle(); } processClick(); @@ -674,7 +676,7 @@ void FToggleButton::drawText ( wchar_t LabelText[] } if ( isMonochron() ) - setReverse(false);; + setReverse(false); } } // namespace finalcut diff --git a/src/fvterm.cpp b/src/fvterm.cpp index f7938e9b..bfa74ed4 100644 --- a/src/fvterm.cpp +++ b/src/fvterm.cpp @@ -98,7 +98,7 @@ FPoint FVTerm::getPrintCursor() return FPoint ( win->offset_left + win->cursor_x , win->offset_top + win->cursor_y ); - return FPoint(0,0); + return FPoint(0, 0); } //---------------------------------------------------------------------- @@ -184,7 +184,7 @@ void FVTerm::clearArea (int fillchar) void FVTerm::createVTerm (const FRect& r) { // initialize virtual terminal - const FPoint shadow(0,0); + const FPoint shadow(0, 0); createArea (r, shadow, vterm); } @@ -198,7 +198,7 @@ void FVTerm::createVTerm (int width, int height) //---------------------------------------------------------------------- void FVTerm::resizeVTerm (const FRect& r) { - const FPoint shadow(0,0); + const FPoint shadow(0, 0); resizeArea (r, shadow, vterm); } @@ -2014,7 +2014,7 @@ void FVTerm::init (bool disable_alt_screen) createVTerm (term_geometry); // Create virtual desktop area - FPoint shadow_size(0,0); + FPoint shadow_size(0, 0); createArea (term_geometry, shadow_size, vdesktop); vdesktop->visible = true; active_area = vdesktop; @@ -2191,7 +2191,7 @@ bool FVTerm::clearTerm (int fillchar) if ( cl ) // Clear screen { appendOutputBuffer (cl); - term_pos->setPoint(0,0); + term_pos->setPoint(0, 0); } else if ( cd ) // Clear to end of screen { @@ -2209,7 +2209,7 @@ bool FVTerm::clearTerm (int fillchar) appendOutputBuffer (cb); } - setTermXY (0,0); + setTermXY (0, 0); } flush_out(); diff --git a/src/fwindow.cpp b/src/fwindow.cpp index 679cd8c2..274be106 100644 --- a/src/fwindow.cpp +++ b/src/fwindow.cpp @@ -184,9 +184,9 @@ bool FWindow::setTransparentShadow (bool on) flags.shadow = flags.trans_shadow = on; if ( on ) - setShadowSize (2,1); + setShadowSize (2, 1); else - setShadowSize (0,0); + setShadowSize (0, 0); return on; } @@ -201,13 +201,13 @@ bool FWindow::setShadow (bool on) { flags.shadow = true; flags.trans_shadow = false; - setShadowSize (1,1); + setShadowSize (1, 1); } else { flags.shadow = false; flags.trans_shadow = false; - setShadowSize (0,0); + setShadowSize (0, 0); } return on; diff --git a/src/include/final/fbutton.h b/src/include/final/fbutton.h index ccdd7546..1f3c619a 100644 --- a/src/include/final/fbutton.h +++ b/src/include/final/fbutton.h @@ -69,7 +69,7 @@ class FButton : public FWidget public: // Constructors explicit FButton (FWidget* = 0); - FButton (const FString&, FWidget* = 0); + explicit FButton (const FString&, FWidget* = 0); // Destructor virtual ~FButton(); diff --git a/src/include/final/fdialog.h b/src/include/final/fdialog.h index c1540a77..5371434b 100644 --- a/src/include/final/fdialog.h +++ b/src/include/final/fdialog.h @@ -88,7 +88,7 @@ class FDialog : public FWindow // Constructors explicit FDialog (FWidget* = 0); - FDialog (const FString&, FWidget* = 0); + explicit FDialog (const FString&, FWidget* = 0); // Destructor virtual ~FDialog(); diff --git a/src/include/final/ftermdebugdata.h b/src/include/final/ftermdebugdata.h index 439e2ed6..87f796b3 100644 --- a/src/include/final/ftermdebugdata.h +++ b/src/include/final/ftermdebugdata.h @@ -46,6 +46,12 @@ namespace finalcut class FTermDebugData { public: + // Constructors + FTermDebugData(); + + // Destructor + ~FTermDebugData(); + // Accessors const FString& getAnswerbackString(); const FString& getSecDAString(); @@ -64,6 +70,17 @@ class FTermDebugData FTermData* data; }; +// FTermDebugData inline functions +//---------------------------------------------------------------------- +inline FTermDebugData::FTermDebugData() + : term_detection(0) + , data(0) +{ } + +//---------------------------------------------------------------------- +inline FTermDebugData::~FTermDebugData() +{ } + //---------------------------------------------------------------------- inline void FTermDebugData::setFTermDetection (FTermDetection* obj) { term_detection = obj; } diff --git a/src/include/final/ftooltip.h b/src/include/final/ftooltip.h index 37c2f567..d5c65bb5 100644 --- a/src/include/final/ftooltip.h +++ b/src/include/final/ftooltip.h @@ -76,7 +76,7 @@ class FToolTip : public FWindow public: // Constructor explicit FToolTip (FWidget* = 0); - FToolTip (const FString&, FWidget* = 0); + explicit FToolTip (const FString&, FWidget* = 0); // Destructor virtual ~FToolTip (); diff --git a/src/include/final/fwidget.h b/src/include/final/fwidget.h index b76a5a59..1bdd9522 100644 --- a/src/include/final/fwidget.h +++ b/src/include/final/fwidget.h @@ -95,6 +95,7 @@ #error "Only can be included directly." #endif +#include #include #include "final/fvterm.h"