diff --git a/3rdparty/.editorconfig b/3rdparty/.editorconfig index 0555dfa..b419896 100644 --- a/3rdparty/.editorconfig +++ b/3rdparty/.editorconfig @@ -3,3 +3,4 @@ root = true [ini/*] indent_style = space indent_size = 4 +trim_trailing_whitespace = true diff --git a/3rdparty/ini/ini.h b/3rdparty/ini/ini.h index 6851ecb..394c196 100644 --- a/3rdparty/ini/ini.h +++ b/3rdparty/ini/ini.h @@ -166,7 +166,7 @@ to substitute them for your own. Here's an example: #define INI_IMPLEMENTATION #define INI_MEMCPY( dst, src, cnt ) ( my_memcpy_func( dst, src, cnt ) ) #define INI_STRLEN( s ) ( my_strlen_func( s ) ) - #define INI_STRICMP( s1, s2 ) ( my_stricmp_func( s1, s2 ) ) + #define INI_STRNICMP( s1, s2, cnt ) ( my_strnicmp_func( s1, s2, cnt ) ) #include "ini.h" If no custom function is defined, ini.h will default to the C runtime library equivalent. @@ -414,13 +414,13 @@ the length is determined automatically, but in this case `value` has to be zero- #define INI_STRLEN( s ) ( strlen( s ) ) #endif -#ifndef INI_STRICMP +#ifndef INI_STRNICMP #ifdef _WIN32 #include - #define INI_STRICMP( s1, s2 ) ( stricmp( s1, s2 ) ) + #define INI_STRNICMP( s1, s2, cnt ) ( strnicmp( s1, s2, cnt ) ) #else #include - #define INI_STRICMP( s1, s2 ) ( strcasecmp( s1, s2 ) ) + #define INI_STRNICMP( s1, s2, cnt ) ( strncasecmp( s1, s2, cnt ) ) #endif #endif @@ -738,7 +738,7 @@ int ini_find_section( ini_t const* ini, char const* name, int name_length ) { char const* const other = ini->sections[ i ].name_large ? ini->sections[ i ].name_large : ini->sections[ i ].name; - if( (int) INI_STRLEN( other ) == name_length && INI_STRICMP( name, other, name_length) == 0 ) + if( (int) INI_STRLEN( other ) == name_length && INI_STRNICMP( name, other, name_length ) == 0 ) return i; } } @@ -762,7 +762,7 @@ int ini_find_property( ini_t const* ini, int section, char const* name, int name { char const* const other = ini->properties[ i ].name_large ? ini->properties[ i ].name_large : ini->properties[ i ].name; - if( (int) INI_STRLEN( other ) == name_length && INI_STRICMP( name, other, name_length) == 0 ) + if( (int) INI_STRLEN( other ) == name_length && INI_STRNICMP( name, other, name_length ) == 0 ) return c; ++c; } diff --git a/src/allocator.cpp b/src/allocator.cpp index 79c22d2..e3b5b37 100644 --- a/src/allocator.cpp +++ b/src/allocator.cpp @@ -3,6 +3,7 @@ * License: https://github.com/bkaradzic/bx#license-bsd-2-clause */ +#include "bx_p.h" #include #include diff --git a/src/bx.cpp b/src/bx.cpp index 8a063c5..ae9743e 100644 --- a/src/bx.cpp +++ b/src/bx.cpp @@ -3,6 +3,7 @@ * License: https://github.com/bkaradzic/bx#license-bsd-2-clause */ +#include "bx_p.h" #include #include diff --git a/src/commandline.cpp b/src/commandline.cpp index 2d12fbb..de65826 100644 --- a/src/commandline.cpp +++ b/src/commandline.cpp @@ -3,6 +3,7 @@ * License: https://github.com/bkaradzic/bx#license-bsd-2-clause */ +#include "bx_p.h" #include #include diff --git a/src/crtnone.cpp b/src/crtnone.cpp index 877dcd8..8502821 100644 --- a/src/crtnone.cpp +++ b/src/crtnone.cpp @@ -3,6 +3,7 @@ * License: https://github.com/bkaradzic/bx#license-bsd-2-clause */ +#include "bx_p.h" #include #include #include diff --git a/src/debug.cpp b/src/debug.cpp index 889a16c..d08fc99 100644 --- a/src/debug.cpp +++ b/src/debug.cpp @@ -3,6 +3,7 @@ * License: https://github.com/bkaradzic/bx#license-bsd-2-clause */ +#include "bx_p.h" #include #include // isPrint #include // WriterI diff --git a/src/dtoa.cpp b/src/dtoa.cpp index 48f3d5c..a09fa5b 100644 --- a/src/dtoa.cpp +++ b/src/dtoa.cpp @@ -3,6 +3,7 @@ * License: https://github.com/bkaradzic/bx#license-bsd-2-clause */ +#include "bx_p.h" #include #include #include diff --git a/src/easing.cpp b/src/easing.cpp index 2c37025..8ecb2d5 100644 --- a/src/easing.cpp +++ b/src/easing.cpp @@ -3,6 +3,7 @@ * License: https://github.com/bkaradzic/bx#license-bsd-2-clause */ +#include "bx_p.h" #include namespace bx diff --git a/src/file.cpp b/src/file.cpp index 234e983..fd01997 100644 --- a/src/file.cpp +++ b/src/file.cpp @@ -3,6 +3,7 @@ * License: https://github.com/bkaradzic/bx#license-bsd-2-clause */ +#include "bx_p.h" #include #include diff --git a/src/filepath.cpp b/src/filepath.cpp index 5d6ab21..3a49118 100644 --- a/src/filepath.cpp +++ b/src/filepath.cpp @@ -3,6 +3,7 @@ * License: https://github.com/bkaradzic/bx#license-bsd-2-clause */ +#include "bx_p.h" #include #include #include diff --git a/src/hash.cpp b/src/hash.cpp index ba7fcf2..4335443 100644 --- a/src/hash.cpp +++ b/src/hash.cpp @@ -3,6 +3,7 @@ * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause */ +#include "bx_p.h" #include namespace bx diff --git a/src/math.cpp b/src/math.cpp index b437d31..8327570 100644 --- a/src/math.cpp +++ b/src/math.cpp @@ -3,7 +3,9 @@ * License: https://github.com/bkaradzic/bx#license-bsd-2-clause */ +#include "bx_p.h" #include + #include namespace bx diff --git a/src/mutex.cpp b/src/mutex.cpp index 4d8fdff..74e3c14 100644 --- a/src/mutex.cpp +++ b/src/mutex.cpp @@ -3,6 +3,7 @@ * License: https://github.com/bkaradzic/bx#license-bsd-2-clause */ +#include "bx_p.h" #include #if BX_CONFIG_SUPPORTS_THREADING diff --git a/src/os.cpp b/src/os.cpp index 162a586..e416afa 100644 --- a/src/os.cpp +++ b/src/os.cpp @@ -3,6 +3,7 @@ * License: https://github.com/bkaradzic/bx#license-bsd-2-clause */ +#include "bx_p.h" #include #include #include diff --git a/src/process.cpp b/src/process.cpp index 358907f..b748260 100644 --- a/src/process.cpp +++ b/src/process.cpp @@ -3,6 +3,7 @@ * License: https://github.com/bkaradzic/bx#license-bsd-2-clause */ +#include "bx_p.h" #include #include diff --git a/src/settings.cpp b/src/settings.cpp index 206fa6b..6d946f0 100644 --- a/src/settings.cpp +++ b/src/settings.cpp @@ -3,6 +3,7 @@ * License: https://github.com/bkaradzic/bx#license-bsd-2-clause */ +#include "bx_p.h" #include namespace diff --git a/src/sort.cpp b/src/sort.cpp index 3b7485f..3dc1069 100644 --- a/src/sort.cpp +++ b/src/sort.cpp @@ -3,6 +3,7 @@ * License: https://github.com/bkaradzic/bx#license-bsd-2-clause */ +#include "bx_p.h" #include namespace bx diff --git a/src/string.cpp b/src/string.cpp index ccfc019..617cece 100644 --- a/src/string.cpp +++ b/src/string.cpp @@ -3,6 +3,7 @@ * License: https://github.com/bkaradzic/bx#license-bsd-2-clause */ +#include "bx_p.h" #include #include #include diff --git a/src/thread.cpp b/src/thread.cpp index c5d875f..2850418 100644 --- a/src/thread.cpp +++ b/src/thread.cpp @@ -3,6 +3,7 @@ * License: https://github.com/bkaradzic/bx#license-bsd-2-clause */ +#include "bx_p.h" #include #if BX_PLATFORM_ANDROID \ diff --git a/src/timer.cpp b/src/timer.cpp index a615827..ad3bb1c 100644 --- a/src/timer.cpp +++ b/src/timer.cpp @@ -3,6 +3,7 @@ * License: https://github.com/bkaradzic/bx#license-bsd-2-clause */ +#include "bx_p.h" #include #if BX_PLATFORM_ANDROID diff --git a/src/url.cpp b/src/url.cpp index 3f01333..1dda391 100644 --- a/src/url.cpp +++ b/src/url.cpp @@ -3,6 +3,7 @@ * License: https://github.com/bkaradzic/bnet#license-bsd-2-clause */ +#include "bx_p.h" #include namespace bx