Remove #pragma pack() directive lines

This commit is contained in:
Markus Gans 2019-09-08 02:04:24 +02:00
parent 81e00a22d3
commit bc3afa6235
114 changed files with 283 additions and 796 deletions

View File

@ -1,3 +1,7 @@
2019-09-08 Markus Gans <guru.mail@muenster.de>
* Remove the lines of the #pragma pack() directive from the code
because they caused a misaligned address
2019-09-06 Markus Gans <guru.mail@muenster.de>
* Outsourcing the initialization data to a separate struct

View File

@ -44,9 +44,6 @@ namespace finalcut
// class FClassName
//----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class FClassName
{
public:
@ -121,7 +118,7 @@ class FClassName
// Friend class
};
#pragma pack(pop)
// FClassName inline functions
//----------------------------------------------------------------------

View File

@ -36,9 +36,6 @@ using finalcut::FSize;
// class TextWindow
//----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class SegmentView : public finalcut::FDialog
{
public:
@ -69,7 +66,6 @@ class SegmentView : public finalcut::FDialog
finalcut::FLineEdit Input{"0123", this};
finalcut::FButton Exit{"E&xit", this};
};
#pragma pack(pop)
//----------------------------------------------------------------------
SegmentView::SegmentView (finalcut::FWidget* parent)

View File

@ -29,7 +29,7 @@ endif
all: $(OBJS)
debug:
$(MAKE) $(MAKEFILE) DEBUG="-g -D DEBUG -Wall -Wextra -Wpedantic -Weverything -Wpadded -Wno-c++98-compat -Wno-c++98-compat-pedantic -Wno-implicit-fallthrough -Wno-reserved-id-macro"
$(MAKE) $(MAKEFILE) DEBUG="-g -D DEBUG -Wall -Wextra -Wpedantic -Weverything -Wno-padded -Wno-c++98-compat -Wno-c++98-compat-pedantic -Wno-implicit-fallthrough -Wno-reserved-id-macro"
profile:
$(MAKE) $(MAKEFILE) PROFILE="-pg"

View File

@ -42,9 +42,6 @@ constexpr lDouble PI{3.141592653589793238L};
// class Button
//----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class Button : public finalcut::FButton
{
public:
@ -61,7 +58,6 @@ class Button : public finalcut::FButton
// Data member
bool checked{false};
};
#pragma pack(pop)
//----------------------------------------------------------------------
Button::Button (finalcut::FWidget* parent)
@ -110,9 +106,6 @@ void Button::onKeyPress (finalcut::FKeyEvent* ev)
// class Calc
//----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class Calc : public finalcut::FDialog
{
public:
@ -244,7 +237,6 @@ class Calc : public finalcut::FDialog
std::map<Calc::button, std::shared_ptr<Button> > calculator_buttons{};
std::map<Calc::button, keyFunction> key_map{};
};
#pragma pack(pop)
//----------------------------------------------------------------------
Calc::Calc (FWidget* parent)

View File

@ -36,9 +36,6 @@ using finalcut::FSize;
// class CheckList
//----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class CheckList : public finalcut::FDialog
{
public:
@ -69,7 +66,6 @@ class CheckList : public finalcut::FDialog
finalcut::FListView listView{this};
finalcut::FStatusBar status_bar{this};
};
#pragma pack(pop)
//----------------------------------------------------------------------
CheckList::CheckList (finalcut::FWidget* parent)

View File

