doom3-gpl
Doom 3 GPL source release
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Macros | Functions | Variables
posix_main.cpp File Reference
#include "../../idlib/precompiled.h"
#include "../sys_local.h"
#include <sys/types.h>
#include <sys/stat.h>
#include <errno.h>
#include <dirent.h>
#include <unistd.h>
#include <sys/mman.h>
#include <sys/time.h>
#include <pwd.h>
#include <pthread.h>
#include <dlfcn.h>
#include <termios.h>
#include <signal.h>
#include <fcntl.h>
#include "posix_public.h"

Go to the source code of this file.

Macros

#define MAX_OSPATH   256
 
#define COMMAND_HISTORY   64
 
#define MAX_QUED_EVENTS   256
 
#define MASK_QUED_EVENTS   ( MAX_QUED_EVENTS - 1 )
 

Functions

void Posix_Exit (int ret)
 
void Posix_SetExit (int ret)
 
void Posix_SetExitSpawn (const char *exeName)
 
void Sys_Quit (void)
 
int Sys_Milliseconds (void)
 
void Sys_Mkdir (const char *path)
 
int Sys_ListFiles (const char *directory, const char *extension, idStrList &list)
 
void Posix_QueEvent (sysEventType_t type, int value, int value2, int ptrLength, void *ptr)
 
sysEvent_t Sys_GetEvent (void)
 
void Sys_ClearEvents (void)
 
const char * Posix_Cwd (void)
 
void Sys_GetMemoryStatus (sysMemoryStats_t &stats)
 
void Sys_GetCurrentMemoryStatus (sysMemoryStats_t &stats)
 
void Sys_GetExeLaunchMemoryStatus (sysMemoryStats_t &stats)
 
void Sys_Init (void)
 
void Posix_Shutdown (void)
 
int Sys_DLL_Load (const char *path)
 
voidSys_DLL_GetProcAddress (int handle, const char *sym)
 
void Sys_DLL_Unload (int handle)
 
void Sys_ShowConsole (int visLevel, bool quitOnClose)
 
const char * Sys_DefaultCDPath (void)
 
long Sys_FileTimeStamp (FILE *fp)
 
void Sys_Sleep (int msec)
 
char * Sys_GetClipboardData (void)
 
void Sys_SetClipboardData (const char *string)
 
void Sys_FlushCacheMemory (void *base, int bytes)
 
bool Sys_FPU_StackIsEmpty (void)
 
void Sys_FPU_ClearStack (void)
 
const char * Sys_FPU_GetState (void)
 
void Sys_FPU_SetPrecision (int precision)
 
bool Sys_LockMemory (void *ptr, int bytes)
 
bool Sys_UnlockMemory (void *ptr, int bytes)
 
void Sys_SetPhysicalWorkMemory (int minBytes, int maxBytes)
 
int Sys_GetDriveFreeSpace (const char *path)
 
bool Sys_AlreadyRunning (void)
 
void Posix_EarlyInit (void)
 
void Posix_LateInit (void)
 
void Posix_InitConsoleInput (void)
 
void tty_Del ()
 
void tty_Left ()
 
void tty_Right ()
 
void tty_Hide ()
 
void tty_Show ()
 
void tty_FlushIn ()
 
char * Posix_ConsoleInput (void)
 
void Sys_GenerateEvents (void)
 
void Sys_DebugPrintf (const char *fmt,...)
 
void Sys_DebugVPrintf (const char *fmt, va_list arg)
 
void Sys_Printf (const char *msg,...)
 
void Sys_VPrintf (const char *msg, va_list arg)
 
void Sys_Error (const char *error,...)
 
void Sys_FreeOpenAL (void)
 

Variables

idEditField input_field
 
idEditField history_backup
 
idCVar in_tty ("in_tty","1", CVAR_BOOL|CVAR_INIT|CVAR_SYSTEM,"terminal tab-completion and history")
 
idCVar com_pid ("com_pid","0", CVAR_INTEGER|CVAR_INIT|CVAR_SYSTEM,"process id")
 
unsigned long sys_timeBase = 0
 

Macro Definition Documentation

#define COMMAND_HISTORY   64

Definition at line 48 of file posix_main.cpp.

#define MASK_QUED_EVENTS   ( MAX_QUED_EVENTS - 1 )

Definition at line 263 of file posix_main.cpp.

#define MAX_OSPATH   256

Definition at line 47 of file posix_main.cpp.

#define MAX_QUED_EVENTS   256

Definition at line 262 of file posix_main.cpp.

Function Documentation

char* Posix_ConsoleInput ( void  )

Definition at line 717 of file posix_main.cpp.

const char* Posix_Cwd ( void  )

Definition at line 337 of file posix_main.cpp.

void Posix_EarlyInit ( void  )

Definition at line 538 of file posix_main.cpp.

void Posix_Exit ( int  ret)

Definition at line 80 of file posix_main.cpp.

void Posix_InitConsoleInput ( void  )

Definition at line 568 of file posix_main.cpp.

void Posix_LateInit ( void  )

Definition at line 552 of file posix_main.cpp.

void Posix_QueEvent ( sysEventType_t  type,
int  value,
int  value2,
int  ptrLength,
void ptr 
)

Definition at line 275 of file posix_main.cpp.

void Posix_SetExit ( int  ret)

