1/* 2Copyright (C) 1996-1997 Id Software, Inc. 3 4This program is free software; you can redistribute it and/or 5modify it under the terms of the GNU General Public License 6as published by the Free Software Foundation; either version 2 7of the License, or (at your option) any later version. 8 9This program is distributed in the hope that it will be useful, 10but WITHOUT ANY WARRANTY; without even the implied warranty of 11MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 13See the GNU General Public License for more details. 14 15You should have received a copy of the GNU General Public License 16along with this program; if not, write to the Free Software 17Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 19*/ 20// sys.h -- non-portable functions 21 22// 23// file IO 24// 25 26// returns the file size 27// return -1 if file is not present 28// the file should be in BINARY mode for stupid OSs that care 29int Sys_FileOpenRead (const char *path, int *hndl); 30 31int Sys_FileOpenWrite (const char *path); 32void Sys_FileClose (int handle); 33void Sys_FileSeek (int handle, int position); 34int Sys_FileRead (int handle, void *dest, int count); 35int Sys_FileWrite (int handle, const void *data, int count); 36int Sys_FileTime (const char *path); 37void Sys_mkdir (const char *path); 38 39// 40// memory protection 41// 42void Sys_MakeCodeWriteable (unsigned long startaddr, unsigned long length); 43 44// 45// system IO 46// 47void Sys_DebugLog(const char *file, const char *fmt, ...); 48 49void Sys_Error (const char *error, ...); 50// an error will cause the entire program to exit 51 52void Sys_Printf (const char *fmt, ...); 53// send text to the console 54 55void Sys_Quit (void); 56 57double Sys_FloatTime (void); 58 59char *Sys_ConsoleInput (void); 60 61void Sys_Sleep (void); 62// called to yield for a little bit so as 63// not to hog cpu when paused or debugging 64 65void Sys_SendKeyEvents (void); 66// Perform Key_Event () callbacks until the input que is empty 67 68void Sys_LowFPPrecision (void); 69void Sys_HighFPPrecision (void); 70void Sys_SetFPCW (void); 71 72