Whitespace fixes, update email.
[batch.git] / version / version.c
index 03380915fe4a0b64e90ba69c9a6c25bc1dbd3bab..9fe17c2992f2f8d0b43553033f6f8d391c2fbb19 100644 (file)
@@ -14,13 +14,13 @@ Abstract:
 
 Author:
 
-    Scott Gasch (scott@wannabe.guru.org) 22 Aug 2002
+    Scott Gasch (scott@gasch.org) 22 Aug 2002
 
 Revision History:
 
 --*/
 
-#include <stdlib.h> 
+#include <stdlib.h>
 #include <stdio.h>
 #include <windows.h>
 
@@ -30,7 +30,7 @@ Revision History:
 // stdout about which version of the windows operating system is running
 // and sets the errorlevel to one of the values below accordingly.  Might
 // be useful in your CMD/BAT script...
-// 
+//
 #define EXIT_WIN95            (1)
 #define EXIT_WIN98            (2)
 #define EXIT_WINME            (3)
@@ -46,7 +46,7 @@ Revision History:
 #define EXIT_VISTA            (13)
 #define EXIT_UNKNOWN          (14)
 
-CHAR *g_szWindowsNames[] = 
+CHAR *g_szWindowsNames[] =
 {
     "Not Used",
     "Windows95",
@@ -68,7 +68,7 @@ CHAR *g_szWindowsNames[] =
 typedef BOOL (*FUNCTION_PTR)(OSVERSIONINFO *);
 
 
-BOOL 
+BOOL
 TryWinNT(DWORD *pdwMajor, DWORD *pdwMinor, DWORD *pdwPlatform)
 /*++
 
@@ -93,15 +93,15 @@ Return value:
     BOOL fRet = FALSE;
     HMODULE h = NULL;
     OSVERSIONINFOEXA osvi;
-    
+
     h = LoadLibraryA("kernel32.dll");
     if (NULL == h)
     {
-        fprintf(stderr, "Failed to load kernel32.dll, error=%u.\n", 
+        fprintf(stderr, "Failed to load kernel32.dll, error=%u.\n",
                 GetLastError());
         goto end;
     }
-        
+
     p = (FUNCTION_PTR)GetProcAddress(h, "GetVersionExA");
     if (NULL == p)
     {
@@ -127,12 +127,12 @@ Return value:
     {
         FreeLibrary(h);
     }
-    
+
     return(fRet);
 }
 
 
-int __cdecl 
+int __cdecl
 main(void)
 /*++
 
@@ -156,7 +156,7 @@ Return value:
 
     //
     // This call should be available on all versions of Windows
-    // 
+    //
     dwVersion = GetVersion();
     if ((dwVersion & 0x80000000) ||
         (FALSE == TryWinNT(&dwMajor, &dwMinor, &dwPlatform)))
@@ -168,7 +168,7 @@ Return value:
 
     //
     // Parse results
-    // 
+    //
     if (dwPlatform == VER_PLATFORM_WIN32_NT)
     {
         switch(dwMajor)
@@ -180,7 +180,7 @@ Return value:
                     iRet = EXIT_NT351;
                 }
                 goto end;
-        
+
             case 4:
                 iRet = EXIT_NT4OTHER;
                 if (0 == dwMinor)
@@ -188,7 +188,7 @@ Return value:
                     iRet = EXIT_NT4;
                 }
                 goto end;
-        
+
             case 5:
                 iRet = EXIT_NT5OTHER;
                 if (0 == dwMinor)
@@ -204,11 +204,11 @@ Return value:
                     iRet = EXIT_WIN_SERVER_2003;
                 }
                 goto end;
-                
+
             case 6:
                 iRet = EXIT_VISTA;
                 goto end;
-                
+
             default:
                 goto end;
         }
@@ -232,12 +232,12 @@ Return value:
                     iRet = EXIT_WINME;
                 }
                 goto end;
-                
+
             default:
                 goto end;
         }
     }
-    
+
  end:
     printf("%s %u.%u -- errorlevel is %d\n",
            g_szWindowsNames[iRet],