@ -76,9 +76,6 @@ FString& mapToString ( std::map<FString
// class Listbox
//----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class Listbox : public FDialog
{
public:
@ -105,7 +102,6 @@ class Listbox : public FDialog
FListBox list3{this};
FButton Quit{this};
};
#pragma pack(pop)
//----------------------------------------------------------------------
Listbox::Listbox (FWidget* parent)

View File

@ -36,9 +36,6 @@ using finalcut::FSize;
// class Listview
//----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class Listview : public finalcut::FDialog
{
public:
@ -68,7 +65,6 @@ class Listview : public finalcut::FDialog
finalcut::FListView listView{this};
finalcut::FButton Quit{this};
};
#pragma pack(pop)
//----------------------------------------------------------------------
Listview::Listview (finalcut::FWidget* parent)

View File

@ -31,9 +31,6 @@ using finalcut::FSize;
// class Mandelbrot
//----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class Mandelbrot : public finalcut::FDialog
{
public:
@ -52,7 +49,7 @@ class Mandelbrot : public finalcut::FDialog
void draw() override;
void adjustSize() override;
};
#pragma pack(pop)
//----------------------------------------------------------------------
Mandelbrot::Mandelbrot (finalcut::FWidget* parent)

View File

@ -31,9 +31,6 @@ using finalcut::FSize;
// class Menu
//----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class Menu : public finalcut::FDialog
{
public:
@ -117,7 +114,6 @@ class Menu : public finalcut::FDialog
finalcut::FLabel Headline2{this};
finalcut::FLabel Info{this};
};
#pragma pack(pop)
//----------------------------------------------------------------------
Menu::Menu (finalcut::FWidget* parent)

View File

@ -33,9 +33,6 @@ using finalcut::FSize;
// class ColorChooser
//----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class ColorChooser : public finalcut::FWidget
{
public:
@ -68,7 +65,6 @@ class ColorChooser : public finalcut::FWidget
FColor bg_color{fc::Black};
finalcut::FLabel headline{this};
};
#pragma pack(pop)
//----------------------------------------------------------------------
ColorChooser::ColorChooser (finalcut::FWidget* parent)
@ -176,9 +172,6 @@ inline FColor ColorChooser::getBackground()
// class Brushes
//----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class Brushes : public finalcut::FWidget
{
public:
@ -215,7 +208,6 @@ class Brushes : public finalcut::FWidget
FColor bg_color{fc::Black};
finalcut::FLabel headline{this};
};
#pragma pack(pop)
//----------------------------------------------------------------------
Brushes::Brushes (finalcut::FWidget* parent)
@ -318,9 +310,6 @@ inline void Brushes::setBackground (FColor color)
// class MouseDraw
//----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class MouseDraw : public finalcut::FDialog
{
public:
@ -365,7 +354,7 @@ class MouseDraw : public finalcut::FDialog
ColorChooser c_chooser{this};
Brushes brush{this};
};
#pragma pack(pop)
//----------------------------------------------------------------------
MouseDraw::MouseDraw (finalcut::FWidget* parent)

View File

@ -31,9 +31,6 @@ using finalcut::FSize;
// class Scrollview
//----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class Scrollview : public finalcut::FScrollView
{
public:
@ -72,7 +69,6 @@ class Scrollview : public finalcut::FScrollView
finalcut::FButton go_west{pointer_left, this};
finalcut::FButton go_north{pointer_up, this};
};
#pragma pack(pop)
//----------------------------------------------------------------------
Scrollview::Scrollview (finalcut::FWidget* parent)
@ -194,9 +190,6 @@ void Scrollview::cb_go_north (finalcut::FWidget*, FDataPtr)
// class Scrollviewdemo
//----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class Scrollviewdemo : public finalcut::FDialog
{
public:
@ -217,7 +210,6 @@ class Scrollviewdemo : public finalcut::FDialog
finalcut::FButton quit_btn{"&Quit", this};
finalcut::FLabel label{this};
};
#pragma pack(pop)
//----------------------------------------------------------------------

View File

@ -34,9 +34,6 @@ using finalcut::FColorPair;
// class AttribDlg
//----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class AttribDlg : public finalcut::FDialog
{
public:
@ -72,7 +69,6 @@ class AttribDlg : public finalcut::FDialog
finalcut::FButton next_button{"&Next >", this};
finalcut::FButton back_button{"< &Back", this};
};
#pragma pack(pop)
//----------------------------------------------------------------------
AttribDlg::AttribDlg (finalcut::FWidget* parent)
@ -197,9 +193,6 @@ void AttribDlg::adjustSize()
// class AttribDemo
//----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class AttribDemo : public finalcut::FWidget
{
public:
@ -241,7 +234,6 @@ class AttribDemo : public finalcut::FWidget
// Data member
int colors;
};
#pragma pack(pop)
//----------------------------------------------------------------------
AttribDemo::AttribDemo (finalcut::FWidget* parent)

View File

@ -45,9 +45,6 @@ void string();
// struct data
//----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
struct data
{
static int getNumberOfItems();
@ -60,7 +57,6 @@ struct data
static termcap_string strings[];
};
#pragma pack(pop)
//----------------------------------------------------------------------
// struct data - string data array

View File

@ -31,9 +31,6 @@ using finalcut::FSize;
// class Transparent
//----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class Transparent : public finalcut::FDialog
{
public:
@ -68,7 +65,6 @@ class Transparent : public finalcut::FDialog
// Data members
trans_type type;
};
#pragma pack(pop)
//----------------------------------------------------------------------
Transparent::Transparent ( finalcut::FWidget* parent
@ -147,9 +143,6 @@ void Transparent::onKeyPress (finalcut::FKeyEvent* ev)
// class MainWindow
//----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class MainWindow : public finalcut::FDialog
{
public:
@ -195,7 +188,7 @@ class MainWindow : public finalcut::FDialog
Transparent* ibg{nullptr};
finalcut::FStatusBar status_bar{this};
};
#pragma pack(pop)
//----------------------------------------------------------------------
MainWindow::MainWindow (finalcut::FWidget* parent)

View File

@ -112,9 +112,6 @@ bool sortDescending ( const finalcut::FObject* lhs
// class Treeview
//----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class Treeview : public finalcut::FDialog
{
public:
@ -151,15 +148,12 @@ class Treeview : public finalcut::FDialog
static TreeItem south_america[];
static TreeItem oceania[];
};
#pragma pack(pop)
//----------------------------------------------------------------------
// struct Treeview::TreeItem
//----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
struct Treeview::TreeItem
{
const char* const* begin() const
@ -174,7 +168,6 @@ struct Treeview::TreeItem
const char* density;
TreeItem* child_element;
};
#pragma pack(pop)
//----------------------------------------------------------------------
// class Treeview - array data

View File

@ -37,9 +37,6 @@ using finalcut::FSize;
// class ProgressDialog
//----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class ProgressDialog : public finalcut::FDialog
{
public:
@ -71,7 +68,6 @@ class ProgressDialog : public finalcut::FDialog
finalcut::FButton more{this};
finalcut::FButton quit{this};
};
#pragma pack(pop)
//----------------------------------------------------------------------
ProgressDialog::ProgressDialog (finalcut::FWidget* parent)
@ -183,9 +179,6 @@ void ProgressDialog::cb_exit_bar (finalcut::FWidget*, FDataPtr)
// class TextWindow
//----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class TextWindow : public finalcut::FDialog
{
public:
@ -211,7 +204,6 @@ class TextWindow : public finalcut::FDialog
// Data members
finalcut::FTextView scrollText{this};
};
#pragma pack(pop)
//----------------------------------------------------------------------
TextWindow::TextWindow (finalcut::FWidget* parent)
@ -253,9 +245,6 @@ void TextWindow::adjustSize()
// class MyDialog
//----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class MyDialog : public finalcut::FDialog
{
public:
@ -365,7 +354,6 @@ class MyDialog : public finalcut::FDialog
finalcut::FLabel sum_count{this};
finalcut::FString clipboard{};
};
#pragma pack(pop)
//----------------------------------------------------------------------
MyDialog::MyDialog (finalcut::FWidget* parent)

View File

@ -31,9 +31,6 @@ using finalcut::FSize;
// class Watch
//----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class Watch : public finalcut::FDialog
{
public:
@ -73,7 +70,6 @@ class Watch : public finalcut::FDialog
finalcut::FSwitch seconds_sw{L"Seconds", this};
finalcut::FButton quit_btn{L"&Quit", this};
};
#pragma pack(pop)
//----------------------------------------------------------------------
Watch::Watch (FWidget* parent)

View File

@ -32,9 +32,6 @@ using finalcut::FSize;
// class SmallWindow
//----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class SmallWindow : public finalcut::FDialog
{
public:
@ -65,7 +62,7 @@ class SmallWindow : public finalcut::FDialog
finalcut::FLabel top_right_label{this};
finalcut::FLabel bottom_label{this};
};
#pragma pack(pop)
//----------------------------------------------------------------------
SmallWindow::SmallWindow (finalcut::FWidget* parent)
@ -167,9 +164,6 @@ void SmallWindow::onTimer (finalcut::FTimerEvent*)
// class Window
//----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class Window : public finalcut::FDialog
{
public:
@ -242,7 +236,7 @@ class Window : public finalcut::FDialog
finalcut::FButton CloseButton{this};
finalcut::FButton QuitButton{this};
};
#pragma pack(pop)
//----------------------------------------------------------------------
Window::Window (finalcut::FWidget* parent)

View File

@ -159,7 +159,7 @@ all: dep $(OBJS)
$(LIB): all
debug:
$(MAKE) $(MAKEFILE) DEBUG="-g -D DEBUG -Wall -Wextra -Wpedantic -Weverything -Wpadded -Wno-c++98-compat -Wno-c++98-compat-pedantic -Wno-implicit-fallthrough -Wno-reserved-id-macro"
$(MAKE) $(MAKEFILE) DEBUG="-g -D DEBUG -Wall -Wextra -Wpedantic -Weverything -Wno-padded -Wno-c++98-compat -Wno-c++98-compat-pedantic -Wno-implicit-fallthrough -Wno-reserved-id-macro"
profile:
$(MAKE) $(MAKEFILE) PROFILE="-pg"

View File

@ -691,7 +691,7 @@ bool FApplication::processDialogSwitchAccelerator()
if ( move_size )
{
auto w = move_size;
setMoveSizeWidget(0);
setMoveSizeWidget(nullptr);
w->redraw();
}
@ -729,7 +729,7 @@ bool FApplication::processAccelerator (const FWidget*& widget)
if ( move_size )
{
auto w = move_size;
setMoveSizeWidget(0);
setMoveSizeWidget(nullptr);
w->redraw();
}
@ -807,7 +807,7 @@ void FApplication::unsetMoveSizeMode()
if ( move_size )
{
auto w = move_size;
setMoveSizeWidget(0);
setMoveSizeWidget(nullptr);
w->redraw();
}
}
@ -1011,7 +1011,7 @@ void FApplication::sendMouseLeftClickEvent ( const FPoint& widgetMousePos
if ( ! mouse->isRightButtonPressed()
&& ! mouse->isMiddleButtonPressed() )
setClickedWidget(0);
setClickedWidget(nullptr);
sendEvent (released_widget, &m_up_ev);
}
@ -1045,7 +1045,7 @@ void FApplication::sendMouseRightClickEvent ( const FPoint& widgetMousePos
if ( ! mouse->isLeftButtonPressed()
&& ! mouse->isMiddleButtonPressed() )
setClickedWidget(0);
setClickedWidget(nullptr);
sendEvent (released_widget, &m_up_ev);
}
@ -1071,7 +1071,7 @@ void FApplication::sendMouseMiddleClickEvent ( const FPoint& widgetMousePos
// gnome-terminal sends no released on middle click
if ( isGnomeTerminal() )
setClickedWidget(0);
setClickedWidget(nullptr);
}
else if ( mouse->isMiddleButtonReleased() )
{
@ -1084,7 +1084,7 @@ void FApplication::sendMouseMiddleClickEvent ( const FPoint& widgetMousePos
if ( ! mouse->isLeftButtonPressed()
&& ! mouse->isRightButtonPressed() )
{
setClickedWidget(0);
setClickedWidget(nullptr);
}
sendEvent (released_widget, &m_up_ev);
@ -1107,7 +1107,7 @@ void FApplication::sendWheelEvent ( const FPoint& widgetMousePos
, mouse_position
, fc::WheelUp );
auto scroll_over_widget = clicked;
setClickedWidget(0);
setClickedWidget(nullptr);
sendEvent(scroll_over_widget, &wheel_ev);
}
@ -1118,7 +1118,7 @@ void FApplication::sendWheelEvent ( const FPoint& widgetMousePos
, mouse_position
, fc::WheelDown );
auto scroll_over_widget = clicked;
setClickedWidget(0);
setClickedWidget(nullptr);
sendEvent (scroll_over_widget, &wheel_ev);
}
}

View File

@ -63,7 +63,7 @@ FButtonGroup::~FButtonGroup() // destructor
while ( iter != buttonlist.end() )
{
auto toggle_button = static_cast<FToggleButton*>(*iter);
toggle_button->setGroup(0);
toggle_button->setGroup(nullptr);
iter = buttonlist.erase(iter);
}
}
@ -272,7 +272,7 @@ void FButtonGroup::remove (FToggleButton* button)
if ( toggle_button == button )
{
iter = buttonlist.erase(iter);
button->setGroup(0);
button->setGroup(nullptr);
button->delCallback(this);
break;
}

View File

