Module: wine Branch: master Commit: 21d95abef8184a7f99e8abdc3da8a762aca46567 URL: https://source.winehq.org/git/wine.git/?a=commit;h=21d95abef8184a7f99e8abdc3... Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Jun 10 10:56:06 2019 +0200 localui: Build with msvcrt. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/localui/Makefile.in | 2 ++ dlls/localui/localui.c | 17 ++++++++--------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/dlls/localui/Makefile.in b/dlls/localui/Makefile.in index eb4273f..70b7254 100644 --- a/dlls/localui/Makefile.in +++ b/dlls/localui/Makefile.in @@ -1,6 +1,8 @@ MODULE = localui.dll IMPORTS = winspool user32 +EXTRADLLFLAGS = -mno-cygwin + C_SRCS = \ localui.c diff --git a/dlls/localui/localui.c b/dlls/localui/localui.c index 77c8bf0..ab8f5c9 100644 --- a/dlls/localui/localui.c +++ b/dlls/localui/localui.c @@ -30,7 +30,6 @@ #include "ddk/winsplp.h" #include "wine/debug.h" -#include "wine/unicode.h" #include "localui.h" WINE_DEFAULT_DEBUG_CHANNEL(localui); @@ -187,7 +186,7 @@ static void dlg_port_already_exists(HWND hWnd, LPCWSTR portname) message = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR)); if (message) { message[0] = '\0'; - snprintfW(message, len, res_PortExistsW, portname); + swprintf(message, len, res_PortExistsW, portname); MessageBoxW(hWnd, message, res_PortW, MB_OK | MB_ICONERROR); HeapFree(GetProcessHeap(), 0, message); } @@ -213,7 +212,7 @@ static void dlg_invalid_portname(HWND hWnd, LPCWSTR portname) message = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR)); if (message) { message[0] = '\0'; - snprintfW(message, len, res_InvalidNameW, portname); + swprintf(message, len, res_InvalidNameW, portname); MessageBoxW(hWnd, message, res_PortW, MB_OK | MB_ICONERROR); HeapFree(GetProcessHeap(), 0, message); } @@ -380,7 +379,7 @@ static INT_PTR CALLBACK dlgproc_lptconfig(HWND hwnd, UINT msg, WPARAM wparam, LP /* native localui.dll use the same limits */ if ((res > 0) && (res < 1000000) && status) { - sprintfW(bufferW, fmt_uW, res); + swprintf(bufferW, ARRAY_SIZE(bufferW), fmt_uW, res); res = XcvDataW( data->hXcv, cmd_ConfigureLPTPortCommandOKW, (PBYTE) bufferW, (lstrlenW(bufferW) +1) * sizeof(WCHAR), @@ -416,13 +415,13 @@ static DWORD get_type_from_name(LPCWSTR name) { HANDLE hfile; - if (!strncmpiW(name, portname_LPT, ARRAY_SIZE(portname_LPT) -1)) + if (!wcsnicmp(name, portname_LPT, ARRAY_SIZE(portname_LPT) -1)) return PORT_IS_LPT; - if (!strncmpiW(name, portname_COM, ARRAY_SIZE(portname_COM) -1)) + if (!wcsnicmp(name, portname_COM, ARRAY_SIZE(portname_COM) -1)) return PORT_IS_COM; - if (!strcmpiW(name, portname_FILE)) + if (!wcsicmp(name, portname_FILE)) return PORT_IS_FILE; if (name[0] == '/') @@ -431,10 +430,10 @@ static DWORD get_type_from_name(LPCWSTR name) if (name[0] == '|') return PORT_IS_PIPE; - if (!strncmpW(name, portname_CUPS, ARRAY_SIZE(portname_CUPS) -1)) + if (!wcsncmp(name, portname_CUPS, ARRAY_SIZE(portname_CUPS) -1)) return PORT_IS_CUPS; - if (!strncmpW(name, portname_LPR, ARRAY_SIZE(portname_LPR) -1)) + if (!wcsncmp(name, portname_LPR, ARRAY_SIZE(portname_LPR) -1)) return PORT_IS_LPR; /* Must be a file or a directory. Does the file exist ? */