From b8829faac46512311d2ff3326ec14013287d36f9 Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Fri, 13 Sep 2002 15:07:48 +0000 Subject: [PATCH] bspfile.c: start rewriting for saner code starting with making the private functions static cmdlib.[ch]: win32 compile fixes (remove redundant function) --- libs/util/bspfile.c | 6 +++--- tools/qfmodelgen/include/cmdlib.h | 1 - tools/qfmodelgen/source/cmdlib.c | 20 -------------------- 3 files changed, 3 insertions(+), 24 deletions(-) diff --git a/libs/util/bspfile.c b/libs/util/bspfile.c index 6a02880b6..919db44f7 100644 --- a/libs/util/bspfile.c +++ b/libs/util/bspfile.c @@ -104,7 +104,7 @@ QFile *wadfile; Byte swaps all data in a bsp file. */ -void +static void SwapBSPFile (qboolean todisk) { int c, i, j; @@ -221,7 +221,7 @@ SwapBSPFile (qboolean todisk) } } -void +static void AddLump (int lumpnum, void *data, int len) { lump_t *lump; @@ -233,7 +233,7 @@ AddLump (int lumpnum, void *data, int len) Qwrite (wadfile, data, (len + 3) &~3); } -int +static int CopyLump (int lump, void *dest, int size) { int length, ofs; diff --git a/tools/qfmodelgen/include/cmdlib.h b/tools/qfmodelgen/include/cmdlib.h index 530047c39..6e997a9c0 100644 --- a/tools/qfmodelgen/include/cmdlib.h +++ b/tools/qfmodelgen/include/cmdlib.h @@ -47,7 +47,6 @@ int Q_strncasecmp (char *s1, char *s2, int n); int Q_strcasecmp (char *s1, char *s2); void Q_getwd (char *out); -int filelength (QFile *f); int FileTime (char *path); void Q_mkdir (char *path); diff --git a/tools/qfmodelgen/source/cmdlib.c b/tools/qfmodelgen/source/cmdlib.c index 47409ec2e..2827245b5 100644 --- a/tools/qfmodelgen/source/cmdlib.c +++ b/tools/qfmodelgen/source/cmdlib.c @@ -319,26 +319,6 @@ int CheckParm (char *check) } - -/* -================ -filelength -================ -*/ -int filelength (QFile *f) -{ - int pos; - int end; - - pos = Qtell (f); - Qseek (f, 0, SEEK_END); - end = Qtell (f); - Qseek (f, pos, SEEK_SET); - - return end; -} - - QFile *SafeOpenWrite (char *filename) { QFile *f;