core_log, todos

This commit is contained in:
krzosa
2024-12-29 13:36:41 +01:00
parent 11450a445d
commit bfdd384f90
5 changed files with 15 additions and 5 deletions

View File

@@ -32,6 +32,6 @@
#define STB_SPRINTF_IMPLEMENTATION #define STB_SPRINTF_IMPLEMENTATION
#include "stb_sprintf.h" #include "stb_sprintf.h"
#include "core_string.c" #include "core_string.c"
#include "log.c" #include "core_log.c"
#include "core_lexer.c" #include "core_lexer.c"
#include "core_type_info.c" #include "core_type_info.c"

View File

@@ -9,4 +9,5 @@
#include "core_lexer.h" #include "core_lexer.h"
#include "core_math.h" #include "core_math.h"
#include "core_intrin.h" #include "core_intrin.h"
#include "core_type_info.h" #include "core_type_info.h"
#include "core_log.h"

View File

@@ -230,6 +230,3 @@ typedef double f64;
} while (0) } while (0)
#define DLLS_REMOVE(first, node) DLLS_REMOVE_MOD(first, node, next, prev) #define DLLS_REMOVE(first, node) DLLS_REMOVE_MOD(first, node, next, prev)
void debugf(const char *string, ...);
void panicf(const char *string, ...);

12
src/core/core_log.h Normal file
View File

@@ -0,0 +1,12 @@
/*
** [ ] investigate: how to design api! (minimal platform code)
** [ ] ryan and allen do some kind of log data structure, is that worth anything?
** [ ] how programming languages do it?
** [ ] probably want to log stuff without it being in my face all the time
** [ ] want to warn user without quiting with option of silencing
** (use case: lexing error but don't care)
** [ ] wasm doesn't handle console logging without new line XD
*/
void debugf(const char *string, ...);
void debugexf(const char *string, ...);
void panicf(const char *string, ...);