mirror of
https://github.com/Ed94/gencpp.git
synced 2024-11-10 02:54:53 -08:00
Ed_
050b00f28a
Adding the pragma once and includes the files broke compilation, still diagnosing why. - Some string functions were moved to the cpp, still need to do some more evaluation of it and the containers... - Added support for forceinline and neverinline to parsing (untested) - Added support for specifiers in operator cast such as explicit, inline/forceinline/neverinline, etc. - Before it only support const. - Still need to support volatile. - Forceinline was not supported at all for tokenization, fixed that.
45 lines
696 B
C++
45 lines
696 B
C++
#pragma once
|
|
#include "src_start.cpp"
|
|
|
|
#pragma region Debug
|
|
|
|
void assert_handler( char const* condition, char const* file, s32 line, char const* msg, ... )
|
|
{
|
|
_printf_err( "%s:(%d): Assert Failure: ", file, line );
|
|
|
|
if ( condition )
|
|
_printf_err( "`%s` \n", condition );
|
|
|
|
if ( msg )
|
|
{
|
|
va_list va;
|
|
va_start( va, msg );
|
|
_printf_err_va( msg, va );
|
|
va_end( va );
|
|
}
|
|
|
|
_printf_err( "%s", "\n" );
|
|
}
|
|
|
|
s32 assert_crash( char const* condition )
|
|
{
|
|
GEN_PANIC( condition );
|
|
return 0;
|
|
}
|
|
|
|
#if defined( GEN_SYSTEM_WINDOWS )
|
|
void process_exit( u32 code )
|
|
{
|
|
ExitProcess( code );
|
|
}
|
|
#else
|
|
# include <stdlib.h>
|
|
|
|
void process_exit( u32 code )
|
|
{
|
|
exit( code );
|
|
}
|
|
#endif
|
|
|
|
#pragma endregion Debug
|