Extend User IO, OS_GetDate for linux

This commit is contained in:
Krzosa Karol
2024-01-14 17:18:58 +01:00
parent bad74c2dcd
commit 2eb1bbdfd9
6 changed files with 37 additions and 13 deletions

View File

@@ -31,7 +31,7 @@ typedef enum IO_ErrorResult {
#define IO__PrintfFormat(fmt, va)
#endif
extern void (*IO_User_OutputMessage)(char *str, int len);
extern void (*IO_User_OutputMessage)(int kind, char *file, int line, char *str, int len);
#define IO__STRINGIFY(x) #x
#define IO__TOSTRING(x) IO__STRINGIFY(x)
@@ -74,10 +74,16 @@ extern void (*IO_User_OutputMessage)(char *str, int len);
#define IO_Todo() IO_FatalError("This codepath is not implemented yet")
IO_API bool IO__FatalErrorf(const char *file, int line, const char *msg, ...) IO__PrintfFormat(3, 4);
IO_API void IO_Printf(const char *msg, ...) IO__PrintfFormat(1, 2);
IO_API void IO__Printf(int kind, char *file, int line, const char *msg, ...) IO__PrintfFormat(4, 5);
IO_API bool IO__FatalError(char *msg);
IO_API void IO_Print(char *msg);
IO_API void IO_Print(int kind, char *file, int line, char *msg, int len);
IO_API void IO_OutputMessage(char *str, int len);
IO_API IO_ErrorResult IO_OutputError(char *str, int len);
IO_API void IO_Exit(int error_code);
IO_API bool IO_IsDebuggerPresent(void);
const int IO_KindPrintf = 1;
const int IO_KindWarningf = 2;
#define IO_Printf(...) IO__Printf(IO_KindPrintf, __FILE__, __LINE__, __VA_ARGS__)
#define IO_Warningf(...) IO__Printf(IO_KindWarningf, __FILE__, __LINE__, __VA_ARGS__)