X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=sys.h;h=2f21159f1e3cf6c14427e6b95195c67b9fd233a6;hb=b134a4aeee8f2cabaef8f6bea8c23393b3159d49;hp=82134615407092afe3705719e486ace42952f4dd;hpb=bfbabeee8f8ae8c5f35a147be7ab6ca31960b0e8;p=xonotic%2Fdarkplaces.git diff --git a/sys.h b/sys.h index 82134615..2f21159f 100644 --- a/sys.h +++ b/sys.h @@ -204,16 +204,19 @@ char *Sys_TimeString(const char *timeformat); // system IO interface (these are the sys functions that need to be implemented in a new driver atm) // -/// an error will cause the entire program to exit +/// Causes the entire program to exit ASAP. +/// Trailing \n should be omitted. void Sys_Error (const char *error, ...) DP_FUNC_PRINTF(1) DP_FUNC_NORETURN; /// (may) output text to terminal which launched program -void Sys_Print(const char *text); +/// is POSIX async-signal-safe +/// textlen excludes any (optional) \0 terminator +void Sys_Print(const char *text, size_t textlen); +/// used to report failures inside Con_Printf() void Sys_Printf(const char *fmt, ...); /// INFO: This is only called by Host_Shutdown so we dont need testing for recursion -void Sys_Shutdown (void); -void Sys_Quit (int returnvalue); +void Sys_SDL_Shutdown(void); /*! on some build/platform combinations (such as Linux gcc with the -pg * profiling option) this can turn on/off profiling, used primarily to limit @@ -236,16 +239,18 @@ double Sys_DirtyTime(void); void Sys_ProvideSelfFD (void); +/// Reads a line from POSIX stdin or the Windows console char *Sys_ConsoleInput (void); /// called to yield for a little bit so as not to hog cpu when paused or debugging double Sys_Sleep(double time); +void Sys_SDL_Dialog(const char *title, const char *string); void Sys_SDL_Init(void); /// Perform Key_Event () callbacks until the input que is empty void Sys_SDL_HandleEvents(void); -char *Sys_GetClipboardData (void); +char *Sys_SDL_GetClipboardData (void); extern qbool sys_supportsdlgetticks; unsigned int Sys_SDL_GetTicks (void); // wrapper to call SDL_GetTicks