Fix line endings from peterlubczynski's previous checkin (^M^J -> ^J) to fix IRIX and OS/2 bustage.

This commit is contained in:
dbaron%fas.harvard.edu 2001-06-29 02:34:23 +00:00
parent 0e1ad7ad4e
commit f7789a4395
4 changed files with 142 additions and 142 deletions

View File

@ -108,64 +108,64 @@ static NS_DEFINE_IID(kIPluginStreamListenerIID, NS_IPLUGINSTREAMLISTENER_IID);
ns4xPlugin::ns4xPlugin(NPPluginFuncs* callbacks, PRLibrary* aLibrary, NP_PLUGINSHUTDOWN aShutdown, nsIServiceManager* serviceMgr)
{
NS_INIT_REFCNT();
gServiceMgr = serviceMgr;
fLibrary = nsnull;
#if defined(XP_WIN)
// On Windows (and Mac) we need to keep a direct reference to the fCallbacks and NOT
// just copy the struct. See Bugzilla 85334
NP_GETENTRYPOINTS pfnGetEntryPoints =
(NP_GETENTRYPOINTS)PR_FindSymbol(aLibrary, "NP_GetEntryPoints");
if (!pfnGetEntryPoints)
{
NS_ASSERTION(pfnGetEntryPoints, "failed to get entry points");
return;
}
memset((void*) &fCallbacks, 0, sizeof(fCallbacks));
fCallbacks.size = sizeof(fCallbacks);
nsresult result = pfnGetEntryPoints(&fCallbacks);
NS_ASSERTION( NS_OK == result,"Failed to get callbacks");
NS_ASSERTION(HIBYTE(fCallbacks.version) >= NP_VERSION_MAJOR,
"callback version is less than NP version");
fShutdownEntry = (NP_PLUGINSHUTDOWN)PR_FindSymbol(aLibrary, "NP_Shutdown");
#elif defined(XP_MAC)
// get the main entry point
#if TARGET_CARBON
NP_MAIN pfnMain = (NP_MAIN) PR_FindSymbol(aLibrary, "main");
#else
NP_MAIN pfnMain = (NP_MAIN) PR_FindSymbol(aLibrary, "mainRD");
#endif
if(pfnMain == NULL)
{
NS_ASSERTION(pfnMain, "failed to get entry points");
return;
}
// call into the entry point
NPError error;
NS_TRY_SAFE_CALL_RETURN(error, CallNPP_MainEntryProc(pfnMain,
&(ns4xPlugin::CALLBACKS),
&fCallbacks,
&fShutdownEntry), aLibrary);
if(error != NPERR_NO_ERROR || ((fCallbacks.version >> 8) < NP_VERSION_MAJOR))
{
return;
}
#else // for everyone else
gServiceMgr = serviceMgr;
fLibrary = nsnull;
#if defined(XP_WIN)
// On Windows (and Mac) we need to keep a direct reference to the fCallbacks and NOT
// just copy the struct. See Bugzilla 85334
NP_GETENTRYPOINTS pfnGetEntryPoints =
(NP_GETENTRYPOINTS)PR_FindSymbol(aLibrary, "NP_GetEntryPoints");
if (!pfnGetEntryPoints)
{
NS_ASSERTION(pfnGetEntryPoints, "failed to get entry points");
return;
}
memset((void*) &fCallbacks, 0, sizeof(fCallbacks));
fCallbacks.size = sizeof(fCallbacks);
nsresult result = pfnGetEntryPoints(&fCallbacks);
NS_ASSERTION( NS_OK == result,"Failed to get callbacks");
NS_ASSERTION(HIBYTE(fCallbacks.version) >= NP_VERSION_MAJOR,
"callback version is less than NP version");
fShutdownEntry = (NP_PLUGINSHUTDOWN)PR_FindSymbol(aLibrary, "NP_Shutdown");
#elif defined(XP_MAC)
// get the main entry point
#if TARGET_CARBON
NP_MAIN pfnMain = (NP_MAIN) PR_FindSymbol(aLibrary, "main");
#else
NP_MAIN pfnMain = (NP_MAIN) PR_FindSymbol(aLibrary, "mainRD");
#endif
if(pfnMain == NULL)
{
NS_ASSERTION(pfnMain, "failed to get entry points");
return;
}
// call into the entry point
NPError error;
NS_TRY_SAFE_CALL_RETURN(error, CallNPP_MainEntryProc(pfnMain,
&(ns4xPlugin::CALLBACKS),
&fCallbacks,
&fShutdownEntry), aLibrary);
if(error != NPERR_NO_ERROR || ((fCallbacks.version >> 8) < NP_VERSION_MAJOR))
{
return;
}
#else // for everyone else
memcpy((void*) &fCallbacks, (void*) callbacks, sizeof(fCallbacks));
fShutdownEntry = aShutdown;
#endif
fLibrary = aLibrary;
#endif
fLibrary = aLibrary;
}
@ -306,7 +306,7 @@ ns4xPlugin::CreatePlugin(nsIServiceManager* aServiceMgr,
#endif
#if defined(XP_PC) && !defined(XP_WIN)
// XXX this probably should be factored out and
// XXX this probably should be factored out and
// just use trailing XP_WIN.
NP_GETENTRYPOINTS pfnGetEntryPoints =
(NP_GETENTRYPOINTS)PR_FindSymbol(aLibrary, "NP_GetEntryPoints");
@ -330,11 +330,11 @@ ns4xPlugin::CreatePlugin(nsIServiceManager* aServiceMgr,
// create the new plugin handler
*aResult = new ns4xPlugin(&callbacks, aLibrary, pfnShutdown, aServiceMgr);
#elif defined(XP_WIN)
// Note: on Windows, we must use the fCallback because plugins may change
// the function table. The Shockwave installer makes changes in the table while running
*aResult = new ns4xPlugin(nsnull, aLibrary, nsnull, aServiceMgr);
#endif
#elif defined(XP_WIN)
// Note: on Windows, we must use the fCallback because plugins may change
// the function table. The Shockwave installer makes changes in the table while running
*aResult = new ns4xPlugin(nsnull, aLibrary, nsnull, aServiceMgr);
#endif
#ifdef XP_PC
if (*aResult == NULL)
return NS_ERROR_OUT_OF_MEMORY;
@ -367,10 +367,10 @@ ns4xPlugin::CreatePlugin(nsIServiceManager* aServiceMgr,
return NS_ERROR_UNEXPECTED;
#endif
#if defined(XP_MAC)
nsPluginsDir pluginsDir(PLUGINS_DIR_LOCATION_MAC_SYSTEM_PLUGINS_FOLDER);
if(!pluginsDir.Valid())
return NS_ERROR_FAILURE;
#if defined(XP_MAC)
nsPluginsDir pluginsDir(PLUGINS_DIR_LOCATION_MAC_SYSTEM_PLUGINS_FOLDER);
if(!pluginsDir.Valid())
return NS_ERROR_FAILURE;
short appRefNum = ::CurResFile();
short pluginRefNum;
@ -416,9 +416,9 @@ ns4xPlugin::CreatePlugin(nsIServiceManager* aServiceMgr,
ns4xPlugin* plugin = new ns4xPlugin(nsnull, aLibrary, nsnull, aServiceMgr);
if(plugin == NULL)
return NS_ERROR_OUT_OF_MEMORY;
if(plugin == NULL)
return NS_ERROR_OUT_OF_MEMORY;
::UseResFile(appRefNum);
plugin->SetPluginRefNum(pluginRefNum);

View File

@ -1644,8 +1644,8 @@ nsPluginStreamListenerPeer::OnStartRequest(nsIRequest *request, nsISupports* aCo
if (NS_FAILED(rv)) {
// The channel doesn't want to do our bidding, lets cache it to disk ourselves
rv = SetupPluginCacheFile(channel);
if (NS_FAILED(rv))
NS_WARNING("No Cache Aval. Some plugins wont work OR we don't have a URL");
if (NS_FAILED(rv))
NS_WARNING("No Cache Aval. Some plugins wont work OR we don't have a URL");
}
char* aContentType = nsnull;

View File

@ -108,64 +108,64 @@ static NS_DEFINE_IID(kIPluginStreamListenerIID, NS_IPLUGINSTREAMLISTENER_IID);
ns4xPlugin::ns4xPlugin(NPPluginFuncs* callbacks, PRLibrary* aLibrary, NP_PLUGINSHUTDOWN aShutdown, nsIServiceManager* serviceMgr)
{
NS_INIT_REFCNT();
gServiceMgr = serviceMgr;
fLibrary = nsnull;
#if defined(XP_WIN)
// On Windows (and Mac) we need to keep a direct reference to the fCallbacks and NOT
// just copy the struct. See Bugzilla 85334
NP_GETENTRYPOINTS pfnGetEntryPoints =
(NP_GETENTRYPOINTS)PR_FindSymbol(aLibrary, "NP_GetEntryPoints");
if (!pfnGetEntryPoints)
{
NS_ASSERTION(pfnGetEntryPoints, "failed to get entry points");
return;
}
memset((void*) &fCallbacks, 0, sizeof(fCallbacks));
fCallbacks.size = sizeof(fCallbacks);
nsresult result = pfnGetEntryPoints(&fCallbacks);
NS_ASSERTION( NS_OK == result,"Failed to get callbacks");
NS_ASSERTION(HIBYTE(fCallbacks.version) >= NP_VERSION_MAJOR,
"callback version is less than NP version");
fShutdownEntry = (NP_PLUGINSHUTDOWN)PR_FindSymbol(aLibrary, "NP_Shutdown");
#elif defined(XP_MAC)
// get the main entry point
#if TARGET_CARBON
NP_MAIN pfnMain = (NP_MAIN) PR_FindSymbol(aLibrary, "main");
#else
NP_MAIN pfnMain = (NP_MAIN) PR_FindSymbol(aLibrary, "mainRD");
#endif
if(pfnMain == NULL)
{
NS_ASSERTION(pfnMain, "failed to get entry points");
return;
}
// call into the entry point
NPError error;
NS_TRY_SAFE_CALL_RETURN(error, CallNPP_MainEntryProc(pfnMain,
&(ns4xPlugin::CALLBACKS),
&fCallbacks,
&fShutdownEntry), aLibrary);
if(error != NPERR_NO_ERROR || ((fCallbacks.version >> 8) < NP_VERSION_MAJOR))
{
return;
}
#else // for everyone else
gServiceMgr = serviceMgr;
fLibrary = nsnull;
#if defined(XP_WIN)
// On Windows (and Mac) we need to keep a direct reference to the fCallbacks and NOT
// just copy the struct. See Bugzilla 85334
NP_GETENTRYPOINTS pfnGetEntryPoints =
(NP_GETENTRYPOINTS)PR_FindSymbol(aLibrary, "NP_GetEntryPoints");
if (!pfnGetEntryPoints)
{
NS_ASSERTION(pfnGetEntryPoints, "failed to get entry points");
return;
}
memset((void*) &fCallbacks, 0, sizeof(fCallbacks));
fCallbacks.size = sizeof(fCallbacks);
nsresult result = pfnGetEntryPoints(&fCallbacks);
NS_ASSERTION( NS_OK == result,"Failed to get callbacks");
NS_ASSERTION(HIBYTE(fCallbacks.version) >= NP_VERSION_MAJOR,
"callback version is less than NP version");
fShutdownEntry = (NP_PLUGINSHUTDOWN)PR_FindSymbol(aLibrary, "NP_Shutdown");
#elif defined(XP_MAC)
// get the main entry point
#if TARGET_CARBON
NP_MAIN pfnMain = (NP_MAIN) PR_FindSymbol(aLibrary, "main");
#else
NP_MAIN pfnMain = (NP_MAIN) PR_FindSymbol(aLibrary, "mainRD");
#endif
if(pfnMain == NULL)
{
NS_ASSERTION(pfnMain, "failed to get entry points");
return;
}
// call into the entry point
NPError error;
NS_TRY_SAFE_CALL_RETURN(error, CallNPP_MainEntryProc(pfnMain,
&(ns4xPlugin::CALLBACKS),
&fCallbacks,
&fShutdownEntry), aLibrary);
if(error != NPERR_NO_ERROR || ((fCallbacks.version >> 8) < NP_VERSION_MAJOR))
{
return;
}
#else // for everyone else
memcpy((void*) &fCallbacks, (void*) callbacks, sizeof(fCallbacks));
fShutdownEntry = aShutdown;
#endif
fLibrary = aLibrary;
#endif
fLibrary = aLibrary;
}
@ -306,7 +306,7 @@ ns4xPlugin::CreatePlugin(nsIServiceManager* aServiceMgr,
#endif
#if defined(XP_PC) && !defined(XP_WIN)
// XXX this probably should be factored out and
// XXX this probably should be factored out and
// just use trailing XP_WIN.
NP_GETENTRYPOINTS pfnGetEntryPoints =
(NP_GETENTRYPOINTS)PR_FindSymbol(aLibrary, "NP_GetEntryPoints");
@ -330,11 +330,11 @@ ns4xPlugin::CreatePlugin(nsIServiceManager* aServiceMgr,
// create the new plugin handler
*aResult = new ns4xPlugin(&callbacks, aLibrary, pfnShutdown, aServiceMgr);
#elif defined(XP_WIN)
// Note: on Windows, we must use the fCallback because plugins may change
// the function table. The Shockwave installer makes changes in the table while running
*aResult = new ns4xPlugin(nsnull, aLibrary, nsnull, aServiceMgr);
#endif
#elif defined(XP_WIN)
// Note: on Windows, we must use the fCallback because plugins may change
// the function table. The Shockwave installer makes changes in the table while running
*aResult = new ns4xPlugin(nsnull, aLibrary, nsnull, aServiceMgr);
#endif
#ifdef XP_PC
if (*aResult == NULL)
return NS_ERROR_OUT_OF_MEMORY;
@ -367,10 +367,10 @@ ns4xPlugin::CreatePlugin(nsIServiceManager* aServiceMgr,
return NS_ERROR_UNEXPECTED;
#endif
#if defined(XP_MAC)
nsPluginsDir pluginsDir(PLUGINS_DIR_LOCATION_MAC_SYSTEM_PLUGINS_FOLDER);
if(!pluginsDir.Valid())
return NS_ERROR_FAILURE;
#if defined(XP_MAC)
nsPluginsDir pluginsDir(PLUGINS_DIR_LOCATION_MAC_SYSTEM_PLUGINS_FOLDER);
if(!pluginsDir.Valid())
return NS_ERROR_FAILURE;
short appRefNum = ::CurResFile();
short pluginRefNum;
@ -416,9 +416,9 @@ ns4xPlugin::CreatePlugin(nsIServiceManager* aServiceMgr,
ns4xPlugin* plugin = new ns4xPlugin(nsnull, aLibrary, nsnull, aServiceMgr);
if(plugin == NULL)
return NS_ERROR_OUT_OF_MEMORY;
if(plugin == NULL)
return NS_ERROR_OUT_OF_MEMORY;
::UseResFile(appRefNum);
plugin->SetPluginRefNum(pluginRefNum);

View File

@ -1644,8 +1644,8 @@ nsPluginStreamListenerPeer::OnStartRequest(nsIRequest *request, nsISupports* aCo
if (NS_FAILED(rv)) {
// The channel doesn't want to do our bidding, lets cache it to disk ourselves
rv = SetupPluginCacheFile(channel);
if (NS_FAILED(rv))
NS_WARNING("No Cache Aval. Some plugins wont work OR we don't have a URL");
if (NS_FAILED(rv))
NS_WARNING("No Cache Aval. Some plugins wont work OR we don't have a URL");
}
char* aContentType = nsnull;