Pietro Gagliardi
48cd6e1dd8
Cleaned #include directives so C standard library headers are sorted and so each source file only includes one header file. This makes things clenaer, and alos allows us to more properly strip unneeded headers later.
2019-06-01 09:27:17 -04:00
Pietro Gagliardi
1814745646
Wrote a wrapper for vsnprintf() that calls _vcsprintf()/vsnprintf_s() on Windows, because lol. I'm going to try switching from strcpy() to strncpy() for the other cases; let's see if this works.
2019-05-31 02:52:51 -04:00
Pietro Gagliardi
3ddaf3052e
Fixed build issues on other platforms. That dumb msvcrt macro is next.
2019-05-31 00:24:12 -04:00
Pietro Gagliardi
9daef443b2
Moved uiQueueMain() to common/init.c to avoid having multiple initialized variables; the per-OS versions are now uiprivSysQueueMain(). Also more TODOs.
2019-05-30 01:39:43 -04:00
Pietro Gagliardi
ab5b3076ed
Removed uiInitError length checking and just truncated too-long messages with an ellipsis. Also removed the non-printf version of uiprivReportInitError.
2019-05-30 01:16:33 -04:00
Pietro Gagliardi
19ad0d33a3
Changed uiInit() to return bool instead of int, now that we've settled on using bool.
2019-05-29 21:10:44 -04:00
Pietro Gagliardi
b5927353e0
Started work to test that functions dislike being called before uiInit() or on a different thread; better to do it now than later.
2019-05-28 21:54:13 -04:00
Pietro Gagliardi
f97383f66c
Rearranged things so that uiInit() itself is in common/init.c and the OS-specific initialization code is its own standalone internal function. This'll make testing a bit easier, especially after the next few commits, and will allow me to test pre-initialization and cross-thread stuff a bit more easily.
2019-05-09 12:07:28 -04:00
Pietro Gagliardi
b8b3b3df39
Fixed the rest of the build errors and warnings. Woo! Now for the manifests.
2019-04-21 17:28:47 -04:00
Pietro Gagliardi
f7867f3427
ALMOST fixed the build on Windows with MSVC. (For the change to test/testing.h: Even in VS2019 inline isn't available in C, ugh. That function doesn't need to be inline anyway, so eh.)
2019-04-21 15:08:09 -04:00
Pietro Gagliardi
c6aa8c3324
Pruned windows/init.cpp to a minimal initialization that we can test things with, which includes adding a function to load err->Message with a formatted string.
...
Also added a better error for if InitCommonControlsEx() returns 0 without setting the last error; this usually means that v5 is loaded.
Fixes #451 .
Updates #337 .
2019-04-21 14:49:16 -04:00
Pietro Gagliardi
469484415d
Implemented uiInit() on Unix.
2019-04-21 12:24:19 -04:00
Pietro Gagliardi
484989e925
Implemented uiInit() on macOS. The tests work so far!
2019-04-20 21:38:26 -04:00
Pietro Gagliardi
74b1e2780d
Implemented the cross-platform bits of uiInit().
2019-04-19 12:32:13 -04:00