dxdiag: Build with msvcrt.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
stable
Alexandre Julliard 2019-04-29 11:52:43 +02:00
parent 3efefad87d
commit d846e49a74
4 changed files with 14 additions and 19 deletions

View File

@ -1,7 +1,8 @@
MODULE = dxdiag.exe
APPMODE = -mwindows -municode
IMPORTS = dxguid ole32 oleaut32 user32
EXTRADLLFLAGS = -mwindows -municode -mno-cygwin
C_SRCS = \
information.c \
main.c \

View File

@ -23,8 +23,6 @@
#include <dxdiag.h>
#include "wine/debug.h"
#include "wine/unicode.h"
#include "dxdiag_private.h"
WINE_DEFAULT_DEBUG_CHANNEL(dxdiag);
@ -69,10 +67,10 @@ static BOOL property_to_string(IDxDiagContainer *container, const WCHAR *propert
{
WCHAR *bstr = V_BSTR(&var);
*output = HeapAlloc(GetProcessHeap(), 0, (strlenW(bstr) + 1) * sizeof(WCHAR));
*output = HeapAlloc(GetProcessHeap(), 0, (lstrlenW(bstr) + 1) * sizeof(WCHAR));
if (*output)
{
strcpyW(*output, bstr);
lstrcpyW(*output, bstr);
ret = TRUE;
}
}

View File

@ -23,8 +23,6 @@
#include <dxdiag.h>
#include "wine/debug.h"
#include "wine/unicode.h"
#include "dxdiag_private.h"
WINE_DEFAULT_DEBUG_CHANNEL(dxdiag);
@ -61,7 +59,7 @@ static BOOL process_file_name(const WCHAR *cmdline, enum output_type output_type
cmdline++;
/* Ignore filename quoting, if any. */
if (*cmdline == '"' && (endptr = strrchrW(cmdline, '"')))
if (*cmdline == '"' && (endptr = wcsrchr(cmdline, '"')))
{
/* Reject a string with only one quote. */
if (cmdline == endptr)
@ -70,7 +68,7 @@ static BOOL process_file_name(const WCHAR *cmdline, enum output_type output_type
cmdline++;
}
else
endptr = cmdline + strlenW(cmdline);
endptr = cmdline + lstrlenW(cmdline);
len = endptr - cmdline;
if (len == 0 || len >= filename_len)
@ -80,14 +78,14 @@ static BOOL process_file_name(const WCHAR *cmdline, enum output_type output_type
filename[len] = '\0';
/* Append an extension appropriate for the output type if the filename does not have one. */
if (!strrchrW(filename, '.'))
if (!wcsrchr(filename, '.'))
{
const WCHAR *filename_ext = get_output_extension(output_type);
if (len + strlenW(filename_ext) >= filename_len)
if (len + lstrlenW(filename_ext) >= filename_len)
return FALSE;
strcatW(filename, filename_ext);
lstrcatW(filename, filename_ext);
}
return TRUE;
@ -145,17 +143,17 @@ static BOOL process_command_line(const WCHAR *cmdline, struct command_line_info
ARRAY_SIZE(info->outfile));
case 'W':
case 'w':
if (strncmpiW(cmdline, whql_colonW, 5))
if (wcsnicmp(cmdline, whql_colonW, 5))
return FALSE;
cmdline += 5;
if (!strncmpiW(cmdline, offW, 3))
if (!wcsnicmp(cmdline, offW, 3))
{
info->whql_check = FALSE;
cmdline += 2;
}
else if (!strncmpiW(cmdline, onW, 2))
else if (!wcsnicmp(cmdline, onW, 2))
{
info->whql_check = TRUE;
cmdline++;
@ -167,7 +165,7 @@ static BOOL process_command_line(const WCHAR *cmdline, struct command_line_info
case 'd':
case 'D':
if (strncmpiW(cmdline, dontskipW, 8))
if (wcsnicmp(cmdline, dontskipW, 8))
return FALSE;
cmdline += 8;
break;

View File

@ -26,8 +26,6 @@
#include <stdio.h>
#include "wine/debug.h"
#include "wine/unicode.h"
#include "dxdiag_private.h"
WINE_DEFAULT_DEBUG_CHANNEL(dxdiag);
@ -98,7 +96,7 @@ static BOOL output_text_header(HANDLE hFile, const char *caption)
static BOOL output_text_field(HANDLE hFile, const char *field_name, DWORD field_width, const WCHAR *value)
{
DWORD value_lenW = strlenW(value);
DWORD value_lenW = lstrlenW(value);
DWORD value_lenA = WideCharToMultiByte(CP_ACP, 0, value, value_lenW, NULL, 0, NULL, NULL);
DWORD total_len = field_width + sizeof(": ") - 1 + value_lenA + sizeof(crlf);
char sprintf_fmt[1 + 10 + 3 + 1];