mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2024-11-10 07:12:07 +00:00
Remove unused and broken functions for writing files.
This commit is contained in:
parent
9af1af55a5
commit
6ff41e6b2f
1 changed files with 0 additions and 62 deletions
|
@ -305,68 +305,6 @@ FS_GetFileByHandle(fileHandle_t f)
|
|||
return &fs_handles[f - 1];
|
||||
}
|
||||
|
||||
/*
|
||||
* Returns file size or -1 on error.
|
||||
*/
|
||||
int
|
||||
FS_FOpenFileAppend(fsHandle_t *handle)
|
||||
{
|
||||
char path[MAX_OSPATH];
|
||||
|
||||
FS_CreatePath(handle->name);
|
||||
|
||||
Com_sprintf(path, sizeof(path), "%s/%s", fs_gamedir, handle->name);
|
||||
|
||||
handle->file = fopen(path, "ab");
|
||||
|
||||
if (handle->file)
|
||||
{
|
||||
if (fs_debug->value)
|
||||
{
|
||||
Com_Printf("FS_FOpenFileAppend: '%s'.\n", path);
|
||||
}
|
||||
|
||||
return FS_FileLength(handle->file);
|
||||
}
|
||||
|
||||
if (fs_debug->value)
|
||||
{
|
||||
Com_Printf("FS_FOpenFileAppend: couldn't open '%s'.\n", path);
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
/*
|
||||
* Always returns 0 or -1 on error.
|
||||
*/
|
||||
int
|
||||
FS_FOpenFileWrite(fsHandle_t *handle)
|
||||
{
|
||||
char path[MAX_OSPATH];
|
||||
|
||||
FS_CreatePath(handle->name);
|
||||
|
||||
Com_sprintf(path, sizeof(path), "%s/%s", fs_gamedir, handle->name);
|
||||
|
||||
if ((handle->file = fopen(path, "wb")) != NULL)
|
||||
{
|
||||
if (fs_debug->value)
|
||||
{
|
||||
Com_Printf("FS_FOpenFileWrite: '%s'.\n", path);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (fs_debug->value)
|
||||
{
|
||||
Com_Printf("FS_FOpenFileWrite: couldn't open '%s'.\n", path);
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
/*
|
||||
* Other dll's can't just call fclose() on files returned by FS_FOpenFile.
|
||||
*/
|
||||
|
|
Loading…
Reference in a new issue