Skip to content

Commit 88d9e90

Browse files
committed
Preparing Einstein to 2025
Fix Find panel in toolkit also some typos commented out code to follow newton script calls better help text
1 parent 42b3785 commit 88d9e90

11 files changed

+39
-44
lines changed

CMakeLists.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
cmake_minimum_required(VERSION 3.15.0 FATAL_ERROR)
99

10-
project( "Einstein" VERSION "2024.4.22" )
10+
project( "Einstein" VERSION "2024.12.26" )
1111

1212
# Avoid warning about DOWNLOAD_EXTRACT_TIMESTAMP in CMake 3.24:
1313
if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.24.0")
@@ -68,13 +68,13 @@ endif ()
6868

6969
FetchContent_Declare (
7070
googletest
71-
URL https://github.com/google/googletest/archive/refs/tags/release-1.11.0.zip
71+
URL https://github.com/google/googletest/archive/refs/tags/v1.15.2.zip
7272
)
7373

7474
FetchContent_Declare(
7575
FLTK
7676
GIT_REPOSITORY https://github.com/fltk/fltk
77-
GIT_TAG master
77+
GIT_TAG release-1.4.1
7878
GIT_SHALLOW TRUE
7979
)
8080

@@ -96,10 +96,10 @@ set( gtest_force_shared_crt ON CACHE BOOL "" FORCE )
9696
FetchContent_GetProperties(googletest)
9797
if ( NOT googletest_POPULATED )
9898
# Fetch the content using previously declared details
99-
FetchContent_Populate(googletest)
99+
FetchContent_MakeAvailable(googletest)
100100

101101
# Bring the populated content into the build
102-
add_subdirectory( ${googletest_SOURCE_DIR} ${googletest_BINARY_DIR} )
102+
#add_subdirectory( ${googletest_SOURCE_DIR} ${googletest_BINARY_DIR} )
103103
endif ()
104104

105105
enable_testing()

Emulator/JIT/TJIT.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,12 @@ class TJIT
5656
TJIT(
5757
TMemory* inMemoryIntf,
5858
TMMU* inMMUIntf) :
59-
mCache(inMemoryIntf, inMMUIntf) {};
59+
mCache(inMemoryIntf, inMMUIntf) { };
6060

6161
///
6262
/// Destructor.
6363
///
64-
virtual ~TJIT(void) {};
64+
virtual ~TJIT(void) { };
6565

6666
///
6767
/// Invalidate an instruction.

Emulator/Network/TUsermodeNetwork.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2108,7 +2108,7 @@ TUsermodeNetwork::~TUsermodeNetwork()
21082108
// release all package handlers
21092109
while (mFirstPacketHandler)
21102110
RemovePacketHandler(mFirstPacketHandler);
2111-
// release all other resources
2111+
// release all other resources
21122112
#if TARGET_OS_WIN32
21132113
WSACleanup();
21142114
#endif

Emulator/Screen/TNullScreenManager.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,12 @@ class TNullScreenManager
5050
KUInt32 inPortraitHeight = kDefaultPortraitHeight,
5151
Boolean inFullScreen = false,
5252
Boolean inScreenIsLandscape = true) :
53-
TScreenManager(inLog, inPortraitWidth, inPortraitHeight, inFullScreen, inScreenIsLandscape) {};
53+
TScreenManager(inLog, inPortraitWidth, inPortraitHeight, inFullScreen, inScreenIsLandscape) { };
5454

5555
///
5656
/// Destructeur.
5757
///
58-
virtual ~TNullScreenManager(void) {};
58+
virtual ~TNullScreenManager(void) { };
5959

6060
///
6161
/// Notify that the tablet orientation changed.

Emulator/Serial/TBasiliskIISerialPortManager.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,8 +188,7 @@ TBasiliskIISerialPortManager::OpenPTY()
188188
}
189189

190190
// tcgetattr(fd, &struct termios)
191-
struct termios tios {
192-
};
191+
struct termios tios {};
193192

194193
ret = tcgetattr(pBasiliskLocalFD, &tios);
195194
if (ret == -1)

Emulator/Serial/TPtySerialPortManager.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,8 +191,7 @@ TPtySerialPortManager::HandleDMA()
191191

192192
// thread loops and handles pipe, port, and DMA
193193
fd_set readSet;
194-
struct timeval timeout {
195-
};
194+
struct timeval timeout {};
196195
for (;;)
197196
{
198197
bool needTimer = false;

Emulator/Serial/TTcpClientSerialPortManager.cpp

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ TTcpClientSerialPortManager::Connect()
289289
if (now < mReconnectTimeout)
290290
return false;
291291

292-
// Create a new socket
292+
// Create a new socket
293293
#if TARGET_OS_WIN32
294294
mTcpSocket = WSASocket(AF_INET, SOCK_STREAM, IPPROTO_TCP, NULL, 0, 0);
295295
if (mTcpSocket == INVALID_SOCKET)
@@ -307,8 +307,7 @@ TTcpClientSerialPortManager::Connect()
307307
#endif
308308

309309
// Create the address information to our server
310-
struct sockaddr_in server {
311-
};
310+
struct sockaddr_in server {};
312311
memset(&server, 0, sizeof(struct sockaddr_in));
313312
server.sin_family = AF_INET;
314313
server.sin_port = htons(static_cast<uint16_t>(mPort));
@@ -428,14 +427,12 @@ TTcpClientSerialPortManager::HandleDMA()
428427
}
429428
}
430429
#else
431-
static struct sigaction action {
432-
};
430+
static struct sigaction action {};
433431
action.sa_handler = sigpipe_handler;
434432
sigaction(SIGPIPE, &action, nullptr);
435433

