From 3d59dfed9804d093975f36fc1579c0837f06e674 Mon Sep 17 00:00:00 2001 From: Joseph Carter Date: Mon, 22 May 2000 21:16:22 +0000 Subject: [PATCH] Before I can fix the (MANY!) problems with newtree, I have to fix the little problem of mixed QFile and FILE. Since we're not using ZLib in this tree, QFile makes no real sense. That didn't fix the real problem I am having though. --- include/cl_slist.h | 4 +- include/client.h | 4 +- include/cvar.h | 2 +- include/keys.h | 2 +- include/quakefs.h | 6 +- include/quakeio.h | 36 +++----- include/server.h | 8 +- source/cl_main.c | 6 +- source/cl_parse.c | 4 +- source/cl_slist.c | 6 +- source/cmd.c | 2 +- source/com.c | 2 +- source/cvar.c | 2 +- source/gl_mesh.c | 2 +- source/gl_part.c | 2 +- source/gl_warp.c | 10 +- source/keys.c | 2 +- source/menu.c | 54 +++++------ source/quakefs.c | 20 ++-- source/quakeio.c | 221 ++++++++------------------------------------- source/r_part.c | 2 +- source/sv_ccmds.c | 2 +- source/sv_main.c | 6 +- source/vid_glx.c | 2 +- 24 files changed, 127 insertions(+), 280 deletions(-) diff --git a/include/cl_slist.h b/include/cl_slist.h index 66ddf3d..93eb57e 100644 --- a/include/cl_slist.h +++ b/include/cl_slist.h @@ -49,8 +49,8 @@ void Server_List_Swap(server_entry_t *swap1, server_entry_t *swap2); server_entry_t *Server_List_Get_By_Num(server_entry_t *start, int n); int Server_List_Len(server_entry_t *start); -server_entry_t *Server_List_LoadF(QFile *f, server_entry_t *start); -void Server_List_SaveF(QFile *f, server_entry_t *start); +server_entry_t *Server_List_LoadF(FILE *f, server_entry_t *start); +void Server_List_SaveF(FILE *f, server_entry_t *start); void Server_List_Del_All(server_entry_t *start); void Server_List_Shutdown(server_entry_t *start); diff --git a/include/client.h b/include/client.h index e3ed89b..96c9f07 100644 --- a/include/client.h +++ b/include/client.h @@ -199,7 +199,7 @@ typedef struct int qport; - QFile *download; // file transfer from server + FILE *download; // file transfer from server char downloadtempname[MAX_OSPATH]; char downloadname[MAX_OSPATH]; int downloadnumber; @@ -215,7 +215,7 @@ typedef struct qboolean demorecording; qboolean demoplayback; qboolean timedemo; - QFile *demofile; + FILE *demofile; float td_lastframe; // to meter out one message a frame int td_startframe; // host_framecount at start float td_starttime; // realtime at second frame of timedemo diff --git a/include/cvar.h b/include/cvar.h index 4f313d0..a07392e 100644 --- a/include/cvar.h +++ b/include/cvar.h @@ -100,7 +100,7 @@ qboolean Cvar_Command (void); // command. Returns true if the command was a variable reference that // was handled. (print or change) -void Cvar_WriteVariables (QFile *f); +void Cvar_WriteVariables (FILE *f); // Writes lines containing "set variable value" for all variables // with the archive flag set to true. diff --git a/include/keys.h b/include/keys.h index 8c109dd..28ad789 100644 --- a/include/keys.h +++ b/include/keys.h @@ -175,7 +175,7 @@ extern qboolean chat_team; void Key_Event (int key, qboolean down); void Key_Init (void); -void Key_WriteBindings (QFile *f); +void Key_WriteBindings (FILE *f); void Key_SetBinding (int keynum, char *binding); void Key_ClearStates (void); diff --git a/include/quakefs.h b/include/quakefs.h index 9a1f763..c88d973 100644 --- a/include/quakefs.h +++ b/include/quakefs.h @@ -49,9 +49,9 @@ extern char com_gamedir[MAX_OSPATH]; extern char gamedirfile[MAX_OSPATH]; void COM_WriteFile (char *filename, void *data, int len); -int COM_FOpenFile (char *filename, QFile **gzfile); -void COM_CloseFile (QFile *h); -int COM_filelength (QFile *f); +int COM_FOpenFile (char *filename, FILE **gzfile); +void COM_CloseFile (FILE *h); +int COM_filelength (FILE *f); void COM_FileBase (char *in, char *out); void COM_DefaultExtension (char *path, char *extension); char *COM_SkipPath (char *pathname); diff --git a/include/quakeio.h b/include/quakeio.h index 175703d..3db19d6 100644 --- a/include/quakeio.h +++ b/include/quakeio.h @@ -33,32 +33,22 @@ #include #include -#ifdef HAS_ZLIB -#include -#endif - -typedef struct { - FILE *file; -#ifdef HAS_ZLIB - gzFile *gzfile; -#endif -} QFile; void Qexpand_squiggle(const char *path, char *dest); int Qrename(const char *old, const char *new); -QFile *Qopen(const char *path, const char *mode); -QFile *Qdopen(int fd, const char *mode); -void Qclose(QFile *file); -int Qread(QFile *file, void *buf, int count); -int Qwrite(QFile *file, void *buf, int count); -int Qprintf(QFile *file, const char *fmt, ...); -char *Qgets(QFile *file, char *buf, int count); -int Qgetc(QFile *file); -int Qputc(QFile *file, int c); -int Qseek(QFile *file, long offset, int whence); -long Qtell(QFile *file); -int Qflush(QFile *file); -int Qeof(QFile *file); +FILE *Qopen(const char *path, const char *mode); +FILE *Qdopen(int fd, const char *mode); +void Qclose(FILE *file); +int Qread(FILE *file, void *buf, int count); +int Qwrite(FILE *file, void *buf, int count); +int Qprintf(FILE *file, const char *fmt, ...); +char *Qgets(FILE *file, char *buf, int count); +int Qgetc(FILE *file); +int Qputc(FILE *file, int c); +int Qseek(FILE *file, long offset, int whence); +long Qtell(FILE *file); +int Qflush(FILE *file); +int Qeof(FILE *file); #endif /*_QUAKEIO_H*/ diff --git a/include/server.h b/include/server.h index 8d54632..0fb8f46 100644 --- a/include/server.h +++ b/include/server.h @@ -187,7 +187,7 @@ typedef struct client_s client_frame_t frames[UPDATE_BACKUP]; // updates can be deltad from here - QFile *download; // file being downloaded + FILE *download; // file being downloaded int downloadsize; // total bytes int downloadcount; // bytes sent @@ -199,7 +199,7 @@ typedef struct client_s qboolean upgradewarn; // did we warn him? - QFile *upload; + FILE *upload; char uploadfn[MAX_QPATH]; netadr_t snap_from; qboolean remote_snap; @@ -363,8 +363,8 @@ extern char localmodels[MAX_MODELS][5]; // inline model names for precache extern char localinfo[MAX_LOCALINFO_STRING+1]; extern int host_hunklevel; -extern QFile *sv_logfile; -extern QFile *sv_fraglogfile; +extern FILE *sv_logfile; +extern FILE *sv_fraglogfile; //=========================================================== // FIXME: declare exported functions in their own relevant .h diff --git a/source/cl_main.c b/source/cl_main.c index 7de9ef4..ac3f9c0 100644 --- a/source/cl_main.c +++ b/source/cl_main.c @@ -1186,8 +1186,8 @@ CL_Init */ void CL_Init (void) { - QFile *servlist; - char st[80]; + FILE *servlist; + char st[80]; cls.state = ca_disconnected; @@ -1484,7 +1484,7 @@ Writes key bindings and archived cvars to config.cfg */ void Host_WriteConfiguration (void) { - QFile *f; + FILE *f; if (host_initialized) { diff --git a/source/cl_parse.c b/source/cl_parse.c index 3d389fc..bbc4c60 100644 --- a/source/cl_parse.c +++ b/source/cl_parse.c @@ -178,7 +178,7 @@ to start a download from the server. */ qboolean CL_CheckOrDownloadFile (char *filename) { - QFile *f; + FILE *f; if (strstr (filename, "..")) { @@ -548,7 +548,7 @@ CL_ParseServerData void CL_ParseServerData (void) { char *str; - QFile *f; + FILE *f; char fn[MAX_OSPATH]; qboolean cflag = false; extern char gamedirfile[MAX_OSPATH]; diff --git a/source/cl_slist.c b/source/cl_slist.c index d5ab0ac..1f732c0 100644 --- a/source/cl_slist.c +++ b/source/cl_slist.c @@ -138,7 +138,7 @@ int Server_List_Len (server_entry_t *start) { return i; } -server_entry_t *Server_List_LoadF (QFile *f,server_entry_t *start) { // This could get messy +server_entry_t *Server_List_LoadF (FILE *f,server_entry_t *start) { // This could get messy char line[256]; /* Long lines get truncated. */ int c = ' '; /* int so it can be compared to EOF properly*/ int len; @@ -175,7 +175,7 @@ server_entry_t *Server_List_LoadF (QFile *f,server_entry_t *start) { // This cou } } - void Server_List_SaveF (QFile *f,server_entry_t *start) { + void Server_List_SaveF (FILE *f,server_entry_t *start) { do { Qprintf(f,"%s %s\n",start->server,start->desc); start = start->next; @@ -184,7 +184,7 @@ server_entry_t *Server_List_LoadF (QFile *f,server_entry_t *start) { // This cou } void Server_List_Shutdown (server_entry_t *start) { - QFile *f; + FILE *f; if (start) { if ((f = Qopen(va("%s/servers.txt",fs_userpath->string),"w"))) { Server_List_SaveF(f,start); diff --git a/source/cmd.c b/source/cmd.c index 5b4b900..ef551af 100644 --- a/source/cmd.c +++ b/source/cmd.c @@ -305,7 +305,7 @@ Cmd_Exec_File (char *path) int mark; int len; char base[32]; - QFile *file; + FILE *file; if ((file = Qopen (path, "r")) != NULL) { // extract the filename base name for hunk tag diff --git a/source/com.c b/source/com.c index 5ba6f56..f313c23 100644 --- a/source/com.c +++ b/source/com.c @@ -62,7 +62,7 @@ being registered. */ void COM_CheckRegistered (void) { - QFile *h; + FILE *h; unsigned short check[128]; COM_FOpenFile("gfx/pop.lmp", &h); diff --git a/source/cvar.c b/source/cvar.c index fde33dc..a9841a0 100644 --- a/source/cvar.c +++ b/source/cvar.c @@ -247,7 +247,7 @@ Writes lines containing "set variable value" for all variables with the archive flag set to true. ============ */ -void Cvar_WriteVariables (QFile *f) +void Cvar_WriteVariables (FILE *f) { cvar_t *var; diff --git a/source/gl_mesh.c b/source/gl_mesh.c index a145b93..be93c72 100644 --- a/source/gl_mesh.c +++ b/source/gl_mesh.c @@ -320,7 +320,7 @@ void GL_MakeAliasModelDisplayLists (model_t *m, aliashdr_t *hdr) int *cmds; trivertx_t *verts; char cache[MAX_QPATH], fullpath[MAX_OSPATH]; - QFile *f; + FILE *f; aliasmodel = m; paliashdr = hdr; // (aliashdr_t *)Mod_Extradata (m); diff --git a/source/gl_part.c b/source/gl_part.c index 12638f6..e00ae7e 100644 --- a/source/gl_part.c +++ b/source/gl_part.c @@ -120,7 +120,7 @@ void R_ClearParticles (void) void R_ReadPointFile_f (void) { - QFile *f; + FILE *f; vec3_t org; int r; int c; diff --git a/source/gl_warp.c b/source/gl_warp.c index a26f559..a2149b3 100644 --- a/source/gl_warp.c +++ b/source/gl_warp.c @@ -357,7 +357,7 @@ byte *pcx_rgb; LoadPCX ============ */ -void LoadPCX (QFile *f) +void LoadPCX (FILE *f) { pcx_t *pcx, pcxbuf; byte palette[768]; @@ -441,7 +441,7 @@ typedef struct _TargaHeader { TargaHeader targa_header; byte *targa_rgba; -int fgetLittleShort (QFile *f) +int fgetLittleShort (FILE *f) { byte b1, b2; @@ -451,7 +451,7 @@ int fgetLittleShort (QFile *f) return (short)(b1 + b2*256); } -int fgetLittleLong (QFile *f) +int fgetLittleLong (FILE *f) { byte b1, b2, b3, b4; @@ -469,7 +469,7 @@ int fgetLittleLong (QFile *f) LoadTGA ============= */ -void LoadTGA (QFile *fin) +void LoadTGA (FILE *fin) { int columns, rows, numPixels; byte *pixbuf; @@ -626,7 +626,7 @@ char *suf[6] = {"rt", "bk", "lf", "ft", "up", "dn"}; void R_LoadSkys (char * skyname) { int i; - QFile *f; + FILE *f; char name[64]; if (stricmp (skyname, "none") == 0) diff --git a/source/keys.c b/source/keys.c index c77f708..06b09ac 100644 --- a/source/keys.c +++ b/source/keys.c @@ -667,7 +667,7 @@ Key_WriteBindings Writes lines containing "bind key value" ============ */ -void Key_WriteBindings (QFile *f) +void Key_WriteBindings (FILE *f) { int i; diff --git a/source/menu.c b/source/menu.c index 36ad7db..2651e80 100644 --- a/source/menu.c +++ b/source/menu.c @@ -1317,33 +1317,33 @@ void M_Quit_Draw (void) { #define VSTR(x) #x #define VSTR2(x) VSTR(x) - char *cmsg[] = { +// char *cmsg[] = { // 0123456789012345678901234567890123456789 - "0 QuakeWorld", - "1 version " VSTR2(VERSION) " by id Software", - "0Programming", - "1 John Carmack Michael Abrash", - "1 John Cash Christian Antkow", - "0Additional Programming", - "1 Dave 'Zoid' Kirsch", - "1 Jack 'morbid' Mathews", - "0Id Software is not responsible for", - "0providing technical support for", - "0QUAKEWORLD(tm). (c)1996 Id Software,", - "0Inc. All Rights Reserved.", - "0QUAKEWORLD(tm) is a trademark of Id", - "0Software, Inc.", - "1NOTICE: THE COPYRIGHT AND TRADEMARK", - "1NOTICES APPEARING IN YOUR COPY OF", - "1QUAKE(r) ARE NOT MODIFIED BY THE USE", - "1OF QUAKEWORLD(tm) AND REMAIN IN FULL", - "1FORCE.", - "0NIN(r) is a registered trademark", - "0licensed to Nothing Interactive, Inc.", - "0All rights reserved. Press y to exit", - NULL }; - char **p; - int y; +// "0 QuakeWorld", +// "1 version " VSTR2(VERSION) " by id Software", +// "0Programming", +// "1 John Carmack Michael Abrash", +// "1 John Cash Christian Antkow", +// "0Additional Programming", +// "1 Dave 'Zoid' Kirsch", +// "1 Jack 'morbid' Mathews", +// "0Id Software is not responsible for", +// "0providing technical support for", +// "0QUAKEWORLD(tm). (c)1996 Id Software,", +// "0Inc. All Rights Reserved.", +// "0QUAKEWORLD(tm) is a trademark of Id", +// "0Software, Inc.", +// "1NOTICE: THE COPYRIGHT AND TRADEMARK", +// "1NOTICES APPEARING IN YOUR COPY OF", +// "1QUAKE(r) ARE NOT MODIFIED BY THE USE", +// "1OF QUAKEWORLD(tm) AND REMAIN IN FULL", +// "1FORCE.", +// "0NIN(r) is a registered trademark", +// "0licensed to Nothing Interactive, Inc.", +// "0All rights reserved. Press y to exit", +// NULL }; +// char **p; +// int y; if (wasInMenus) { @@ -1352,7 +1352,7 @@ void M_Quit_Draw (void) M_Draw (); m_state = m_quit; } -#if 1 +#if 0 M_DrawTextBox (0, 0, 38, 23); y = 12; for (p = cmsg; *p; p++, y += 8) { diff --git a/source/quakefs.c b/source/quakefs.c index b5afa11..fce8a95 100644 --- a/source/quakefs.c +++ b/source/quakefs.c @@ -121,7 +121,7 @@ typedef struct typedef struct pack_s { char filename[MAX_OSPATH]; - QFile *handle; + FILE *handle; int numfiles; packfile_t *files; } pack_t; @@ -186,7 +186,7 @@ COM_FileBase (char *in, char *out) COM_filelength */ int -COM_filelength (QFile *f) +COM_filelength (FILE *f) { int pos; int end; @@ -203,9 +203,9 @@ COM_filelength (QFile *f) COM_FileOpenRead */ int -COM_FileOpenRead (char *path, QFile **hndl) +COM_FileOpenRead (char *path, FILE **hndl) { - QFile *f; + FILE *f; f = Qopen(path, "rbz"); if (!f) @@ -285,7 +285,7 @@ COM_Maplist_f ( void ) void COM_WriteFile ( char *filename, void *data, int len ) { - QFile *f; + FILE *f; char name[MAX_OSPATH]; snprintf(name, sizeof(name), "%s/%s", com_gamedir, filename); @@ -338,7 +338,7 @@ COM_CreatePath ( char *path ) void COM_CopyFile (char *netpath, char *cachepath) { - QFile *in, *out; + FILE *in, *out; int remaining, count; char buf[4096]; @@ -366,7 +366,7 @@ COM_CopyFile (char *netpath, char *cachepath) /* COM_OpenRead */ -QFile * +FILE * COM_OpenRead (const char *path, int offs, int len) { int fd=open(path,O_RDONLY); @@ -406,7 +406,7 @@ int file_from_pak; // global indicating file came from pack file ZOID Sets com_filesize and one of handle or file */ int -COM_FOpenFile (char *filename, QFile **gzfile) +COM_FOpenFile (char *filename, FILE **gzfile) { searchpath_t *search; char netpath[MAX_OSPATH]; @@ -482,7 +482,7 @@ int loadsize; byte * COM_LoadFile (char *path, int usehunk) { - QFile *h; + FILE *h; byte *buf; char base[32]; int len; @@ -579,7 +579,7 @@ COM_LoadPackFile (char *packfile) packfile_t *newfiles; int numpackfiles; pack_t *pack; - QFile *packhandle; + FILE *packhandle; dpackfile_t info[MAX_FILES_IN_PACK]; if (COM_FileOpenRead (packfile, &packhandle) == -1) diff --git a/source/quakeio.c b/source/quakeio.c index b04b3ca..2244fe9 100644 --- a/source/quakeio.c +++ b/source/quakeio.c @@ -32,24 +32,24 @@ # include #endif #ifdef HAVE_MALLOC_H -#include +# include #endif #include #include #include #include #ifdef WIN32 -#include -#include +# include +# include #else -#include +# include #endif #ifdef HAVE_UNISTD_H -#include +# include #endif #ifdef _MSC_VER -#define _POSIX_ +# define _POSIX_ #endif #include @@ -91,247 +91,104 @@ Qrename(const char *old, const char *new) return rename (e_old, e_new); } -QFile * +FILE * Qopen(const char *path, const char *mode) { - QFile *file; - char m[80],*p; - int zip=0; + FILE *file; char e_path[PATH_MAX]; Qexpand_squiggle (path, e_path); path = e_path; - for (p=m; *mode && p-m<(sizeof(m)-1); mode++) { - if (*mode=='z') { - zip=1; - continue; - } - *p++=*mode; - } - *p=0; - - file=calloc(sizeof(*file),1); - if (!file) - return 0; -#ifdef HAS_ZLIB - if (zip) { - file->gzfile=gzopen(path,m); - if (!file->gzfile) { - free(file); - return 0; - } - } else -#endif - { - file->file=fopen(path,m); - if (!file->file) { - free(file); - return 0; - } - } + file=fopen(path,mode); return file; } -QFile * +FILE * Qdopen(int fd, const char *mode) { - QFile *file; - char m[80],*p; - int zip=0; + FILE *file; - for (p=m; *mode && p-m<(sizeof(m)-1); mode++) { - if (*mode=='z') { - zip=1; - continue; - } - *p++=*mode; - } - - *p=0; - - file=calloc(sizeof(*file),1); - if (!file) - return 0; -#ifdef HAS_ZLIB - if (zip) { - file->gzfile=gzdopen(fd,m); - if (!file->gzfile) { - free(file); - return 0; - } - } else -#endif - { - file->file=fdopen(fd,m); - if (!file->file) { - free(file); - return 0; - } - } + file=fdopen(fd,mode); #ifdef WIN32 -#ifdef __BORLANDC__ - setmode(_fileno(file->file),O_BINARY); -#else - _setmode(_fileno(file->file),_O_BINARY); -#endif +# ifdef __BORLANDC__ + setmode(_fileno(file),O_BINARY); +# else + _setmode(_fileno(file),_O_BINARY); +# endif #endif return file; } void -Qclose(QFile *file) +Qclose(FILE *file) { - if (file->file) - fclose(file->file); -#ifdef HAS_ZLIB - else - gzclose(file->gzfile); -#endif + fclose(file); free(file); } int -Qread(QFile *file, void *buf, int count) +Qread(FILE *file, void *buf, int count) { - if (file->file) - return fread(buf, 1, count, file->file); -#ifdef HAS_ZLIB - else - return gzread(file->gzfile,buf,count); -#else - return -1; -#endif + return fread(buf, 1, count, file); } int -Qwrite(QFile *file, void *buf, int count) +Qwrite(FILE *file, void *buf, int count) { - if (file->file) - return fwrite(buf, 1, count, file->file); -#ifdef HAS_ZLIB - else - return gzwrite(file->gzfile,buf,count); -#else - return -1; -#endif + return fwrite(buf, 1, count, file); } int -Qprintf(QFile *file, const char *fmt, ...) +Qprintf(FILE *file, const char *fmt, ...) { va_list args; int ret=-1; va_start(args,fmt); - if (file->file) - ret=vfprintf(file->file, fmt, args); -#ifdef HAS_ZLIB - else { - char buf[4096]; - va_start(args, fmt); -#ifdef HAVE_VSNPRINTF - (void)vsnprintf(buf, sizeof(buf), fmt, args); -#else - (void)vsprintf(buf, fmt, args); -#endif - va_end(args); - ret = strlen(buf); /* some *sprintf don't return the nb of bytes written */ - if (ret>0) - ret=gzwrite(file, buf, (unsigned)ret); - } -#endif + ret=vfprintf(file, fmt, args); va_end(args); return ret; } char * -Qgets(QFile *file, char *buf, int count) +Qgets(FILE *file, char *buf, int count) { - if (file->file) - return fgets(buf, count, file->file); -#ifdef HAS_ZLIB - else - return gzgets(file->gzfile,buf,count); -#else - return 0; -#endif + return fgets(buf, count, file); } int -Qgetc(QFile *file) +Qgetc(FILE *file) { - if (file->file) - return fgetc(file->file); -#ifdef HAS_ZLIB - else - return gzgetc(file->gzfile); -#else - return -1; -#endif + return fgetc(file); } int -Qputc(QFile *file, int c) +Qputc(FILE *file, int c) { - if (file->file) - return fputc(c, file->file); -#ifdef HAS_ZLIB - else - return gzputc(file->gzfile,c); -#else - return -1; -#endif + return fputc(c, file); } int -Qseek(QFile *file, long offset, int whence) +Qseek(FILE *file, long offset, int whence) { - if (file->file) - return fseek(file->file, offset, whence); -#ifdef HAS_ZLIB - else - return gzseek(file->gzfile,offset,whence); -#else - return -1; -#endif + return fseek(file, offset, whence); } long -Qtell(QFile *file) +Qtell(FILE *file) { - if (file->file) - return ftell(file->file); -#ifdef HAS_ZLIB - else - return gztell(file->gzfile); -#else - return -1; -#endif + return ftell(file); } int -Qflush(QFile *file) +Qflush(FILE *file) { - if (file->file) - return fflush(file->file); -#ifdef HAS_ZLIB - else - return gzflush(file->gzfile,Z_SYNC_FLUSH); -#else - return -1; -#endif + return fflush(file); } int -Qeof(QFile *file) +Qeof(FILE *file) { - if (file->file) - return feof(file->file); -#ifdef HAS_ZLIB - else - return gzeof(file->gzfile); -#else - return -1; -#endif + return feof(file); } diff --git a/source/r_part.c b/source/r_part.c index c932602..ef30157 100644 --- a/source/r_part.c +++ b/source/r_part.c @@ -101,7 +101,7 @@ void R_ClearParticles (void) void R_ReadPointFile_f (void) { - QFile *f; + FILE *f; vec3_t org; int r; int c; diff --git a/source/sv_ccmds.c b/source/sv_ccmds.c index c4cec99..e357242 100644 --- a/source/sv_ccmds.c +++ b/source/sv_ccmds.c @@ -332,7 +332,7 @@ void SV_Map_f (void) { char level[MAX_QPATH]; char expanded[MAX_QPATH]; - QFile *f; + FILE *f; if (Cmd_Argc() != 2) { diff --git a/source/sv_main.c b/source/sv_main.c index 957ea1e..22277c0 100644 --- a/source/sv_main.c +++ b/source/sv_main.c @@ -163,8 +163,8 @@ cvar_t *watervis; CVAR_FIXME */ cvar_t *hostname; -QFile *sv_logfile; -QFile *sv_fraglogfile; +FILE *sv_logfile; +FILE *sv_fraglogfile; void SV_AcceptClient (netadr_t adr, int userid, char *userinfo); void Master_Shutdown (void); @@ -1110,7 +1110,7 @@ SV_WriteIP_f */ void SV_WriteIP_f (void) { - QFile *f; + FILE *f; char name[MAX_OSPATH]; byte b[4]; int i; diff --git a/source/vid_glx.c b/source/vid_glx.c index 594ab5d..f75f914 100644 --- a/source/vid_glx.c +++ b/source/vid_glx.c @@ -480,7 +480,7 @@ void VID_SetPalette (unsigned char *palette) int k; unsigned short i; unsigned *table; - QFile *f; + FILE *f; char s[255]; float dist, bestdist; static qboolean palflag = false;