<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">[PATCH] Remove some printfs from common file functions

Remove some generally not that useful Sys_Printf's from NQ/QW common.c.
Thanks to Stephen A for the initial patch.

diff -urN a/NQ/common.c head/NQ/common.c
--- a/NQ/common.c	2006-02-19 11:16:00.000000000 +1030
+++ head/NQ/common.c	2006-02-19 11:15:28.000000000 +1030
@@ -1159,8 +1159,6 @@
 	Sys_Printf("COM_WriteFile: failed on %s\n", name);
 	return;
     }
-
-    Sys_Printf("%s: %s\n", __func__, name);
     Sys_FileWrite(handle, data, len);
     Sys_FileClose(handle);
 }
@@ -1254,8 +1252,6 @@
 	    pak = search-&gt;pack;
 	    for (i = 0; i &lt; pak-&gt;numfiles; i++)
 		if (!strcmp(pak-&gt;files[i].name, filename)) {	// found it!
-		    Sys_Printf("PackFile: %s : %s\n", pak-&gt;filename,
-			       filename);
 		    if (handle) {
 			*handle = pak-&gt;handle;
 			Sys_FileSeek(pak-&gt;handle, pak-&gt;files[i].filepos);
@@ -1300,7 +1296,6 @@
 		strcpy(netpath, cachepath);
 	    }
 
-	    Sys_Printf("FindFile: %s\n", netpath);
 	    com_filesize = Sys_FileOpenRead(netpath, &amp;i);
 	    if (handle)
 		*handle = i;
@@ -1312,7 +1307,6 @@
 	}
 
     }
-
     Sys_Printf("FindFile: can't find %s\n", filename);
 
     if (handle)
diff -urN a/QW/common/common.c head/QW/common/common.c
--- a/QW/common/common.c	2006-02-19 11:16:00.000000000 +1030
+++ head/QW/common/common.c	2006-02-19 10:16:48.000000000 +1030
@@ -1279,8 +1279,6 @@
 	if (!f)
 	    Sys_Error("Error opening %s", filename);
     }
-
-    Sys_Printf("%s: %s\n", __func__, name);
     fwrite(data, 1, len, f);
     fclose(f);
 }
@@ -1374,8 +1372,6 @@
 	    pak = search-&gt;pack;
 	    for (i = 0; i &lt; pak-&gt;numfiles; i++)
 		if (!strcmp(pak-&gt;files[i].name, filename)) {	// found it!
-		    Sys_Printf("PackFile: %s : %s\n", pak-&gt;filename,
-			       filename);
 		    // open a new file on the pakfile
 		    *file = fopen(pak-&gt;filename, "rb");
 		    if (!*file)
@@ -1391,21 +1387,17 @@
 		if (strchr(filename, '/') || strchr(filename, '\\'))
 		    continue;
 	    }
-
 	    sprintf(netpath, "%s/%s", search-&gt;filename, filename);
 
 	    findtime = Sys_FileTime(netpath);
 	    if (findtime == -1)
 		continue;
 
-	    Sys_Printf("FindFile: %s\n", netpath);
-
 	    *file = fopen(netpath, "rb");
 	    return COM_filelength(*file);
 	}
 
     }
-
     Sys_Printf("FindFile: can't find %s\n", filename);
 
     *file = NULL;
</pre></body></html>