@ -606,7 +606,7 @@ void FDialog::onMouseDoubleClick (FMouseEvent* ev)
if ( window_focus_widget )
window_focus_widget->setFocus();
setClickedWidget(0);
setClickedWidget(nullptr);
if ( isModal() )
done (FDialog::Reject);
@ -1566,7 +1566,7 @@ void FDialog::cancelMouseResize()
//----------------------------------------------------------------------
inline void FDialog::acceptMoveSize()
{
setMoveSizeWidget(0);
setMoveSizeWidget(nullptr);
if ( tooltip )
delete tooltip;
@ -1578,7 +1578,7 @@ inline void FDialog::acceptMoveSize()
//----------------------------------------------------------------------
inline void FDialog::cancelMoveSize()
{
setMoveSizeWidget(0);
setMoveSizeWidget(nullptr);
if ( tooltip )
delete tooltip;
@ -1677,7 +1677,7 @@ void FDialog::cb_zoom (FWidget*, FDataPtr)
{
dialog_menu->unselectItem();
dialog_menu->hide();
setClickedWidget(0);
setClickedWidget(nullptr);
drawTitleBar();
zoomWindow();
setZoomItem();
@ -1688,7 +1688,7 @@ void FDialog::cb_close (FWidget*, FDataPtr)
{
dialog_menu->unselectItem();
dialog_menu->hide();
setClickedWidget(0);
setClickedWidget(nullptr);
drawTitleBar();
close();
}

View File

@ -196,7 +196,7 @@ FListViewItem::FListViewItem (FObjectIterator parent_iter)
FListViewItem::FListViewItem ( const FStringList& cols
, FDataPtr data
, FObjectIterator parent_iter )
: FObject(0)
: FObject(nullptr)
, column_list(cols)
, data_pointer(data)
{

View File

@ -111,7 +111,7 @@ void FMenu::hide()
if ( openmenu && openmenu != this )
openmenu->hide();
setOpenMenu(0);
setOpenMenu(nullptr);
}
mouse_down = false;
@ -882,7 +882,7 @@ void FMenu::mouseMoveDeselection (FMenuItem* m_item, mouseStates& ms)
m_item->unsetFocus();
if ( getSelectedItem() == m_item )
setSelectedItem(0);
setSelectedItem(nullptr);
ms.focus_changed = true;
}

View File

@ -49,7 +49,7 @@ FMenuBar::FMenuBar(FWidget* parent)
//----------------------------------------------------------------------
FMenuBar::~FMenuBar() // destructor
{
setMenuBar(0);
setMenuBar(nullptr);
}
@ -456,7 +456,7 @@ bool FMenuBar::hotkeyMenu (FKeyEvent*& ev)
}
else
{
setSelectedItem(0);
setSelectedItem(nullptr);
redraw();
drop_down = false;
(*iter)->processClicked();
@ -785,7 +785,7 @@ bool FMenuBar::clickItem (FMenuItem* item)
if ( getSelectedItem() == item )
{
setSelectedItem(0);
setSelectedItem(nullptr);
leaveMenuBar();
drop_down = false;
item->processClicked();
@ -805,7 +805,7 @@ void FMenuBar::unselectMenuItem (FMenuItem* item)
drop_down = false;
if ( getSelectedItem() == item )
setSelectedItem(0);
setSelectedItem(nullptr);
}
//----------------------------------------------------------------------

View File

@ -46,7 +46,7 @@ FMenuList::~FMenuList() // destructor
while ( iter != item_list.end() )
{
(*iter)->setSuperMenu(0);
(*iter)->setSuperMenu(nullptr);
iter = item_list.erase(iter);
}
}
@ -74,7 +74,7 @@ void FMenuList::remove (FMenuItem* i)
if ( (*iter) == i )
{
iter = item_list.erase(iter);
i->setSuperMenu(0);
i->setSuperMenu(nullptr);
break;
}
else
@ -131,7 +131,7 @@ void FMenuList::unselectItem()
if ( hasSelectedItem() )
getSelectedItem()->unsetSelected();
setSelectedItem(0);
setSelectedItem(nullptr);
}
} // namespace finalcut

View File

