Another oddity that’ll need investigation:
SYS_WIN32(m_TimerID = timeSetEvent(55, 22, l_Win32TimerProc, 0, TIME_PERIODIC));
SYS_WIN32(if (m_TimerID == 0) {
)
SYS_WIN32( ErrorHandler.AddError(ERR_BADINPUT,
"Failed to initialize the timer using SetTimer()!") );
SYS_WIN32( return (FALSE) );
SYS_WIN32(
} )
I have no idea how that’s supposed to work. The macro function’s ) is before the closing brace while the final macro function sets the closing brace. Not sure why it even uses a macro function, to be honest. For that matter, I’m not even sure what this file is for. It’s tasktime.cpp/tasktime.h. From the code, it sounds like it may be a re-implmentation of some Windows system stuff for handling processes but I don’t know why MWEdit would need such code. It’s a file editor, not a low-level program. There’s a good chance it’ll be slated for removal.
I’m a little nervous about touching it right now with how weird it’s set up: I don’t want to break anything.
There’s also custom code for running it in a console in Common/conapp.cpp even though it’s a GUI application. It’s starting to look like the Common directory was just a holding space for custom code for a variety of projects even if it didn’t necessarily pertain to the program.
I’m also seeing a lot of stuff like this:
DEFINE_FUNCTION("CreateBlockInfo(void*, size_t, char*)");
Just about every function has a similar line as the first line in the block where DEFINE_FUNCTION just repeats the function line. In some cases, it’s commented out. I’m assuming this is an old legacy artifact that can be safely removed?
