From 194028c8d452978a2f3083cf5acff8628be330a5 Mon Sep 17 00:00:00 2001 From: "sfraser%netscape.com" Date: Mon, 7 Feb 2000 23:38:28 +0000 Subject: [PATCH] Remove PowerPlant dependencies, by temporarily #if 0 out some code. r=beard, scc git-svn-id: svn://10.0.0.236/trunk@60005 18797224-902f-48f8-a5cc-f745e15eee43 --- .../appshell/src/nsCommandLineServiceMac.cpp | 22 ++++++++++++++---- mozilla/xpfe/bootstrap/macbuild/apprunner.mcp | Bin 166681 -> 166681 bytes .../startup/src/nsCommandLineServiceMac.cpp | 22 ++++++++++++++---- 3 files changed, 36 insertions(+), 8 deletions(-) diff --git a/mozilla/xpfe/appshell/src/nsCommandLineServiceMac.cpp b/mozilla/xpfe/appshell/src/nsCommandLineServiceMac.cpp index 9c0db9953a2..9eff366ad71 100644 --- a/mozilla/xpfe/appshell/src/nsCommandLineServiceMac.cpp +++ b/mozilla/xpfe/appshell/src/nsCommandLineServiceMac.cpp @@ -60,8 +60,10 @@ static NS_DEFINE_CID(kIOServiceCID, NS_IOSERVICE_CID); #include // PowerPlant +#ifdef MOZ_POWERPLANT #include #include +#endif // MOZ_POWERPLANT #include "nsAppShellCIDs.h" static NS_DEFINE_IID(kAppShellServiceCID, NS_APPSHELL_SERVICE_CID); @@ -284,8 +286,10 @@ nsAppleEventHandler::nsAppleEventHandler() // We must not throw out of here. try { +#ifdef MOZ_POWERPLANT UAppleEventsMgr::InstallAEHandlers( NewAEEventHandlerProc(nsAppleEventHandler::AppleEventHandler)); +#endif } catch(...) { @@ -312,9 +316,11 @@ pascal OSErr nsAppleEventHandler::AppleEventHandler( // We must not throw out of here. try { +#ifdef MOZ_POWERPLANT StAEDescriptor resultDesc; err = sAppleEventHandler->HandleAppleEvent( *inAppleEvent, *outAEReply, resultDesc, inRefCon); +#endif } catch(...) { @@ -338,6 +344,7 @@ OSErr nsAppleEventHandler::HandleAppleEvent( // Out: Event Handled by CAppleEvent //---------------------------------------------------------------------------------------- { +#ifdef MOZ_POWERPLANT OSErr err = errAEEventNotHandled; switch (inAENumber) { @@ -404,6 +411,7 @@ OSErr nsAppleEventHandler::HandleAppleEvent( //CFrontApp::sApplication->LDocApplication::HandleAppleEvent( inAppleEvent, outAEReply, outResult, inAENumber ); break; } +#endif return noErr; } // nsAppleEventHandler::HandleAppleEvent @@ -443,10 +451,12 @@ OSErr nsAppleEventHandler::HandleAEOpenOrPrintDoc( CInfoPBRec info; nsspec.GetCatInfo(info); OSType fileType = info.hFileInfo.ioFlFndrInfo.fdType; +#ifdef MOZ_POWERPLANT if (inAENumber == ae_OpenDoc) err = HandleOpen1Doc(spec, fileType); else err = HandlePrint1Doc(spec, fileType); +#endif } Clean: ::AEDisposeDesc(&docList); @@ -977,6 +987,7 @@ void MoreExtractFromAEDesc::GetCString(const AppleEvent &inAppleEvent, //---------------------------------------------------------------------------------------- { s = nil; +#ifdef MOZ_POWERPLANT StAEDescriptor desc; OSErr err = ::AEGetParamDesc(&inAppleEvent,keyword,typeWildCard,&desc.mDesc); @@ -987,6 +998,7 @@ void MoreExtractFromAEDesc::GetCString(const AppleEvent &inAppleEvent, return; } TheCString(desc, s); +#endif } //---------------------------------------------------------------------------------------- @@ -1025,7 +1037,7 @@ void MoreExtractFromAEDesc::TheCString(const AEDesc &inDesc, char * & outPtr) return; } - Int32 strLength = GetHandleSize(dataH); + PRInt32 strLength = GetHandleSize(dataH); outPtr = (char *)PR_MALLOC(strLength+1); // +1 for nsnull ending if (!outPtr) return; @@ -1051,11 +1063,13 @@ void MoreExtractFromAEDesc::MakeErrorReturn( // Out: keyErrorNum and keyErrorSting AEDescs are added to the Event. //---------------------------------------------------------------------------------------- { +#ifdef MOZ_POWERPLANT StAEDescriptor errorNum(errorCode); StAEDescriptor errorText((ConstStringPtr)errorString); // We can ignore the errors. If error occurs, it only means that the reply is not handled OSErr err = ::AEPutParamDesc(&event, keyErrorNumber, &errorNum.mDesc); err = ::AEPutParamDesc(&event, keyErrorString, &errorText.mDesc); +#endif } //---------------------------------------------------------------------------------------- @@ -1108,9 +1122,9 @@ ProcessSerialNumber MoreExtractFromAEDesc::ExtractAESender(const AppleEvent OSErr err = AEGetAttributePtr(&inAppleEvent, keyAddressAttr, typeTargetID, &realType, &target, sizeof(target), &realSize); - ThrowIfOSErr_(err); + // ThrowIfOSErr_(err); err = ::GetProcessSerialNumberFromPortName(&target.name,&psn); - ThrowIfOSErr_(err); + // ThrowIfOSErr_(err); return psn; } @@ -1120,7 +1134,7 @@ void MoreExtractFromAEDesc::DispatchURLDirectly(const AppleEvent &inAppleEvent) { char *url = nsnull; MoreExtractFromAEDesc::GetCString(inAppleEvent, keyDirectObject, url); - ThrowIfNil_(url); + // ThrowIfNil_(url); NS_NOTYETIMPLEMENTED("Write Me"); #if 0 URL_Struct * request = NET_CreateURLStruct(url, NET_DONT_RELOAD); diff --git a/mozilla/xpfe/bootstrap/macbuild/apprunner.mcp b/mozilla/xpfe/bootstrap/macbuild/apprunner.mcp index 71b94afd0701bc863f56b74618e78e530d56d8fe..fd7f008c2a13b681ed5834c0f5d642623fe1c62e 100644 GIT binary patch delta 466 zcmbO^jcevKt__Whj3Sep7|j_)Ht%9|V`enp%*ZOkJTZVpkdc9bfeDCNftVSHIVL|= z(q|O{vIHmZpCrAxkz*MnP@N=99UDv?kY)j5*2%Ax)Dh|@H*%Qjfg$Af z=8tN>7$@Hsl>qYv-T?VO87K2B;@TvU$T)euvOnXS%^M{@u(3_g`~Uyi`_0Q0_A*Tt zP!VNho~)+QGWnUxf3?g!{@7;<{Bc_r2mtM4VBns>pDXmn#M#8c)Y4$fkxEMjko@HH zs$yK+!5N7~sbH?Xs>0@ERldoL!jm<)CQklvN@%jdY5&bUQnwhJ?RIas+s!zebvq+F z(`BaVC0tA&rqAJGn!CMI0Lb6|N0?~`<8&VprUldQh%%{8zbVS3Ik|o(_w@QACXemW zflTG<+iN~Ce(R8DJa7{j3JJL-1vx;6fr1eVST+I~0n;Z|Gexl}Co?cG9+>{Inn{a^ zLu$Kh4O1(VG~-cAVAxeab#lP;F)(ncOy66_q{k+i2r^;&$2ul1Cbk`UK+c@)jEzhZ FTmW}(gm?e| delta 399 zcmbO^jcevKt__Whj1rTZ7|j_aHt%9|V`eno%*ZOkJb9mz1TPx{0|PS_@AT9%quQVf)1ar5+XWny47hSDZb+7wEg zZT_sx#kl#YYR{xeH$QLYk-Ej$Y`1&6-EPL&tkVml8Kt)eWHNRbZm;>o_^m^pi5+M) zOG0i*K@QMtCb-=UEE|FBgy|EjnWETK_(4+BKUOnoF)8idE?dLY$|TJs(8<8SS^?Dw m^aTuXNKM~c$E3%mydGr2_K$T;Tuf|SDnQPZ?Tn2~5?lb|n{eU) diff --git a/mozilla/xpfe/components/startup/src/nsCommandLineServiceMac.cpp b/mozilla/xpfe/components/startup/src/nsCommandLineServiceMac.cpp index 9c0db9953a2..9eff366ad71 100644 --- a/mozilla/xpfe/components/startup/src/nsCommandLineServiceMac.cpp +++ b/mozilla/xpfe/components/startup/src/nsCommandLineServiceMac.cpp @@ -60,8 +60,10 @@ static NS_DEFINE_CID(kIOServiceCID, NS_IOSERVICE_CID); #include // PowerPlant +#ifdef MOZ_POWERPLANT #include #include +#endif // MOZ_POWERPLANT #include "nsAppShellCIDs.h" static NS_DEFINE_IID(kAppShellServiceCID, NS_APPSHELL_SERVICE_CID); @@ -284,8 +286,10 @@ nsAppleEventHandler::nsAppleEventHandler() // We must not throw out of here. try { +#ifdef MOZ_POWERPLANT UAppleEventsMgr::InstallAEHandlers( NewAEEventHandlerProc(nsAppleEventHandler::AppleEventHandler)); +#endif } catch(...) { @@ -312,9 +316,11 @@ pascal OSErr nsAppleEventHandler::AppleEventHandler( // We must not throw out of here. try { +#ifdef MOZ_POWERPLANT StAEDescriptor resultDesc; err = sAppleEventHandler->HandleAppleEvent( *inAppleEvent, *outAEReply, resultDesc, inRefCon); +#endif } catch(...) { @@ -338,6 +344,7 @@ OSErr nsAppleEventHandler::HandleAppleEvent( // Out: Event Handled by CAppleEvent //---------------------------------------------------------------------------------------- { +#ifdef MOZ_POWERPLANT OSErr err = errAEEventNotHandled; switch (inAENumber) { @@ -404,6 +411,7 @@ OSErr nsAppleEventHandler::HandleAppleEvent( //CFrontApp::sApplication->LDocApplication::HandleAppleEvent( inAppleEvent, outAEReply, outResult, inAENumber ); break; } +#endif return noErr; } // nsAppleEventHandler::HandleAppleEvent @@ -443,10 +451,12 @@ OSErr nsAppleEventHandler::HandleAEOpenOrPrintDoc( CInfoPBRec info; nsspec.GetCatInfo(info); OSType fileType = info.hFileInfo.ioFlFndrInfo.fdType; +#ifdef MOZ_POWERPLANT if (inAENumber == ae_OpenDoc) err = HandleOpen1Doc(spec, fileType); else err = HandlePrint1Doc(spec, fileType); +#endif } Clean: ::AEDisposeDesc(&docList); @@ -977,6 +987,7 @@ void MoreExtractFromAEDesc::GetCString(const AppleEvent &inAppleEvent, //---------------------------------------------------------------------------------------- { s = nil; +#ifdef MOZ_POWERPLANT StAEDescriptor desc; OSErr err = ::AEGetParamDesc(&inAppleEvent,keyword,typeWildCard,&desc.mDesc); @@ -987,6 +998,7 @@ void MoreExtractFromAEDesc::GetCString(const AppleEvent &inAppleEvent, return; } TheCString(desc, s); +#endif } //---------------------------------------------------------------------------------------- @@ -1025,7 +1037,7 @@ void MoreExtractFromAEDesc::TheCString(const AEDesc &inDesc, char * & outPtr) return; } - Int32 strLength = GetHandleSize(dataH); + PRInt32 strLength = GetHandleSize(dataH); outPtr = (char *)PR_MALLOC(strLength+1); // +1 for nsnull ending if (!outPtr) return; @@ -1051,11 +1063,13 @@ void MoreExtractFromAEDesc::MakeErrorReturn( // Out: keyErrorNum and keyErrorSting AEDescs are added to the Event. //---------------------------------------------------------------------------------------- { +#ifdef MOZ_POWERPLANT StAEDescriptor errorNum(errorCode); StAEDescriptor errorText((ConstStringPtr)errorString); // We can ignore the errors. If error occurs, it only means that the reply is not handled OSErr err = ::AEPutParamDesc(&event, keyErrorNumber, &errorNum.mDesc); err = ::AEPutParamDesc(&event, keyErrorString, &errorText.mDesc); +#endif } //---------------------------------------------------------------------------------------- @@ -1108,9 +1122,9 @@ ProcessSerialNumber MoreExtractFromAEDesc::ExtractAESender(const AppleEvent OSErr err = AEGetAttributePtr(&inAppleEvent, keyAddressAttr, typeTargetID, &realType, &target, sizeof(target), &realSize); - ThrowIfOSErr_(err); + // ThrowIfOSErr_(err); err = ::GetProcessSerialNumberFromPortName(&target.name,&psn); - ThrowIfOSErr_(err); + // ThrowIfOSErr_(err); return psn; } @@ -1120,7 +1134,7 @@ void MoreExtractFromAEDesc::DispatchURLDirectly(const AppleEvent &inAppleEvent) { char *url = nsnull; MoreExtractFromAEDesc::GetCString(inAppleEvent, keyDirectObject, url); - ThrowIfNil_(url); + // ThrowIfNil_(url); NS_NOTYETIMPLEMENTED("Write Me"); #if 0 URL_Struct * request = NET_CreateURLStruct(url, NET_DONT_RELOAD);