]> de.git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
added FS_FileSize and made FS_FileExtension public
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 21 Jan 2007 11:51:27 +0000 (11:51 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 21 Jan 2007 11:51:27 +0000 (11:51 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@6711 d7cf8633-e32d-0410-b094-e92efae38249

fs.c
fs.h

diff --git a/fs.c b/fs.c
index bee65369560b3ce153bc500d966d6b01ab0de55b..1a35d45d780d1bd63a4e74bc286086561c36e30b 100644 (file)
--- a/fs.c
+++ b/fs.c
@@ -249,7 +249,6 @@ FUNCTION PROTOTYPES
 void FS_Dir_f(void);
 void FS_Ls_f(void);
 
-static const char *FS_FileExtension (const char *in);
 static searchpath_t *FS_FindFile (const char *name, int* index, qboolean quiet);
 static packfile_t* FS_AddFileToPack (const char* name, pack_t* pack,
                                                                        fs_offset_t offset, fs_offset_t packsize,
@@ -1028,7 +1027,7 @@ void FS_AddGameHierarchy (const char *dir)
 FS_FileExtension
 ============
 */
-static const char *FS_FileExtension (const char *in)
+const char *FS_FileExtension (const char *in)
 {
        const char *separator, *backslash, *colon, *dot;
 
@@ -2149,6 +2148,19 @@ fs_offset_t FS_Tell (qfile_t* file)
 }
 
 
+/*
+====================
+FS_FileSize
+
+Give the total size of a file
+====================
+*/
+fs_offset_t FS_FileSize (qfile_t* file)
+{
+       return file->real_length;
+}
+
+
 /*
 ====================
 FS_Purge
diff --git a/fs.h b/fs.h
index 5589af7a75652a4b6f2cd8cd07a76578f744ee4e..a256b719e10724e33328714688525134fe947437 100644 (file)
--- a/fs.h
+++ b/fs.h
@@ -64,7 +64,9 @@ int FS_Getc (qfile_t* file);
 int FS_UnGetc (qfile_t* file, unsigned char c);
 int FS_Seek (qfile_t* file, fs_offset_t offset, int whence);
 fs_offset_t FS_Tell (qfile_t* file);
+fs_offset_t FS_FileSize (qfile_t* file);
 void FS_Purge (qfile_t* file);
+const char *FS_FileExtension (const char *in);
 int FS_CheckNastyPath (const char *path, qboolean isgamedir);
 qboolean FS_ChangeGameDir(const char *string);