mirror of
https://github.com/Ed94/metadesk.git
synced 2026-06-20 19:04:59 -07:00
draft of base.c
This commit is contained in:
+8
-7
@@ -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" );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user