Sync changes from upstream repository

This commit is contained in:
Bozo the Builder
2024-06-17 02:22:39 -07:00
parent 6dce0c19e7
commit a14564cf09
27 changed files with 233 additions and 54 deletions

View File

@@ -82,8 +82,8 @@ int ON_String::ScanBufferVargs(
va_list args
)
{
#if defined(ON_COMPILER_CLANG) || defined(ON_RUNTIME_LINUX)
#if defined(ON_RUNTIME_ANDROID) || defined(ON_RUNTIME_LINUX)
#if defined(ON_COMPILER_CLANG) || defined(ON_RUNTIME_LINUX) || defined(ON_RUNTIME_WASM)
#if defined(ON_RUNTIME_ANDROID) || defined(ON_RUNTIME_LINUX) || defined(ON_RUNTIME_WASM)
if (nullptr == buffer || nullptr == format)
return -1;
return vsscanf(buffer, format, args);
@@ -156,7 +156,7 @@ int ON_wString::ScanBufferVargs(
if (nullptr == args)
return -1;
return swscanf_l(buffer, _c_locale, format, args);
#elif defined(ON_RUNTIME_ANDROID) || defined(ON_RUNTIME_LINUX)
#elif defined(ON_RUNTIME_ANDROID) || defined(ON_RUNTIME_LINUX) || defined(ON_RUNTIME_WASM)
return swscanf(buffer, format, args);
#else
return swscanf(buffer, format, args);
@@ -395,8 +395,8 @@ const char* ON_String::ToNumber(
local_buffer[local_buffer_count++] = 0;
double x = value_on_failure;
#if defined(ON_COMPILER_CLANG) || defined(ON_RUNTIME_LINUX)
#if defined(ON_RUNTIME_ANDROID) || defined(ON_RUNTIME_LINUX)
#if defined(ON_COMPILER_CLANG) || defined(ON_RUNTIME_LINUX) || defined(ON_RUNTIME_WASM)
#if defined(ON_RUNTIME_ANDROID) || defined(ON_RUNTIME_LINUX) || defined(ON_RUNTIME_WASM)
if (1 == sscanf(local_buffer, "%lg", &x))
{
*value = x;
@@ -657,8 +657,8 @@ const wchar_t* ON_wString::ToNumber(
local_buffer[local_buffer_count++] = 0;
double x = value_on_failure;
#if defined(ON_COMPILER_CLANG) || defined(ON_RUNTIME_LINUX)
#if defined(ON_RUNTIME_ANDROID) || defined(ON_RUNTIME_LINUX)
#if defined(ON_COMPILER_CLANG) || defined(ON_RUNTIME_LINUX) || defined(ON_RUNTIME_WASM)
#if defined(ON_RUNTIME_ANDROID) || defined(ON_RUNTIME_LINUX) || defined(ON_RUNTIME_WASM)
if (1 == sscanf(local_buffer, "%lg", &x))
{
*value = x;