From b5e36c7149e1e3a865ecf8215d42e6ead3e32068 Mon Sep 17 00:00:00 2001 From: Thad Ward Date: Wed, 24 May 2000 19:19:08 +0000 Subject: [PATCH] commit changes for dabb, since he's having trouble with sourceforge: win32 requires a call to setmode(), since it doesn't seem to do the mode change in fdopen properly. also removed some "z" modes, since someone forgot to when removing the Qfile stuffs --- source/quakefs.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/source/quakefs.c b/source/quakefs.c index 26359d4..7a5ae15 100644 --- a/source/quakefs.c +++ b/source/quakefs.c @@ -207,7 +207,7 @@ COM_FileOpenRead (char *path, FILE **hndl) { FILE *f; - f = fopen(path, "rbz"); + f = fopen(path, "rb"); if (!f) { *hndl = NULL; @@ -393,7 +393,11 @@ COM_OpenRead (const char *path, int offs, int len) } lseek(fd,offs,SEEK_SET); com_filesize=len; - return fdopen(fd,"rbz"); + +#ifdef WIN32 + setmode(fd,O_BINARY); +#endif + return fdopen(fd,"rb"); return 0; }