I wasn't happy with existing implementation of the IO, so I decided
to change it - as a result there is no longer BH_IOOpen and BH_IOClose
and many IO operations are now optional (behind BH_IOCtl).
Finnally implemented buffered IO and fixed size memory buffer IO.
Recently got a MacBook Pro and decided to check how things build on
MacOS. Discovered that POSIX unnamed semaphores weren't implemented, so
I reimplemented them with conditional variable and mutex.
Additionally, fixed scripts and CMake on MacOS
Refactored strings functions to make them use supplied string
instead of allocating new ones.
Additionally, split String/Int.c into several files to avoid define
mess that was present before.
Added tests for string to/from integers and added documentation.
While adding tests caught few bugs and shortcomings (now everything
works as expected)
Finally, fixed bugs in bigint implementation as well as switched to
32/64 bit integer implementation (gained 2x speed up in some cases).
Additionally, I decided to split Float.c into Float.c and BInt.h for
better readability.
Finally added StringToDouble function (should work for the majority of
the cases). Additionally fixed bug in StringFromDouble related to
incorrect rounding and added asserts (should add more asserts in the
following commits).
Also implemented some optimizations from Burger and Dybvig paper.
Added initial implementation (or wrapper) of the threading library.
It's rather basic, but should work for most of the tasks.
Unfortunately, spinlock implementation relies on GCC/Clang compiler
built-ins (or in-worst-case-scenario on Win32 - InterlockExchange).
In the future, I should revisit this code and fix/reimplement some stuff
(or add support for Windows XP).
Added some basic geometric primitives such as planes, rays, segments
and lines (plus some extra functions like xProject, xBarycentric, Lerpf),
as well as some intersection tests between them.
Additionally, I split massive math test into smaller ones and tweaked
unit test library (testing no longer stops after first failure).
After a while I felt that putting underscores between words was not the
best solution, so I changed the underscores to capital letters.
Fixed consistency bug between POSIX/Win32 platform in BH_FileOpen.
Removed definitions for math types (vector, matrix, etc.) due to
potential aliasing issues.