OSL_DEBUG_LEVEL formatting
This commit is contained in:
@@ -111,11 +111,9 @@ oslModule SAL_CALL osl_loadModule(rtl_uString *ustrModuleName, sal_Int32 nRtldMo
|
|||||||
sprintf( szError, "Module: %s; rc: %d;\nReason: %s;\n"
|
sprintf( szError, "Module: %s; rc: %d;\nReason: %s;\n"
|
||||||
"Please contact technical support and report above informations.\n\n",
|
"Please contact technical support and report above informations.\n\n",
|
||||||
buffer, rc, szErrorMessage );
|
buffer, rc, szErrorMessage );
|
||||||
#if OSL_DEBUG_LEVEL>0
|
#if OSL_DEBUG_LEVEL > 0
|
||||||
fprintf( stderr, szError);
|
fprintf( stderr, szError);
|
||||||
#endif
|
#else
|
||||||
//OSL_TRACE(szError);
|
|
||||||
#ifndef OSL_DEBUG_LEVEL
|
|
||||||
WinMessageBox(HWND_DESKTOP,HWND_DESKTOP,
|
WinMessageBox(HWND_DESKTOP,HWND_DESKTOP,
|
||||||
szError, "Critical error: DosLoadModule failed",
|
szError, "Critical error: DosLoadModule failed",
|
||||||
0, MB_ERROR | MB_OK | MB_MOVEABLE);
|
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)
|
void SAL_CALL osl_unloadModule(oslModule Module)
|
||||||
{
|
{
|
||||||
#if OSL_DEBUG_LEVEL>0
|
#if OSL_DEBUG_LEVEL > 0
|
||||||
if (!Module)
|
if (!Module)
|
||||||
fprintf( stderr, "osl_unloadModule NULL HANDLE.\n");
|
fprintf( stderr, "osl_unloadModule NULL HANDLE.\n");
|
||||||
#endif
|
#endif
|
||||||
|
@@ -129,7 +129,7 @@ oslPipe SAL_CALL osl_createPipe(rtl_uString *ustrPipeName, oslPipeOptions Option
|
|||||||
|
|
||||||
/* create pipe name */
|
/* create pipe name */
|
||||||
OString sPipe = OUStringToOString(ustrPipeName, RTL_TEXTENCODING_ASCII_US);
|
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);
|
debug_printf("osl_createPipe options 0x%x\n", Options);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -140,7 +140,7 @@ oslPipe SAL_CALL osl_createPipe(rtl_uString *ustrPipeName, oslPipeOptions Option
|
|||||||
APIRET fPipeAvailable;
|
APIRET fPipeAvailable;
|
||||||
|
|
||||||
sprintf (strPipeNameBuffer, "\\PIPE\\OSL_PIPE_%s", sPipe.getStr());
|
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);
|
debug_printf("osl_createPipe %s\n", strPipeNameBuffer);
|
||||||
#endif
|
#endif
|
||||||
ngLastError = DosOpen( (PCSZ)strPipeNameBuffer,
|
ngLastError = DosOpen( (PCSZ)strPipeNameBuffer,
|
||||||
@@ -175,7 +175,7 @@ oslPipe SAL_CALL osl_createPipe(rtl_uString *ustrPipeName, oslPipeOptions Option
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
sprintf (strPipeNameBuffer, "\\PIPE\\OSL_PIPE_%s", sPipe.getStr());
|
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);
|
debug_printf("osl_createPipe %s\n", strPipeNameBuffer);
|
||||||
#endif
|
#endif
|
||||||
ngLastError = DosCreateNPipe( (PCSZ)strPipeNameBuffer,
|
ngLastError = DosCreateNPipe( (PCSZ)strPipeNameBuffer,
|
||||||
|
@@ -99,16 +99,16 @@ static void oslWorkerWrapperFunction(void* pData)
|
|||||||
BOOL rc;
|
BOOL rc;
|
||||||
osl_TThreadImpl* pThreadImpl= (osl_TThreadImpl*)pData;
|
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);
|
printf("oslWorkerWrapperFunction pThreadImpl %x, pThreadImpl->m_ThreadId %d\n", pThreadImpl, pThreadImpl->m_ThreadId);
|
||||||
#endif
|
#endif
|
||||||
/* Inizialize PM for this thread */
|
/* Inizialize PM for this thread */
|
||||||
pThreadImpl->m_hab = WinInitialize( 0 );
|
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);
|
printf("pThreadImpl->m_ThreadId %d, pThreadImpl->m_hab %x\n", pThreadImpl->m_ThreadId,pThreadImpl->m_hab);
|
||||||
#endif
|
#endif
|
||||||
pThreadImpl->m_hmq = WinCreateMsgQueue( pThreadImpl->m_hab, 0 );
|
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);
|
printf("pThreadImpl->m_ThreadId %d, pThreadImpl->m_hmq %x\n", pThreadImpl->m_ThreadId,pThreadImpl->m_hmq);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -116,16 +116,16 @@ printf("pThreadImpl->m_ThreadId %d, pThreadImpl->m_hmq %x\n", pThreadImpl->m_Thr
|
|||||||
pThreadImpl->m_WorkerFunction( pThreadImpl->m_pData );
|
pThreadImpl->m_WorkerFunction( pThreadImpl->m_pData );
|
||||||
|
|
||||||
/* Free all PM-resources for this thread */
|
/* 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);
|
printf("pThreadImpl->m_ThreadId %d, about to destroy queue\n", pThreadImpl->m_ThreadId);
|
||||||
#endif
|
#endif
|
||||||
rc = WinDestroyMsgQueue( pThreadImpl->m_hmq );
|
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, WinDestroyMsgQueue rc=%d (should be 1)\n", pThreadImpl->m_ThreadId, rc);
|
||||||
printf("pThreadImpl->m_ThreadId %d, about to terminate hab\n", pThreadImpl->m_ThreadId);
|
printf("pThreadImpl->m_ThreadId %d, about to terminate hab\n", pThreadImpl->m_ThreadId);
|
||||||
#endif
|
#endif
|
||||||
rc = WinTerminate( pThreadImpl->m_hab );
|
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);
|
printf("pThreadImpl->m_ThreadId %d, WinTerminate rc=%d (should be 1)\n", pThreadImpl->m_ThreadId, rc);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@@ -170,7 +170,7 @@ static oslThread oslCreateThread(oslWorkerFunction pWorker,
|
|||||||
DosSuspendThread( pThreadImpl->m_ThreadId );
|
DosSuspendThread( pThreadImpl->m_ThreadId );
|
||||||
DosReleaseMutexSem( MutexLock);
|
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);
|
printf("oslCreateThread pThreadImpl %x, pThreadImpl->m_ThreadId %d\n", pThreadImpl, pThreadImpl->m_ThreadId);
|
||||||
#endif
|
#endif
|
||||||
if(pThreadImpl->m_ThreadId == -1)
|
if(pThreadImpl->m_ThreadId == -1)
|
||||||
|
Reference in New Issue
Block a user