r916 - trunk/platform

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Mon Oct 1 11:47:07 EDT 2007


Author: icculus
Date: 2007-10-01 11:47:07 -0400 (Mon, 01 Oct 2007)
New Revision: 916

Modified:
   trunk/platform/windows.c
Log:
Minor windows cleanups.


Modified: trunk/platform/windows.c
===================================================================
--- trunk/platform/windows.c	2007-07-12 10:37:56 UTC (rev 915)
+++ trunk/platform/windows.c	2007-10-01 15:47:07 UTC (rev 916)
@@ -360,7 +360,6 @@
 static char *getExePath(void)
 {
     DWORD buflen = 64;
-    int success = 0;
     LPWSTR modpath = NULL;
     char *retval = NULL;
 
@@ -797,6 +796,8 @@
 /* this could probably use a cleanup. */
 char *__PHYSFS_platformRealPath(const char *path)
 {
+    /* !!! FIXME: this should return NULL if (path) doesn't exist? */
+    /* !!! FIXME: Need to handle symlinks in Vista... */
     /* !!! FIXME: try GetFullPathName() instead? */
     /* this function should be UTF-8 clean. */
     char *retval = NULL;
@@ -934,14 +935,14 @@
   *
   * Returns non-zero if successful, otherwise it returns zero on failure.
   */
- static int getOSInfo(void)
- {
-     OSVERSIONINFO osVerInfo;     /* Information about the OS */
-     osVerInfo.dwOSVersionInfoSize = sizeof(osVerInfo);
-     BAIL_IF_MACRO(!GetVersionEx(&osVerInfo), winApiStrError(), 0);
-     osHasUnicode = (osVerInfo.dwPlatformId != VER_PLATFORM_WIN32_WINDOWS);
-     return(1);
- } /* getOSInfo */
+static int getOSInfo(void)
+{
+    OSVERSIONINFO osVerInfo;     /* Information about the OS */
+    osVerInfo.dwOSVersionInfoSize = sizeof(osVerInfo);
+    BAIL_IF_MACRO(!GetVersionEx(&osVerInfo), winApiStrError(), 0);
+    osHasUnicode = (osVerInfo.dwPlatformId != VER_PLATFORM_WIN32_WINDOWS);
+    return(1);
+} /* getOSInfo */
 
 
 int __PHYSFS_platformInit(void)




More information about the physfs-commits mailing list