2 Copyright (C) 1996-1997 Id Software, Inc.
4 This program is free software; you can redistribute it and/or
5 modify it under the terms of the GNU General Public License
6 as published by the Free Software Foundation; either version 2
7 of the License, or (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13 See the GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20 // sys.h -- non-portable functions
29 // returns the file size
30 // return -1 if file is not present
31 // the file should be in BINARY mode for stupid OSs that care
32 int Sys_FileOpenRead (const char *path, int *hndl);
34 int Sys_FileOpenWrite (const char *path);
35 void Sys_FileClose (int handle);
36 void Sys_FileSeek (int handle, int position);
37 int Sys_FileRead (int handle, void *dest, int count);
38 int Sys_FileWrite (int handle, void *data, int count);
39 int Sys_FileTime (const char *path);
40 void Sys_mkdir (const char *path);
45 void Sys_Error (const char *error, ...);
46 // an error will cause the entire program to exit
48 void Sys_Printf (const char *fmt, ...);
49 // send text to the console
53 double Sys_DoubleTime (void);
55 char *Sys_ConsoleInput (void);
57 void Sys_Sleep (void);
58 // called to yield for a little bit so as
59 // not to hog cpu when paused or debugging
61 void Sys_SendKeyEvents (void);
62 // Perform Key_Event () callbacks until the input que is empty
64 // called after Com_InitArgv
65 void Sys_Shared_EarlyInit (void);
66 // called after Host_init
67 void Sys_Shared_LateInit (void);