draft of base.c

This commit is contained in:
2025-02-08 20:02:31 -05:00
parent 843cc7fa90
commit ad47dc037f
13 changed files with 119 additions and 168 deletions
+8 -7
View File
@@ -1,25 +1,26 @@
#ifdef INTELLISENSE_DIRECTIVES
# include "strings.h"
# include "debug.h"
# include "platform.c"
#endif
#define md__printf_err( fmt, ... ) fprintf( stderr, fmt, __VA_ARGS__ )
#define md__printf_err_va( fmt, va ) vfprintf( stderr, fmt, va )
void assert_handler( char const* condition, char const* file, char const* function, S32 line, char const* msg, ... )
{
// TODO(Ed): Change this to metadesks's procs
_printf_err( "%s - %s:(%d): Assert Failure: ", file, function, line );
md__printf_err( "%s - %s:(%d): Assert Failure: ", file, function, line );
if ( condition )
// TODO(Ed): Change this to metadesks's procs
_printf_err( "`%s` \n", condition );
md__printf_err( "`%s` \n", condition );
if ( msg )
{
va_list va;
va_start( va, msg );
_printf_err_va( msg, va );
md__printf_err_va( msg, va );
va_end( va );
}
// TODO(Ed): Change this to metadesks's procs
_printf_err( "%s", "\n" );
md__printf_err( "%s", "\n" );
}