wineconsole verbosity
Andreas Mohr
andi at rhlx01.fht-esslingen.de
Sun Jun 9 06:28:04 CDT 2002
Hi all,
wineconsole was awfully quiet about just about anything.
Made initialization more verbose in case of errors.
--
Andreas Mohr Stauferstr. 6, D-71272 Renningen, Germany
-------------- next part --------------
Index: programs/wineconsole/wineconsole.c
===================================================================
RCS file: /home/wine/wine/programs/wineconsole/wineconsole.c,v
retrieving revision 1.13
diff -u -r1.13 wineconsole.c
--- programs/wineconsole/wineconsole.c 31 May 2002 23:40:59 -0000 1.13
+++ programs/wineconsole/wineconsole.c 9 Jun 2002 11:27:01 -0000
@@ -420,7 +420,7 @@
/******************************************************************
* WINECON_Spawn
*
- * Spawn the child processus when invoked with wineconsole foo bar
+ * Spawn the child process when invoked with wineconsole foo bar
*/
static BOOL WINECON_Spawn(struct inner_data* data, LPCSTR lpCmdLine)
{
@@ -495,19 +495,42 @@
/* case of wineconsole <evt>, signal process that created us that we're up and running */
if (WINECON_HasEvent(lpCmdLine, &evt))
{
- if (!(data = WINECON_Init(hInst, 0))) return 0;
+ if (!(data = WINECON_Init(hInst, 0)))
+ {
+ WINE_ERR("failed to init1 wineconsole.\n");
+ return 0;
+ }
ret = SetEvent((HANDLE)evt);
+ if (!ret)
+ {
+ WINE_ERR("SetEvent failed.\n");
+ goto cleanup;
+ }
}
else
{
- if (!(data = WINECON_Init(hInst, (void*)GetCurrentProcessId()))) return 0;
+ if (!(data = WINECON_Init(hInst, (void*)GetCurrentProcessId())))
+ {
+ WINE_ERR("failed to init2 wineconsole.\n");
+ return 0;
+ }
ret = WINECON_Spawn(data, lpCmdLine);
+ if (!ret)
+ {
+ WINE_MESSAGE("wineconsole: spawning client program failed. Invalid/missing command line arguments ?\n");
+ goto cleanup;
+ }
}
- if (ret && WCUSER_InitBackend(data))
+ if (WCUSER_InitBackend(data))
{
+ WINE_TRACE("calling MainLoop.\n");
ret = data->fnMainLoop(data);
}
+ else
+ WINE_ERR("WCUSER_InitBackend failed.\n");
+
+cleanup:
WINECON_Delete(data);
return ret;
More information about the wine-patches
mailing list