diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-03-25 16:42:43 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-03-25 18:49:17 +0100 |
commit | 2ab3bae2cff8a51ba11e68539d75d21f826d9481 (patch) | |
tree | e51e25c545f9c5b18aa1c1aeb35bf686df0f8edb /tools | |
parent | e5d7a360e68b1725ee28abc5c76db5c4023dce88 (diff) |
Reduce some functions to local
Change-Id: Ia2d7eaaa1381fe46839b0d52a91bdc3a439fa418
Diffstat (limited to 'tools')
-rw-r--r-- | tools/source/debug/debug.cxx | 34 |
1 files changed, 4 insertions, 30 deletions
diff --git a/tools/source/debug/debug.cxx b/tools/source/debug/debug.cxx index a52f1e48156e..1797ab81a908 100644 --- a/tools/source/debug/debug.cxx +++ b/tools/source/debug/debug.cxx @@ -47,6 +47,8 @@ #ifdef DBG_UTIL +void DbgOutf( const sal_Char* pFStr, ... ); + // PointerList #define PBLOCKCOUNT 1024 @@ -1335,7 +1337,7 @@ void DbgXtor( DbgDataType* pDbgData, sal_uInt16 nAction, const void* pThis, : "Leave method from class ") << pDbgData->pName); } -void DbgOut( const sal_Char* pMsg, sal_uInt16 nDbgOut, const sal_Char* pFile, sal_uInt16 nLine ) +void DbgOut( const sal_Char* pMsg, sal_uInt16 nDbgOut ) { static bool bIn = false; if ( bIn ) @@ -1391,32 +1393,6 @@ void DbgOut( const sal_Char* pMsg, sal_uInt16 nDbgOut, const sal_Char* pFile, sa else strcpy( &(aBufOut[nBufLen]), pMsg ); - if ( pFile && nLine && (nBufLen+nMsgLen < DBG_BUF_MAXLEN) ) - { - if ( nOut == DBG_OUT_MSGBOX ) - strcat( aBufOut, "\n" ); - else - strcat( aBufOut, " " ); - strcat( aBufOut, "From File " ); - strcat( aBufOut, pFile ); - strcat( aBufOut, " at Line " ); - - // Convert line to String and append - sal_Char aLine[9]; - sal_Char* pLine = &aLine[7]; - sal_uInt16 i; - memset( aLine, 0, sizeof( aLine ) ); - do - { - i = nLine % 10; - pLine--; - *(pLine) = (sal_Char)i + 48; - nLine /= 10; - } - while ( nLine ); - strcat( aBufOut, pLine ); - } - if ( ( nOut >= DBG_OUT_USER_CHANNEL_0 ) && ( nOut - DBG_OUT_USER_CHANNEL_0 < pData->aDbgPrintUserChannels.size() ) ) { DbgPrintLine pPrinter = pData->aDbgPrintUserChannels[ nOut - DBG_OUT_USER_CHANNEL_0 ]; @@ -1503,7 +1479,7 @@ void DbgOutf( const sal_Char* pFStr, ... ) vsprintf( aBuf, pFStr, pList ); va_end( pList ); - DbgOut( aBuf ); + DbgOut( aBuf, DBG_OUT_TRACE ); } #else @@ -1513,9 +1489,7 @@ void* DbgFunc( sal_uInt16, void* ) { return NULL; } void DbgProf( sal_uInt16, DbgDataType* ) {} void DbgXtor( DbgDataType*, sal_uInt16, const void*, DbgUsr ) {} -void DbgOut( const sal_Char*, sal_uInt16, const sal_Char*, sal_uInt16 ) {} void DbgOutTypef( sal_uInt16, const sal_Char*, ... ) {} -void DbgOutf( const sal_Char*, ... ) {} #endif |