From f754fd05cd14f590f7af6c1beb418986b68cd4f9 Mon Sep 17 00:00:00 2001 From: Scott Gasch Date: Thu, 2 Jun 2016 08:46:38 -0700 Subject: [PATCH] Whitespace fixes, update email. --- version/version.c | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/version/version.c b/version/version.c index 0338091..9fe17c2 100644 --- a/version/version.c +++ b/version/version.c @@ -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 +#include #include #include @@ -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], -- 2.46.1