From aa1041bae807d58894b2fa95947d2c01dd591d17 Mon Sep 17 00:00:00 2001 From: Sean Barrett Date: Sun, 17 Apr 2016 09:16:54 -0700 Subject: [PATCH 1/6] stbcc 0.94 --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 6c5bfd6..c40af5d 100644 --- a/README.md +++ b/README.md @@ -23,12 +23,12 @@ library | lastest version | category | LoC | description **stb_herringbone_wa...** | 0.6 | game dev | 1220 | herringbone Wang tile map generator **stb_c_lexer.h** | 0.07 | parsing | 816 | simplify writing parsers for C-like languages **stb_divide.h** | 0.91 | math | 379 | more useful 32-bit modulus e.g. "euclidean divide" -**stb_connected_comp...** | 0.93 | misc | 936 | incrementally compute reachability on grids +**stb_connected_comp...** | 0.94 | misc | 1000 | incrementally compute reachability on grids **stb.h** | 2.27 | misc | 14185 | helper functions for C, mostly redundant in C++; basically author's personal stuff **stb_leakcheck.h** | 0.2 | misc | 124 | quick-and-dirty malloc/free leak-checking Total libraries: 19 -Total lines of C code: 47750 +Total lines of C code: 47814 FAQ From 376774cb354ced932c10e23705544dbd9d2d88bf Mon Sep 17 00:00:00 2001 From: Thomas Versteeg Date: Tue, 19 Apr 2016 13:24:18 +0200 Subject: [PATCH 2/6] Add @vurtin his nuklear library to other_libs --- docs/other_libs.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/other_libs.md b/docs/other_libs.md index 27c5130..40f5c43 100644 --- a/docs/other_libs.md +++ b/docs/other_libs.md @@ -125,7 +125,8 @@ tests | [pempek_assert.cpp](https://github.com/gpakosz/Assert) tests | [minctest](https://github.com/codeplea/minctest) | zlib | C |**1**| unit testing tests | [greatest](https://github.com/silentbicycle/greatest) | iSC | C |**1**| unit testing tests | [µnit](https://github.com/nemequ/munit) | MIT | C |**1**| unit testing -user interface | [dear imgui](https://github.com/ocornut/imgui) | MIT | C++*| 9 | an immediate-mode GUI formerly named "ImGui"; [3rd-party C wrapper](https://github.com/Extrawurst/cimgui) +user interface | [dear imgui](https://github.com/ocornut/imgui) | MIT | C++*| 9 | an immediate-mode GUI formerly named "ImGui"; [3rd-party C wrapper](https://github.com/Extrawurst/cimgui) +user interface | [nuklear](https://github.com/vurtun/nuklear) | **public domain** | C |**1**| minimal GUI toolkit _misc_ | [MakeID.h](http://www.humus.name/3D/MakeID.h) | **public domain** | C++ |**1**| allocate/deallocate small integer IDs efficiently _misc_ | [loguru](https://github.com/emilk/loguru) | **public domain** | C++ |**1**| flexible logging _misc_ | [tinyformat](https://github.com/c42f/tinyformat) | Boost | C++ |**1**| typesafe printf From 72e10c7e210799ea96d684256445ad687ea50839 Mon Sep 17 00:00:00 2001 From: Thomas Versteeg Date: Tue, 19 Apr 2016 16:01:10 +0200 Subject: [PATCH 3/6] Fix the nuklear library in other_libs.md Change the usable language from C to C/C++ --- docs/other_libs.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/other_libs.md b/docs/other_libs.md index 40f5c43..fcb87fb 100644 --- a/docs/other_libs.md +++ b/docs/other_libs.md @@ -126,7 +126,7 @@ tests | [minctest](https://github.com/codeplea/minctest) tests | [greatest](https://github.com/silentbicycle/greatest) | iSC | C |**1**| unit testing tests | [µnit](https://github.com/nemequ/munit) | MIT | C |**1**| unit testing user interface | [dear imgui](https://github.com/ocornut/imgui) | MIT | C++*| 9 | an immediate-mode GUI formerly named "ImGui"; [3rd-party C wrapper](https://github.com/Extrawurst/cimgui) -user interface | [nuklear](https://github.com/vurtun/nuklear) | **public domain** | C |**1**| minimal GUI toolkit +user interface | [nuklear](https://github.com/vurtun/nuklear) | **public domain** |C/c++|**1**| minimal GUI toolkit _misc_ | [MakeID.h](http://www.humus.name/3D/MakeID.h) | **public domain** | C++ |**1**| allocate/deallocate small integer IDs efficiently _misc_ | [loguru](https://github.com/emilk/loguru) | **public domain** | C++ |**1**| flexible logging _misc_ | [tinyformat](https://github.com/c42f/tinyformat) | Boost | C++ |**1**| typesafe printf From 25b476af56be1e11a5af059e963ca29cb19a0fad Mon Sep 17 00:00:00 2001 From: Sean Barrett Date: Tue, 19 Apr 2016 07:58:48 -0700 Subject: [PATCH 4/6] Update other_libs.md --- docs/other_libs.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/other_libs.md b/docs/other_libs.md index fcb87fb..2fe0432 100644 --- a/docs/other_libs.md +++ b/docs/other_libs.md @@ -125,8 +125,8 @@ tests | [pempek_assert.cpp](https://github.com/gpakosz/Assert) tests | [minctest](https://github.com/codeplea/minctest) | zlib | C |**1**| unit testing tests | [greatest](https://github.com/silentbicycle/greatest) | iSC | C |**1**| unit testing tests | [µnit](https://github.com/nemequ/munit) | MIT | C |**1**| unit testing -user interface | [dear imgui](https://github.com/ocornut/imgui) | MIT | C++*| 9 | an immediate-mode GUI formerly named "ImGui"; [3rd-party C wrapper](https://github.com/Extrawurst/cimgui) -user interface | [nuklear](https://github.com/vurtun/nuklear) | **public domain** |C/c++|**1**| minimal GUI toolkit +user interface | [dear imgui](https://github.com/ocornut/imgui) | MIT | C++ | 9 | an immediate-mode GUI formerly named "ImGui"; [3rd-party C wrapper](https://github.com/Extrawurst/cimgui) +user interface | [nuklear](https://github.com/vurtun/nuklear) | **public domain** |C/C++|**1**| minimal GUI toolkit _misc_ | [MakeID.h](http://www.humus.name/3D/MakeID.h) | **public domain** | C++ |**1**| allocate/deallocate small integer IDs efficiently _misc_ | [loguru](https://github.com/emilk/loguru) | **public domain** | C++ |**1**| flexible logging _misc_ | [tinyformat](https://github.com/c42f/tinyformat) | Boost | C++ |**1**| typesafe printf From e2505ba00c5c0bb1b4c39174052cb78c6202dac8 Mon Sep 17 00:00:00 2001 From: Sean Barrett Date: Tue, 19 Apr 2016 09:32:23 -0700 Subject: [PATCH 5/6] Update other_libs.md --- docs/other_libs.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/other_libs.md b/docs/other_libs.md index 2fe0432..701e810 100644 --- a/docs/other_libs.md +++ b/docs/other_libs.md @@ -93,6 +93,7 @@ math | [ShaderFastLibs](https://github.com/michaldrobot/ShaderFast math | [TinyExpr](https://github.com/codeplea/tinyexpr) | zlib | C | 2 | evaluation of math expressions from strings math | [linalg.h](https://github.com/sgorsten/linalg) | **unlicense** | C++ |**1**| vector/matrix/quaternion math math | [PoissonGenerator.h](https://github.com/corporateshark/poisson-disk-generator) | MIT | C++ |**1**| Poisson disk points generator (disk or rect) +math | [prns.h](http://marc-b-reynolds.github.io/shf/2016/04/19/prns.html) | **public domain** |C/C++|**1**| seekable pseudo-random number sequences multithreading | [mm_sched.h](https://github.com/vurtun/mmx) | zlib |C/C++|**1**| cross-platform multithreaded task scheduler network |**[zed_net](https://github.com/ZedZull/zed_net)** | **public domain** |C/C++|**1**| cross-platform socket wrapper network | [mm_web.h](https://github.com/vurtun/mmx) | BSD |C/C++|**1**| lightweight webserver, fork of webby From f710c23bf7f6b6482e555405f72403a3c3c03167 Mon Sep 17 00:00:00 2001 From: Hansi Raber Date: Fri, 29 Apr 2016 04:45:55 +0200 Subject: [PATCH 6/6] stb_textedit/stb_text_locate_coord: fix cursor position in the "shouldn't happen, but if it does, fall through to end-of-line case" case (`i=0` causes problems with the return values in this case) --- stb_textedit.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/stb_textedit.h b/stb_textedit.h index 29af484..5a617ea 100644 --- a/stb_textedit.h +++ b/stb_textedit.h @@ -417,10 +417,9 @@ static int stb_text_locate_coord(STB_TEXTEDIT_STRING *str, float x, float y) // check if it's before the end of the line if (x < r.x1) { // search characters in row for one that straddles 'x' - k = i; prev_x = r.x0; - for (i=0; i < r.num_chars; ++i) { - float w = STB_TEXTEDIT_GETWIDTH(str, k, i); + for (k=0; k < r.num_chars; ++k) { + float w = STB_TEXTEDIT_GETWIDTH(str, i, k); if (x < prev_x+w) { if (x < prev_x+w/2) return k+i;