Bug 47207. Changing printf to PRINTF to use new logging facility. r=valeski,sr=waterson
git-svn-id: svn://10.0.0.236/trunk@81885 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -113,7 +113,7 @@ struct Mutex {
|
||||
mState( -1 ) {
|
||||
mHandle = CreateMutex( 0, FALSE, mName.GetBuffer() );
|
||||
#if MOZ_DEBUG_DDE
|
||||
printf( "CreateMutex error = 0x%08X\n", (int)GetLastError() );
|
||||
PRINTF(( "CreateMutex error = 0x%08X\n", (int)GetLastError() ));
|
||||
#endif
|
||||
}
|
||||
~Mutex() {
|
||||
@@ -124,7 +124,7 @@ struct Mutex {
|
||||
BOOL rc = CloseHandle( mHandle );
|
||||
#if MOZ_DEBUG_DDE
|
||||
if ( !rc ) {
|
||||
printf( "CloseHandle error = 0x%08X\n", (int)GetLastError() );
|
||||
PRINTF(( "CloseHandle error = 0x%08X\n", (int)GetLastError() ));
|
||||
}
|
||||
#endif
|
||||
}
|
||||
@@ -132,11 +132,11 @@ struct Mutex {
|
||||
BOOL Lock( DWORD timeout ) {
|
||||
if ( mHandle ) {
|
||||
#if MOZ_DEBUG_DDE
|
||||
printf( "Waiting (%d msec) for DDE mutex...\n", (int)timeout );
|
||||
PRINTF(( "Waiting (%d msec) for DDE mutex...\n", (int)timeout ));
|
||||
#endif
|
||||
mState = WaitForSingleObject( mHandle, timeout );
|
||||
#if MOZ_DEBUG_DDE
|
||||
printf( "...wait complete, result = 0x%08X\n", (int)mState );
|
||||
PRINTF(( "...wait complete, result = 0x%08X\n", (int)mState ));
|
||||
#endif
|
||||
return mState == WAIT_OBJECT_0;
|
||||
} else {
|
||||
@@ -146,7 +146,7 @@ struct Mutex {
|
||||
void Unlock() {
|
||||
if ( mHandle && mState == WAIT_OBJECT_0 ) {
|
||||
#if MOZ_DEBUG_DDE
|
||||
printf( "Releasing DDE mutex\n" );
|
||||
PRINTF(( "Releasing DDE mutex\n" ));
|
||||
#endif
|
||||
ReleaseMutex( mHandle );
|
||||
mState = -1;
|
||||
@@ -260,7 +260,7 @@ nsSplashScreenOS2::nsSplashScreenOS2()
|
||||
|
||||
nsSplashScreenOS2::~nsSplashScreenOS2() {
|
||||
#if MOZ_DEBUG_DDE
|
||||
printf( "splash screen dtor called\n" );
|
||||
PRINTF(( "splash screen dtor called\n" ));
|
||||
#endif
|
||||
// Make sure dialog is gone.
|
||||
Hide();
|
||||
@@ -570,7 +570,7 @@ nsNativeAppSupportOS2::Start( PRBool *aResult ) {
|
||||
// Get command line to pass to server.
|
||||
LPTSTR cmd = GetCommandLine();
|
||||
#if MOZ_DEBUG_DDE
|
||||
printf( "Acting as DDE client, cmd=%s\n", cmd );
|
||||
PRINTF(( "Acting as DDE client, cmd=%s\n", cmd ));
|
||||
#endif
|
||||
rc = (UINT)DdeClientTransaction( (LPBYTE)cmd,
|
||||
strlen( cmd ) + 1,
|
||||
@@ -586,14 +586,14 @@ nsNativeAppSupportOS2::Start( PRBool *aResult ) {
|
||||
} else {
|
||||
// Something went wrong. Not much we can do, though...
|
||||
#if MOZ_DEBUG_DDE
|
||||
printf( "DdeClientTransaction failed, error = 0x%08X\n",
|
||||
(int)DdeGetLastError( mInstance ) );
|
||||
PRINTF(( "DdeClientTransaction failed, error = 0x%08X\n",
|
||||
(int)DdeGetLastError( mInstance ) ));
|
||||
#endif
|
||||
}
|
||||
} else {
|
||||
// We're going to be the server...
|
||||
#if MOZ_DEBUG_DDE
|
||||
printf( "Setting up DDE server...\n" );
|
||||
PRINTF(( "Setting up DDE server...\n" ));
|
||||
#endif
|
||||
|
||||
// Next step is to register a DDE service.
|
||||
@@ -601,27 +601,27 @@ nsNativeAppSupportOS2::Start( PRBool *aResult ) {
|
||||
|
||||
if ( rc ) {
|
||||
#if MOZ_DEBUG_DDE
|
||||
printf( "...DDE server started\n" );
|
||||
PRINTF(( "...DDE server started\n" ));
|
||||
#endif
|
||||
// Tell app to do its thing.
|
||||
*aResult = PR_TRUE;
|
||||
rv = NS_OK;
|
||||
} else {
|
||||
#if MOZ_DEBUG_DDE
|
||||
printf( "DdeNameService failed, error = 0x%08X\n",
|
||||
(int)DdeGetLastError( mInstance ) );
|
||||
PRINTF(( "DdeNameService failed, error = 0x%08X\n",
|
||||
(int)DdeGetLastError( mInstance ) ));
|
||||
#endif
|
||||
}
|
||||
}
|
||||
} else {
|
||||
#if MOZ_DEBUG_DDE
|
||||
printf( "DdeCreateStringHandle failed, error = 0x%08X\n",
|
||||
(int)DdeGetLastError( mInstance ) );
|
||||
PRINTF(( "DdeCreateStringHandle failed, error = 0x%08X\n",
|
||||
(int)DdeGetLastError( mInstance ) ));
|
||||
#endif
|
||||
}
|
||||
} else {
|
||||
#if MOZ_DEBUG_DDE
|
||||
printf( "DdeInitialize failed, error = 0x%08X\n", (int)rc );
|
||||
PRINTF(( "DdeInitialize failed, error = 0x%08X\n", (int)rc ));
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -755,14 +755,14 @@ nsNativeAppSupportOS2::HandleDDENotification( UINT uType, // transaction t
|
||||
ULONG dwData2 ) { // transaction-specific data
|
||||
|
||||
#if MOZ_DEBUG_DDE
|
||||
printf( "DDE: uType =%s\n", uTypeDesc( uType ).GetBuffer() );
|
||||
printf( " uFmt =%u\n", (unsigned)uFmt );
|
||||
printf( " hconv =%08x\n", (int)hconv );
|
||||
printf( " hsz1 =%08x:%s\n", (int)hsz1, hszValue( mInstance, hsz1 ).GetBuffer() );
|
||||
printf( " hsz2 =%08x:%s\n", (int)hsz2, hszValue( mInstance, hsz2 ).GetBuffer() );
|
||||
printf( " hdata =%08x\n", (int)hdata );
|
||||
printf( " dwData1=%08x\n", (int)dwData1 );
|
||||
printf( " dwData2=%08x\n", (int)dwData2 );
|
||||
PRINTF(( "DDE: uType =%s\n", uTypeDesc( uType ).GetBuffer() ));
|
||||
PRINTF(( " uFmt =%u\n", (unsigned)uFmt ));
|
||||
PRINTF(( " hconv =%08x\n", (int)hconv ));
|
||||
PRINTF(( " hsz1 =%08x:%s\n", (int)hsz1, hszValue( mInstance, hsz1 ).GetBuffer() ));
|
||||
PRINTF(( " hsz2 =%08x:%s\n", (int)hsz2, hszValue( mInstance, hsz2 ).GetBuffer() ));
|
||||
PRINTF(( " hdata =%08x\n", (int)hdata ));
|
||||
PRINTF(( " dwData1=%08x\n", (int)dwData1 ));
|
||||
PRINTF(( " dwData2=%08x\n", (int)dwData2 ));
|
||||
#endif
|
||||
|
||||
HDDEDATA result = 0;
|
||||
@@ -785,7 +785,7 @@ nsNativeAppSupportOS2::HandleDDENotification( UINT uType, // transaction t
|
||||
DWORD bytes;
|
||||
LPBYTE request = DdeAccessData( hdata, &bytes );
|
||||
#if MOZ_DEBUG_DDE
|
||||
printf( "Handling dde request: [%s]...\n", (char*)request );
|
||||
PRINTF(( "Handling dde request: [%s]...\n", (char*)request ));
|
||||
#endif
|
||||
HandleRequest( request );
|
||||
result = (HDDEDATA)DDE_FACK;
|
||||
@@ -813,7 +813,7 @@ nsNativeAppSupportOS2::HandleRequest( LPBYTE request ) {
|
||||
(const char*)arg ) {
|
||||
// Launch browser.
|
||||
#if MOZ_DEBUG_DDE
|
||||
printf( "Launching browser on url [%s]...\n", (const char*)arg );
|
||||
PRINTF(( "Launching browser on url [%s]...\n", (const char*)arg ));
|
||||
#endif
|
||||
(void)OpenWindow( "chrome://navigator/content/", arg );
|
||||
}
|
||||
@@ -821,7 +821,7 @@ nsNativeAppSupportOS2::HandleRequest( LPBYTE request ) {
|
||||
(const char*)arg ) {
|
||||
// Launch chrome.
|
||||
#if MOZ_DEBUG_DDE
|
||||
printf( "Launching chrome url [%s]...\n", (const char*)arg );
|
||||
PRINTF(( "Launching chrome url [%s]...\n", (const char*)arg ));
|
||||
#endif
|
||||
(void)OpenWindow( arg, "" );
|
||||
}
|
||||
@@ -829,19 +829,19 @@ nsNativeAppSupportOS2::HandleRequest( LPBYTE request ) {
|
||||
(const char*)arg ) {
|
||||
// Launch composer.
|
||||
#if MOZ_DEBUG_DDE
|
||||
printf( "Launching editor on url [%s]...\n", arg );
|
||||
PRINTF(( "Launching editor on url [%s]...\n", arg ));
|
||||
#endif
|
||||
(void)OpenWindow( "chrome://editor/content/", arg );
|
||||
} else if ( NS_SUCCEEDED( args->GetCmdLineValue( "-mail", getter_Copies(arg))) &&
|
||||
(const char*)arg ) {
|
||||
// Launch composer.
|
||||
#if MOZ_DEBUG_DDE
|
||||
printf( "Launching mail...\n" );
|
||||
PRINTF(( "Launching mail...\n" ));
|
||||
#endif
|
||||
(void)OpenWindow( "chrome://messenger/content/", "" );
|
||||
} else {
|
||||
#if MOZ_DEBUG_DDE
|
||||
printf( "Unknown request [%s]\n", (char*) request );
|
||||
PRINTF(( "Unknown request [%s]\n", (char*) request ));
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -991,7 +991,7 @@ nsNativeAppSupportOS2::GetCmdLineArgs( LPBYTE request, nsICmdLineService **aResu
|
||||
(void**)aResult );
|
||||
if ( NS_FAILED( rv ) || NS_FAILED( ( rv = (*aResult)->Initialize( argc, argv ) ) ) ) {
|
||||
#if MOZ_DEBUG_DDE
|
||||
printf( "Error creating command line service = 0x%08X\n", (int)rv );
|
||||
PRINTF(( "Error creating command line service = 0x%08X\n", (int)rv ));
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -1033,7 +1033,7 @@ nsNativeAppSupportOS2::OpenWindow( const char*urlstr, const char *args ) {
|
||||
}
|
||||
} else {
|
||||
#ifdef MOZ_DEBUG_DDE
|
||||
printf( "GetHiddenWindowAndJSContext failed, rv=0x%08X\n", (int)rv );
|
||||
PRINTF(( "GetHiddenWindowAndJSContext failed, rv=0x%08X\n", (int)rv ));
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user