Browse Source

Merge branch 'master' of github.com:bkaradzic/bx

Branimir Karadžić 8 years ago
parent
commit
34eadd2f21
22 changed files with 28 additions and 6 deletions
  1. 1 0
      3rdparty/.editorconfig
  2. 6 6
      3rdparty/ini/ini.h
  3. 1 0
      src/allocator.cpp
  4. 1 0
      src/bx.cpp
  5. 1 0
      src/commandline.cpp
  6. 1 0
      src/crtnone.cpp
  7. 1 0
      src/debug.cpp
  8. 1 0
      src/dtoa.cpp
  9. 1 0
      src/easing.cpp
  10. 1 0
      src/file.cpp
  11. 1 0
      src/filepath.cpp
  12. 1 0
      src/hash.cpp
  13. 2 0
      src/math.cpp
  14. 1 0
      src/mutex.cpp
  15. 1 0
      src/os.cpp
  16. 1 0
      src/process.cpp
  17. 1 0
      src/settings.cpp
  18. 1 0
      src/sort.cpp
  19. 1 0
      src/string.cpp
  20. 1 0
      src/thread.cpp
  21. 1 0
      src/timer.cpp
  22. 1 0
      src/url.cpp

+ 1 - 0
3rdparty/.editorconfig

@@ -3,3 +3,4 @@ root = true
 [ini/*]
 indent_style = space
 indent_size  = 4
+trim_trailing_whitespace = true

+ 6 - 6
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 <string.h>
-        #define INI_STRICMP( s1, s2 ) ( stricmp( s1, s2 ) )
+        #define INI_STRNICMP( s1, s2, cnt ) ( strnicmp( s1, s2, cnt ) )
     #else
         #include <string.h>
-        #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;
                 }

+ 1 - 0
src/allocator.cpp

@@ -3,6 +3,7 @@
  * License: https://github.com/bkaradzic/bx#license-bsd-2-clause
  */
 
+#include "bx_p.h"
 #include <bx/allocator.h>
 
 #include <malloc.h>

+ 1 - 0
src/bx.cpp

@@ -3,6 +3,7 @@
  * License: https://github.com/bkaradzic/bx#license-bsd-2-clause
  */
 
+#include "bx_p.h"
 #include <bx/debug.h>
 #include <bx/readerwriter.h>
 

+ 1 - 0
src/commandline.cpp

@@ -3,6 +3,7 @@
  * License: https://github.com/bkaradzic/bx#license-bsd-2-clause
  */
 
+#include "bx_p.h"
 #include <bx/commandline.h>
 #include <bx/string.h>
 

+ 1 - 0
src/crtnone.cpp

@@ -3,6 +3,7 @@
  * License: https://github.com/bkaradzic/bx#license-bsd-2-clause
  */
 
+#include "bx_p.h"
 #include <bx/debug.h>
 #include <bx/sort.h>
 #include <bx/readerwriter.h>

+ 1 - 0
src/debug.cpp

@@ -3,6 +3,7 @@
  * License: https://github.com/bkaradzic/bx#license-bsd-2-clause
  */
 
+#include "bx_p.h"
 #include <bx/debug.h>
 #include <bx/string.h>       // isPrint
 #include <bx/readerwriter.h> // WriterI

+ 1 - 0
src/dtoa.cpp

@@ -3,6 +3,7 @@
  * License: https://github.com/bkaradzic/bx#license-bsd-2-clause
  */
 
+#include "bx_p.h"
 #include <bx/cpu.h>
 #include <bx/math.h>
 #include <bx/string.h>

+ 1 - 0
src/easing.cpp

@@ -3,6 +3,7 @@
  * License: https://github.com/bkaradzic/bx#license-bsd-2-clause
  */
 
+#include "bx_p.h"
 #include <bx/easing.h>
 
 namespace bx

+ 1 - 0
src/file.cpp

@@ -3,6 +3,7 @@
  * License: https://github.com/bkaradzic/bx#license-bsd-2-clause
  */
 
+#include "bx_p.h"
 #include <bx/file.h>
 
 #include <stdio.h>

+ 1 - 0
src/filepath.cpp

@@ -3,6 +3,7 @@
  * License: https://github.com/bkaradzic/bx#license-bsd-2-clause
  */
 
+#include "bx_p.h"
 #include <bx/file.h>
 #include <bx/os.h>
 #include <bx/readerwriter.h>

+ 1 - 0
src/hash.cpp

@@ -3,6 +3,7 @@
  * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause
  */
 
+#include "bx_p.h"
 #include <bx/hash.h>
 
 namespace bx

+ 2 - 0
src/math.cpp

@@ -3,7 +3,9 @@
  * License: https://github.com/bkaradzic/bx#license-bsd-2-clause
  */
 
+#include "bx_p.h"
 #include <bx/math.h>
+
 #include <math.h>
 
 namespace bx

+ 1 - 0
src/mutex.cpp

@@ -3,6 +3,7 @@
  * License: https://github.com/bkaradzic/bx#license-bsd-2-clause
  */
 
+#include "bx_p.h"
 #include <bx/mutex.h>
 
 #if BX_CONFIG_SUPPORTS_THREADING

+ 1 - 0
src/os.cpp

@@ -3,6 +3,7 @@
  * License: https://github.com/bkaradzic/bx#license-bsd-2-clause
  */
 
+#include "bx_p.h"
 #include <bx/string.h>
 #include <bx/os.h>
 #include <bx/uint32_t.h>

+ 1 - 0
src/process.cpp

@@ -3,6 +3,7 @@
  * License: https://github.com/bkaradzic/bx#license-bsd-2-clause
  */
 
+#include "bx_p.h"
 #include <bx/process.h>
 
 #include <stdio.h>

+ 1 - 0
src/settings.cpp

@@ -3,6 +3,7 @@
  * License: https://github.com/bkaradzic/bx#license-bsd-2-clause
  */
 
+#include "bx_p.h"
 #include <bx/settings.h>
 
 namespace

+ 1 - 0
src/sort.cpp

@@ -3,6 +3,7 @@
  * License: https://github.com/bkaradzic/bx#license-bsd-2-clause
  */
 
+#include "bx_p.h"
 #include <bx/sort.h>
 
 namespace bx

+ 1 - 0
src/string.cpp

@@ -3,6 +3,7 @@
  * License: https://github.com/bkaradzic/bx#license-bsd-2-clause
  */
 
+#include "bx_p.h"
 #include <bx/allocator.h>
 #include <bx/hash.h>
 #include <bx/readerwriter.h>

+ 1 - 0
src/thread.cpp

@@ -3,6 +3,7 @@
  * License: https://github.com/bkaradzic/bx#license-bsd-2-clause
  */
 
+#include "bx_p.h"
 #include <bx/thread.h>
 
 #if    BX_PLATFORM_ANDROID \

+ 1 - 0
src/timer.cpp

@@ -3,6 +3,7 @@
  * License: https://github.com/bkaradzic/bx#license-bsd-2-clause
  */
 
+#include "bx_p.h"
 #include <bx/timer.h>
 
 #if BX_PLATFORM_ANDROID

+ 1 - 0
src/url.cpp

@@ -3,6 +3,7 @@
  * License: https://github.com/bkaradzic/bnet#license-bsd-2-clause
  */
 
+#include "bx_p.h"
 #include <bx/url.h>
 
 namespace bx