|
UFO: Alien Invasion
|
System specific stuff. More...


Go to the source code of this file.
Functions | |
| void | Sys_Init (void) |
| void | Sys_NormPath (char *path) |
| void | Sys_Sleep (int milliseconds) |
| const char * | Sys_GetCurrentUser (void) |
| int | Sys_Setenv (const char *name, const char *value) |
| set/unset environment variables (empty value removes it) | |
| void | Sys_InitSignals (void) |
| const char * | Sys_SetLocale (const char *localeID) |
| const char * | Sys_GetLocale (void) |
| const char * | Sys_ConsoleInput (void) |
| void | Sys_ConsoleOutput (const char *string) |
| void | Sys_Error (const char *error,...) __attribute__((noreturn |
| void | format (__printf__, 1, 2))) |
| void | Sys_Quit (void) |
| char * | Sys_GetHomeDirectory (void) |
| Returns the home environment variable (which hold the path of the user's homedir). | |
| void | Sys_ConsoleShutdown (void) |
| void | Sys_ConsoleInit (void) |
| Initialize the console input (tty mode if possible). | |
| void | Sys_ShowConsole (bool show) |
| char * | Sys_FindFirst (const char *path, unsigned musthave, unsigned canthave) |
| Opens the directory and returns the first file that matches our searchrules. | |
| char * | Sys_FindNext (unsigned musthave, unsigned canthave) |
| Returns the next file of the already opened directory (Sys_FindFirst) that matches our search mask. | |
| void | Sys_FindClose (void) |
| void | Sys_ListFilteredFiles (const char *basedir, const char *subdirs, const char *filter, linkedList_t **list) |
| void | Sys_Mkdir (const char *path) |
| void | Sys_Mkfifo (const char *ospath, struct qFILE_s *f) |
| char * | Sys_Cwd (void) |
| void | Sys_SetAffinityAndPriority (void) |
| int | Sys_Milliseconds (void) |
| void | Sys_Backtrace (void) |
| On platforms supporting it, print a backtrace. | |
| void | Sys_Breakpoint (void) |
| void | Sys_OpenURL (const char *url) |
| FILE * | Sys_Fopen (const char *filenamefilename, const char *modemode) |
| int | Sys_Remove (const char *filenamefilename) |
| int | Sys_Rename (const char *oldname, const char *newname) |
| int | Sys_Access (const char *filenamefilename, int modemode) |
System specific stuff.
Definition in file system.h.
| void format | ( | __printf__ | , |
| 1 | , | ||
| 2 | ) |
Definition at line 255 of file unix_files.cpp.
References lengthof, MAX_OSPATH, Sys_Access(), and Sys_Utf8ToUtf16().
Referenced by FS_FileExists(), Sys_Access(), and Sys_SetAffinityAndPriority().
On platforms supporting it, print a backtrace.
Definition at line 102 of file android_system.cpp.
References androidDumpBacktrace(), BUILDSTRING, Com_BreakIntoDebugger(), CPUSTRING, FILE, i, Sys_Backtrace(), Sys_Fopen(), and UFO_VERSION.
Referenced by Com_Error(), Com_SetValue(), Com_ValueToStr(), Sys_Backtrace(), Sys_Error(), and Sys_SetAffinityAndPriority().
Definition at line 84 of file unix_shared.cpp.
References Sys_Breakpoint().
Referenced by Com_BreakIntoDebugger(), Sys_Breakpoint(), and Sys_SetAffinityAndPriority().
Initialize the console input (tty mode if possible).
Definition at line 43 of file android_console.cpp.
References Com_Printf(), CONSOLE_WINDOW_CLASS_NAME, CONSOLE_WINDOW_NAME, CONSOLE_WINDOW_STYLE, sysConsole_t::defInputProc, sysConsole_t::defOutputProc, global_hInstance, sysConsole_t::hBrushInput, sysConsole_t::hBrushMsg, sysConsole_t::hBrushOutput, sysConsole_t::hFont, sysConsole_t::hFontBold, sysConsole_t::hWnd, sysConsole_t::hWndClear, sysConsole_t::hWndCopy, sysConsole_t::hWndInput, sysConsole_t::hWndMsg, sysConsole_t::hWndOutput, sysConsole_t::hWndQuit, MAXCMDLINE, stdinActive, Sys_BacktraceInit(), sys_console, Sys_ConsoleEditProc(), Sys_ConsoleInit(), Sys_ConsoleProc(), Sys_IsATTY(), Sys_ShowConsole(), Sys_TTYConsoleHistoryClear(), Sys_TTYConsoleSigCont(), TTY_eof, TTY_erase, TTY_tc, ttyConsoleActivated, and ttyConsoleHistory.
Referenced by format(), main(), SDL_main(), Sys_ConsoleInit(), Sys_TTYConsoleSigCont(), and WinMain().
| const char * Sys_ConsoleInput | ( | void | ) |
Definition at line 47 of file android_console.cpp.
References consoleHistory_t::buffer, sysConsole_t::cmdBuffer, Com_ConsoleCompleteCommand(), CON_FlushIn(), consoleHistory_t::cursor, len, MAXCMDLINE, Q_strncpyz(), stdinActive, sys_console, Sys_ConsoleInput(), Sys_ConsoleLoop(), Sys_ShowConsole(), Sys_TTYConsoleHistoryAdd(), Sys_TTYConsoleHistoryClear(), Sys_TTYConsoleHistoryNext(), Sys_TTYConsoleHistoryPrevious(), Sys_TTYDeleteCharacter(), TTY_erase, ttyConsoleActivated, and ttyConsoleHistory.
Referenced by SV_Frame(), and Sys_ConsoleInput().
| void Sys_ConsoleOutput | ( | const char * | string | ) |
Definition at line 52 of file android_console.cpp.
References sysConsole_t::hWndOutput, len, MAX_OUTPUT, MAX_PRINTMSG, sysConsole_t::outLen, sys_console, and Sys_ConsoleOutput().
Referenced by Com_vPrintf(), Sys_ConsoleOutput(), Sys_ConsoleOutput(), and Sys_Error().
Definition at line 36 of file android_console.cpp.
References CONSOLE_WINDOW_CLASS_NAME, sysConsole_t::defInputProc, sysConsole_t::defOutputProc, global_hInstance, sysConsole_t::hBrushInput, sysConsole_t::hBrushMsg, sysConsole_t::hBrushOutput, sysConsole_t::hFont, sysConsole_t::hFontBold, sysConsole_t::hWnd, sysConsole_t::hWndInput, sysConsole_t::hWndOutput, Sys_BacktraceShutdown(), sys_console, Sys_ConsoleShutdown(), Sys_TTYDeleteCharacter(), sysConsole_t::timerActive, TTY_tc, and ttyConsoleActivated.
Referenced by format(), Sys_ConsoleShutdown(), Sys_Error(), and Sys_Quit().
| char * Sys_Cwd | ( | void | ) |
Definition at line 197 of file unix_files.cpp.
References lengthof, MAX_OSPATH, Sys_Cwd(), and Sys_Utf16ToUtf8().
Referenced by FS_GetCwd(), Sys_Cwd(), and Sys_Mkfifo().
| void Sys_Error | ( | const char * | error, |
| ... ) |
Definition at line 142 of file unix_files.cpp.
References fdir, findhandle, and Sys_FindClose().
Referenced by format(), FS_ListFiles(), and Sys_FindClose().
| char * Sys_FindFirst | ( | const char * | path, |
| unsigned | musthave, | ||
| unsigned | canhave ) |
Opens the directory and returns the first file that matches our searchrules.
Definition at line 87 of file unix_files.cpp.
References Com_FilePath(), Com_Filter(), Com_sprintf(), CompareAttributes(), fdir, findbase, findhandle, findname, findpath, findpattern, lengthof, Q_streq, Q_strncpyz(), Sys_Error(), Sys_FindFirst(), Sys_Utf16ToUtf8(), Sys_Utf8ToUtf16(), and wfindpath.
Referenced by format(), FS_ListFiles(), and Sys_FindFirst().
| char * Sys_FindNext | ( | unsigned | musthave, |
| unsigned | canhave ) |
Returns the next file of the already opened directory (Sys_FindFirst) that matches our search mask.
Definition at line 125 of file unix_files.cpp.
References Com_Filter(), Com_sprintf(), CompareAttributes(), fdir, findbase, findhandle, findname, findpath, findpattern, Q_streq, Sys_FindNext(), and Sys_Utf16ToUtf8().
Referenced by format(), FS_ListFiles(), and Sys_FindNext().
| FILE * Sys_Fopen | ( | const char * | filename, |
| const char * | mode ) |
Definition at line 240 of file unix_files.cpp.
References FILE, lengthof, MAX_OSPATH, MAX_VAR, Sys_Fopen(), and Sys_Utf8ToUtf16().
Referenced by CL_CheckAndQueueDownload(), CL_StartHTTPDownload(), fopen_file_func(), FS_CopyFile(), FS_OpenFile(), main(), SV_InitGameProgs(), Sys_Backtrace(), Sys_Fopen(), Sys_Mkfifo(), and Sys_SetAffinityAndPriority().
| const char * Sys_GetCurrentUser | ( | void | ) |
Definition at line 44 of file android_system.cpp.
References lengthof, MAX_VAR, Q_strncpyz(), Sys_GetCurrentUser(), and Sys_Utf16ToUtf8().
Referenced by CL_InitLocal(), Sys_GetCurrentUser(), and WEB_InitStartup().
| char * Sys_GetHomeDirectory | ( | void | ) |
Returns the home environment variable (which hold the path of the user's homedir).
Definition at line 45 of file unix_files.cpp.
References Com_Printf(), Q_strcat(), Sys_GetHomeDirectory(), Sys_Utf16ToUtf8(), and Sys_Utf8ToUtf16().
Referenced by format(), FS_GetHomeDirectory(), and Sys_GetHomeDirectory().
| const char * Sys_GetLocale | ( | void | ) |
Definition at line 156 of file win_shared.cpp.
References Sys_GetLocale().
Referenced by CL_LanguageInit(), and Sys_GetLocale().
Definition at line 39 of file android_main.cpp.
References Com_Printf(), CVAR_ARCHIVE, Cvar_Get(), CVAR_SERVERINFO, sys_affinity, Sys_Error(), Sys_Init(), sys_os, and sys_priority.
Referenced by Qcommon_Init(), and Sys_Init().
Definition at line 182 of file unix_shared.cpp.
References Sys_InitSignals().
Referenced by main(), Qcommon_Init(), and Sys_InitSignals().
| void Sys_ListFilteredFiles | ( | const char * | basedir, |
| const char * | subdirs, | ||
| const char * | filter, | ||
| linkedList_t ** | list ) |
Definition at line 151 of file unix_files.cpp.
References Com_Filter(), Com_sprintf(), findhandle, findname, lengthof, LIST_AddString(), MAX_OSPATH, Q_strcasecmp, Sys_ListFilteredFiles(), Sys_Utf16ToUtf8(), Sys_Utf8ToUtf16(), and wfindpath.
Referenced by format(), FS_BuildFileList(), and Sys_ListFilteredFiles().
Definition at line 41 of file unix_shared.cpp.
References Sys_Milliseconds().
Referenced by CL_Frame(), CL_InitLocal(), Qcommon_Frame(), Schedule_Timer(), SCR_TimeRefresh_f(), CampaignTest::SetUpTestCase(), SV_InitGameProgs(), SVC_BucketForAddress(), SVC_RateLimit(), Sys_Milliseconds(), Sys_SetAffinityAndPriority(), TEST_F(), TEST_F(), RandomMapAssemblyTest::testAssembly(), GameTest::testCountSpawnpointsForMapInMultiplayerMode(), GameTest::testCountSpawnpointsForMapInSingleplayerMode(), and tick_timer().
| void Sys_Mkdir | ( | const char * | path | ) |
Definition at line 208 of file unix_files.cpp.
References Com_Printf(), lengthof, MAX_OSPATH, Sys_Mkdir(), and Sys_Utf8ToUtf16().
Referenced by format(), FS_CreatePath(), and Sys_Mkdir().
| void Sys_Mkfifo | ( | const char * | ospath, |
| struct qFILE_s * | f ) |
References f, Sys_Cwd(), and Sys_Mkfifo().
Referenced by FS_CreateOpenPipeFile(), Sys_Mkfifo(), and Sys_Mkfifo().
| void Sys_NormPath | ( | char * | path | ) |
Definition at line 50 of file unix_files.cpp.
References Sys_NormPath().
Referenced by FS_NormPath(), and Sys_NormPath().
| void Sys_OpenURL | ( | const char * | url | ) |
Definition at line 196 of file unix_shared.cpp.
References Com_sprintf(), and Sys_OpenURL().
Referenced by CL_OpenURL_f(), Sys_OpenURL(), and Sys_SetAffinityAndPriority().
Definition at line 86 of file android_system.cpp.
References CL_Shutdown(), Mem_Shutdown(), Qcommon_Shutdown(), Sys_ConsoleShutdown(), and Sys_Quit().
Referenced by Com_Quit(), format(), Sys_ConsoleLoop(), Sys_ConsoleProc(), and Sys_Quit().
| int Sys_Remove | ( | const char * | filename | ) |
Definition at line 245 of file unix_files.cpp.
References lengthof, MAX_OSPATH, Sys_Remove(), and Sys_Utf8ToUtf16().
Referenced by CL_HTTP_Cleanup(), FS_RemoveFile(), FS_WriteFile(), Sys_Remove(), and Sys_SetAffinityAndPriority().
| int Sys_Rename | ( | const char * | oldname, |
| const char * | newname ) |
Definition at line 250 of file unix_files.cpp.
References lengthof, MAX_OSPATH, Sys_Rename(), and Sys_Utf8ToUtf16().
Referenced by FS_RenameFile(), Sys_Rename(), and Sys_SetAffinityAndPriority().
References FILE, Sys_Access(), Sys_Backtrace(), Sys_Breakpoint(), Sys_Fopen(), Sys_Milliseconds(), Sys_OpenURL(), Sys_Remove(), Sys_Rename(), and Sys_SetAffinityAndPriority().
Referenced by CL_Frame(), and Sys_SetAffinityAndPriority().
| int Sys_Setenv | ( | const char * | name, |
| const char * | value ) |
set/unset environment variables (empty value removes it)
Definition at line 60 of file unix_shared.cpp.
References name, and Sys_Setenv().
Referenced by CL_Env_f(), CL_LanguageTest(), Rimp_Init(), Sys_Setenv(), and Sys_SetLocale().
| const char * Sys_SetLocale | ( | const char * | localeID | ) |
Definition at line 147 of file win_shared.cpp.
References Sys_Setenv(), and Sys_SetLocale().
Referenced by CL_LanguageTryToSet(), and Sys_SetLocale().
| void Sys_ShowConsole | ( | bool | show | ) |
Definition at line 32 of file android_console.cpp.
References sysConsole_t::hWnd, sysConsole_t::hWndInput, sysConsole_t::hWndOutput, sys_console, Sys_ShowConsole(), Sys_TTYConsoleHide(), Sys_TTYConsoleShow(), and ttyConsoleActivated.
Referenced by format(), Qcommon_Init(), Sys_ConsoleInit(), Sys_ConsoleInput(), Sys_Error(), and Sys_ShowConsole().
Definition at line 68 of file unix_shared.cpp.
References long(), and Sys_Sleep().
Referenced by M_MusicStreamCallback(), NET_Wait(), R_RenderFrame(), R_RunThread(), Sys_Error(), and Sys_Sleep().