mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-29 20:20:43 +00:00
nukage obsoletage
This commit is contained in:
parent
356492f683
commit
ef0e0a167d
1 changed files with 0 additions and 56 deletions
|
@ -69,62 +69,6 @@ qboolean isDedicated = true;
|
|||
|
||||
int nostdout = 0;
|
||||
|
||||
int
|
||||
Sys_FileOpenRead (char *path, int *handle)
|
||||
{
|
||||
struct stat fileinfo;
|
||||
int h;
|
||||
|
||||
h = open (path, O_RDONLY, 0666);
|
||||
*handle = h;
|
||||
if (h == -1)
|
||||
return -1;
|
||||
|
||||
if (fstat (h, &fileinfo) == -1)
|
||||
Sys_Error ("Error fstating %s", path);
|
||||
|
||||
return fileinfo.st_size;
|
||||
}
|
||||
|
||||
int
|
||||
Sys_FileOpenWrite (char *path)
|
||||
{
|
||||
int handle;
|
||||
|
||||
umask (0);
|
||||
|
||||
handle = open (path, O_RDWR | O_CREAT | O_TRUNC, 0666);
|
||||
|
||||
if (handle == -1)
|
||||
Sys_Error ("Error opening %s: %s", path, strerror (errno));
|
||||
|
||||
return handle;
|
||||
}
|
||||
|
||||
int
|
||||
Sys_FileWrite (int handle, void *src, int count)
|
||||
{
|
||||
return write (handle, src, count);
|
||||
}
|
||||
|
||||
void
|
||||
Sys_FileClose (int handle)
|
||||
{
|
||||
close (handle);
|
||||
}
|
||||
|
||||
void
|
||||
Sys_FileSeek (int handle, int position)
|
||||
{
|
||||
lseek (handle, position, SEEK_SET);
|
||||
}
|
||||
|
||||
int
|
||||
Sys_FileRead (int handle, void *dest, int count)
|
||||
{
|
||||
return read (handle, dest, count);
|
||||
}
|
||||
|
||||
void
|
||||
Sys_DebugLog (const char *file, const char *fmt, ...)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue