diff options
author | Max Horn | 2004-04-25 14:42:14 +0000 |
---|---|---|
committer | Max Horn | 2004-04-25 14:42:14 +0000 |
commit | d4f876b37df0fdc772936eedf9b112802987254b (patch) | |
tree | c7e782e5846dd153159c574ca9cb2ca250dfd34f /saga/ys_file.cpp | |
parent | f9cd78cedd48371f8aa9d98cbcdeb879fe543fac (diff) | |
download | scummvm-rg350-d4f876b37df0fdc772936eedf9b112802987254b.tar.gz scummvm-rg350-d4f876b37df0fdc772936eedf9b112802987254b.tar.bz2 scummvm-rg350-d4f876b37df0fdc772936eedf9b112802987254b.zip |
Fix many warnings; use C++ type system instead of C style typedefs; removed various unused stuff; const correctness; etc.
svn-id: r13622
Diffstat (limited to 'saga/ys_file.cpp')
-rw-r--r-- | saga/ys_file.cpp | 63 |
1 files changed, 0 insertions, 63 deletions
diff --git a/saga/ys_file.cpp b/saga/ys_file.cpp deleted file mode 100644 index 39cb84cff0..0000000000 --- a/saga/ys_file.cpp +++ /dev/null @@ -1,63 +0,0 @@ -/* ScummVM - Scumm Interpreter - * Copyright (C) 2004 The ScummVM project - * - * The ReInherit Engine is (C)2000-2003 by Daniel Balsom. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * $Header$ - * - */ -#include <stdio.h> -#include <stdlib.h> -#include <errno.h> - -#include "yslib.h" - -namespace Saga { - -int ys_get_filesize(FILE * file_p, unsigned long *len_p, int *p_errno) -/*--------------------------------------------------------------------------*\ - * Returns the 'size' of the specified file. The file must be opened in - * binary mode. Note that not all operating systems support determing the - * exact end of a binary file stream, so this function is limited in - * portability. -\*--------------------------------------------------------------------------*/ -{ - long f_pos; - long f_len; - - f_pos = ftell(file_p); - if (f_pos == -1) { - *p_errno = errno; - return YS_E_FAILURE; - } - - fseek(file_p, 0, SEEK_END); - - f_len = ftell(file_p); - if (f_pos == -1) { - *p_errno = errno; - return YS_E_FAILURE; - } - - fseek(file_p, f_pos, SEEK_SET); - - *len_p = (unsigned long)f_len; - - return YS_E_SUCCESS;; -} - -} // End of namespace Saga |