Commit Graph

21 Commits

Author SHA1 Message Date
d0230c3b30 Fix and simplify CMakeLists.txt 2025-07-30 18:39:51 +03:00
92fab9dbba Add color manipulation utilities 2025-07-25 10:41:15 +03:00
fc774fd0ff Refactor, separate docs from headers, add ru docs
Doxygen kind'a sucks and I need multilanguage documentation, so I did
that. Also, separated massive Math.h file into smaller files.
2025-06-21 20:12:15 +03:00
1b6c858a1b Refactor IO, add buffered IO
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.
2025-04-26 10:42:22 +03:00
48ddd91dd4 Fix MacOS and POSIX semaphores related issues
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
2025-04-25 22:38:33 +03:00
6aee5a83aa Refactor string functions, add unicode support
Refactored existing functions. Added Unicode support and UTF-8, UTF-16,
and UTF-32 encoding/decoding.
2025-04-05 13:56:00 +03:00
f9ebeabb18 Refactor strings (avoid using dynamically allocated memory)
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.
2025-04-05 13:56:00 +03:00
82bea0ebf8 Refactor bigints, add int and float conv functions
Added functions to convert from/to ints/floats. Floats are converted
according to basic Steele&White algorithm (without speedup).
2025-04-05 13:56:00 +03:00
0683389d7b Improved build system and POSIX compatibility
Fixed few bugs related to build system and POSIX compatabilty.
2025-04-05 13:55:06 +03:00
83a4e723bf Fix build error on Linux/POSIX 2025-03-03 17:43:13 +03:00
d403d41f2c Add initial implementation of threads/mutexes/semaphores/cvs/spinlocks
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).
2025-03-02 23:18:23 +03:00
a2d0913c79 Add utils for working with endianness, more documentation, refactor CMake
Decided to update the docs, as well as adding few new features and small
refactoring.
2025-02-28 21:44:22 +03:00
93033ebc99 Remove main.c, rename variable in CMakeLists.txt 2025-02-28 10:28:17 +03:00
e1c62d4f6b Move platform-dependent code into it's own directory 2025-02-28 10:13:51 +03:00
b0fbfcd69e Split Math.c into smaller files
Friend said that Math.c was too big and complicated.
2025-02-28 10:08:05 +03:00
37feb762cb Add argument parsing
Added (IMHO) relatively simple argument parsing function (as well as helper
function for printing help information).
2025-02-28 09:09:58 +03:00
c34a24c2a4 Fix naming in CMakeLists.txt 2025-02-03 10:56:40 +03:00
586a9ace21 Change file naming
This is a follow-up to previous commit.
2025-02-02 21:40:31 +03:00
8d73a9b473 Fix asan profile, add script for running tests
Linking against static asan library was a mistake. Now this should
work better for other compilers. Also added script for running all tests
under different profiles.
2025-01-29 22:41:39 +03:00
6ede63e18f Add Asan profile, fix multiple bugs.
Added Asan profile to help catch and fix various bugs (and indeed, there
were few of them).

Additionally, fixed bhunit macro to process arguments only once.
2025-01-29 09:19:34 +03:00
453843f51a Initial commit 2025-01-18 17:24:36 +03:00