Fix gcc-6 compilation errors; bug 594176 --- a/classes/tdesktop.cc +++ b/classes/tdesktop.cc @@ -26,6 +26,10 @@ Modified cursor behavior while desktop locked by Salvador E. Tropea (SET) #define Uses_TVCodePage #include +#include + +using std::abs; + TDeskInit::TDeskInit( TBackground *(*cBackground)( TRect ) ) : createBackground( cBackground ) { --- a/classes/tdisplay.cc +++ b/classes/tdisplay.cc @@ -22,6 +22,10 @@ same used in original Turbo Vision for compatibility purposes. #define Uses_TVCodePage #include +#include + +using std::abs; + // Remove me please! int TDisplay::dual_display=0; --- a/classes/tvtext1.cc +++ b/classes/tvtext1.cc @@ -110,8 +110,8 @@ char TCheckBoxes::button[] = " [ ] "; char TCheckBoxes::obutton[] = " [ ] "; -TScrollChars TScrollBar::vChars = {30, 31, 177, 254, 178}; -TScrollChars TScrollBar::ovChars = {30, 31, 177, 254, 178}; -TScrollChars TScrollBar::hChars = {17, 16, 177, 254, 178}; -TScrollChars TScrollBar::ohChars = {17, 16, 177, 254, 178}; +TScrollChars TScrollBar::vChars = {30, 31, (char) 177, (char) 254, (char) 178}; +TScrollChars TScrollBar::ovChars = {30, 31, (char) 177, (char) 254, (char) 178}; +TScrollChars TScrollBar::hChars = {17, 16, (char) 177, (char) 254, (char) 178}; +TScrollChars TScrollBar::ohChars = {17, 16, (char) 177, (char) 254, (char) 178}; --- a/classes/x11/x11src.cc +++ b/classes/x11/x11src.cc @@ -94,6 +94,10 @@ #define TIMER_ALARM SIGALRM #endif +#include + +using std::abs; + const unsigned foWmin=5, foHmin=7, foWmax=20, foHmax=32; const int cursorDelay=300000; @@ -2555,49 +2559,49 @@ Cursor TScreenX11::busyCursor, TScreenX11::leftPtr; char TScreenX11::busyCursorMap[]= { - 0xff, 0xff, 0xff, 0x1f, - 0xfd, 0xff, 0xff, 0x1f, - 0xf9, 0xff, 0xff, 0x1f, - 0xf1, 0xff, 0xff, 0x1f, - 0xe1, 0x7f, 0xc0, 0x1f, - 0xc1, 0x7f, 0xc0, 0x1f, - 0x81, 0x3f, 0x80, 0x1f, - 0x01, 0x9f, 0x3b, 0x1f, - 0x01, 0xce, 0x7b, 0x1e, - 0xc1, 0xef, 0xfb, 0x1e, - 0xc9, 0xef, 0xf1, 0x18, - 0x9d, 0xef, 0xf1, 0x18, - 0x9f, 0xef, 0xfe, 0x18, - 0x3f, 0x6f, 0xff, 0x1e, - 0x3f, 0xcf, 0x7f, 0x1e, - 0xff, 0x9f, 0x3f, 0x1f, - 0xff, 0x3f, 0x80, 0x1f, - 0xff, 0x7f, 0xc0, 0x1f, - 0xff, 0x7f, 0xc0, 0x1f, - 0xff, 0xff, 0xff, 0x1f + (char)0xff, (char)0xff, (char)0xff, (char)0x1f, + (char)0xfd, (char)0xff, (char)0xff, (char)0x1f, + (char)0xf9, (char)0xff, (char)0xff, (char)0x1f, + (char)0xf1, (char)0xff, (char)0xff, (char)0x1f, + (char)0xe1, (char)0x7f, (char)0xc0, (char)0x1f, + (char)0xc1, (char)0x7f, (char)0xc0, (char)0x1f, + (char)0x81, (char)0x3f, (char)0x80, (char)0x1f, + (char)0x01, (char)0x9f, (char)0x3b, (char)0x1f, + (char)0x01, (char)0xce, (char)0x7b, (char)0x1e, + (char)0xc1, (char)0xef, (char)0xfb, (char)0x1e, + (char)0xc9, (char)0xef, (char)0xf1, (char)0x18, + (char)0x9d, (char)0xef, (char)0xf1, (char)0x18, + (char)0x9f, (char)0xef, (char)0xfe, (char)0x18, + (char)0x3f, (char)0x6f, (char)0xff, (char)0x1e, + (char)0x3f, (char)0xcf, (char)0x7f, (char)0x1e, + (char)0xff, (char)0x9f, (char)0x3f, (char)0x1f, + (char)0xff, (char)0x3f, (char)0x80, (char)0x1f, + (char)0xff, (char)0x7f, (char)0xc0, (char)0x1f, + (char)0xff, (char)0x7f, (char)0xc0, (char)0x1f, + (char)0xff, (char)0xff, (char)0xff, (char)0x1f }; char TScreenX11::busyCursorMask[]= { - 0xfc, 0xff, 0xff, 0x1f, - 0xf8, 0xff, 0xff, 0x1f, - 0xf0, 0xff, 0xff, 0x1f, - 0xe0, 0x3f, 0x80, 0x1f, - 0xc0, 0x3f, 0x80, 0x1f, - 0x80, 0x3f, 0x80, 0x1f, - 0x00, 0x1f, 0x00, 0x1f, - 0x00, 0x0e, 0x00, 0x1e, - 0x00, 0x04, 0x00, 0x1c, - 0x00, 0x04, 0x00, 0x10, - 0x80, 0x07, 0x00, 0x10, - 0x08, 0x07, 0x00, 0x10, - 0x0c, 0x07, 0x00, 0x10, - 0x1f, 0x06, 0x00, 0x10, - 0x1f, 0x06, 0x00, 0x1c, - 0x3f, 0x0f, 0x00, 0x1e, - 0xff, 0x1f, 0x00, 0x1f, - 0xff, 0x3f, 0x80, 0x1f, - 0xff, 0x3f, 0x80, 0x1f, - 0xff, 0x3f, 0x80, 0x1f + (char)0xfc, (char)0xff, (char)0xff, (char)0x1f, + (char)0xf8, (char)0xff, (char)0xff, (char)0x1f, + (char)0xf0, (char)0xff, (char)0xff, (char)0x1f, + (char)0xe0, (char)0x3f, (char)0x80, (char)0x1f, + (char)0xc0, (char)0x3f, (char)0x80, (char)0x1f, + (char)0x80, (char)0x3f, (char)0x80, (char)0x1f, + (char)0x00, (char)0x1f, (char)0x00, (char)0x1f, + (char)0x00, (char)0x0e, (char)0x00, (char)0x1e, + (char)0x00, (char)0x04, (char)0x00, (char)0x1c, + (char)0x00, (char)0x04, (char)0x00, (char)0x10, + (char)0x80, (char)0x07, (char)0x00, (char)0x10, + (char)0x08, (char)0x07, (char)0x00, (char)0x10, + (char)0x0c, (char)0x07, (char)0x00, (char)0x10, + (char)0x1f, (char)0x06, (char)0x00, (char)0x10, + (char)0x1f, (char)0x06, (char)0x00, (char)0x1c, + (char)0x3f, (char)0x0f, (char)0x00, (char)0x1e, + (char)0xff, (char)0x1f, (char)0x00, (char)0x1f, + (char)0xff, (char)0x3f, (char)0x80, (char)0x1f, + (char)0xff, (char)0x3f, (char)0x80, (char)0x1f, + (char)0xff, (char)0x3f, (char)0x80, (char)0x1f }; /* This is the function which creates cursors. On success it return