Fix whitespace, add asserts, add string to double function, fix bugs

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.
This commit is contained in:
2025-03-24 22:38:11 +03:00
parent 82bea0ebf8
commit b943135d71
4 changed files with 435 additions and 102 deletions

View File

@@ -12,7 +12,7 @@ void BH_StringFree(char *string)
char *BH_StringCopy(const char *string)
{
char *result;
result = malloc(strlen(string) + 1);
if (result)
strcpy(result, string);