shithub: choc

Download patch

ref: 69cd2345e29316f8bfb247b2f1f97c4076b47d27
parent: 770fb3d7c7c23bc9b101ebbf314b142a440f6637
author: Simon Howard <[email protected]>
date: Mon Aug 6 00:48:55 EDT 2007

Remove duplicate FileExists function.

Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 944

--- a/src/m_misc.c
+++ b/src/m_misc.c
@@ -875,23 +875,6 @@
     Z_Free (pcx);
 }
 
-static boolean FileExists(char *filename)
-{
-    FILE *handle;
-
-    handle = fopen(filename, "rb");
-
-    if (handle != NULL)
-    {
-        fclose(handle);
-        return true;
-    }
-    else
-    {
-        return false;
-    }
-}
-
 //
 // M_ScreenShot
 //
@@ -912,7 +895,7 @@
     {
 	lbmname[4] = i/10 + '0';
 	lbmname[5] = i%10 + '0';
-	if (!FileExists(lbmname))
+	if (!M_FileExists(lbmname))
 	    break;	// file doesn't exist
     }
     if (i==100)