Remove unused and broken functions for writing files.

This commit is contained in:
Yamagi Burmeister 2016-08-16 20:14:41 +02:00
parent 9af1af55a5
commit 6ff41e6b2f

View file

@ -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.
*/