Go to the documentation of this file.
24 #define PACK_ATTRIB __attribute__ ((packed))
27 #define PACK_PREFIX __pragma(pack(push, 1))
28 #define PACK_SUFFIX __pragma(pack(pop))
37 #define CTRE_ASSERT(cond) do{}while(0)
38#elif defined(WIN32) || defined(_WIN32) || defined(_WIN64)
43 #define CTRE_ASSERT(cond) assert(cond)
46 #define CTRE_ASSERT(cond) do{}while(0)
49 #define CTRE_ASSERT(cond) do{}while(0)
56#if defined(WIN32) || defined(_WIN32) || defined(_WIN64)
57 #define CTRE_IMPLEMENT_SHUTDOWN_HANDLER(shutdown_handler) \
58 static void shutdown_handler(); \
59 BOOL WINAPI CTRE_Global_ConsoleHandlerRoutine(DWORD dwCtrlType) { \
60 if (dwCtrlType == CTRL_CLOSE_EVENT) { shutdown_handler(); } \
63 static void shutdown_handler()
66 #define CTRE_REGISTER_SHUTDOWN_HANDLER(shutdown_handler) \
67 do{ (void)SetConsoleCtrlHandler(CTRE_Global_ConsoleHandlerRoutine, TRUE); } while(0)
71 #define CTRE_IMPLEMENT_SHUTDOWN_HANDLER(shutdown_handler) static void shutdown_handler(int signo)
72 #define CTRE_REGISTER_SHUTDOWN_HANDLER(shutdown_handler)