Definition at line 109 of file posix_main.cpp.

void Posix_SetExitSpawn ( const char *  exeName)

Definition at line 119 of file posix_main.cpp.

void Posix_Shutdown ( void  )

Definition at line 376 of file posix_main.cpp.

bool Sys_AlreadyRunning ( void  )

Definition at line 529 of file posix_main.cpp.

void Sys_ClearEvents ( void  )

Definition at line 328 of file posix_main.cpp.

void Sys_DebugPrintf ( const char *  fmt,
  ... 
)

Definition at line 999 of file posix_main.cpp.

void Sys_DebugVPrintf ( const char *  fmt,
va_list  arg 
)

Definition at line 1009 of file posix_main.cpp.

const char* Sys_DefaultCDPath ( void  )

Definition at line 429 of file posix_main.cpp.

void* Sys_DLL_GetProcAddress ( int  handle,
const char *  sym 
)

Definition at line 401 of file posix_main.cpp.

int Sys_DLL_Load ( const char *  path)

Definition at line 388 of file posix_main.cpp.

void Sys_DLL_Unload ( int  handle)

Definition at line 415 of file posix_main.cpp.

void Sys_Error ( const char *  error,
  ... 
)

Definition at line 1036 of file posix_main.cpp.

long Sys_FileTimeStamp ( FILE *  fp)

Definition at line 433 of file posix_main.cpp.

void Sys_FlushCacheMemory ( void base,
int  bytes 
)

Definition at line 466 of file posix_main.cpp.

void Sys_FPU_ClearStack ( void  )

Definition at line 475 of file posix_main.cpp.

const char* Sys_FPU_GetState ( void  )

Definition at line 478 of file posix_main.cpp.

void Sys_FPU_SetPrecision ( int  precision)

Definition at line 482 of file posix_main.cpp.

bool Sys_FPU_StackIsEmpty ( void  )

Definition at line 471 of file posix_main.cpp.

void Sys_FreeOpenAL ( void  )

Definition at line 1053 of file posix_main.cpp.

void Sys_GenerateEvents ( void  )

Definition at line 980 of file posix_main.cpp.

char* Sys_GetClipboardData ( void  )

Definition at line 455 of file posix_main.cpp.

void Sys_GetCurrentMemoryStatus ( sysMemoryStats_t stats)

Definition at line 355 of file posix_main.cpp.

int Sys_GetDriveFreeSpace ( const char *  path)

Definition at line 518 of file posix_main.cpp.

sysEvent_t Sys_GetEvent ( void  )

Definition at line 309 of file posix_main.cpp.

void Sys_GetExeLaunchMemoryStatus ( sysMemoryStats_t stats)

Definition at line 359 of file posix_main.cpp.

void Sys_GetMemoryStatus ( sysMemoryStats_t stats)

Definition at line 351 of file posix_main.cpp.

void Sys_Init ( void  )

Definition at line 369 of file posix_main.cpp.

int Sys_ListFiles ( const char *  directory,
const char *  extension,
idStrList list 
)

Definition at line 198 of file posix_main.cpp.

bool Sys_LockMemory ( void ptr,
int  bytes 
)

Definition at line 490 of file posix_main.cpp.

int Sys_Milliseconds ( void  )

Definition at line 168 of file posix_main.cpp.

void Sys_Mkdir ( const char *  path)

Definition at line 189 of file posix_main.cpp.

void Sys_Printf ( const char *  msg,
  ... 
)

Definition at line 1015 of file posix_main.cpp.

void Sys_Quit ( void  )

Definition at line 149 of file posix_main.cpp.

void Sys_SetClipboardData ( const char *  string)

Definition at line 460 of file posix_main.cpp.

void Sys_SetPhysicalWorkMemory ( int  minBytes,
int  maxBytes 
)

Definition at line 508 of file posix_main.cpp.

void Sys_ShowConsole ( int  visLevel,
bool  quitOnClose 
)

Definition at line 424 of file posix_main.cpp.

void Sys_Sleep ( int  msec)

Definition at line 439 of file posix_main.cpp.

bool Sys_UnlockMemory ( void ptr,
int  bytes 
)

Definition at line 499 of file posix_main.cpp.

void Sys_VPrintf ( const char *  msg,
va_list  arg 
)

Definition at line 1025 of file posix_main.cpp.

void tty_Del ( )

Definition at line 635 of file posix_main.cpp.

void tty_FlushIn ( )

Definition at line 702 of file posix_main.cpp.

void tty_Hide ( )

Definition at line 658 of file posix_main.cpp.

void tty_Left ( )

Definition at line 645 of file posix_main.cpp.

void tty_Right ( )

Definition at line 650 of file posix_main.cpp.

void tty_Show ( )

Definition at line 682 of file posix_main.cpp.

Variable Documentation

idCVar com_pid("com_pid","0", CVAR_INTEGER|CVAR_INIT|CVAR_SYSTEM,"process id")
idEditField history_backup

Definition at line 59 of file posix_main.cpp.

idCVar in_tty("in_tty","1", CVAR_BOOL|CVAR_INIT|CVAR_SYSTEM,"terminal tab-completion and history")
idEditField input_field

Definition at line 52 of file posix_main.cpp.

unsigned long sys_timeBase = 0

Definition at line 162 of file posix_main.cpp.