rename all stb_sprintf identifiers to follow stb conventions

This commit is contained in:
Sean Barrett 2016-12-05 03:48:37 -08:00
parent fd23d7097d
commit c9fe5bac48
6 changed files with 338 additions and 303 deletions

1
stb.h
View File

@ -730,6 +730,7 @@ STB_EXTERN int stb_snprintf(char *s, size_t n, const char *fmt, ...);
STB_EXTERN int stb_vsnprintf(char *s, size_t n, const char *fmt, va_list v);
#ifdef STB_DEFINE
int stb_vsnprintf(char *s, size_t n, const char *fmt, va_list v)
{
int res;

File diff suppressed because it is too large Load Diff

View File

@ -143,6 +143,8 @@ void end_timer(void)
printf("%6.4lf ms: %s\n", tm * 1000, message);
}
extern void quicktest(void);
int loc[5000][2];
int main(int argc, char **argv)
{
@ -152,6 +154,7 @@ int main(int argc, char **argv)
uint8 *map = stbi_load("data/map_03.png", &w, &h, 0, 1);
assert(map);
quicktest();
for (j=0; j < h; ++j)
for (i=0; i < w; ++i)

View File

@ -154,6 +154,10 @@ SOURCE=..\stb_rect_pack.h
# End Source File
# Begin Source File
SOURCE=..\stb_sprintf.h
# End Source File
# Begin Source File
SOURCE=..\stb_textedit.h
# End Source File
# Begin Source File

View File

@ -1,3 +1,7 @@
#include "stb_sprintf.h"
#define STB_SPRINTF_IMPLEMENTATION
#include "stb_sprintf.h"
#define STB_PERLIN_IMPLEMENTATION
#define STB_IMAGE_WRITE_IMPLEMENTATION
#define STB_DXT_IMPLEMENATION
@ -28,3 +32,11 @@
#define STBTE_DRAW_TILE(x,y,id,highlight,data) 0
#define STB_TILEMAP_EDITOR_IMPLEMENTATION
#include "stb_tilemap_editor.h"
int quicktest(void)
{
char buffer[999];
stbsp_sprintf(buffer, "test%%test");
return 0;
}

View File

@ -1,3 +1,7 @@
#include "stb_sprintf.h"
#define STB_SPRINTF_IMPLEMENTATION
#include "stb_sprintf.h"
#define STB_TRUETYPE_IMPLEMENTATION
#define STB_PERLIN_IMPLEMENTATION
#define STB_IMAGE_WRITE_IMPLEMENTATION