[Libreoffice-commits] .: sal/osl

Thomas Arnhold tarnhold at kemper.freedesktop.org
Sun Feb 6 03:29:52 PST 2011


 sal/osl/os2/module.c |    8 +++-----
 sal/osl/os2/pipe.cxx |    6 +++---
 sal/osl/os2/thread.c |   14 +++++++-------
 3 files changed, 13 insertions(+), 15 deletions(-)

New commits:
commit f575ff4155549e476edd2e557f6fbf633fc32e1f
Author: Thomas Arnhold <thomas at arnhold.org>
Date:   Sun Feb 6 12:29:33 2011 +0100

    OSL_DEBUG_LEVEL formatting

diff --git a/sal/osl/os2/module.c b/sal/osl/os2/module.c
index ca9193e..f1a99b2 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 b960d86..bb873b0 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 c9a375e..6c5152f 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)


More information about the Libreoffice-commits mailing list