Commit 1ba6a135 authored by Eric Pouech's avatar Eric Pouech Committed by Alexandre Julliard

winecfg: Output with MESSAGE.

Regular GUI programs don't use console nor std I/O. Signed-off-by: 's avatarEric Pouech <epouech@codeweavers.com>
parent e048f71e
......@@ -25,7 +25,6 @@
#include <windows.h>
#include <commdlg.h>
#include <wine/debug.h>
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include "winecfg.h"
......@@ -516,7 +515,7 @@ void print_windows_versions(void)
for (i = 0; i < ARRAY_SIZE(win_versions); i++)
{
wprintf(L" %10s %s\n", win_versions[i].szVersion, win_versions[i].szDescription);
MESSAGE(" %10ls %ls\n", win_versions[i].szVersion, win_versions[i].szDescription);
}
}
......@@ -527,10 +526,10 @@ void print_current_winver(void)
if (!winver || !winver[0])
{
int ver = get_registry_version();
wprintf(L"%s\n", ver == -1 ? DEFAULT_WIN_VERSION : win_versions[ver].szVersion);
MESSAGE("%ls\n", ver == -1 ? DEFAULT_WIN_VERSION : win_versions[ver].szVersion);
}
else
wprintf(L"%s\n", winver);
MESSAGE("%ls\n", winver);
free(winver);
}
......
......@@ -23,7 +23,6 @@
#include <assert.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#define COBJMACROS
......
......@@ -23,7 +23,6 @@
#include <assert.h>
#include <stdarg.h>
#include <stdio.h>
#include <string.h>
#include <ntstatus.h>
......
......@@ -21,8 +21,6 @@
*
*/
#include <stdio.h>
#define WIN32_LEAN_AND_MEAN
#define COBJMACROS
......
......@@ -23,7 +23,6 @@
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <commdlg.h>
#include <stdio.h>
#include <assert.h>
#include <stdlib.h>
......
......@@ -23,6 +23,7 @@
#define WIN32_LEAN_AND_MEAN
#include <locale.h>
#include <windows.h>
#include <commctrl.h>
#include <objbase.h>
......@@ -186,6 +187,9 @@ ProcessCmdLine(LPWSTR lpCmdLine)
{
return -1;
}
setlocale(LC_ALL, "en-US");
if (lpCmdLine[1] == 'V' || lpCmdLine[1] == 'v')
{
if (wcslen(lpCmdLine) > 4)
......@@ -194,22 +198,19 @@ ProcessCmdLine(LPWSTR lpCmdLine)
print_current_winver();
return 0;
}
if (lpCmdLine[1] != '?')
MESSAGE("Unsupported option '%ls'\n", lpCmdLine);
if (lpCmdLine[1] == '?')
{
printf("Usage: winecfg [options]\n\n");
printf("Options:\n");
printf(" [no option] Launch the graphical version of this program.\n");
printf(" /v Display the current global Windows version.\n");
printf(" /v version Set global Windows version to 'version'.\n");
printf(" /? Display this information and exit.\n\n");
printf("Valid versions for 'version':\n\n");
print_windows_versions();
MESSAGE("Usage: winecfg [options]\n\n");
MESSAGE("Options:\n");
MESSAGE(" [no option] Launch the graphical version of this program.\n");
MESSAGE(" /v Display the current global Windows version.\n");
MESSAGE(" /v version Set global Windows version to 'version'.\n");
MESSAGE(" /? Display this information and exit.\n\n");
MESSAGE("Valid versions for 'version':\n\n");
print_windows_versions();
return 0;
}
return -1;
return 0;
}
/*****************************************************************************
......
......@@ -25,7 +25,6 @@
#include <assert.h>
#include <stdarg.h>
#include <stdlib.h>
#include <stdio.h>
#define COBJMACROS
......
......@@ -30,7 +30,6 @@
#define WIN32_LEAN_AND_MEAN
#include <assert.h>
#include <stdio.h>
#include <limits.h>
#include <windows.h>
#include <winreg.h>
......
......@@ -25,7 +25,6 @@
#include <stdarg.h>
#include <stdlib.h>
#include <stdio.h>
#include <windows.h>
#include <wine/debug.h>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment