summaryrefslogtreecommitdiff
path: root/sal
diff options
context:
space:
mode:
authorThomas Arnhold <thomas@arnhold.org>2011-02-06 12:29:33 +0100
committerThomas Arnhold <thomas@arnhold.org>2011-02-06 12:29:56 +0100
commitc58c6f98a917f9312adde19c6ec7058c827c8756 (patch)
tree3cc532f62ee7f27e9fd401f01e13df69716c993a /sal
parent259c35955a07b450e2653cd78005eb6362cc4d26 (diff)
OSL_DEBUG_LEVEL formatting
Diffstat (limited to 'sal')
-rw-r--r--sal/osl/os2/module.c8
-rw-r--r--sal/osl/os2/pipe.cxx6
-rw-r--r--sal/osl/os2/thread.c14
3 files changed, 13 insertions, 15 deletions
diff --git a/sal/osl/os2/module.c b/sal/osl/os2/module.c
index 57f4342a11b6..58a9ea99b9ef 100644
--- a/sal/osl/os2/module.c
+++ b/sal/osl/os2/module.c
@@ -111,11 +111,9 @@ oslModule SAL_CALL osl_loadModule(rtl_uString *ustrModuleName, sal_Int32 nRtldMo
sprintf( szError, "Module: %s; rc: %d;\nReason: %s;\n"
"Please contact technical support and report above informations.\n\n",
buffer, rc, szErrorMessage );
-#if OSL_DEBUG_LEVEL>0
+#if OSL_DEBUG_LEVEL > 0
fprintf( stderr, szError);
-#endif
- //OSL_TRACE(szError);
-#ifndef OSL_DEBUG_LEVEL
+#else
WinMessageBox(HWND_DESKTOP,HWND_DESKTOP,
szError, "Critical error: DosLoadModule failed",
0, MB_ERROR | MB_OK | MB_MOVEABLE);
@@ -154,7 +152,7 @@ osl_getModuleHandle(rtl_uString *pModuleName, oslModule *pResult)
/*****************************************************************************/
void SAL_CALL osl_unloadModule(oslModule Module)
{
-#if OSL_DEBUG_LEVEL>0
+#if OSL_DEBUG_LEVEL > 0
if (!Module)
fprintf( stderr, "osl_unloadModule NULL HANDLE.\n");
#endif
diff --git a/sal/osl/os2/pipe.cxx b/sal/osl/os2/pipe.cxx
index ddd3bcc5c064..9280cb09e1b8 100644
--- a/sal/osl/os2/pipe.cxx
+++ b/sal/osl/os2/pipe.cxx
@@ -129,7 +129,7 @@ oslPipe SAL_CALL osl_createPipe(rtl_uString *ustrPipeName, oslPipeOptions Option
/* create pipe name */
OString sPipe = OUStringToOString(ustrPipeName, RTL_TEXTENCODING_ASCII_US);
-#if OSL_DEBUG_LEVEL>0
+#if OSL_DEBUG_LEVEL > 0
debug_printf("osl_createPipe options 0x%x\n", Options);
#endif
@@ -140,7 +140,7 @@ oslPipe SAL_CALL osl_createPipe(rtl_uString *ustrPipeName, oslPipeOptions Option
APIRET fPipeAvailable;
sprintf (strPipeNameBuffer, "\\PIPE\\OSL_PIPE_%s", sPipe.getStr());
-#if OSL_DEBUG_LEVEL>0
+#if OSL_DEBUG_LEVEL > 0
debug_printf("osl_createPipe %s\n", strPipeNameBuffer);
#endif
ngLastError = DosOpen( (PCSZ)strPipeNameBuffer,
@@ -175,7 +175,7 @@ oslPipe SAL_CALL osl_createPipe(rtl_uString *ustrPipeName, oslPipeOptions Option
break;
sprintf (strPipeNameBuffer, "\\PIPE\\OSL_PIPE_%s", sPipe.getStr());
-#if OSL_DEBUG_LEVEL>0
+#if OSL_DEBUG_LEVEL > 0
debug_printf("osl_createPipe %s\n", strPipeNameBuffer);
#endif
ngLastError = DosCreateNPipe( (PCSZ)strPipeNameBuffer,
diff --git a/sal/osl/os2/thread.c b/sal/osl/os2/thread.c
index d751376a3978..d4b01a98ad78 100644
--- a/sal/osl/os2/thread.c
+++ b/sal/osl/os2/thread.c
@@ -99,16 +99,16 @@ static void oslWorkerWrapperFunction(void* pData)
BOOL rc;
osl_TThreadImpl* pThreadImpl= (osl_TThreadImpl*)pData;
-#if OSL_DEBUG_LEVEL>0
+#if OSL_DEBUG_LEVEL > 0
printf("oslWorkerWrapperFunction pThreadImpl %x, pThreadImpl->m_ThreadId %d\n", pThreadImpl, pThreadImpl->m_ThreadId);
#endif
/* Inizialize PM for this thread */
pThreadImpl->m_hab = WinInitialize( 0 );
-#if OSL_DEBUG_LEVEL>0
+#if OSL_DEBUG_LEVEL > 0
printf("pThreadImpl->m_ThreadId %d, pThreadImpl->m_hab %x\n", pThreadImpl->m_ThreadId,pThreadImpl->m_hab);
#endif
pThreadImpl->m_hmq = WinCreateMsgQueue( pThreadImpl->m_hab, 0 );
-#if OSL_DEBUG_LEVEL>0
+#if OSL_DEBUG_LEVEL > 0
printf("pThreadImpl->m_ThreadId %d, pThreadImpl->m_hmq %x\n", pThreadImpl->m_ThreadId,pThreadImpl->m_hmq);
#endif
@@ -116,16 +116,16 @@ printf("pThreadImpl->m_ThreadId %d, pThreadImpl->m_hmq %x\n", pThreadImpl->m_Thr
pThreadImpl->m_WorkerFunction( pThreadImpl->m_pData );
/* Free all PM-resources for this thread */
-#if OSL_DEBUG_LEVEL>0
+#if OSL_DEBUG_LEVEL > 0
printf("pThreadImpl->m_ThreadId %d, about to destroy queue\n", pThreadImpl->m_ThreadId);
#endif
rc = WinDestroyMsgQueue( pThreadImpl->m_hmq );
-#if OSL_DEBUG_LEVEL>0
+#if OSL_DEBUG_LEVEL > 0
printf("pThreadImpl->m_ThreadId %d, WinDestroyMsgQueue rc=%d (should be 1)\n", pThreadImpl->m_ThreadId, rc);
printf("pThreadImpl->m_ThreadId %d, about to terminate hab\n", pThreadImpl->m_ThreadId);
#endif
rc = WinTerminate( pThreadImpl->m_hab );
-#if OSL_DEBUG_LEVEL>0
+#if OSL_DEBUG_LEVEL > 0
printf("pThreadImpl->m_ThreadId %d, WinTerminate rc=%d (should be 1)\n", pThreadImpl->m_ThreadId, rc);
#endif
}
@@ -170,7 +170,7 @@ static oslThread oslCreateThread(oslWorkerFunction pWorker,
DosSuspendThread( pThreadImpl->m_ThreadId );
DosReleaseMutexSem( MutexLock);
}
-#if OSL_DEBUG_LEVEL>0
+#if OSL_DEBUG_LEVEL > 0
printf("oslCreateThread pThreadImpl %x, pThreadImpl->m_ThreadId %d\n", pThreadImpl, pThreadImpl->m_ThreadId);
#endif
if(pThreadImpl->m_ThreadId == -1)