Commit 30ab4fe8 authored by Alexandre Julliard's avatar Alexandre Julliard

icinfo: Build with msvcrt.

parent fdc124c1
MODULE = icinfo.exe MODULE = icinfo.exe
APPMODE = -mconsole -municode
IMPORTS = msvfw32 IMPORTS = msvfw32
EXTRADLLFLAGS = -mconsole -municode -mno-cygwin
C_SRCS = icinfo.c C_SRCS = icinfo.c
...@@ -18,28 +18,27 @@ ...@@ -18,28 +18,27 @@
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
#include <wine/unicode.h>
#include "windows.h" #include "windows.h"
#include "mmsystem.h" #include "mmsystem.h"
#include "vfw.h" #include "vfw.h"
static int mywprintf(const WCHAR *format, ...) static int WINAPIV mywprintf(const WCHAR *format, ...)
{ {
static char output_bufA[65536]; static char output_bufA[65536];
static WCHAR output_bufW[sizeof(output_bufA)]; static WCHAR output_bufW[sizeof(output_bufA)];
va_list parms; __ms_va_list parms;
DWORD nOut; DWORD nOut;
BOOL res = FALSE; BOOL res = FALSE;
HANDLE hout = GetStdHandle(STD_OUTPUT_HANDLE); HANDLE hout = GetStdHandle(STD_OUTPUT_HANDLE);
va_start(parms, format); __ms_va_start(parms, format);
vsnprintfW(output_bufW, ARRAY_SIZE(output_bufW), format, parms); vswprintf(output_bufW, ARRAY_SIZE(output_bufW), format, parms);
va_end(parms); __ms_va_end(parms);
/* Try to write as unicode whenever we think it's a console */ /* Try to write as unicode whenever we think it's a console */
if (((DWORD_PTR)hout & 3) == 3) if (((DWORD_PTR)hout & 3) == 3)
{ {
res = WriteConsoleW(hout, output_bufW, strlenW(output_bufW), &nOut, NULL); res = WriteConsoleW(hout, output_bufW, lstrlenW(output_bufW), &nOut, NULL);
} }
else else
{ {
...@@ -82,9 +81,9 @@ int wmain(int argc, WCHAR* argv[]) ...@@ -82,9 +81,9 @@ int wmain(int argc, WCHAR* argv[])
static const WCHAR unk_opt_fmt[] = {'U','n','k','n','o','w','n',' ','o','p','t','i','o','n',':',' ','%','s','\n',0}; static const WCHAR unk_opt_fmt[] = {'U','n','k','n','o','w','n',' ','o','p','t','i','o','n',':',' ','%','s','\n',0};
for (i = 1; i < argc; i++) { for (i = 1; i < argc; i++) {
if (!strcmpW(argv[i], about)) if (!lstrcmpW(argv[i], about))
doabout = 1; doabout = 1;
else if (!strcmpW(argv[i], configure)) else if (!lstrcmpW(argv[i], configure))
doconfigure = 1; doconfigure = 1;
else { else {
mywprintf(unk_opt_fmt, argv[i]); mywprintf(unk_opt_fmt, argv[i]);
......
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