From 1ec1bfff6948370ae24dcae5f5138e6d80bebbb0 Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Thu, 3 Jan 2002 20:21:37 +0000 Subject: [PATCH] add the z flag to most read Qopen calls --- client/cl_parse.c | 2 +- client/menu.c | 4 ++-- ctf/g_save.c | 4 ++-- game/g_save.c | 4 ++-- qcommon/files.c | 6 +++--- server/sv_ccmds.c | 4 ++-- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/client/cl_parse.c b/client/cl_parse.c index 7c0978c..c3a9004 100644 --- a/client/cl_parse.c +++ b/client/cl_parse.c @@ -97,7 +97,7 @@ qboolean CL_CheckOrDownloadFile (char *filename) // FS_CreatePath (name); - fp = Qopen (name, "r+b"); + fp = Qopen (name, "r+bz"); if (fp) { // it exists int len; Qseek(fp, 0, SEEK_END); diff --git a/client/menu.c b/client/menu.c index 1ffa2c3..370c3da 100644 --- a/client/menu.c +++ b/client/menu.c @@ -2037,7 +2037,7 @@ void Create_Savestrings (void) for (i=0 ; i"); @@ -2520,7 +2520,7 @@ void StartServer_MenuInit( void ) ** load the list of map names */ Com_sprintf( mapsname, sizeof( mapsname ), "%s/maps.lst", FS_Gamedir() ); - if ( ( fp = Qopen( mapsname, "rb" ) ) == 0 ) + if ( ( fp = Qopen( mapsname, "rbz" ) ) == 0 ) { if ( ( length = FS_LoadFile( "maps.lst", ( void ** ) &buffer ) ) == -1 ) Com_Error( ERR_DROP, "couldn't find maps.lst\n" ); diff --git a/ctf/g_save.c b/ctf/g_save.c index 31656ad..a19f47f 100644 --- a/ctf/g_save.c +++ b/ctf/g_save.c @@ -473,7 +473,7 @@ void ReadGame (char *filename) gi.FreeTags (TAG_GAME); - f = Qopen (filename, "rb"); + f = Qopen (filename, "rbz"); if (!f) gi.error ("Couldn't open %s", filename); @@ -668,7 +668,7 @@ void ReadLevel (char *filename) void *base; edict_t *ent; - f = Qopen (filename, "rb"); + f = Qopen (filename, "rbz"); if (!f) gi.error ("Couldn't open %s", filename); diff --git a/game/g_save.c b/game/g_save.c index 4764e7b..1236186 100644 --- a/game/g_save.c +++ b/game/g_save.c @@ -496,7 +496,7 @@ void ReadGame (char *filename) gi.FreeTags (TAG_GAME); - f = Qopen (filename, "rb"); + f = Qopen (filename, "rbz"); if (!f) gi.error ("Couldn't open %s", filename); @@ -691,7 +691,7 @@ void ReadLevel (char *filename) void *base; edict_t *ent; - f = Qopen (filename, "rb"); + f = Qopen (filename, "rbz"); if (!f) gi.error ("Couldn't open %s", filename); diff --git a/qcommon/files.c b/qcommon/files.c index 18b3e5e..47c9da5 100644 --- a/qcommon/files.c +++ b/qcommon/files.c @@ -219,7 +219,7 @@ int FS_FOpenFile (char *filename, QFile **file) if (!strncmp (filename, link->from, link->fromlength)) { Com_sprintf (netpath, sizeof(netpath), "%s%s",link->to, filename+link->fromlength); - *file = Qopen (netpath, "rb"); + *file = Qopen (netpath, "rbz"); if (*file) { Com_DPrintf ("link file: %s\n",netpath); @@ -258,7 +258,7 @@ int FS_FOpenFile (char *filename, QFile **file) Com_sprintf (netpath, sizeof(netpath), "%s/%s",search->filename, filename); - *file = Qopen (netpath, "rb"); + *file = Qopen (netpath, "rbz"); if (!*file) continue; @@ -293,7 +293,7 @@ int FS_FOpenFile (char *filename, QFile **file) { Com_sprintf (netpath, sizeof(netpath), "%s/%s",FS_Gamedir(), filename); - *file = Qopen (netpath, "rb"); + *file = Qopen (netpath, "rbz"); if (!*file) return -1; diff --git a/server/sv_ccmds.c b/server/sv_ccmds.c index 9f1fe29..8aabca0 100644 --- a/server/sv_ccmds.c +++ b/server/sv_ccmds.c @@ -311,7 +311,7 @@ void SV_ReadLevelFile (void) Com_DPrintf("SV_ReadLevelFile()\n"); Com_sprintf (name, sizeof(name), "%s/save/current/%s.sv2", FS_Gamedir(), sv.name); - f = Qopen(name, "rb"); + f = Qopen(name, "rbz"); if (!f) { Com_Printf ("Failed to open %s\n", name); @@ -414,7 +414,7 @@ void SV_ReadServerFile (void) Com_DPrintf("SV_ReadServerFile()\n"); Com_sprintf (name, sizeof(name), "%s/save/current/server.ssv", FS_Gamedir()); - f = Qopen (name, "rb"); + f = Qopen (name, "rbz"); if (!f) { Com_Printf ("Couldn't read %s\n", name);