From 5e4a0617b72fd4db2e1fc4d5c2d8b483d948d573 Mon Sep 17 00:00:00 2001 From: Sean Barrett Date: Sun, 2 Feb 2020 11:12:13 -0800 Subject: [PATCH] udpate version numbers --- stb.h | 1 + stb_divide.h | 3 ++- stb_ds.h | 2 +- stb_dxt.h | 5 +++-- stb_easy_font.h | 3 ++- stb_image.h | 11 ++++++++--- stb_image_resize.h | 1 + stb_image_write.h | 5 ++++- stb_include.h | 2 +- stb_leakcheck.h | 4 ++-- stb_perlin.h | 2 +- stb_sprintf.h | 2 +- stb_truetype.h | 3 ++- 13 files changed, 29 insertions(+), 15 deletions(-) diff --git a/stb.h b/stb.h index 03211e6..943b1ca 100644 --- a/stb.h +++ b/stb.h @@ -23,6 +23,7 @@ Version History + 2.36 various fixes 2.35 fix clang-cl issues with swprintf 2.34 fix warnings 2.33 more fixes to random numbers diff --git a/stb_divide.h b/stb_divide.h index 6662629..ec44904 100644 --- a/stb_divide.h +++ b/stb_divide.h @@ -1,8 +1,9 @@ -// stb_divide.h - v0.92 - public domain - Sean Barrett, Feb 2010 +// stb_divide.h - v0.93 - public domain - Sean Barrett, Feb 2010 // Three kinds of divide/modulus of signed integers. // // HISTORY // +// v0.93 2020-02-02 Write useful exit() value from main() // v0.92 2019-02-25 Fix warning // v0.91 2010-02-27 Fix euclidean division by INT_MIN for non-truncating C // Check result with 64-bit math to catch such cases diff --git a/stb_ds.h b/stb_ds.h index 043e72b..14f7823 100644 --- a/stb_ds.h +++ b/stb_ds.h @@ -1,4 +1,4 @@ -/* stb_ds.h - v0.62b - public domain data structures - Sean Barrett 2019 +/* stb_ds.h - v0.63 - public domain data structures - Sean Barrett 2019 This is a single-header-file library that provides easy-to-use dynamic arrays and hash tables for C (also works in C++). diff --git a/stb_dxt.h b/stb_dxt.h index 7361b06..a84b0a9 100644 --- a/stb_dxt.h +++ b/stb_dxt.h @@ -1,4 +1,4 @@ -// stb_dxt.h - v1.08b - DXT1/DXT5 compressor - public domain +// stb_dxt.h - v1.09 - DXT1/DXT5 compressor - public domain // original by fabian "ryg" giesen - ported to C by stb // use '#define STB_DXT_IMPLEMENTATION' before including to create the implementation // @@ -10,7 +10,8 @@ // You can turn on dithering and "high quality" using mode. // // version history: -// v1.08 - (sbt) fix bug in dxt-with-alpha block +// v1.09 - (stb) update documentation re: surprising alpha channel requirement +// v1.08 - (stb) fix bug in dxt-with-alpha block // v1.07 - (stb) bc4; allow not using libc; add STB_DXT_STATIC // v1.06 - (stb) fix to known-broken 1.05 // v1.05 - (stb) support bc5/3dc (Arvids Kokins), use extern "C" in C++ (Pavel Krajcevski) diff --git a/stb_easy_font.h b/stb_easy_font.h index 49ba7a4..ff4808d 100644 --- a/stb_easy_font.h +++ b/stb_easy_font.h @@ -1,4 +1,4 @@ -// stb_easy_font.h - v1.0 - bitmap font for 3D rendering - public domain +// stb_easy_font.h - v1.1 - bitmap font for 3D rendering - public domain // Sean Barrett, Feb 2015 // // Easy-to-deploy, @@ -71,6 +71,7 @@ // // VERSION HISTORY // +// (2020-02-02) 1.1 make everything static so can compile it in more than one src file // (2017-01-15) 1.0 space character takes same space as numbers; fix bad spacing of 'f' // (2016-01-22) 0.7 width() supports multiline text; add height() // (2015-09-13) 0.6 #include ; updated license diff --git a/stb_image.h b/stb_image.h index 3365bf5..e8a89c1 100644 --- a/stb_image.h +++ b/stb_image.h @@ -48,6 +48,7 @@ LICENSE RECENT REVISION HISTORY: + 2.24 (2020-02-02) fix warnings; thread-local failure_reason and flip_vertically 2.23 (2019-08-11) fix clang static analysis warning 2.22 (2019-03-04) gif fixes, fix warnings 2.21 (2019-02-25) fix typo in comment @@ -436,7 +437,7 @@ STBIDEF int stbi_is_hdr_from_file(FILE *f); // get a VERY brief reason for failure -// NOT THREADSAFE +// on most compilers (and ALL modern mainstream compilers) this is threadsafe STBIDEF const char *stbi_failure_reason (void); // free the loaded image -- this is just free() @@ -468,9 +469,13 @@ STBIDEF void stbi_convert_iphone_png_to_rgb(int flag_true_if_should_convert); // flip the image vertically, so the first pixel in the output array is the bottom left STBIDEF void stbi_set_flip_vertically_on_load(int flag_true_if_should_flip); + // as above, but only applies to images loaded on the thread that calls the function -// this function is only available if your compiler supports thread-local variables +// this function is only available if your compiler supports thread-local variables; +// calling it will fail to link if your compiler doesn't +#if __cplusplus >= 201103L || __STDC_VERSION_ >= 201112L || defined(__GNUC__) || defined(_MSC_VER) STBIDEF void stbi_set_flip_vertically_on_load_thread(int flag_true_if_should_flip); +#endif // ZLIB client - used by PNG, available for other purposes @@ -575,7 +580,7 @@ STBIDEF int stbi_zlib_decode_noheader_buffer(char *obuffer, int olen, const ch #define STBI_THREAD_LOCAL _Thread_local #elif defined(__GNUC__) #define STBI_THREAD_LOCAL __thread - #elif _MSC_VER + #elif defined(_MSC_VER) #define STBI_THREAD_LOCAL __declspec(thread) #endif #endif diff --git a/stb_image_resize.h b/stb_image_resize.h index 9ee90b5..6b7b0c1 100644 --- a/stb_image_resize.h +++ b/stb_image_resize.h @@ -159,6 +159,7 @@ Nathan Reed: warning fixes REVISIONS + 0.97 (2020-02-02) fixed warning 0.96 (2019-03-04) fixed warnings 0.95 (2017-07-23) fixed warnings 0.94 (2017-03-18) fixed warnings diff --git a/stb_image_write.h b/stb_image_write.h index aef2a77..532d18c 100644 --- a/stb_image_write.h +++ b/stb_image_write.h @@ -1,4 +1,4 @@ -/* stb_image_write - v1.13 - public domain - http://nothings.org/stb +/* stb_image_write - v1.14 - public domain - http://nothings.org/stb writes out PNG/BMP/TGA/JPEG/HDR images to C stdio - Sean Barrett 2010-2015 no warranty implied; use at your own risk @@ -1574,6 +1574,9 @@ STBIWDEF int stbi_write_jpg(char const *filename, int x, int y, int comp, const #endif // STB_IMAGE_WRITE_IMPLEMENTATION /* Revision history + 1.14 (2020-02-02) updated JPEG writer to downsample chroma channels + 1.13 + 1.12 1.11 (2019-08-11) 1.10 (2019-02-07) diff --git a/stb_include.h b/stb_include.h index 0d6f64b..273d48f 100644 --- a/stb_include.h +++ b/stb_include.h @@ -1,4 +1,4 @@ -// stb_include.h - v0.01 - parse and process #include directives - public domain +// stb_include.h - v0.02 - parse and process #include directives - public domain // // To build this, in one source file that includes this file do // #define STB_INCLUDE_IMPLEMENTATION diff --git a/stb_leakcheck.h b/stb_leakcheck.h index 1f2aa73..36f853d 100644 --- a/stb_leakcheck.h +++ b/stb_leakcheck.h @@ -1,4 +1,4 @@ -// stb_leakcheck.h - v0.5 - quick & dirty malloc leak-checking - public domain +// stb_leakcheck.h - v0.6 - quick & dirty malloc leak-checking - public domain // LICENSE // // See end of file. @@ -134,7 +134,7 @@ void stb_leakcheck_dumpmem(void) } #endif // STB_LEAKCHECK_IMPLEMENTATION -#ifndef INCLUDE_STB_LEAKCHECK_H +#if !defined(INCLUDE_STB_LEAKCHECK_H) || !defined(malloc) #define INCLUDE_STB_LEAKCHECK_H #include // we want to define the macros *after* stdlib to avoid a slew of errors diff --git a/stb_perlin.h b/stb_perlin.h index 0fbb47f..9fad41e 100644 --- a/stb_perlin.h +++ b/stb_perlin.h @@ -1,4 +1,4 @@ -// stb_perlin.h - v0.4 - perlin noise +// stb_perlin.h - v0.5 - perlin noise // public domain single-file C implementation by Sean Barrett // // LICENSE diff --git a/stb_sprintf.h b/stb_sprintf.h index 467d1bc..630d851 100644 --- a/stb_sprintf.h +++ b/stb_sprintf.h @@ -1,4 +1,4 @@ -// stb_sprintf - v1.06 - public domain snprintf() implementation +// stb_sprintf - v1.07 - public domain snprintf() implementation // originally by Jeff Roberts / RAD Game Tools, 2015/10/20 // http://github.com/nothings/stb // diff --git a/stb_truetype.h b/stb_truetype.h index ab0a427..b1cbbff 100644 --- a/stb_truetype.h +++ b/stb_truetype.h @@ -1,4 +1,4 @@ -// stb_truetype.h - v1.22 - public domain +// stb_truetype.h - v1.23 - public domain // authored from 2009-2019 by Sean Barrett / RAD Game Tools // // This library processes TrueType files: @@ -50,6 +50,7 @@ // // VERSION HISTORY // +// 1.23 (2020-02-02) query SVG data for glyphs; query whole kerning table // 1.22 (2019-08-11) minimize missing-glyph duplication; fix kerning if both 'GPOS' and 'kern' are defined // 1.21 (2019-02-25) fix warning // 1.20 (2019-02-07) PackFontRange skips missing codepoints; GetScaleFontVMetrics()