436434
// thread loops and handles pipe, port, and DMA
437-
struct timeval timeout {
438-
};
435+
struct timeval timeout {};
439436
for (;;)
440437
{
441438
bool needTimer = false;

K/Misc/TMappedFile.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ TMappedFile::Map(
185185
mBuffer = ::malloc(mSize);
186186
if (mBuffer)
187187
{
188-
if (((size_t)::read(mFileFd, mBuffer, mSize)) != mSize)
188+
if (((size_t) ::read(mFileFd, mBuffer, mSize)) != mSize)
189189
{
190190
// Read failed.
191191
::free(mBuffer);

Toolkit/TFLScriptPanel.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -322,8 +322,8 @@ TFLScriptEditor::style_parse(const char* text,
322322
{
323323
// Might be a keyword...
324324
for (temp = text, bufptr = buf;
325-
(isalnum((*temp) & 255) || *temp == '_') && bufptr < (buf + sizeof(buf) - 1);
326-
*bufptr++ = *temp++)
325+
(isalnum((*temp) & 255) || *temp == '_') && bufptr < (buf + sizeof(buf) - 1);
326+
*bufptr++ = *temp++)
327327
{
328328
// nothing
329329
}

Toolkit/TFLTerminalPanel.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -129,12 +129,12 @@ TFLTile::TFLTile(int x, int y, int w, int h, const char* label) :
129129
void
130130
TFLTile::resize(int x, int y, int w, int h)
131131
{
132-
// Fl_Widget* monitor = child(2);
133-
// int mh = monitor->h();
132+
// Fl_Widget* monitor = child(2);
133+
// int mh = monitor->h();
134134
Fl_Tile::resize(x, y, w, h);
135-
// child(1)->resize(x, y, w, h - mh);
136-
// child(2)->resize(x, y + h - mh, w, mh);
137-
// init_sizes();
135+
// child(1)->resize(x, y, w, h - mh);
136+
// child(2)->resize(x, y + h - mh, w, mh);
137+
// init_sizes();
138138
}
139139

140140
// ============================================================================ //

Toolkit/TToolkit.cpp

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -249,8 +249,8 @@ TToolkit::Show()
249249

250250
wToolkitWindow = CreateToolkitWindow(x, y);
251251
wToolkitWindow->size_range(350, 78 + 250);
252-
wTile->size_range(wScriptPanel, 320, 100);
253-
wTile->size_range(wToolkitTerminal, 320, 32);
252+
wTile->size_range(wScriptPanel, 320, 100);
253+
wTile->size_range(wToolkitTerminal, 320, 32);
254254
LoadRecentFileMenu();
255255

256256
wToolkitTerminal->buffer(gTerminalBuffer = new Fl_Text_Buffer());
@@ -745,14 +745,14 @@ TToolkit::UserActionFindNext(bool fromLast)
745745
void
746746
TToolkit::UserActionFindShow()
747747
{
748-
if (!wToolkitFindGroup->visible() && (wScriptPanel->h() > wToolkitFindGroup->h()) )
748+
if (!wToolkitFindGroup->visible() && (wScriptPanel->h() > wToolkitFindGroup->h()))
749749
{
750-
int y = wToolkitFindGroup->y() + wToolkitFindGroup->h();
751-
int h = wToolkitWindow->h() - y;
752-
wTile->resize(wTile->x(), y, wTile->w(), h);
753-
wTile->init_sizes();
754-
wTile->parent()->init_sizes();
755-
wToolkitFindGroup->show();
750+
int y = wToolkitFindGroup->y() + wToolkitFindGroup->h();
751+
int h = wToolkitWindow->h() - y;
752+
wTile->resize(wTile->x(), y, wTile->w(), h);
753+
wTile->init_sizes();
754+
wTile->parent()->init_sizes();
755+
wToolkitFindGroup->show();
756756
}
757757
}
758758

@@ -764,12 +764,12 @@ TToolkit::UserActionFindHide()
764764
{
765765
if (wToolkitFindGroup->visible())
766766
{
767-
int y = wToolkitFindGroup->y();
768-
int h = wToolkitWindow->h() - y;
769-
wToolkitFindGroup->hide();
770-
wTile->resize(wTile->x(), y, wTile->w(), h);
771-
wTile->init_sizes();
772-
wTile->parent()->init_sizes();
767+
int y = wToolkitFindGroup->y();
768+
int h = wToolkitWindow->h() - y;
769+
wToolkitFindGroup->hide();
770+
wTile->resize(wTile->x(), y, wTile->w(), h);
771+
wTile->init_sizes();
772+
wTile->parent()->init_sizes();
773773
}
774774
}
775775

0 commit comments

Comments
 (0)