]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - sys.h
physics: fix and refactor unsticking
[xonotic/darkplaces.git] / sys.h
diff --git a/sys.h b/sys.h
index 1b076a697f6fdb3ef4673111e533b4594394b664..a5c6b275b2e08d9d2c5e2d45251d4c8a1e3d5e11 100644 (file)
--- 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_SDL_Shutdown(void);
-void Sys_Quit (int returnvalue);
 
 /*! 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,6 +239,7 @@ 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
@@ -246,7 +250,7 @@ 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
@@ -257,5 +261,7 @@ void Sys_InitProcessNice (void);
 void Sys_MakeProcessNice (void);
 void Sys_MakeProcessMean (void);
 
+int Sys_Main(int argc, char *argv[]);
+
 #endif