Commit Graph

4190 Commits

Author SHA1 Message Date
Pietro Gagliardi 65c88fd1c4 And documented all the other functions we need to start writing common/control.c. 2019-06-06 22:51:37 -04:00
Pietro Gagliardi 582a781171 More uiControl work. 2019-06-05 23:20:53 -04:00
Pietro Gagliardi 4ff61c81b0 More uiControl documentation writing. This new system might work nicely the way I'm designing it... 2019-06-04 20:33:29 -04:00
Pietro Gagliardi 26e492539d Renamed uiFreeEvent() to uiEventFree() for consistency with uiControlFree(). 2019-06-02 22:04:25 -04:00
Pietro Gagliardi 57dc482f2a Oops 2019-06-02 20:50:55 -04:00
Pietro Gagliardi b8f8e1c4f7 Started writing out uiControl's documentation. This new design is going to be rather interesting. 2019-06-02 20:47:27 -04:00
Pietro Gagliardi c6294f163f Okay, added uiFreeEvent() error tests. Now back to uiControl. 2019-06-02 19:11:22 -04:00
Pietro Gagliardi d040bca07e Started layout out the uiControl stuff. I forgot to write tests for uiFreeEvent() errors :| 2019-06-02 18:49:16 -04:00
Pietro Gagliardi 12c01d0d42 Ensured calls to bsearch() have a length of at least 1; UndefinedBehaviorSanitizer will warn otherwise. Also included qsort(), to be safe. 2019-06-02 14:26:25 -04:00
Pietro Gagliardi 6d6cd66046 Freed defers after they run. Apparently this is sufficient to satisfy AddressSanitizer, which... how? I'll take it, but still, there's definitely more unfreed allocations than this... 2019-06-02 14:06:16 -04:00
Pietro Gagliardi ddaa10b7e1 Wrote defers into test/events.c. Woo! Now we need to free the defers when we're done, and I have an idea... 2019-06-02 12:48:06 -04:00
Pietro Gagliardi 9f2796ebac Added uiEventFree(). Now to add it to the tests and see what AddressSanitizer says afterward. 2019-06-02 10:06:50 -04:00
Pietro Gagliardi ece22bdddc Split programmer errors into their own header file for readability and turned the names from string constants into full-fledged uiprivProgrammerError() calls to increase safety. 2019-06-02 08:35:40 -04:00
Pietro Gagliardi 623575f25a Changed uiprivProgrammerError() to use format strings directly, so errors can be more easily caught. We'll make things even more robust when I change the programmer error macros to be functions. 2019-06-02 02:23:12 -04:00
Pietro Gagliardi 671c2031bf TODO in allcalls.h now resolved. 2019-06-02 02:07:33 -04:00
Pietro Gagliardi b5e8b76066 Fixed one mistake. 2019-06-02 02:04:20 -04:00
Pietro Gagliardi 3f4765d116 Renamed diffx() to diff(). 2019-06-02 01:59:08 -04:00
Pietro Gagliardi 0c673acf70 Got rid of all the diff() macros; the replacement, currently called diffx(), just produces the requisite format string. Next up is renaming diffx() to diff() and making sure things work. 2019-06-02 01:51:40 -04:00
Pietro Gagliardi 5d1e6a0cf2 Began handling all the other cases. diff() and diff_2str() go away next. 2019-06-02 01:36:53 -04:00
Pietro Gagliardi 1cf545d369 Started mapping filenames and line numbers back to their appropriate places in the tester. 2019-06-02 01:13:56 -04:00
Pietro Gagliardi 4ae6ab2727 Changed the testing library to allow passing different filename and line numbers through to the various logging functions; cleaned up the macro hell that was by passing the action function directly to the final logging functions in testing.c. Next commit will actually implement this. 2019-06-01 22:03:13 -04:00
Pietro Gagliardi 8980a8663b Cleaned up a TODO. 2019-06-01 20:46:41 -04:00
Pietro Gagliardi bd2877154f Oh, it turns out there IS a warning for shutting up -pedantic. Woo! 2019-06-01 20:26:43 -04:00
Pietro Gagliardi 6ffe0a4c99 Added functionality to mark printf() functions for compilers with warning checks, and marked such. Sadly it appears ms_printf is ignored with -pedantic, so we'll need to stop using I32... 2019-06-01 20:20:11 -04:00
Pietro Gagliardi ef3352c033 Removed the soft librt dependency for now, since we don't appear to need it, at least for Ubuntu 14.4. If that changes (for instance, if it's required by some non-Linux system or some other distro), we can always add it back. 2019-06-01 12:22:35 -04:00
Pietro Gagliardi 9ad77ac57e Rewrote a TODO. Didn't solve it yet, because I'm genuinely indecisive about this one. 2019-06-01 12:17:08 -04:00
Pietro Gagliardi 8531710f03 More TODOs. 2019-06-01 12:11:16 -04:00
Pietro Gagliardi efe118a81d Resolved warning suppression issue in timerDurationString(). It turns out BOTH this AND the solution were both in timer.c, and I somehow did not notice :V 2019-06-01 12:06:09 -04:00
Pietro Gagliardi a8ad49fead Made the names of format string arguments across the board consistent. Only the "public" functions in the testing library are kept expanded for documentation purposes. 2019-06-01 11:40:16 -04:00
Pietro Gagliardi 76fabb37cf Renamed common/init.c to common/main.c. 2019-06-01 11:24:34 -04:00
Pietro Gagliardi dea7436468 Changed LONGTERMs in windows/ to TODOs. If it's not worth doing soon, it should go in another list of things to do. 2019-06-01 10:33:03 -04:00
Pietro Gagliardi f2ce4c8f56 Split the shared and static resources on the Windows tester, for the same reason. 2019-06-01 10:29:48 -04:00
Pietro Gagliardi a8cd121003 Cleaned up resources on Windows. Now to do so for tester. 2019-06-01 10:24:32 -04:00
Pietro Gagliardi ed378d4e0b Cleaned up some easy-to-fix TODOs on Windows, including a LONGTERM that will not be relevant to libui in its current architecture (that'll be handled with a custom build step that converts resources to source code). Next: making resources.rc truly shared-only to reduce the noise further. 2019-06-01 10:18:47 -04:00
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 a93f5c8f53 Split the strsafe strncpy() into its own header file and simplified its usage a bit. 2019-05-31 22:34:34 -04:00
Pietro Gagliardi 7d0f8403ab Fixed build errors on other platforms. This is a headache and a half :D I should split the files into strsafe_vsnprintf and strsafe_strncpy, but I want to share this file as is in one piece for now. 2019-05-31 22:07:51 -04:00
Pietro Gagliardi a17b7c8c14 Fixed build errors and simplified error handling in test/noinitwrongthread.c. Now to test this at runtime on all platforms. 2019-05-31 11:17:11 -04:00
Pietro Gagliardi 644e188e05 And rewrote strncpy(), since strncpy_s() also exists. Now to test the build. 2019-05-31 10:38:47 -04:00
Pietro Gagliardi 664cf26cdc Changed strcpy() to strncpy(). Let's build on Windows! 2019-05-31 02:58:57 -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 b5a109c063 And wrote array_impl.h. No more code duplication in this respect! Now for some more loose ends before we move on to controls. 2019-05-31 00:12:08 -04:00
Pietro Gagliardi dca2e5f038 Wrote array_header.h. Now for array_impl.h. 2019-05-30 23:47:07 -04:00
Pietro Gagliardi 2dd68fc47f Formalized the macro magic that actually works into sharedbits/{start,end}.h. Now to do arrays! 2019-05-30 23:23:02 -04:00
Pietro Gagliardi 6493faf529 Ah, figured it out. Now to separate these out into a separate header file. 2019-05-30 23:17:50 -04:00
Pietro Gagliardi 3c6cc53a0a Okay something is definitely not right. 2019-05-30 23:14:30 -04:00
Pietro Gagliardi 0f4602ee0f Moved the allocation functions to sharedbits/. Not fully working yet... 2019-05-30 23:11:08 -04:00
Pietro Gagliardi dc8620f9a8 Okay, no more ints that need to be changed. Started splitting out the common allocation and array code into a separate sharedbits/ folder. 2019-05-30 22:46:22 -04:00
Pietro Gagliardi c090dacc4a Switched the test code to use bool wherever appropriate. Will try to do this for the rest of libui, and then I'll deduplicate the allocation and array code. 2019-05-30 22:09:45 -04:00