Michael Stefaniuc : wineconsole: Switch the rest to use the explicit W-forms.

Alexandre Julliard julliard at winehq.org
Wed Apr 28 16:35:46 CDT 2010


Module: wine
Branch: master
Commit: b3350899f20cfc341a6d2cf9e4f1c1cc53e34e10
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=b3350899f20cfc341a6d2cf9e4f1c1cc53e34e10

Author: Michael Stefaniuc <mstefani at redhat.de>
Date:   Wed Apr 28 01:10:42 2010 +0200

wineconsole: Switch the rest to use the explicit W-forms.

And compile with -DWINE_NO_UNICODE_MACROS.

---

 programs/wineconsole/Makefile.in    |    2 +-
 programs/wineconsole/curses.c       |    2 +-
 programs/wineconsole/winecon_user.h |   14 +++++++-------
 programs/wineconsole/wineconsole.c  |   12 ++++++------
 4 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/programs/wineconsole/Makefile.in b/programs/wineconsole/Makefile.in
index f35767c..1763b18 100644
--- a/programs/wineconsole/Makefile.in
+++ b/programs/wineconsole/Makefile.in
@@ -1,4 +1,4 @@
-EXTRADEFS = -DUNICODE
+EXTRADEFS = -DWINE_NO_UNICODE_MACROS
 TOPSRCDIR = @top_srcdir@
 TOPOBJDIR = ../..
 SRCDIR    = @srcdir@
diff --git a/programs/wineconsole/curses.c b/programs/wineconsole/curses.c
index 549efb4..773f985 100644
--- a/programs/wineconsole/curses.c
+++ b/programs/wineconsole/curses.c
@@ -882,7 +882,7 @@ static DWORD CALLBACK input_thread( void *arg )
         else
             numEvent = WCCURSES_FillSimpleChar(ir, inchar);
 
-        if (numEvent) WriteConsoleInput(data->hConIn, ir, numEvent, &n);
+        if (numEvent) WriteConsoleInputW(data->hConIn, ir, numEvent, &n);
     }
     close( PRIVATE(data)->sync_pipe[0] );
     return 0;
diff --git a/programs/wineconsole/winecon_user.h b/programs/wineconsole/winecon_user.h
index 51db26c..73a7701 100644
--- a/programs/wineconsole/winecon_user.h
+++ b/programs/wineconsole/winecon_user.h
@@ -45,13 +45,13 @@ struct inner_data_user {
 /* from user.c */
 extern const COLORREF WCUSER_ColorMap[16];
 extern BOOL WCUSER_GetProperties(struct inner_data*, BOOL);
-extern BOOL WCUSER_ValidateFont(const struct inner_data* data, const LOGFONT* lf);
+extern BOOL WCUSER_ValidateFont(const struct inner_data* data, const LOGFONTW* lf);
 extern BOOL WCUSER_ValidateFontMetric(const struct inner_data* data,
-                                      const TEXTMETRIC* tm, DWORD fontType);
-extern HFONT WCUSER_CopyFont(struct config_data* config, HWND hWnd, const LOGFONT* lf,
-                             LONG* el);
-extern void WCUSER_FillLogFont(LOGFONT* lf, const WCHAR* name,
+                                      const TEXTMETRICW* tm, DWORD fontType);
+extern HFONT WCUSER_CopyFont(struct config_data* config, HWND hWnd,
+                             const LOGFONTW* lf, LONG* el);
+extern void WCUSER_FillLogFont(LOGFONTW* lf, const WCHAR* name,
                                UINT height, UINT weight);
 
-extern void WCUSER_DumpLogFont(const char* pfx, const LOGFONT* lf, DWORD ft);
-extern void WCUSER_DumpTextMetric(const TEXTMETRIC* tm, DWORD ft);
+extern void WCUSER_DumpLogFont(const char* pfx, const LOGFONTW* lf, DWORD ft);
+extern void WCUSER_DumpTextMetric(const TEXTMETRICW* tm, DWORD ft);
diff --git a/programs/wineconsole/wineconsole.c b/programs/wineconsole/wineconsole.c
index 0e57176..5acb9ad 100644
--- a/programs/wineconsole/wineconsole.c
+++ b/programs/wineconsole/wineconsole.c
@@ -45,7 +45,7 @@ static void printf_res(UINT uResId, ...)
     va_list args;
 
     va_start(args, uResId);
-    LoadStringW(GetModuleHandle(NULL), uResId, buffer, sizeof(buffer)/sizeof(WCHAR));
+    LoadStringW(GetModuleHandleW(NULL), uResId, buffer, sizeof(buffer)/sizeof(buffer[0]));
     WideCharToMultiByte(CP_UNIXCP, 0, buffer, -1, ansi, sizeof(ansi), NULL, NULL);
     vprintf(ansi, args);
     va_end(args);
@@ -561,7 +561,7 @@ static struct inner_data* WINECON_Init(HINSTANCE hInst, DWORD pid, LPCWSTR appna
     data = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*data));
     if (!data) return 0;
 
-    GetStartupInfo(&si);
+    GetStartupInfoW(&si);
 
     if (pid == 0)
     {
@@ -672,9 +672,9 @@ static struct inner_data* WINECON_Init(HINSTANCE hInst, DWORD pid, LPCWSTR appna
  */
 static BOOL WINECON_Spawn(struct inner_data* data, LPWSTR cmdLine)
 {
-    PROCESS_INFORMATION	info;
-    STARTUPINFO		startup;
-    BOOL		done;
+    PROCESS_INFORMATION info;
+    STARTUPINFOW        startup;
+    BOOL                done;
 
     /* we're in the case wineconsole <exe> <options>... spawn the new process */
     memset(&startup, 0, sizeof(startup));
@@ -696,7 +696,7 @@ static BOOL WINECON_Spawn(struct inner_data* data, LPWSTR cmdLine)
 	return FALSE;
     }
 
-    done = CreateProcess(NULL, cmdLine, NULL, NULL, TRUE, 0L, NULL, NULL, &startup, &info);
+    done = CreateProcessW(NULL, cmdLine, NULL, NULL, TRUE, 0L, NULL, NULL, &startup, &info);
 
     /* we no longer need the handles passed to the child for the console */
     CloseHandle(startup.hStdInput);




More information about the wine-cvs mailing list