mirror of
https://github.com/Ed94/metadesk.git
synced 2026-08-07 08:08:48 +00:00
forgot about stb_sprintf.h...
This commit is contained in:
+3
-5
@@ -134,11 +134,9 @@ if ($code_sanity)
|
|||||||
$linker_args = @()
|
$linker_args = @()
|
||||||
$linker_args += $flag_link_win_subsystem_console
|
$linker_args += $flag_link_win_subsystem_console
|
||||||
|
|
||||||
$path_base = join-path $path_code base
|
$includes = @( $path_code, $path_root )
|
||||||
|
$unit = join-path $path_tests 'code_sanity.c'
|
||||||
$includes = @( $path_base )
|
$executable = join-path $path_build 'code_sanity.exe'
|
||||||
$unit = join-path $path_code 'metadesk.c'
|
|
||||||
$executable = join-path $path_build 'metadesk.lib'
|
|
||||||
|
|
||||||
$result = build-simple $path_build $includes $compiler_args $linker_args $unit $executable
|
$result = build-simple $path_build $includes $compiler_args $linker_args $unit $executable
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,8 +9,16 @@
|
|||||||
# define BUILD_DEBUG 1
|
# define BUILD_DEBUG 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if ! defined(BUILD_SUPPLEMENTARY_UNIT)
|
#if ! defined(BUILD_STATIC)
|
||||||
# define BUILD_SUPPLEMENTARY_UNIT 0
|
# 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
|
#endif
|
||||||
|
|
||||||
#if !defined(BUILD_ENTRY_DEFINING_UNIT)
|
#if !defined(BUILD_ENTRY_DEFINING_UNIT)
|
||||||
|
|||||||
+4
-4
@@ -5,8 +5,8 @@
|
|||||||
|
|
||||||
#ifndef MD_API
|
#ifndef MD_API
|
||||||
#if COMPILER_MSVC
|
#if COMPILER_MSVC
|
||||||
# ifdef MD_DYN_LINK
|
# if BUILD_DYANMIC
|
||||||
# ifdef MD_DYN_EXPORT
|
# if BUILD_API_EXPORT
|
||||||
# define MD_API __declspec(dllexport)
|
# define MD_API __declspec(dllexport)
|
||||||
# else
|
# else
|
||||||
# define MD_API __declspec(dllimport)
|
# define MD_API __declspec(dllimport)
|
||||||
@@ -15,7 +15,7 @@
|
|||||||
# define MD_API // Empty for static builds
|
# define MD_API // Empty for static builds
|
||||||
# endif
|
# endif
|
||||||
#else
|
#else
|
||||||
# ifdef MD_DYN_LINK
|
# ifdef BUILD_DYANMIC
|
||||||
# define MD_API __attribute__((visibility("default")))
|
# define MD_API __attribute__((visibility("default")))
|
||||||
# else
|
# else
|
||||||
# define MD_API // Empty for static builds
|
# define MD_API // Empty for static builds
|
||||||
@@ -36,7 +36,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef global // Global variables
|
#ifndef global // Global variables
|
||||||
# if defined(MD_DYN_EXPORT) || defined(MD_STATIC_LINK)
|
# if BUILD_API_EXPORT || BUILD_STATIC
|
||||||
# define global
|
# define global
|
||||||
# else
|
# else
|
||||||
# define global static
|
# define global static
|
||||||
|
|||||||
@@ -48,8 +48,6 @@ struct Log
|
|||||||
////////////////////////////////
|
////////////////////////////////
|
||||||
//~ rjf: Log Creation/Selection
|
//~ rjf: Log Creation/Selection
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Log* log_alloc(AllocatorInfo ainfo, U64 arena_block_size);
|
Log* log_alloc(AllocatorInfo ainfo, U64 arena_block_size);
|
||||||
void log_release(Log* log);
|
void log_release(Log* log);
|
||||||
MD_API void log_select (Log* log);
|
MD_API void log_select (Log* log);
|
||||||
|
|||||||
+3
-5
@@ -6,13 +6,11 @@
|
|||||||
# include "thread_context.h"
|
# include "thread_context.h"
|
||||||
////////////////////////////////
|
////////////////////////////////
|
||||||
//~ rjf: Third Party Includes
|
//~ rjf: Third Party Includes
|
||||||
#if !BUILD_SUPPLEMENTARY_UNIT
|
|
||||||
# define STB_SPRINTF_IMPLEMENTATION
|
# define STB_SPRINTF_IMPLEMENTATION
|
||||||
# define STB_SPRINTF_STATIC
|
# if BUILD_STATIC
|
||||||
# include "third_party/stb/stb_sprintf.h"
|
# #define STB_SPRINTF_STATIC
|
||||||
// Note(Ed): We should inject when generating the library segmented or singleheader
|
|
||||||
# endif
|
# endif
|
||||||
|
# include "third_party/stb/stb_sprintf.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Copyright (c) 2024 Epic Games Tools
|
// Copyright (c) 2024 Epic Games Tools
|
||||||
|
|||||||
@@ -15,7 +15,6 @@
|
|||||||
//~ rjf: Third Party Includes
|
//~ rjf: Third Party Includes
|
||||||
# define STB_SPRINTF_DECORATE(name) md_##name
|
# define STB_SPRINTF_DECORATE(name) md_##name
|
||||||
# include "third_party/stb/stb_sprintf.h"
|
# 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
|
// Copyright (c) 2024 Epic Games Tools
|
||||||
|
|||||||
@@ -227,6 +227,9 @@ struct ParseResult
|
|||||||
typedef struct Context Context;
|
typedef struct Context Context;
|
||||||
struct 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
|
// 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
|
// Otherwise it will just reserve its own Arena backed by chained virutal address space
|
||||||
AllocatorInfo backing[2];
|
AllocatorInfo backing[2];
|
||||||
|
|||||||
@@ -5,6 +5,12 @@
|
|||||||
|
|
||||||
#include "base/platform.c"
|
#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
|
MD_NS_BEGIN
|
||||||
|
|
||||||
#include "base/debug.c"
|
#include "base/debug.c"
|
||||||
|
|||||||
@@ -10,6 +10,9 @@
|
|||||||
#include "base/profiling.h"
|
#include "base/profiling.h"
|
||||||
#include "base/namespace.h"
|
#include "base/namespace.h"
|
||||||
|
|
||||||
|
#define STB_SPRINTF_DECORATE(name) md_##name
|
||||||
|
#include "third_party/stb/stb_sprintf.h"
|
||||||
|
|
||||||
MD_NS_BEGIN
|
MD_NS_BEGIN
|
||||||
|
|
||||||
#include "base/base_types.h"
|
#include "base/base_types.h"
|
||||||
|
|||||||
@@ -4,5 +4,10 @@
|
|||||||
|
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
|
Context ctx;
|
||||||
|
init(& ctx);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
deinit(& ctx);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user