new xj_snprintf and xj_decodef. Code from stb_sprintf was pulled in

This commit is contained in:
cozis
2022-04-28 13:04:41 +02:00
parent 12ffc1a667
commit 8fbdd029d4
6 changed files with 1736 additions and 5 deletions
+1 -3
View File
@@ -297,7 +297,7 @@ void *xj_bpalloc(xj_alloc *alloc, int size)
return addr;
}
static void xj_preport(xj_error *error, const char *src, int off, const char *fmt, ...)
void xj_preport(xj_error *error, const char *src, int off, const char *fmt, ...)
{
if(error != NULL)
{
@@ -341,8 +341,6 @@ static void xj_preport(xj_error *error, const char *src, int off, const char *fm
}
}
#define xj_report(error, fmt, ...) xj_preport(error, NULL, -1, fmt, ## __VA_ARGS__)
// Create an [xj_value] that represents the [null] JSON value.
xj_value *xj_value_null(xj_alloc *alloc, xj_error *error)
{