forgot about stb_sprintf.h...

This commit is contained in:
2025-02-08 23:53:35 -05:00
parent 50c7853b9f
commit d82af845bc
14 changed files with 67 additions and 49 deletions
+10 -2
View File
@@ -9,8 +9,16 @@
# define BUILD_DEBUG 1
#endif
#if ! defined(BUILD_SUPPLEMENTARY_UNIT)
# define BUILD_SUPPLEMENTARY_UNIT 0
#if ! defined(BUILD_STATIC)
# define BUILD_STATIC 0
#endif
#if ! defined(BUILD_DYANMIC)
# define BUILD_DYANMIC 0
#endif
#if ! defined(BUILD_API_EXPORT)
# define BUILD_API_EXPORT 0
#endif
#if !defined(BUILD_ENTRY_DEFINING_UNIT)
+4 -4
View File
@@ -5,8 +5,8 @@
#ifndef MD_API
#if COMPILER_MSVC
# ifdef MD_DYN_LINK
# ifdef MD_DYN_EXPORT
# if BUILD_DYANMIC
# if BUILD_API_EXPORT
# define MD_API __declspec(dllexport)
# else
# define MD_API __declspec(dllimport)
@@ -15,7 +15,7 @@
# define MD_API // Empty for static builds
# endif
#else
# ifdef MD_DYN_LINK
# ifdef BUILD_DYANMIC
# define MD_API __attribute__((visibility("default")))
# else
# define MD_API // Empty for static builds
@@ -36,7 +36,7 @@
#endif
#ifndef global // Global variables
# if defined(MD_DYN_EXPORT) || defined(MD_STATIC_LINK)
# if BUILD_API_EXPORT || BUILD_STATIC
# define global
# else
# define global static
-2
View File
@@ -48,8 +48,6 @@ struct Log
////////////////////////////////
//~ rjf: Log Creation/Selection
Log* log_alloc(AllocatorInfo ainfo, U64 arena_block_size);
void log_release(Log* log);
MD_API void log_select (Log* log);
+3 -5
View File
@@ -6,13 +6,11 @@
# include "thread_context.h"
////////////////////////////////
//~ rjf: Third Party Includes
#if !BUILD_SUPPLEMENTARY_UNIT
# define STB_SPRINTF_IMPLEMENTATION
# define STB_SPRINTF_STATIC
# if BUILD_STATIC
# #define STB_SPRINTF_STATIC
# endif
# include "third_party/stb/stb_sprintf.h"
// Note(Ed): We should inject when generating the library segmented or singleheader
#endif
#endif
// Copyright (c) 2024 Epic Games Tools
-1
View File
@@ -15,7 +15,6 @@
//~ rjf: Third Party Includes
# define STB_SPRINTF_DECORATE(name) md_##name
# include "third_party/stb/stb_sprintf.h"
// Note(Ed): We should inject when generating the library segmented or singleheader
#endif
// Copyright (c) 2024 Epic Games Tools
+3
View File
@@ -227,6 +227,9 @@ struct ParseResult
typedef struct Context Context;
struct Context
{
// Currently, this is only relevant if the user is utilizing this library via bindings
// or they are not utilizing metadesk's hosted `entry_point` runtime
// Note: Only used so far as the first fallback if the user did not preset the thread_context's arenas
// Otherwise it will just reserve its own Arena backed by chained virutal address space
AllocatorInfo backing[2];
+6
View File
@@ -5,6 +5,12 @@
#include "base/platform.c"
#define STB_SPRINTF_IMPLEMENTATION
#if BUILD_STATIC
# #define STB_SPRINTF_STATIC
#endif
#include "third_party/stb/stb_sprintf.h"
MD_NS_BEGIN
#include "base/debug.c"
+3
View File
@@ -10,6 +10,9 @@
#include "base/profiling.h"
#include "base/namespace.h"
#define STB_SPRINTF_DECORATE(name) md_##name
#include "third_party/stb/stb_sprintf.h"
MD_NS_BEGIN
#include "base/base_types.h"
+4 -4
View File
@@ -1267,19 +1267,19 @@ win32_exception_filter(EXCEPTION_POINTERS* exception_ptrs)
const U32 max_frames = 32;
if(idx == max_frames)
{
buflen += wnsprintfW(buffer + buflen, ArrayCount(buffer) - buflen, L"...");
break;
buflen += wnsprintfW(buffer + buflen, ArrayCount(buffer) - buflen, L"...");
break;
}
if(!dbg_StackWalk64(image_type, process, thread, &frame, context, 0, dbg_SymFunctionTableAccess64, dbg_SymGetModuleBase64, 0))
{
break;
break;
}
U64 address = frame.AddrPC.Offset;
if(address == 0)
{
break;
break;
}
if(idx==0)