common/file/gen_find is written to be partially cross-platform. It does have _WIN32 checks for some of it but it still breaks on non-Windows platforms as the required typedef is itself in a check. I’ve made a note of the problem in the code.
Several functions in common/string/sstring.h have no prototype, just definitions. Most of these are duplicated in windows/win_util and defined in there. The CSString:: versions aren’t used from what I can tell so we can likely remove them from the header to clean it up. That’ll be done once I’ve checked each function to make sure we can excise them.
Many things in common are aliases to stuff in the Windows API with the exact same name so we’ll definitely want to namespace these to prevent confusion. I’ve tried to clean up what I accidentally though was from the Windows API but were in reality aliases but there’s a good chance I missed some stuff.
Edit:
Fixed a few bugs in common/string/sstring.cc. There were some misnamed variables that didn’t match the prototype and, instead, referenced the typedefs. All fixed now 🙂
A lot of the string stuff is weird so I fully expect it to croak, if not on build, then on certain extended characters. It’ll be better once the string library has been rewritten to modern compliance. That doesn’t necessarily require the Unicode tracker item to be done but does require consistency in the code.
Also, one task that needs to be accomplished at some point is rearranging the source files to match the order of the headers.
Edit 2:
common/time/task_time.cc has more DOS code that needs to be removed. It uses weird macros, though, so those will need to be untangled first to make sure it’s done correctly.
Doesn’t look like that file or symbols are used in the project anyways so I’ll go ahead and tag them for removal. Going to clean them up first, anyways, just in case they’re needed after all but the grep came up empty:
~/projects/MWEdit$ git grep --files-with-matches "TaskTimer"
common/time/task_time.cc
common/time/task_time.h
common/utility/profile can likely be marked for removal:
~/projects/MWEdit$ git grep "ProfileLog"
common/utility/profile.cc: CLogFile ProfileLog;
common/utility/profile.cc: //boolean OpenLog = ProfileLog.Open("profile.log");
common/utility/profile.h:extern CLogFile ProfileLog;
~/projects/MWEdit$ git grep "profile_t"
common/utility/profile.cc: extern profile_t *g_pLastStaticProfile = NULL;
common/utility/profile.h: profile_t ProfName = {{0ul}, {0ul}, {0ul}, 0.0, {0ul}, 0.0, {0ul}};
common/utility/profile.h: static profile_t ProfName = {{0ul}, {0ul}, {0ul}, 0.0, {0ul}, 0.0, {0ul}}; \
common/utility/profile.h:} profile_t;
common/utility/profile.h:extern profile_t *g_pLastStaticProfile;
common/utility/profile.h: profile_t &m_rProfile; /* Referenced profile object */
common/utility/profile.h: CProfileEndFunc(profile_t &Profile) : m_rProfile(Profile) { ; }