@ -63,10 +63,10 @@ FMessageBox::FMessageBox (const FMessageBox& mbox)
, text_components(mbox.text_components)
, text_split(mbox.text_split)
, max_line_width(mbox.max_line_width)
, center_text(mbox.center_text)
, emphasis_color(mbox.emphasis_color)
, num_buttons(mbox.num_buttons)
, text_num_lines(mbox.text_num_lines)
, center_text(mbox.center_text)
{
setTitlebarText (mbox.getTitlebarText());
init ( mbox.button_digit[0]

View File

@ -56,10 +56,6 @@ void FOptiAttr::setTermEnvironment (termEnv& term_env)
// Set all required termcap values at once
// and initialize the FOptiAttr environment
ansi_default_color = term_env.ansi_default_color;
max_color = term_env.max_color;
attr_without_color = term_env.attr_without_color;
set_enter_bold_mode (term_env.t_enter_bold_mode);
set_exit_bold_mode (term_env.t_exit_bold_mode);
set_enter_dim_mode (term_env.t_enter_dim_mode);
@ -96,6 +92,10 @@ void FOptiAttr::setTermEnvironment (termEnv& term_env)
set_orig_pair (term_env.t_orig_pair);
set_orig_orig_colors (term_env.t_orig_colors);
max_color = term_env.max_color;
attr_without_color = term_env.attr_without_color;
ansi_default_color = term_env.ansi_default_color;
initialize();
}

View File

@ -85,9 +85,6 @@ void FOptiMove::setTermEnvironment (termEnv& term_env)
{
// Set all required termcap values at once
set_auto_left_margin (term_env.automatic_left_margin);
set_eat_newline_glitch (term_env.eat_nl_glitch);
setTabStop (term_env.tabstop);
set_cursor_home (term_env.t_cursor_home);
set_cursor_to_ll (term_env.t_cursor_to_ll);
set_carriage_return (term_env.t_carriage_return);
@ -108,6 +105,9 @@ void FOptiMove::setTermEnvironment (termEnv& term_env)
set_repeat_char (term_env.t_repeat_char);
set_clr_bol (term_env.t_clr_bol);
set_clr_eol (term_env.t_clr_eol);
setTabStop (term_env.tabstop);
set_auto_left_margin (term_env.automatic_left_margin);
set_eat_newline_glitch (term_env.eat_nl_glitch);
}
//----------------------------------------------------------------------
@ -601,7 +601,7 @@ int FOptiMove::repeatedAppend ( const capability& o
, char* dst )
{
std::size_t src_len = std::strlen(o.cap);
std::size_t dst_len = ( dst != 0 ) ? std::strlen(dst) : 0;
std::size_t dst_len = ( dst != nullptr ) ? std::strlen(dst) : 0;
int total{0};
if ( (dst_len + uInt(count) * src_len) < BUF_SIZE - 1 )
@ -611,7 +611,7 @@ int FOptiMove::repeatedAppend ( const capability& o
if ( dst )
{
dst += dst_len;
std::size_t free = BUF_SIZE - dst_len;
std::size_t free = BUF_SIZE - dst_len - 2;
while ( count-- > 0 )
{
@ -922,8 +922,7 @@ inline bool FOptiMove::isMethod1Faster ( int& move_time
if ( xold >= 0 && yold >= 0 )
{
char null_result[BUF_SIZE];
char* null_ptr = null_result;
int new_time = relativeMove (null_ptr, xold, yold, xnew, ynew);
int new_time = relativeMove (null_result, xold, yold, xnew, ynew);
if ( new_time < LONG_DURATION && new_time < move_time )
{
@ -945,8 +944,7 @@ inline bool FOptiMove::isMethod2Faster ( int& move_time
if ( yold >= 0 && F_carriage_return.cap )
{
char null_result[BUF_SIZE];
char* null_ptr = null_result;
int new_time = relativeMove (null_ptr, 0, yold, xnew, ynew);
int new_time = relativeMove (null_result, 0, yold, xnew, ynew);
if ( new_time < LONG_DURATION
&& F_carriage_return.duration + new_time < move_time )
@ -968,8 +966,7 @@ inline bool FOptiMove::isMethod3Faster ( int& move_time
if ( F_cursor_home.cap )
{
char null_result[BUF_SIZE];
char* null_ptr = null_result;
int new_time = relativeMove (null_ptr, 0, 0, xnew, ynew);
int new_time = relativeMove (null_result, 0, 0, xnew, ynew);
if ( new_time < LONG_DURATION
&& F_cursor_home.duration + new_time < move_time )
@ -990,8 +987,7 @@ inline bool FOptiMove::isMethod4Faster ( int& move_time
if ( F_cursor_to_ll.cap )
{
char null_result[BUF_SIZE];
char* null_ptr = null_result;
int new_time = relativeMove ( null_ptr
int new_time = relativeMove ( null_result
, 0, int(screen_height) - 1
, xnew, ynew );
@ -1018,8 +1014,7 @@ inline bool FOptiMove::isMethod5Faster ( int& move_time
&& F_cursor_left.cap )
{
char null_result[BUF_SIZE];
char* null_ptr = null_result;
int new_time = relativeMove ( null_ptr
int new_time = relativeMove ( null_result
, int(screen_width) - 1, yold - 1
, xnew, ynew );
@ -1030,6 +1025,7 @@ inline bool FOptiMove::isMethod5Faster ( int& move_time
{
move_time = F_carriage_return.duration
+ F_cursor_left.duration + new_time;
return true;
}
}

View File

@ -44,8 +44,8 @@ FStatusKey::FStatusKey(FWidget* parent)
//----------------------------------------------------------------------
FStatusKey::FStatusKey (FKey k, const FString& txt, FWidget* parent)
: FWidget(parent)
, key(k)
, text(txt)
, key(k)
{
init (parent);
}
@ -141,13 +141,13 @@ FStatusBar::~FStatusBar() // destructor
while ( iter != key_list.end() )
{
(*iter)->setConnectedStatusbar(0);
(*iter)->setConnectedStatusbar(nullptr);
delAccelerator (*iter);
iter = key_list.erase(iter);
}
}
setStatusBar(0);
setStatusBar(nullptr);
}
@ -286,7 +286,7 @@ void FStatusBar::remove (FStatusKey* skey)
if ( (*iter) == skey )
{
iter = key_list.erase(iter);
skey->setConnectedStatusbar(0);
skey->setConnectedStatusbar(nullptr);
break;
}
else

View File

@ -1614,9 +1614,6 @@ void FTerm::init_optiMove()
FOptiMove::termEnv optimove_env =
{
FTermcap::automatic_left_margin,
FTermcap::eat_nl_glitch,
FTermcap::tabstop,
TCAP(fc::t_cursor_home),
TCAP(fc::t_carriage_return),
TCAP(fc::t_cursor_to_ll),
@ -1636,7 +1633,10 @@ void FTerm::init_optiMove()
TCAP(fc::t_erase_chars),
TCAP(fc::t_repeat_char),
TCAP(fc::t_clr_bol),
TCAP(fc::t_clr_eol)
TCAP(fc::t_clr_eol),
FTermcap::tabstop,
FTermcap::automatic_left_margin,
FTermcap::eat_nl_glitch
};
opti_move->setTermEnvironment(optimove_env);
@ -1649,9 +1649,6 @@ void FTerm::init_optiAttr()
FOptiAttr::termEnv optiattr_env =
{
FTermcap::ansi_default_color,
FTermcap::max_color,
FTermcap::attr_without_color,
TCAP(fc::t_enter_bold_mode),
TCAP(fc::t_exit_bold_mode),
TCAP(fc::t_enter_dim_mode),
@ -1686,7 +1683,10 @@ void FTerm::init_optiAttr()
TCAP(fc::t_set_background),
TCAP(fc::t_orig_pair),
TCAP(fc::t_orig_pair),
TCAP(fc::t_orig_colors)
TCAP(fc::t_orig_colors),
FTermcap::max_color,
FTermcap::attr_without_color,
FTermcap::ansi_default_color
};
opti_attr->setTermEnvironment(optiattr_env);

View File

@ -539,7 +539,7 @@ char* FTermDetection::determineMaxColor (char current_termtype[])
}
//----------------------------------------------------------------------
const FString FTermDetection::getXTermColorName (int color)
const FString FTermDetection::getXTermColorName (FColor color)
{
FString color_str{""};
fd_set ifds{};
@ -547,7 +547,7 @@ const FString FTermDetection::getXTermColorName (int color)
int stdin_no = FTermios::getStdIn();
char temp[512]{};
std::fprintf (stdout, OSC "4;%d;?" BEL, color); // get color
std::fprintf (stdout, OSC "4;%hu;?" BEL, color); // get color
std::fflush(stdout);
FD_ZERO(&ifds);
@ -558,7 +558,7 @@ const FString FTermDetection::getXTermColorName (int color)
// read the terminal answer
if ( select (stdin_no + 1, &ifds, 0, 0, &tv) > 0 )
{
if ( std::scanf("\033]4;%10d;%509[^\n]s", &color, temp) == 2 )
if ( std::scanf("\033]4;%10hu;%509[^\n]s", &color, temp) == 2 )
{
std::size_t n = std::strlen(temp);

View File

@ -112,7 +112,7 @@ void FToolTip::hide()
//----------------------------------------------------------------------
void FToolTip::onMouseDown (FMouseEvent*)
{
setClickedWidget(0);
setClickedWidget(nullptr);
close();
}

View File

@ -645,7 +645,7 @@ void FVTerm::createArea ( const FRect& box
return;
}
area->widget = static_cast<FWidget*>(this);
area->widget = reinterpret_cast<FWidget*>(this);
resizeArea (box, shadow, area);
}

View File

@ -30,6 +30,7 @@
#include "final/ftermdata.h"
#include "final/fwidget.h"
#include "final/fwidgetcolors.h"
#include "final/fwindow.h"
namespace finalcut
{
@ -102,23 +103,23 @@ FWidget::~FWidget() // destructor
// unset clicked widget
if ( this == getClickedWidget() )
setClickedWidget(0);
setClickedWidget(nullptr);
// unset the local window widget focus
if ( flags.focus )
{
if ( auto window = FWindow::getWindowWidget(this) )
window->setWindowFocusWidget(0);
window->setWindowFocusWidget(nullptr);
}
// unset the global widget focus
if ( this == FWidget::getFocusWidget() )
FWidget::setFocusWidget(0);
FWidget::setFocusWidget(nullptr);
// unset main widget
if ( this == getMainWidget() )
{
setMainWidget(0);
setMainWidget(nullptr);
quit();
}
@ -833,6 +834,7 @@ bool FWidget::close()
if ( ! flags.modal )
close_widget->push_back(this);
}
return true;
}
else

View File

@ -144,10 +144,10 @@ void FWindow::setActiveWindow (FWindow* window)
}
//----------------------------------------------------------------------
void FWindow::setWindowFocusWidget (const FWidget* obj)
void FWindow::setWindowFocusWidget (FWidget* obj)
{
// set focus widget of this window
win_focus_widget = const_cast<FWidget*>(obj);
win_focus_widget = obj;
}
//----------------------------------------------------------------------
@ -167,7 +167,7 @@ bool FWindow::activateWindow (bool enable)
void FWindow::unsetActiveWindow()
{
// unset the active FWindow object
FWidget::setActiveWindow (0);
FWidget::setActiveWindow (nullptr);
}
//----------------------------------------------------------------------
@ -499,7 +499,7 @@ FWindow* FWindow::getWindowWidget (const FWidget* obj)
}
if ( obj->isWindowWidget() )
return const_cast<FWindow*>(static_cast<const FWindow*>(obj));
return const_cast<FWindow*>(reinterpret_cast<const FWindow*>(obj));
else
return 0;
}

View File

@ -39,9 +39,6 @@ namespace fc
// class emptyFString
//----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class emptyFString final
{
public:
@ -62,7 +59,6 @@ private:
// Data member
static const FString* empty_string;
};
#pragma pack(pop)
// emptyFString inline functions
//----------------------------------------------------------------------

View File

@ -90,9 +90,6 @@ class FObject;
// class FApplication
//----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class FApplication : public FWidget
{
public:
@ -201,8 +198,6 @@ class FApplication : public FWidget
static FKeyboard* keyboard;
static FWidget* keyboard_widget;
};
#pragma pack(pop)
// FApplication inline functions
//----------------------------------------------------------------------

View File

@ -62,9 +62,6 @@ namespace finalcut
// class FButton
//----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class FButton : public FWidget
{
public:
@ -165,11 +162,6 @@ class FButton : public FWidget
bool click_animation{true};
int click_time{150};
int space_char{int(' ')};
std::size_t hotkeypos{NOT_SET};
std::size_t indent{0};
std::size_t center_offset{0};
std::size_t vcenter_offset{0};
std::size_t txtlength{0};
FColor button_fg{getFWidgetColors().button_active_fg};
FColor button_bg{getFWidgetColors().button_active_bg};
FColor button_hotkey_fg{getFWidgetColors().button_hotkey_fg};
@ -177,9 +169,12 @@ class FButton : public FWidget
FColor button_focus_bg{getFWidgetColors().button_active_focus_bg};
FColor button_inactive_fg{getFWidgetColors().button_inactive_fg};
FColor button_inactive_bg{getFWidgetColors().button_inactive_bg};
std::size_t hotkeypos{NOT_SET};
std::size_t indent{0};
std::size_t center_offset{0};
std::size_t vcenter_offset{0};
std::size_t txtlength{0};
};
#pragma pack(pop)
// FButton inline functions
//----------------------------------------------------------------------

View File

@ -66,9 +66,6 @@ class FToggleButton;
// class FButtonGroup
//----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class FButtonGroup : public FScrollView
{
public:
@ -144,8 +141,6 @@ class FButtonGroup : public FScrollView
FString text{};
FObjectList buttonlist{};
};
#pragma pack(pop)
// FButtonGroup inline functions
//----------------------------------------------------------------------

View File

@ -66,9 +66,6 @@ namespace finalcut
// class FCheckBox
//----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class FCheckBox : public FToggleButton
{
public:
@ -96,8 +93,6 @@ class FCheckBox : public FToggleButton
void drawChecked();
void drawUnchecked();
};
#pragma pack(pop)
// FCheckBox inline functions
//----------------------------------------------------------------------

View File

@ -66,9 +66,6 @@ namespace finalcut
// class FCheckMenuItem
//----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class FCheckMenuItem : public FMenuItem
{
public:
@ -94,8 +91,6 @@ class FCheckMenuItem : public FMenuItem
void processToggle();
void processClicked() override;
};
#pragma pack(pop)
// FCheckMenuItem inline functions
//----------------------------------------------------------------------

View File

@ -45,9 +45,6 @@ namespace finalcut
// class FColorPair
//----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class FColorPair
{
public:
@ -114,7 +111,6 @@ class FColorPair
FColor fg_color; // Foreground color
FColor bg_color; // Background color
};
#pragma pack(pop)
} // namespace finalcut

View File

@ -42,9 +42,6 @@ namespace finalcut
// class FColorPalette
//----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class FColorPalette final
{
public:
@ -66,7 +63,6 @@ class FColorPalette final
static void reset8ColorPalette (funcp);
static void reset16ColorPalette (funcp);
};
#pragma pack(pop)
// FColorPalette inline functions
//----------------------------------------------------------------------

View File

@ -69,9 +69,6 @@ class FToolTip;
// class FDialog
//----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class FDialog : public FWindow
{
public:
@ -238,7 +235,6 @@ class FDialog : public FWindow
// Friend function from FMenu
friend void FMenu::hideSuperMenus();
};
#pragma pack(pop)
// FDialog inline functions
//----------------------------------------------------------------------

View File

@ -72,9 +72,6 @@ namespace finalcut
// class FDialogListMenu
//----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class FDialogListMenu : public FMenu
{
public:
@ -98,7 +95,6 @@ class FDialogListMenu : public FMenu
// Method
void init();
};
#pragma pack(pop)
// FDialogListMenu inline functions

View File

@ -94,9 +94,6 @@ class FPoint;
// class FEvent
//----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class FEvent // event base class
{
public:
@ -108,16 +105,11 @@ class FEvent // event base class
fc::events t{fc::None_Event};
};
#pragma pack(pop)
//----------------------------------------------------------------------
// class FKeyEvent
//----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class FKeyEvent : public FEvent // keyboard event
{
public:
@ -135,16 +127,11 @@ class FKeyEvent : public FEvent // keyboard event
bool accpt{false};
};
#pragma pack(pop)
//----------------------------------------------------------------------
// class FMouseEvent
//----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class FMouseEvent : public FEvent // mouse event
{
public:
@ -167,16 +154,11 @@ class FMouseEvent : public FEvent // mouse event
int b{};
};
#pragma pack(pop)
//----------------------------------------------------------------------
// class FWheelEvent
//----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class FWheelEvent : public FEvent // wheel event
{
public:
@ -199,16 +181,11 @@ class FWheelEvent : public FEvent // wheel event
int w;
};
#pragma pack(pop)
//----------------------------------------------------------------------
// class FFocusEvent
//----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class FFocusEvent : public FEvent // focus event
{
public:
@ -229,16 +206,11 @@ class FFocusEvent : public FEvent // focus event
fc::FocusTypes focus_type{fc::FocusDefiniteWidget};
};
#pragma pack(pop)
//----------------------------------------------------------------------
// class FAccelEvent
//----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class FAccelEvent : public FEvent // focus event
{
public:
@ -258,8 +230,6 @@ class FAccelEvent : public FEvent // focus event
void* focus_widget{};
};
#pragma pack(pop)
//----------------------------------------------------------------------
// class FResizeEvent
@ -331,9 +301,6 @@ class FCloseEvent : public FEvent // close event
// class FTimerEvent
//----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class FTimerEvent : public FEvent // timer event
{
public:
@ -347,16 +314,11 @@ class FTimerEvent : public FEvent // timer event
int id{0};
};
#pragma pack(pop)
//----------------------------------------------------------------------
// class FUserEvent
//----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class FUserEvent : public FEvent // timer event
{
public:
@ -380,8 +342,6 @@ class FUserEvent : public FEvent // timer event
FDataPtr data_pointer{nullptr};
};
#pragma pack(pop)
} // namespace finalcut
#endif // FEVENT_H

View File

@ -92,9 +92,6 @@ class FSystem;
// class FFileDialog
//----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class FFileDialog : public FDialog
{
public:
@ -216,8 +213,6 @@ class FFileDialog : public FDialog
friend bool sortDirFirst ( const FFileDialog::dir_entry&
, const FFileDialog::dir_entry& );
};
#pragma pack(pop)
// FMessageBox inline functions
//----------------------------------------------------------------------

View File

@ -50,9 +50,6 @@ class FTermLinux;
// class FKeyboardCommand
//----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class FKeyboardCommand final
{
public:
@ -68,16 +65,12 @@ class FKeyboardCommand final
FApplication* instance{nullptr};
void (FApplication::*handler)(){nullptr};
};
#pragma pack(pop)
//----------------------------------------------------------------------
// class FKeyboard
//----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class FKeyboard final
{
public:
@ -160,30 +153,29 @@ class FKeyboard final
void escapeKeyPressed();
// Data members
FKey key{0};
char read_buf[READ_BUF_SIZE]{'\0'};
char fifo_buf[FIFO_BUF_SIZE]{'\0'};
int fifo_offset{0};
bool fifo_in_use{false};
int stdin_status_flags{0};
static uInt64 key_timeout;
bool input_data_pending{false};
bool utf8_input{false};
bool mouse_support{true};
bool non_blocking_stdin{false};
FKeyboardCommand keypressed_cmd{};
FKeyboardCommand keyreleased_cmd{};
FKeyboardCommand escape_key_cmd{};
static timeval time_keypressed;
fc::fkeymap* key_map{nullptr};
#if defined(__linux__)
#undef linux
static FTermLinux* linux;
#endif
static timeval time_keypressed;
static uInt64 key_timeout;
fc::fkeymap* key_map{nullptr};
FKey key{0};
char read_buf[READ_BUF_SIZE]{'\0'};
char fifo_buf[FIFO_BUF_SIZE]{'\0'};
int fifo_offset{0};
int stdin_status_flags{0};
bool fifo_in_use{false};
bool input_data_pending{false};
bool utf8_input{false};
bool mouse_support{true};
bool non_blocking_stdin{false};
};
#pragma pack(pop)
// FKeyboard inline functions
//----------------------------------------------------------------------

View File

@ -64,9 +64,6 @@ namespace finalcut
// class FLabel
//----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class FLabel : public FWidget
{
public:
@ -154,17 +151,15 @@ class FLabel : public FWidget
// Data members
FStringList multiline_text{};
bool multiline{false};
FString text{};
FWidget* accel_widget{nullptr};
fc::text_alignment alignment{fc::alignLeft};
FColor emphasis_color{getFWidgetColors().label_emphasis_fg};
FColor ellipsis_color{getFWidgetColors().label_ellipsis_fg};
bool multiline{false};
bool emphasis{false};
bool reverse_mode{false};
FWidget* accel_widget{nullptr};
};
#pragma pack(pop)
// FLabel inline functions
//----------------------------------------------------------------------

View File

@ -65,9 +65,6 @@ class FLabel;
// class FLineEdit
//----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class FLineEdit : public FWidget
{
public:
@ -189,17 +186,16 @@ class FLineEdit : public FWidget
FString text{""};
FString label_text{""};
FLabel* label{};
label_o label_orientation{FLineEdit::label_left};
std::wstring input_filter{};
dragScroll drag_scroll{FLineEdit::noScroll};
bool scroll_timer{false};
label_o label_orientation{FLineEdit::label_left};
int scroll_repeat{100};
bool scroll_timer{false};
bool insert_mode{true};
std::size_t cursor_pos{0};
std::size_t text_offset{0};
std::size_t max_length{std::numeric_limits<std::size_t>::max()};
};
#pragma pack(pop)
// FLineEdit inline functions

View File

@ -69,9 +69,6 @@ class FString;
// class FListBoxItem
//----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class FListBoxItem
{
public:
@ -108,7 +105,6 @@ class FListBoxItem
fc::brackets_type brackets{fc::NoBrackets};
bool selected{false};
};
#pragma pack(pop)
// FListBoxItem inline functions
@ -141,9 +137,6 @@ inline void FListBoxItem::clear()
// class FListBox
//----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class FListBox : public FWidget
{
public:
@ -329,27 +322,26 @@ class FListBox : public FWidget
// Data members
listBoxItems itemlist{};
FDataPtr source_container{nullptr};
convert_type conv_type{FListBox::no_convert};
FScrollbarPtr vbar{nullptr};
FScrollbarPtr hbar{nullptr};
FString text{};
FString inc_search{};
bool multi_select{false};
bool mouse_select{false};
convert_type conv_type{FListBox::no_convert};
fc::dragScroll drag_scroll{fc::noScroll};
bool scroll_timer{false};
int scroll_repeat{100};
int scroll_distance{1};
std::size_t current{0};
int last_current{-1};
int secect_from_item{-1};
int xoffset{0};
int yoffset{0};
int last_yoffset{-1};
std::size_t current{0};
std::size_t nf_offset{0};
std::size_t max_line_width{0};
bool multi_select{false};
bool mouse_select{false};
bool scroll_timer{false};
};
#pragma pack(pop)
// FListBox inline functions

View File

@ -72,9 +72,6 @@ class FString;
// class FListViewItem
//----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class FListViewItem : public FObject
{
public:
@ -142,7 +139,6 @@ class FListViewItem : public FObject
friend class FListView;
friend class FListViewIterator;
};
#pragma pack(pop)
// FListViewItem inline functions
@ -187,9 +183,6 @@ inline bool FListViewItem::isCheckable() const
// class FListViewIterator
//----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class FListViewIterator
{
public:
@ -231,7 +224,6 @@ class FListViewIterator
FObjectIterator node{};
int position{0};
};
#pragma pack(pop)
// FListViewIterator inline functions
@ -263,9 +255,6 @@ inline int FListViewIterator::getPosition() const
// class FListView
//----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class FListView : public FWidget
{
public:
@ -458,48 +447,46 @@ class FListView : public FWidget
FTermBuffer headerline{};
FScrollbarPtr vbar{nullptr};
FScrollbarPtr hbar{nullptr};
sortTypes sort_type{};
FPoint clicked_expander_pos{-1, -1};
FPoint clicked_header_pos{-1, -1};
const FListViewItem* clicked_checkbox_item{nullptr};
std::size_t nf_offset{0};
std::size_t max_line_width{1};
fc::dragScroll drag_scroll{fc::noScroll};
int scroll_repeat{100};
int scroll_distance{1};
int xoffset{0};
int sort_column{-1};
fc::sorting_order sort_order{fc::unsorted};
bool scroll_timer{false};
bool tree_view{false};
bool hide_sort_indicator{false};
bool has_checkable_items{false};
FPoint clicked_expander_pos{-1, -1};
FPoint clicked_header_pos{-1, -1};
const FListViewItem* clicked_checkbox_item{nullptr};
int xoffset{0};
std::size_t nf_offset{0};
std::size_t max_line_width{1};
int sort_column{-1};
sortTypes sort_type{};
fc::sorting_order sort_order{fc::unsorted};
// Function Pointer
bool (*user_defined_ascending) (const FObject*, const FObject*){nullptr};
bool (*user_defined_descending) (const FObject*, const FObject*){nullptr};
// Friend class
friend class FListViewItem;
};
#pragma pack(pop)
//----------------------------------------------------------------------
// struct FListView::Header
//----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
struct FListView::Header
{
public:
Header() = default;
FString name{};
fc::text_alignment alignment{fc::alignLeft};
int width{0};
bool fixed_width{false};
fc::text_alignment alignment{fc::alignLeft};
};
#pragma pack(pop)
// FListView inline functions

View File

@ -73,9 +73,6 @@ class FMenuItem;
// class FMenu
//----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class FMenu : public FWindow, public FMenuList
{
public:
@ -239,7 +236,6 @@ class FMenu : public FWindow, public FMenuList
bool mouse_down{false};
bool has_checkable_items{false};
};
#pragma pack(pop)
// FMenu inline functions

View File

@ -72,9 +72,6 @@ class FMenu;
// class FMenuBar
//----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class FMenuBar : public FWindow, public FMenuList
{
public:
@ -155,12 +152,11 @@ class FMenuBar : public FWindow, public FMenuList
friend class FMenuItem;
// Data members
std::size_t screenWidth{80};
bool mouse_down{false};
bool drop_down{false};
bool focus_changed{false};
std::size_t screenWidth{80};
};
#pragma pack(pop)
// FMenuBar inline functions

View File

@ -70,9 +70,6 @@ class FMenuList;
// class FMenuItem
//----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class FMenuItem : public FWidget
{
public:
@ -178,18 +175,18 @@ class FMenuItem : public FWidget
// Data members
FString text{};
FMenu* menu{nullptr};
FWidget* super_menu{nullptr};
FDialog* associated_window{nullptr};
std::size_t text_length{0};
FKey accel_key{0};
uChar hotkey{0};
bool selected{false};
bool separator{false};
bool checkable{false};
bool checked{false};
bool radio_button{false};
bool dialog_index{false};
std::size_t text_length{0};
uChar hotkey{0};
FKey accel_key{0};
FMenu* menu{nullptr};
FWidget* super_menu{nullptr};
FDialog* associated_window{nullptr};
// Friend classes
friend class FDialogListMenu;
@ -197,7 +194,6 @@ class FMenuItem : public FWidget
friend class FMenuBar;
friend class FMenu;
};
#pragma pack(pop)
// FMenuItem inline functions

View File

@ -55,9 +55,6 @@ namespace finalcut
// class FMenuList
//----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class FMenuList
{
public:
@ -103,7 +100,6 @@ class FMenuList
FMenuItem* selected_item{};
std::vector<FMenuItem*> item_list{};
};
#pragma pack(pop)
// FMenuList inline functions

View File

@ -77,9 +77,6 @@ class FButton;
// class FMessageBox
//----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class FMessageBox : public FDialog
{
public:
@ -160,15 +157,14 @@ class FMessageBox : public FDialog
FString text{};
FString* text_components{nullptr};
FStringList text_split{};
FButton* button[3]{nullptr};
std::size_t max_line_width{0};
bool center_text{false};
FColor emphasis_color{getFWidgetColors().dialog_emphasis_fg};
int button_digit[3]{0};
uInt num_buttons{0};
uInt text_num_lines{0};
int button_digit[3]{0};
FButton* button[3]{nullptr};
bool center_text{false};
};
#pragma pack(pop)
// FMessageBox inline functions

View File

@ -81,9 +81,6 @@ namespace finalcut
// class FMouse
//----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class FMouse
{
public:
@ -193,7 +190,6 @@ class FMouse
FPoint mouse{0, 0}; // mouse click position
FPoint new_mouse_position{};
};
#pragma pack(pop)
#ifdef F_HAVE_LIBGPM
@ -201,9 +197,6 @@ class FMouse
// class FMouseGPM
//----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class FMouseGPM final : public FMouse
{
public:
@ -253,7 +246,6 @@ class FMouseGPM final : public FMouse
bool gpm_mouse_enabled{false};
int stdin_no{0};
};
#pragma pack(pop)
//----------------------------------------------------------------------
inline bool FMouseGPM::enableGpmMouse()
@ -273,9 +265,6 @@ inline bool FMouseGPM::isGpmMouseEnabled()
// class FMouseX11
//----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class FMouseX11 final : public FMouse
{
public:
@ -329,16 +318,12 @@ class FMouseX11 final : public FMouse
char x11_mouse[MOUSE_BUF_SIZE]{'\0'};
uChar x11_button_state{all_buttons_released};
};
#pragma pack(pop)
//----------------------------------------------------------------------
// class FMouseSGR
//----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class FMouseSGR final : public FMouse
{
public:
@ -392,16 +377,12 @@ class FMouseSGR final : public FMouse
char sgr_mouse[MOUSE_BUF_SIZE]{'\0'};
uChar sgr_button_state{0x23};
};
#pragma pack(pop)
//----------------------------------------------------------------------
// class FMouseUrxvt
//----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class FMouseUrxvt final : public FMouse
{
public:
@ -455,15 +436,12 @@ class FMouseUrxvt final : public FMouse
char urxvt_mouse[MOUSE_BUF_SIZE]{'\0'};
uChar urxvt_button_state{all_buttons_released};
};
#pragma pack(pop)
//----------------------------------------------------------------------
// class FMouseControl
//----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class FMouseControl
{
public:
@ -531,7 +509,6 @@ class FMouseControl
bool use_gpm_mouse{false};
bool use_xterm_mouse{false};
};
#pragma pack(pop)
// FMouseControl inline functions
//----------------------------------------------------------------------

View File

@ -68,9 +68,6 @@ class FUserEvent;
// class FObject
//----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class FObject
{
public:
@ -166,7 +163,6 @@ class FObject
static TimerList* timer_list;
};
#pragma pack(pop)
//----------------------------------------------------------------------
inline const char* FObject::getClassName() const

View File

@ -65,18 +65,12 @@ namespace finalcut
// class FOptiAttr
//----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class FOptiAttr final
{
public:
// Typedef
typedef struct
{
bool ansi_default_color;
int max_color;
int attr_without_color;
char* t_enter_bold_mode;
char* t_exit_bold_mode;
char* t_enter_dim_mode;
@ -112,6 +106,9 @@ class FOptiAttr final
char* t_set_color_pair;
char* t_orig_pair;
char* t_orig_colors;
int max_color;
int attr_without_color;
bool ansi_default_color;
} termEnv;
// Constructor
@ -185,7 +182,7 @@ class FOptiAttr final
private:
// Typedefs and Enumerations
typedef struct alignas(alignof(char*))
typedef struct
{
char* cap;
bool caused_reset;
@ -327,14 +324,13 @@ class FOptiAttr final
int max_color{1};
int attr_without_color{0};
char* attr_ptr{attr_buf};
char attr_buf[8192]{'\0'};
bool ansi_default_color{false};
bool alt_equal_pc_charset{false};
bool monochron{true};
bool fake_reverse{false};
char attr_buf[8192]{'\0'};
char* attr_ptr{attr_buf};
};
#pragma pack(pop)
// FOptiAttr inline functions

View File

@ -70,18 +70,12 @@ namespace finalcut
// class FOptiMove
//----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class FOptiMove final
{
public:
// Typedef
typedef struct
{
bool automatic_left_margin;
bool eat_nl_glitch;
int tabstop;
char* t_cursor_home;
char* t_carriage_return;
char* t_cursor_to_ll;
@ -102,6 +96,9 @@ class FOptiMove final
char* t_repeat_char;
char* t_clr_bol;
char* t_clr_eol;
int tabstop;
bool automatic_left_margin;
bool eat_nl_glitch;
} termEnv;
// Constructor
@ -158,8 +155,8 @@ class FOptiMove final
void set_repeat_char (char[]);
void set_clr_bol (char[]);
void set_clr_eol (char[]);
void set_auto_left_margin (const bool&);
void set_eat_newline_glitch (const bool&);
void set_auto_left_margin (bool);
void set_eat_newline_glitch (bool);
// Methods
void check_boundaries (int&, int&, int&, int&);
@ -230,16 +227,15 @@ class FOptiMove final
capability F_clr_bol{};
capability F_clr_eol{};
bool automatic_left_margin{false};
bool eat_nl_glitch{false};
char move_buf[BUF_SIZE]{'\0'};
std::size_t screen_width{80};
std::size_t screen_height{24};
int char_duration{1};
int baudrate{9600};
int tabstop{0};
std::size_t screen_width{80};
std::size_t screen_height{24};
char move_buf[BUF_SIZE]{'\0'};
bool automatic_left_margin{false};
bool eat_nl_glitch{false};
};
#pragma pack(pop)
// FOptiMove inline functions
@ -328,11 +324,11 @@ inline uInt FOptiMove::getClrEolLength() const
{ return uInt(F_clr_eol.length); }
//----------------------------------------------------------------------
inline void FOptiMove::set_auto_left_margin (const bool& bcap)
inline void FOptiMove::set_auto_left_margin (bool bcap)
{ automatic_left_margin = bcap; }
//----------------------------------------------------------------------
inline void FOptiMove::set_eat_newline_glitch (const bool& bcap)
inline void FOptiMove::set_eat_newline_glitch (bool bcap)
{ eat_nl_glitch = bcap; }

View File

@ -44,9 +44,6 @@ namespace finalcut
// class FPoint
//----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class FPoint
{
public:
@ -94,7 +91,6 @@ class FPoint
int xpos{0};
int ypos{0};
};
#pragma pack(pop)
// FPoint inline functions

View File

@ -61,9 +61,6 @@ namespace finalcut
// class FProgressbar
//----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class FProgressbar : public FWidget
{
public:
@ -110,7 +107,6 @@ class FProgressbar : public FWidget
std::size_t percentage{NOT_SET};
std::size_t bar_length{getWidth()};
};
#pragma pack(pop)
// FProgressbar inline functions

View File

@ -66,9 +66,6 @@ namespace finalcut
// class FRadioButton
//----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class FRadioButton : public FToggleButton
{
public:
@ -96,7 +93,6 @@ class FRadioButton : public FToggleButton
void drawChecked();
void drawUnchecked();
};
#pragma pack(pop)
// FRadioButton inline functions

View File

@ -66,9 +66,6 @@ namespace finalcut
// class FRadioMenuItem
//----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class FRadioMenuItem : public FMenuItem
{
public:
@ -94,8 +91,6 @@ class FRadioMenuItem : public FMenuItem
void processToggle();
void processClicked() override;
};
#pragma pack(pop)
// FRadioMenuItem inline functions
//----------------------------------------------------------------------

View File

@ -52,9 +52,6 @@ class FSize;
// class FRect
//----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class FRect
{
public:
@ -144,8 +141,6 @@ class FRect
int X2{-1};
int Y2{-1};
};
#pragma pack(pop)
// FRect inline functions
//----------------------------------------------------------------------

View File

@ -61,9 +61,6 @@ namespace finalcut
// class FScrollbar
//----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class FScrollbar : public FWidget
{
public:
@ -157,14 +154,12 @@ class FScrollbar : public FWidget
int val{0};
int min{0};
int max{99};
double steps{1};
int pagesize{0};
double steps{1};
std::size_t length{20};
fc::orientation bar_orientation{fc::vertical};
int max_color{getMaxColor()};
};
#pragma pack(pop)
// FScrollbar inline functions
//----------------------------------------------------------------------

View File

@ -65,9 +65,6 @@ namespace finalcut
// class FScrollView
//----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class FScrollView : public FWidget
{
public:
@ -194,8 +191,6 @@ class FScrollView : public FWidget
fc::scrollBarMode vMode{fc::Auto}; // fc:Auto, fc::Hidden or fc::Scroll
fc::scrollBarMode hMode{fc::Auto};
};
#pragma pack(pop)
// FScrollView inline functions
//----------------------------------------------------------------------

View File

@ -47,9 +47,6 @@ namespace finalcut
// class FSize
//----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class FSize
{
public:
@ -102,8 +99,6 @@ class FSize
std::size_t width{0};
std::size_t height{0};
};
#pragma pack(pop)
// FSize inline functions
//----------------------------------------------------------------------

View File

@ -42,9 +42,6 @@ namespace finalcut
// class FStartOptions
//----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
struct FStartOptions
{
public:
@ -86,7 +83,6 @@ struct FStartOptions
uInt8 : 7; // padding bits
#endif
};
#pragma pack(pop)
static struct FStartOptions start_options{};

View File

@ -74,9 +74,6 @@ class FStatusBar;
// class FStatusKey
//----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class FStatusKey : public FWidget
{
public:
@ -125,13 +122,12 @@ class FStatusKey : public FWidget
friend class FStatusBar;
// Data members
FKey key{0};
FString text{};
FStatusBar* bar{nullptr};
FKey key{0};
bool active{false};
bool mouse_focus{false};
FStatusBar* bar{nullptr};
};
#pragma pack(pop)
// FStatusKey inline functions
@ -188,9 +184,6 @@ inline void FStatusKey::setConnectedStatusbar (FStatusBar* sb)
// class FStatusBar
//----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class FStatusBar : public FWindow
{
public:
@ -253,13 +246,12 @@ class FStatusBar : public FWindow
// Data members
keyList key_list{};
FString text{""};
bool mouse_down{};
std::size_t screenWidth{80};
int keyname_len{0};
int x{-1};
int x_msg{-1};
bool mouse_down{};
};
#pragma pack(pop)
// FStatusBar inline functions

View File

@ -74,9 +74,6 @@ typedef std::vector<FString> FStringList;
// class FString
//----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class FString
{
public:
@ -280,7 +277,7 @@ class FString
std::size_t bufsize{0};
mutable char* c_string{nullptr};
};
#pragma pack(pop)
// FString inline functions
//----------------------------------------------------------------------

View File

@ -66,9 +66,6 @@ namespace finalcut
// class FSwitch
//----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class FSwitch : public FToggleButton
{
public:
@ -107,8 +104,6 @@ class FSwitch : public FToggleButton
std::size_t switch_offset_pos{0};
bool button_pressed{false};
};
#pragma pack(pop)
// FSwitch inline functions
//----------------------------------------------------------------------

View File

@ -45,9 +45,6 @@ namespace finalcut
// class FSystem
//----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class FSystem
{
public:
@ -74,7 +71,6 @@ class FSystem
, size_t, struct passwd**) = 0;
virtual char* realpath (const char*, char*) = 0;
};
#pragma pack(pop)
} // namespace finalcut

View File

@ -82,9 +82,6 @@ namespace finalcut
// class FSystemImpl
//----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class FSystemImpl : public FSystem
{
public:
@ -210,7 +207,6 @@ class FSystemImpl : public FSystem
return ::realpath(path, resolved_path);
}
};
#pragma pack(pop)
} // namespace finalcut

View File

@ -149,9 +149,6 @@ class FTermXTerminal;
// class FTerm
//----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class FTerm final
{
public:
@ -388,7 +385,6 @@ class FTerm final
#endif
};
#pragma pack(pop)
// FTerm inline functions
//----------------------------------------------------------------------

View File

@ -49,9 +49,6 @@ class FColorPair;
// class FTermBuffer
//----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class FTermBuffer
{
public:
@ -94,7 +91,6 @@ class FTermBuffer
private:
charDataVector data{};
};
#pragma pack(pop)
// FTermBuffer inline functions

View File

@ -71,8 +71,6 @@ class FTermDetection;
//----------------------------------------------------------------------
// class FTermcap
//----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class FTermcap final
{
@ -126,7 +124,7 @@ class FTermcap final
static FTermData* fterm_data;
static FTermDetection* term_detection;
};
#pragma pack(pop)
// FTermcap inline functions
//----------------------------------------------------------------------

View File

@ -46,9 +46,6 @@ class FTermDetection;
// class FTermcapsQuirks
//----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class FTermcapQuirks final
{
public:
@ -85,7 +82,6 @@ class FTermcapQuirks final
static FTermData* fterm_data;
static FTermDetection* term_detection;
};
#pragma pack(pop)
// FTermcapQuirks inline functions
//----------------------------------------------------------------------

View File

@ -50,9 +50,6 @@ namespace finalcut
// class FTermData
//----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class FTermData final
{
public:
@ -131,10 +128,19 @@ class FTermData final
// Data members
encodingMap encoding_list{};
charSubstitution char_substitution_map{};
fc::encoding term_encoding{fc::UNKNOWN};
FRect term_geometry{}; // current terminal geometry
FString xterm_font{};
FString xterm_title{};
fc::encoding term_encoding{fc::UNKNOWN};
int fd_tty{-1}; // Teletype (tty) file descriptor is still undefined
#if DEBUG
int framebuffer_bpp{-1};
#endif
uInt baudrate{0};
char termtype[256]{'\0'};
char termfilename[256]{'\0'};
bool shadow_character{true};
bool half_block_character{true};
bool cursor_optimisation{true};
@ -148,15 +154,7 @@ class FTermData final
bool vga_font{false};
bool monochron{false};
bool resize_term{false};
char termtype[256]{'\0'};
char termfilename[256]{'\0'};
FString xterm_font{};
FString xterm_title{};
#if DEBUG
int framebuffer_bpp{-1};
#endif
};
#pragma pack(pop)
// FTermData inline functions
//----------------------------------------------------------------------

View File

@ -48,9 +48,6 @@ namespace finalcut
// class FTermDetection
//----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class FTermDetection final
{
public:
@ -166,7 +163,7 @@ class FTermDetection final
static bool get256colorEnvString();
static char* termtype_256color_quirks();
static char* determineMaxColor (char[]);
static const FString getXTermColorName (int);
static const FString getXTermColorName (FColor);
static char* parseAnswerbackMsg (char[]);
static const FString getAnswerbackMsg();
static char* parseSecDA (char[]);
@ -222,7 +219,6 @@ class FTermDetection final
int terminal_id_hardware{-1};
} secondary_da;
};
#pragma pack(pop)
// FTermDetection inline functions
//----------------------------------------------------------------------

View File

@ -76,9 +76,6 @@ class FTermData;
// class FTermFreeBSD
//----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class FTermFreeBSD final
{
public:
@ -134,7 +131,7 @@ class FTermFreeBSD final
static FSystem* fsystem;
static FTermData* fterm_data;
};
#pragma pack(pop)
// FTermFreeBSD inline functions
//----------------------------------------------------------------------

View File

@ -47,9 +47,6 @@ namespace finalcut
// class FTermios
//----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class FTermios final
{
public:
@ -92,7 +89,7 @@ class FTermios final
static bool raw_mode;
static struct termios term_init;
};
#pragma pack(pop)
// FTermios inline functions
//----------------------------------------------------------------------

View File

@ -66,9 +66,6 @@ class FTermDetection;
// class FTermLinux
//----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class FTermLinux final
{
public:
@ -193,7 +190,7 @@ class FTermLinux final
static int framebuffer_bpp;
#endif // defined(__linux__)
};
#pragma pack(pop)
// FTermLinux inline functions
//----------------------------------------------------------------------

View File

@ -71,9 +71,6 @@ class FSystem;
// class FTermOpenBSD
//----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class FTermOpenBSD final
{
public:
@ -119,7 +116,7 @@ class FTermOpenBSD final
static FSystem* fsystem;
#endif // defined(__NetBSD__) || defined(__OpenBSD__) || defined(UNIT_TEST)
};
#pragma pack(pop)
// FTermOpenBSD inline functions
//----------------------------------------------------------------------

View File

@ -47,9 +47,6 @@ class FTermDetection;
// class FTermXTerminal
//----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class FTermXTerminal final
{
public:
@ -156,7 +153,7 @@ class FTermXTerminal final
static FTermDetection* term_detection;
static fc::xtermCursorStyle cursor_style;
};
#pragma pack(pop)
// FTermXTerminal inline functions
//----------------------------------------------------------------------

View File

@ -67,9 +67,6 @@ class FString;
// class FTextView
//----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class FTextView : public FWidget
{
public:
@ -167,8 +164,6 @@ class FTextView : public FWidget
int nf_offset{0};
std::size_t maxLineWidth{0};
};
#pragma pack(pop)
// FListBox inline functions
//----------------------------------------------------------------------

View File

@ -64,9 +64,6 @@ class FButtonGroup;
// class FToggleButton - abstract class for FRadioButton, FCheckBox, ...
//----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class FToggleButton : public FWidget
{
public:
@ -167,8 +164,6 @@ class FToggleButton : public FWidget
bool focus_inside_group{true};
bool checked{false};
};
#pragma pack(pop)
// FRadioButton inline functions
//----------------------------------------------------------------------

View File

@ -68,9 +68,6 @@ namespace finalcut
// class FToolTip
//----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class FToolTip : public FWindow
{
public:
@ -115,7 +112,6 @@ class FToolTip : public FWindow
std::size_t max_line_width{0};
std::size_t text_num_lines{0};
};
#pragma pack(pop)
// FToolTip inline functions

View File

@ -106,9 +106,6 @@ struct getPrecision
typedef std::unordered_map<wchar_t, wchar_t> charSubstitution;
#pragma pack(push)
#pragma pack(1)
typedef struct
{
wchar_t code; // character code
@ -118,7 +115,7 @@ typedef struct
union attribute
{
struct alignas(4)
struct
{
// Attribute byte #0
uInt8 bold : 1; // bold
@ -142,17 +139,17 @@ typedef struct
uInt8 no_changes : 1; // no changes required
uInt8 printed : 1; // is printed to VTerm
uInt8 : 6; // padding bits
// Attribute byte #3
uInt8 : 8; // padding byte
} bit;
alignas(4) uInt8 byte[3];
uInt8 byte[4];
} attr;
} charData;
#pragma pack(pop)
namespace fc
{
#pragma pack(push)
#pragma pack(1)
typedef struct
{
FKey num;
@ -174,7 +171,6 @@ typedef struct
char string[25];
}
keyname;
#pragma pack(pop)
} // namespace fc

View File

@ -82,9 +82,6 @@ class FWidget;
// class FVTerm
//----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class FVTerm
{
public:
@ -492,16 +489,12 @@ class FVTerm
static uInt cursor_address_length;
};
#pragma pack(pop)
//----------------------------------------------------------------------
// struct FVTerm::term_area
//----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
struct FVTerm::term_area // define virtual terminal character properties
{
public:
@ -533,7 +526,6 @@ struct FVTerm::term_area // define virtual terminal character properties
bool has_changes{false};
bool visible{false};
};
#pragma pack(pop)
// FVTerm inline functions

View File

@ -128,9 +128,6 @@ class FWidgetColors;
// class FWidget
//----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class FWidget : public FVTerm, public FObject
{
public:
@ -140,7 +137,7 @@ class FWidget : public FVTerm, public FObject
struct accelerator
{
FKey key;
alignas(8) FKey key;
FWidget* object;
};
@ -525,7 +522,6 @@ class FWidget : public FVTerm, public FObject
friend class FScrollView;
};
#pragma pack(pop)
// non-member function forward declarations
//----------------------------------------------------------------------

View File

@ -44,9 +44,6 @@ namespace finalcut
// class FWidgetColors
//----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class FWidgetColors final
{
public:
@ -140,7 +137,6 @@ class FWidgetColors final
FColor progressbar_fg{fc::Default};
FColor progressbar_bg{fc::Default};
};
#pragma pack(pop)
} // namespace finalcut

View File

@ -69,9 +69,6 @@ namespace finalcut
// class FWindow
//----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class FWindow : public FWidget
{
public:
@ -101,7 +98,7 @@ class FWindow : public FWidget
bool setWindowWidget();
bool unsetWindowWidget();
static void setActiveWindow (FWindow*);
void setWindowFocusWidget (const FWidget*);
void setWindowFocusWidget (FWidget*);
bool activateWindow (bool);
bool activateWindow();
void unsetActiveWindow();
@ -175,13 +172,12 @@ class FWindow : public FWidget
static void processAlwaysOnTop();
// Data members
bool window_active{false};
bool zoomed{false};
FWidget* win_focus_widget{nullptr};
FRect normalGeometry{};
static FWindow* previous_window;
bool window_active{false};
bool zoomed{false};
};
#pragma pack(pop)
// FWindow inline functions

View File

@ -29,7 +29,7 @@ endif
all: $(OBJS)
debug:
$(MAKE) $(MAKEFILE) DEBUG="-g -D DEBUG -DUNIT_TEST -Wall -Wextra -Wpedantic -Wpadded -Wno-c++98-compat -Wno-c++98-compat-pedantic -Wno-implicit-fallthrough"
$(MAKE) $(MAKEFILE) DEBUG="-g -D DEBUG -DUNIT_TEST -Wall -Wextra -Wpedantic -Wno-padded -Wno-c++98-compat -Wno-c++98-compat-pedantic -Wno-implicit-fallthrough"
check: test
test: debug

View File

@ -43,9 +43,6 @@ namespace test
// class ConEmu
//----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class ConEmu
{
public:
@ -142,7 +139,6 @@ class ConEmu
static bool* shared_state;
static char* colorname[];
};
#pragma pack(pop)
// static class attributes
bool* ConEmu::shared_state = nullptr;

View File

@ -36,9 +36,6 @@
// class FColorPairTest
//----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class FColorPairTest : public CPPUNIT_NS::TestFixture
{
public:
@ -68,7 +65,7 @@ class FColorPairTest : public CPPUNIT_NS::TestFixture
// End of test suite definition
CPPUNIT_TEST_SUITE_END();
};
#pragma pack(pop)
//----------------------------------------------------------------------
void FColorPairTest::classNameTest()

View File

@ -34,8 +34,6 @@
namespace test
{
#pragma pack(push)
#pragma pack(1)
typedef struct
{
int num;
@ -43,7 +41,6 @@ typedef struct
char tname[4];
}
fkeymap;
#pragma pack(pop)
fkeymap Fkey[] =
{
@ -227,9 +224,6 @@ fkeymap Fkey[] =
// class FKeyboardTest
//----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class FKeyboardTest : public CPPUNIT_NS::TestFixture
{
public:
@ -282,7 +276,6 @@ class FKeyboardTest : public CPPUNIT_NS::TestFixture
int number_of_keys{0};
finalcut::FKeyboard* keyboard{nullptr};
};
#pragma pack(pop)
//----------------------------------------------------------------------
FKeyboardTest::FKeyboardTest()

Some files were not shown because too many files have changed in this diff Show More