Skip to content
Myr

Merge branch 'working'

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Sean Barrett · committed by Sean Barrett · parents f9ab452, 2d412f0 · Browse files · 16 files+255 added−19 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

16 files+255 added−19 removed

  • tests:+13 added−1 removed
  • other:+242 added−18 removed

16 files+255 added−19 removed

added:docs/git_how.txt+11 added
1git checkout working2-- do work3git add ...4git commit56to upload:78git checkout master9git pull ; usually unnecessary10git merge working11git push
modified:tests/image_test.c+1 added-1 removed
10 unmodified lines
11 unsigned char *data = stbi_load(argv[1], &w, &h, 0, 4);12 if (data)13 stbi_write_png("c:/x/result.png", w, h, 4, data, w*4);14 return 0;15}15}
modified:tests/stb.dsw+12 added
13 unmodified lines
14}}}1516###############################################################################1718Project: "make_readme"=..\tools\make_readme\make_readme.dsp - Package Owner=<4>1920Package=<5>21{{{22}}}2324Package=<4>25{{{26}}}2728###############################################################################2930Project: "stb"=.\stb.dsp - Package Owner=<4>3132Package=<5>33{{{
35 unmodified lines
added:tools/make_readme.c+45 added
1#define STB_DEFINE2#include "../stb.h"34int main(int argc, char **argv)5{6 int i;7 int hlen, flen, listlen;8 char *header = stb_file("README.header.md", &hlen);9 char *footer = stb_file("README.footer.md", &flen);10 char **list = stb_stringfile("README.list", &listlen);1112 FILE *f = fopen("../README.md", "wb");13 fwrite(header, 1, hlen, f);1415 for (i=0; i < listlen; ++i) {16 int num,j;17 char **tokens = stb_tokens_stripwhite(list[i], "|", &num);18 FILE *g = fopen(stb_sprintf("../%s", tokens[0]), "rb");19 char buffer[256], *s1, *s2;20 fread(buffer, 1, 256, g);21 fclose(g);22 buffer[255] = 0;23 s1 = strchr(buffer, '-');24 if (!s1) stb_fatal("Couldn't find '-' before version number in %s", tokens[0]);25 s2 = strchr(s1+2, '-');26 if (!s2) stb_fatal("Couldn't find '-' after version number in %s", tokens[0]);27 *s2 = 0;28 s1 += 1;29 s1 = stb_trimwhite(s1);30 if (*s1 == 'v') ++s1;31 fprintf(f, "**%s** | %s", tokens[0], s1);32 s1 = stb_trimwhite(tokens[1]);33 s2 = stb_dupreplace(s1, " ", "&nbsp;");34 fprintf(f, " | %s", s2);35 free(s2);36 for (j=2; j < num; ++j)37 fprintf(f, " | %s", tokens[j]);38 fprintf(f, "\n");39 }4041 fwrite(footer, 1, flen, f);42 fclose(f);4344 return 0;45}
added:tools/make_readme.dsp+88 added
1# Microsoft Developer Studio Project File - Name="make_readme" - Package Owner=<4>2# Microsoft Developer Studio Generated Build File, Format Version 6.003# ** DO NOT EDIT **45# TARGTYPE "Win32 (x86) Console Application" 0x010367CFG=make_readme - Win32 Debug8!MESSAGE This is not a valid makefile. To build this project using NMAKE,9!MESSAGE use the Export Makefile command and run10!MESSAGE 11!MESSAGE NMAKE /f "make_readme.mak".12!MESSAGE 13!MESSAGE You can specify a configuration when running NMAKE14!MESSAGE by defining the macro CFG on the command line. For example:15!MESSAGE 16!MESSAGE NMAKE /f "make_readme.mak" CFG="make_readme - Win32 Debug"17!MESSAGE 18!MESSAGE Possible choices for configuration are:19!MESSAGE 20!MESSAGE "make_readme - Win32 Release" (based on "Win32 (x86) Console Application")21!MESSAGE "make_readme - Win32 Debug" (based on "Win32 (x86) Console Application")22!MESSAGE 2324# Begin Project25# PROP AllowPerConfigDependencies 026# PROP Scc_ProjName ""27# PROP Scc_LocalPath ""28CPP=cl.exe29RSC=rc.exe3031!IF "$(CFG)" == "make_readme - Win32 Release"3233# PROP BASE Use_MFC 034# PROP BASE Use_Debug_Libraries 035# PROP BASE Output_Dir "Release"36# PROP BASE Intermediate_Dir "Release"37# PROP BASE Target_Dir ""38# PROP Use_MFC 039# PROP Use_Debug_Libraries 040# PROP Output_Dir "Release"41# PROP Intermediate_Dir "Release"42# PROP Target_Dir ""43# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c44# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c45# ADD BASE RSC /l 0x409 /d "NDEBUG"46# ADD RSC /l 0x409 /d "NDEBUG"47BSC32=bscmake.exe48# ADD BASE BSC32 /nologo49# ADD BSC32 /nologo50LINK32=link.exe51# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I38652# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I3865354!ELSEIF "$(CFG)" == "make_readme - Win32 Debug"5556# PROP BASE Use_MFC 057# PROP BASE Use_Debug_Libraries 158# PROP BASE Output_Dir "Debug"59# PROP BASE Intermediate_Dir "Debug"60# PROP BASE Target_Dir ""61# PROP Use_MFC 062# PROP Use_Debug_Libraries 163# PROP Output_Dir "Debug"64# PROP Intermediate_Dir "Debug"65# PROP Target_Dir ""66# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c67# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c68# ADD BASE RSC /l 0x409 /d "_DEBUG"69# ADD RSC /l 0x409 /d "_DEBUG"70BSC32=bscmake.exe71# ADD BASE BSC32 /nologo72# ADD BSC32 /nologo73LINK32=link.exe74# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept75# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept7677!ENDIF 7879# Begin Target8081# Name "make_readme - Win32 Release"82# Name "make_readme - Win32 Debug"83# Begin Source File8485SOURCE=.\make_readme.c86# End Source File87# End Target88# End Project
added:tools/mr.bat+1 added
1debug\make_readme
added:tools/README.footer.md+65 added
added:tools/README.header.md+7 added
added:tools/README.list+10 added
1stb_vorbis.c | audio | decode ogg vorbis files from file/memory to float/16-bit signed output2stb_image.c | graphics | image loading/decoding from file/memory: JPG, PNG, TGA, BMP, PSD, GIF, HDR, PIC3stb_truetype.h | graphics | parse, decode, and rasterize characters from truetype fonts4stb_image_write.h | graphics | image writing to disk: PNG, TGA, BMP5stb_textedit.h | UI | guts of a text editor for games etc implementing them from scratch6stb_dxt.h | 3D graphics | Fabian "ryg" Giesen's real-time DXT compressor7stb_perlin.h | 3D graphics | revised Perlin noise (3D input, 1D output)8stb_c_lexer.h | parsing | simplify writing parsers for C-like languages9stb_divide.h | math | more useful 32-bit modulus e.g. "euclidean divide"10stb.h | misc | helper functions for C, mostly redundant in C++; basically author's personal stuff
modified:README.md+9 added-9 removed
3 unmodified lines
4single-file public domain libraries for C/C++56library | lastest version | category | description7--------------------- | ---- | -------- | --------------------------------8**stb_vorbis.c** | 1.0 | audio | decode ogg vorbis files from file/memory to float/16-bit signed output9**stb_image.c** | 1.35 | graphics | image loading/decoding from file/memory: JPG, PNG, TGA, BMP, PSD, GIF, HDR, PIC10**stb_truetype.h** | 0.8 | graphics | parse, decode, and rasterize characters from truetype fonts8**stb_vorbis.c** | 1.0 | audio | decode ogg vorbis files from file/memory to float/16-bit signed output9**stb_image.c** | 1.35 | graphics | image loading/decoding from file/memory: JPG, PNG, TGA, BMP, PSD, GIF, HDR, PIC10**stb_truetype.h** | 0.8 | graphics | parse, decode, and rasterize characters from truetype fonts11**stb_image_write.h** | 0.93 | graphics | image writing to disk: PNG, TGA, BMP12**stb_textedit.h** | 1.2 | UI | guts of a text editor for games etc implementing them from scratch13**stb_dxt.h** | 1.04 | 3D&nbsp;graphics | Fabian "ryg" Giesen's real-time DXT compressor14**stb_perlin.h** | 0.2 | 3D&nbsp;graphics | revised Perlin noise (3D input, 1D output)15**stb_c_lexer.h** | 0.04 | parsing | simplify writing parsers for C-like languages16**stb_divide.h** | 0.91 | math | more useful 32-bit modulus e.g. "euclidean divide"17**stb.h** | 2.23 | misc | helper functions for C, mostly redundant in C++; basically author's personal stuff12**stb_textedit.h** | 1.2 | UI | guts of a text editor for games etc implementing them from scratch13**stb_dxt.h** | 1.04 | 3D&nbsp;graphics | Fabian "ryg" Giesen's real-time DXT compressor14**stb_perlin.h** | 0.2 | 3D&nbsp;graphics | revised Perlin noise (3D input, 1D output)15**stb_c_lexer.h** | 0.04 | parsing | simplify writing parsers for C-like languages16**stb_divide.h** | 0.91 | math | more useful 32-bit modulus e.g. "euclidean divide"17**stb.h** | 2.23 | misc | helper functions for C, mostly redundant in C++; basically author's personal stuff1819FAQ20---21
61 unmodified lines
modified:stb_c_lexer.h+1 added-1 removed
1// stb_c_lexer.h 0.04 -- public domain Sean Barrett 20131// stb_c_lexer.h - v0.04 - public domain Sean Barrett 20132// lexer for making little C-like languages with recursive-descent parsers3//4// This file provides both the interface and the implementation.5// To instantiate the implementation,
801 unmodified lines
modified:stb_image_write.h+1 added-1 removed
1/* stbiw-0.93 - public domain - http://nothings.org/stb/stb_image_write.h1/* stb_image_write - v0.93 - public domain - http://nothings.org/stb/stb_image_write.h2 writes out PNG/BMP/TGA images to C stdio - Sean Barrett 20103 no warranty implied; use at your own risk45
508 unmodified lines
modified:stb_image.c+1 added-1 removed
1/* stbi-1.35 - public domain JPEG/PNG reader - http://nothings.org/stb_image.c1/* stb_image - v1.35 - public domain JPEG/PNG reader - http://nothings.org/stb_image.c2 when you control the images you're loading3 no warranty implied; use at your own risk45 QUICK NOTES:
4673 unmodified lines
modified:stb_perlin.h+1 added-1 removed
1// stb_perlin.h -- perlin noise -- v0.21// stb_perlin.h - v0.2 - perlin noise2// public domain single-file C implementation by Sean Barrett3//4// to create the implementation,5// #define STB_PERLIN_IMPLEMENTATION
170 unmodified lines
modified:stb_vorbis.c+1 added-1 removed
1// Ogg Vorbis audio decoder -- public domain -- version 1.01// Ogg Vorbis audio decoder - v1.0 - public domain2// http://nothings.org/stb_vorbis/3//4// Written by Sean Barrett in 2007, last updated in 20145// Sponsored by RAD Game Tools.
5437 unmodified lines
modified:stb.h+1 added-4 removed
1/* stb-2.23 - Sean's Tool Box -- public domain -- http://nothings.org/stb.h1/* stb.h - v2.23 - Sean's Tool Box -- public domain -- http://nothings.org/stb.h2 no warranty is offered or implied; use this code at your own risk34 This is a single header file with a bunch of useful utilities5 for getting stuff done in C/C++.67 Email bug reports, feature requests, etc. to 'sean' at the same site.897 Documentation: http://nothings.org/stb/stb_h.html8 Unit tests: http://nothings.org/stb/stb.c910
14069 unmodified lines