Commit 8ba3c407 authored by Jean-Paul Saman's avatar Jean-Paul Saman

Remove some excess whitespace and tabs.

parent 9db3ec01
...@@ -97,7 +97,7 @@ ...@@ -97,7 +97,7 @@
#if defined(XP_MACOSX) && defined(__POWERPC__) && (!defined(TARGET_RT_MAC_CFM)) #if defined(XP_MACOSX) && defined(__POWERPC__) && (!defined(TARGET_RT_MAC_CFM))
// glue for mapping outgoing Macho function pointers to TVectors // glue for mapping outgoing Macho function pointers to TVectors
struct TFPtoTVGlue{ struct TFPtoTVGlue {
void* glue[2]; void* glue[2];
}; };
...@@ -235,7 +235,7 @@ NPError NPN_GetURLNotify(NPP instance, const char* url, const char* window, void ...@@ -235,7 +235,7 @@ NPError NPN_GetURLNotify(NPP instance, const char* url, const char* window, void
{ {
int navMinorVers = gNetscapeFuncs.version & 0xFF; int navMinorVers = gNetscapeFuncs.version & 0xFF;
NPError err; NPError err;
if( navMinorVers >= NPVERS_HAS_NOTIFICATION ) if( navMinorVers >= NPVERS_HAS_NOTIFICATION )
{ {
err = CallNPN_GetURLNotifyProc(gNetscapeFuncs.geturlnotify, instance, url, window, notifyData); err = CallNPN_GetURLNotifyProc(gNetscapeFuncs.geturlnotify, instance, url, window, notifyData);
...@@ -256,7 +256,7 @@ NPError NPN_PostURLNotify(NPP instance, const char* url, const char* window, uin ...@@ -256,7 +256,7 @@ NPError NPN_PostURLNotify(NPP instance, const char* url, const char* window, uin
{ {
int navMinorVers = gNetscapeFuncs.version & 0xFF; int navMinorVers = gNetscapeFuncs.version & 0xFF;
NPError err; NPError err;
if( navMinorVers >= NPVERS_HAS_NOTIFICATION ) if( navMinorVers >= NPVERS_HAS_NOTIFICATION )
{ {
err = CallNPN_PostURLNotifyProc(gNetscapeFuncs.posturlnotify, instance, url, err = CallNPN_PostURLNotifyProc(gNetscapeFuncs.posturlnotify, instance, url,
...@@ -283,7 +283,7 @@ NPError NPN_NewStream(NPP instance, NPMIMEType type, const char* window, NPStrea ...@@ -283,7 +283,7 @@ NPError NPN_NewStream(NPP instance, NPMIMEType type, const char* window, NPStrea
{ {
int navMinorVers = gNetscapeFuncs.version & 0xFF; int navMinorVers = gNetscapeFuncs.version & 0xFF;
NPError err; NPError err;
if( navMinorVers >= NPVERS_HAS_STREAMOUTPUT ) if( navMinorVers >= NPVERS_HAS_STREAMOUTPUT )
{ {
err = CallNPN_NewStreamProc(gNetscapeFuncs.newstream, instance, type, window, stream); err = CallNPN_NewStreamProc(gNetscapeFuncs.newstream, instance, type, window, stream);
...@@ -299,7 +299,7 @@ int32 NPN_Write(NPP instance, NPStream* stream, int32 len, void* buffer) ...@@ -299,7 +299,7 @@ int32 NPN_Write(NPP instance, NPStream* stream, int32 len, void* buffer)
{ {
int navMinorVers = gNetscapeFuncs.version & 0xFF; int navMinorVers = gNetscapeFuncs.version & 0xFF;
NPError err; NPError err;
if( navMinorVers >= NPVERS_HAS_STREAMOUTPUT ) if( navMinorVers >= NPVERS_HAS_STREAMOUTPUT )
{ {
err = CallNPN_WriteProc(gNetscapeFuncs.write, instance, stream, len, buffer); err = CallNPN_WriteProc(gNetscapeFuncs.write, instance, stream, len, buffer);
...@@ -315,7 +315,7 @@ NPError NPN_DestroyStream(NPP instance, NPStream* stream, NPError reason) ...@@ -315,7 +315,7 @@ NPError NPN_DestroyStream(NPP instance, NPStream* stream, NPError reason)
{ {
int navMinorVers = gNetscapeFuncs.version & 0xFF; int navMinorVers = gNetscapeFuncs.version & 0xFF;
NPError err; NPError err;
if( navMinorVers >= NPVERS_HAS_STREAMOUTPUT ) if( navMinorVers >= NPVERS_HAS_STREAMOUTPUT )
{ {
err = CallNPN_DestroyStreamProc(gNetscapeFuncs.destroystream, instance, stream, reason); err = CallNPN_DestroyStreamProc(gNetscapeFuncs.destroystream, instance, stream, reason);
...@@ -398,7 +398,7 @@ NPIdentifier NPN_GetStringIdentifier(const NPUTF8 *name) ...@@ -398,7 +398,7 @@ NPIdentifier NPN_GetStringIdentifier(const NPUTF8 *name)
{ {
int navMinorVers = gNetscapeFuncs.version & 0xFF; int navMinorVers = gNetscapeFuncs.version & 0xFF;
if( navMinorVers >= 14 ) if( navMinorVers >= 14 )
{ {
return CallNPN_GetStringIdentifierProc( gNetscapeFuncs.getstringidentifier, name); return CallNPN_GetStringIdentifierProc( gNetscapeFuncs.getstringidentifier, name);
} }
return NULL; return NULL;
...@@ -408,7 +408,7 @@ void NPN_GetStringIdentifiers(const NPUTF8 **names, int32_t nameCount, NPIdentif ...@@ -408,7 +408,7 @@ void NPN_GetStringIdentifiers(const NPUTF8 **names, int32_t nameCount, NPIdentif
{ {
int navMinorVers = gNetscapeFuncs.version & 0xFF; int navMinorVers = gNetscapeFuncs.version & 0xFF;
if( navMinorVers >= 14 ) if( navMinorVers >= 14 )
{ {
CallNPN_GetStringIdentifiersProc( gNetscapeFuncs.getstringidentifiers, names, nameCount, identifiers); CallNPN_GetStringIdentifiersProc( gNetscapeFuncs.getstringidentifiers, names, nameCount, identifiers);
} }
} }
...@@ -417,7 +417,7 @@ NPIdentifier NPN_GetIntIdentifier(int32_t intid) ...@@ -417,7 +417,7 @@ NPIdentifier NPN_GetIntIdentifier(int32_t intid)
{ {
int navMinorVers = gNetscapeFuncs.version & 0xFF; int navMinorVers = gNetscapeFuncs.version & 0xFF;
if( navMinorVers >= 14 ) if( navMinorVers >= 14 )
{ {
return CallNPN_GetIntIdentifierProc( gNetscapeFuncs.getintidentifier, intid); return CallNPN_GetIntIdentifierProc( gNetscapeFuncs.getintidentifier, intid);
} }
return NULL; return NULL;
...@@ -427,7 +427,7 @@ bool NPN_IdentifierIsString(NPIdentifier identifier) ...@@ -427,7 +427,7 @@ bool NPN_IdentifierIsString(NPIdentifier identifier)
{ {
int navMinorVers = gNetscapeFuncs.version & 0xFF; int navMinorVers = gNetscapeFuncs.version & 0xFF;
if( navMinorVers >= 14 ) if( navMinorVers >= 14 )
{ {
return CallNPN_IdentifierIsStringProc( gNetscapeFuncs.identifierisstring, identifier); return CallNPN_IdentifierIsStringProc( gNetscapeFuncs.identifierisstring, identifier);
} }
return false; return false;
...@@ -437,7 +437,7 @@ NPUTF8 *NPN_UTF8FromIdentifier(NPIdentifier identifier) ...@@ -437,7 +437,7 @@ NPUTF8 *NPN_UTF8FromIdentifier(NPIdentifier identifier)
{ {
int navMinorVers = gNetscapeFuncs.version & 0xFF; int navMinorVers = gNetscapeFuncs.version & 0xFF;
if( navMinorVers >= 14 ) if( navMinorVers >= 14 )
{ {
return CallNPN_UTF8FromIdentifierProc( gNetscapeFuncs.utf8fromidentifier, identifier); return CallNPN_UTF8FromIdentifierProc( gNetscapeFuncs.utf8fromidentifier, identifier);
} }
return NULL; return NULL;
...@@ -447,7 +447,7 @@ int32_t NPN_IntFromIdentifier(NPIdentifier identifier) ...@@ -447,7 +447,7 @@ int32_t NPN_IntFromIdentifier(NPIdentifier identifier)
{ {
int navMinorVers = gNetscapeFuncs.version & 0xFF; int navMinorVers = gNetscapeFuncs.version & 0xFF;
if( navMinorVers >= 14 ) if( navMinorVers >= 14 )
{ {
return CallNPN_IntFromIdentifierProc( gNetscapeFuncs.intfromidentifier, identifier); return CallNPN_IntFromIdentifierProc( gNetscapeFuncs.intfromidentifier, identifier);
} }
return 0; return 0;
...@@ -457,7 +457,7 @@ NPObject *NPN_CreateObject(NPP instance, NPClass *aClass) ...@@ -457,7 +457,7 @@ NPObject *NPN_CreateObject(NPP instance, NPClass *aClass)
{ {
int navMinorVers = gNetscapeFuncs.version & 0xFF; int navMinorVers = gNetscapeFuncs.version & 0xFF;
if( navMinorVers >= 14 ) if( navMinorVers >= 14 )
{ {
return CallNPN_CreateObjectProc( gNetscapeFuncs.createobject, instance, aClass); return CallNPN_CreateObjectProc( gNetscapeFuncs.createobject, instance, aClass);
} }
return NULL; return NULL;
...@@ -467,7 +467,7 @@ NPObject *NPN_RetainObject(NPObject *npobj) ...@@ -467,7 +467,7 @@ NPObject *NPN_RetainObject(NPObject *npobj)
{ {
int navMinorVers = gNetscapeFuncs.version & 0xFF; int navMinorVers = gNetscapeFuncs.version & 0xFF;
if( navMinorVers >= 14 ) if( navMinorVers >= 14 )
{ {
return CallNPN_RetainObjectProc( gNetscapeFuncs.retainobject, npobj); return CallNPN_RetainObjectProc( gNetscapeFuncs.retainobject, npobj);
} }
return NULL; return NULL;
...@@ -477,7 +477,7 @@ void NPN_ReleaseObject(NPObject *npobj) ...@@ -477,7 +477,7 @@ void NPN_ReleaseObject(NPObject *npobj)
{ {
int navMinorVers = gNetscapeFuncs.version & 0xFF; int navMinorVers = gNetscapeFuncs.version & 0xFF;
if( navMinorVers >= 14 ) if( navMinorVers >= 14 )
{ {
CallNPN_ReleaseObjectProc( gNetscapeFuncs.releaseobject, npobj); CallNPN_ReleaseObjectProc( gNetscapeFuncs.releaseobject, npobj);
} }
} }
...@@ -486,7 +486,7 @@ bool NPN_Invoke(NPP instance, NPObject *npobj, NPIdentifier methodName, const NP ...@@ -486,7 +486,7 @@ bool NPN_Invoke(NPP instance, NPObject *npobj, NPIdentifier methodName, const NP
{ {
int navMinorVers = gNetscapeFuncs.version & 0xFF; int navMinorVers = gNetscapeFuncs.version & 0xFF;
if( navMinorVers >= 14 ) if( navMinorVers >= 14 )
{ {
return CallNPN_InvokeProc( gNetscapeFuncs.invoke, instance, npobj, methodName, args, argCount, result); return CallNPN_InvokeProc( gNetscapeFuncs.invoke, instance, npobj, methodName, args, argCount, result);
} }
return false; return false;
...@@ -496,7 +496,7 @@ bool NPN_InvokeDefault(NPP instance, NPObject *npobj, const NPVariant *args, uin ...@@ -496,7 +496,7 @@ bool NPN_InvokeDefault(NPP instance, NPObject *npobj, const NPVariant *args, uin
{ {
int navMinorVers = gNetscapeFuncs.version & 0xFF; int navMinorVers = gNetscapeFuncs.version & 0xFF;
if( navMinorVers >= 14 ) if( navMinorVers >= 14 )
{ {
return CallNPN_InvokeDefaultProc( gNetscapeFuncs.invokeDefault, instance, npobj, args, argCount, result); return CallNPN_InvokeDefaultProc( gNetscapeFuncs.invokeDefault, instance, npobj, args, argCount, result);
} }
return false; return false;
...@@ -506,7 +506,7 @@ bool NPN_Evaluate(NPP instance, NPObject *npobj, NPString *script, NPVariant *re ...@@ -506,7 +506,7 @@ bool NPN_Evaluate(NPP instance, NPObject *npobj, NPString *script, NPVariant *re
{ {
int navMinorVers = gNetscapeFuncs.version & 0xFF; int navMinorVers = gNetscapeFuncs.version & 0xFF;
if( navMinorVers >= 14 ) if( navMinorVers >= 14 )
{ {
return CallNPN_EvaluateProc( gNetscapeFuncs.evaluate, instance, npobj, script, result); return CallNPN_EvaluateProc( gNetscapeFuncs.evaluate, instance, npobj, script, result);
} }
return false; return false;
...@@ -516,7 +516,7 @@ bool NPN_GetProperty(NPP instance, NPObject *npobj, NPIdentifier propertyName, N ...@@ -516,7 +516,7 @@ bool NPN_GetProperty(NPP instance, NPObject *npobj, NPIdentifier propertyName, N
{ {
int navMinorVers = gNetscapeFuncs.version & 0xFF; int navMinorVers = gNetscapeFuncs.version & 0xFF;
if( navMinorVers >= 14 ) if( navMinorVers >= 14 )
{ {
return CallNPN_GetPropertyProc( gNetscapeFuncs.getproperty, instance, npobj, propertyName, result); return CallNPN_GetPropertyProc( gNetscapeFuncs.getproperty, instance, npobj, propertyName, result);
} }
return false; return false;
...@@ -526,7 +526,7 @@ bool NPN_SetProperty(NPP instance, NPObject *npobj, NPIdentifier propertyName, c ...@@ -526,7 +526,7 @@ bool NPN_SetProperty(NPP instance, NPObject *npobj, NPIdentifier propertyName, c
{ {
int navMinorVers = gNetscapeFuncs.version & 0xFF; int navMinorVers = gNetscapeFuncs.version & 0xFF;
if( navMinorVers >= 14 ) if( navMinorVers >= 14 )
{ {
return CallNPN_SetPropertyProc( gNetscapeFuncs.setproperty, instance, npobj, propertyName, value); return CallNPN_SetPropertyProc( gNetscapeFuncs.setproperty, instance, npobj, propertyName, value);
} }
return false; return false;
...@@ -536,7 +536,7 @@ bool NPN_RemoveProperty(NPP instance, NPObject *npobj, NPIdentifier propertyName ...@@ -536,7 +536,7 @@ bool NPN_RemoveProperty(NPP instance, NPObject *npobj, NPIdentifier propertyName
{ {
int navMinorVers = gNetscapeFuncs.version & 0xFF; int navMinorVers = gNetscapeFuncs.version & 0xFF;
if( navMinorVers >= 14 ) if( navMinorVers >= 14 )
{ {
return CallNPN_RemovePropertyProc( gNetscapeFuncs.removeproperty, instance, npobj, propertyName); return CallNPN_RemovePropertyProc( gNetscapeFuncs.removeproperty, instance, npobj, propertyName);
} }
return false; return false;
...@@ -546,7 +546,7 @@ bool NPN_HasProperty(NPP instance, NPObject *npobj, NPIdentifier propertyName) ...@@ -546,7 +546,7 @@ bool NPN_HasProperty(NPP instance, NPObject *npobj, NPIdentifier propertyName)
{ {
int navMinorVers = gNetscapeFuncs.version & 0xFF; int navMinorVers = gNetscapeFuncs.version & 0xFF;
if( navMinorVers >= 14 ) if( navMinorVers >= 14 )
{ {
return CallNPN_HasPropertyProc( gNetscapeFuncs.hasproperty, instance, npobj, propertyName); return CallNPN_HasPropertyProc( gNetscapeFuncs.hasproperty, instance, npobj, propertyName);
} }
return false; return false;
...@@ -556,7 +556,7 @@ bool NPN_HasMethod(NPP instance, NPObject *npobj, NPIdentifier methodName) ...@@ -556,7 +556,7 @@ bool NPN_HasMethod(NPP instance, NPObject *npobj, NPIdentifier methodName)
{ {
int navMinorVers = gNetscapeFuncs.version & 0xFF; int navMinorVers = gNetscapeFuncs.version & 0xFF;
if( navMinorVers >= 14 ) if( navMinorVers >= 14 )
{ {
return CallNPN_HasMethodProc( gNetscapeFuncs.hasmethod, instance, npobj, methodName); return CallNPN_HasMethodProc( gNetscapeFuncs.hasmethod, instance, npobj, methodName);
} }
return false; return false;
...@@ -566,7 +566,7 @@ void NPN_ReleaseVariantValue(NPVariant *variant) ...@@ -566,7 +566,7 @@ void NPN_ReleaseVariantValue(NPVariant *variant)
{ {
int navMinorVers = gNetscapeFuncs.version & 0xFF; int navMinorVers = gNetscapeFuncs.version & 0xFF;
if( navMinorVers >= 14 ) if( navMinorVers >= 14 )
{ {
CallNPN_ReleaseVariantValueProc( gNetscapeFuncs.releasevariantvalue, variant); CallNPN_ReleaseVariantValueProc( gNetscapeFuncs.releasevariantvalue, variant);
} }
} }
...@@ -575,7 +575,7 @@ void NPN_SetException(NPObject *npobj, const NPUTF8 *message) ...@@ -575,7 +575,7 @@ void NPN_SetException(NPObject *npobj, const NPUTF8 *message)
{ {
int navMinorVers = gNetscapeFuncs.version & 0xFF; int navMinorVers = gNetscapeFuncs.version & 0xFF;
if( navMinorVers >= 14 ) if( navMinorVers >= 14 )
{ {
CallNPN_SetExceptionProc( gNetscapeFuncs.setexception, npobj, message); CallNPN_SetExceptionProc( gNetscapeFuncs.setexception, npobj, message);
} }
} }
...@@ -633,7 +633,6 @@ void Private_Shutdown(void) ...@@ -633,7 +633,6 @@ void Private_Shutdown(void)
ExitCodeResource(); ExitCodeResource();
} }
NPError Private_New(NPMIMEType pluginType, NPP instance, uint16 mode, int16 argc, char* argn[], char* argv[], NPSavedData* saved) NPError Private_New(NPMIMEType pluginType, NPP instance, uint16 mode, int16 argc, char* argn[], char* argv[], NPSavedData* saved)
{ {
EnterCodeResource(); EnterCodeResource();
...@@ -721,7 +720,6 @@ void Private_StreamAsFile(NPP instance, NPStream* stream, const char* fname) ...@@ -721,7 +720,6 @@ void Private_StreamAsFile(NPP instance, NPStream* stream, const char* fname)
ExitCodeResource(); ExitCodeResource();
} }
NPError Private_DestroyStream(NPP instance, NPStream* stream, NPError reason) NPError Private_DestroyStream(NPP instance, NPStream* stream, NPError reason)
{ {
NPError err; NPError err;
...@@ -786,14 +784,14 @@ void SetUpQD(void) ...@@ -786,14 +784,14 @@ void SetUpQD(void)
OSErr result = noErr; OSErr result = noErr;
CFragConnectionID connID; CFragConnectionID connID;
Str255 errName; Str255 errName;
#endif #endif
// //
// Memorize the plugin’s resource file // Memorize the plugin’s resource file
// refnum for later use. // refnum for later use.
// //
gResFile = CurResFile(); gResFile = CurResFile();
#if !TARGET_API_MAC_CARBON #if !TARGET_API_MAC_CARBON
// //
// Ask the system if CFM is available. // Ask the system if CFM is available.
...@@ -815,11 +813,11 @@ void SetUpQD(void) ...@@ -815,11 +813,11 @@ void SetUpQD(void)
infoRec.processInfoLength = sizeof(ProcessInfoRec); infoRec.processInfoLength = sizeof(ProcessInfoRec);
infoRec.processName = name; infoRec.processName = name;
infoRec.processAppSpec = &myFSSpec; infoRec.processAppSpec = &myFSSpec;
ProcessSerialNumber PSN; ProcessSerialNumber PSN;
PSN.highLongOfPSN = 0; PSN.highLongOfPSN = 0;
PSN.lowLongOfPSN = kCurrentProcess; PSN.lowLongOfPSN = kCurrentProcess;
result = GetProcessInformation(&PSN, &infoRec); result = GetProcessInformation(&PSN, &infoRec);
if (result != noErr) if (result != noErr)
PLUGINDEBUGSTR("\pFailed in GetProcessInformation"); PLUGINDEBUGSTR("\pFailed in GetProcessInformation");
...@@ -828,8 +826,8 @@ void SetUpQD(void) ...@@ -828,8 +826,8 @@ void SetUpQD(void)
// //
// If no CFM installed, assume it must be a 68K app. // If no CFM installed, assume it must be a 68K app.
// //
result = -1; result = -1;
CFragConnectionID connID; CFragConnectionID connID;
if (result == noErr) if (result == noErr)
{ {
...@@ -839,7 +837,7 @@ void SetUpQD(void) ...@@ -839,7 +837,7 @@ void SetUpQD(void)
// return the address of “main” in app, which we ignore). If GetDiskFragment // return the address of “main” in app, which we ignore). If GetDiskFragment
// returns an error, we assume the app must be 68K. // returns an error, we assume the app must be 68K.
// //
Ptr mainAddr; Ptr mainAddr;
Str255 errName; Str255 errName;
result = GetDiskFragment(infoRec.processAppSpec, 0L, 0L, infoRec.processName, result = GetDiskFragment(infoRec.processAppSpec, 0L, 0L, infoRec.processName,
kLoadCFrag, &connID, (Ptr*)&mainAddr, errName); kLoadCFrag, &connID, (Ptr*)&mainAddr, errName);
...@@ -903,13 +901,13 @@ DEFINE_API_C(NPError) main(NPNetscapeFuncs* nsTable, NPPluginFuncs* pluginFuncs, ...@@ -903,13 +901,13 @@ DEFINE_API_C(NPError) main(NPNetscapeFuncs* nsTable, NPPluginFuncs* pluginFuncs,
#endif #endif
NPError err = NPERR_NO_ERROR; NPError err = NPERR_NO_ERROR;
// //
// Ensure that everything Netscape passed us is valid! // Ensure that everything Netscape passed us is valid!
// //
if ((nsTable == NULL) || (pluginFuncs == NULL) || (unloadUpp == NULL)) if ((nsTable == NULL) || (pluginFuncs == NULL) || (unloadUpp == NULL))
err = NPERR_INVALID_FUNCTABLE_ERROR; err = NPERR_INVALID_FUNCTABLE_ERROR;
// //
// Check the “major” version passed in Netscape’s function table. // Check the “major” version passed in Netscape’s function table.
// We won’t load if the major version is newer than what we expect. // We won’t load if the major version is newer than what we expect.
...@@ -922,8 +920,7 @@ DEFINE_API_C(NPError) main(NPNetscapeFuncs* nsTable, NPPluginFuncs* pluginFuncs, ...@@ -922,8 +920,7 @@ DEFINE_API_C(NPError) main(NPNetscapeFuncs* nsTable, NPPluginFuncs* pluginFuncs,
if ((nsTable->version >> 8) > NP_VERSION_MAJOR) // Major version is in high byte if ((nsTable->version >> 8) > NP_VERSION_MAJOR) // Major version is in high byte
err = NPERR_INCOMPATIBLE_VERSION_ERROR; err = NPERR_INCOMPATIBLE_VERSION_ERROR;
} }
if (err == NPERR_NO_ERROR) if (err == NPERR_NO_ERROR)
{ {
// //
...@@ -933,7 +930,7 @@ DEFINE_API_C(NPError) main(NPNetscapeFuncs* nsTable, NPPluginFuncs* pluginFuncs, ...@@ -933,7 +930,7 @@ DEFINE_API_C(NPError) main(NPNetscapeFuncs* nsTable, NPPluginFuncs* pluginFuncs,
// the whole structure, because the Netscape function table // the whole structure, because the Netscape function table
// could actually be bigger than what we expect. // could actually be bigger than what we expect.
// //
int navMinorVers = nsTable->version & 0xFF; int navMinorVers = nsTable->version & 0xFF;
gNetscapeFuncs.version = nsTable->version; gNetscapeFuncs.version = nsTable->version;
...@@ -956,7 +953,7 @@ DEFINE_API_C(NPError) main(NPNetscapeFuncs* nsTable, NPPluginFuncs* pluginFuncs, ...@@ -956,7 +953,7 @@ DEFINE_API_C(NPError) main(NPNetscapeFuncs* nsTable, NPPluginFuncs* pluginFuncs,
gNetscapeFuncs.getJavaPeer = (NPN_GetJavaPeerUPP)HOST_TO_PLUGIN_GLUE(getJavaPeer, nsTable->getJavaPeer); gNetscapeFuncs.getJavaPeer = (NPN_GetJavaPeerUPP)HOST_TO_PLUGIN_GLUE(getJavaPeer, nsTable->getJavaPeer);
} }
if( navMinorVers >= NPVERS_HAS_NOTIFICATION ) if( navMinorVers >= NPVERS_HAS_NOTIFICATION )
{ {
gNetscapeFuncs.geturlnotify = (NPN_GetURLNotifyUPP)HOST_TO_PLUGIN_GLUE(geturlnotify, nsTable->geturlnotify); gNetscapeFuncs.geturlnotify = (NPN_GetURLNotifyUPP)HOST_TO_PLUGIN_GLUE(geturlnotify, nsTable->geturlnotify);
gNetscapeFuncs.posturlnotify = (NPN_PostURLNotifyUPP)HOST_TO_PLUGIN_GLUE(posturlnotify, nsTable->posturlnotify); gNetscapeFuncs.posturlnotify = (NPN_PostURLNotifyUPP)HOST_TO_PLUGIN_GLUE(posturlnotify, nsTable->posturlnotify);
} }
...@@ -966,7 +963,7 @@ DEFINE_API_C(NPError) main(NPNetscapeFuncs* nsTable, NPPluginFuncs* pluginFuncs, ...@@ -966,7 +963,7 @@ DEFINE_API_C(NPError) main(NPNetscapeFuncs* nsTable, NPPluginFuncs* pluginFuncs,
gNetscapeFuncs.invalidateregion = (NPN_InvalidateRegionUPP)HOST_TO_PLUGIN_GLUE(invalidateregion, nsTable->invalidateregion); gNetscapeFuncs.invalidateregion = (NPN_InvalidateRegionUPP)HOST_TO_PLUGIN_GLUE(invalidateregion, nsTable->invalidateregion);
gNetscapeFuncs.forceredraw = (NPN_ForceRedrawUPP)HOST_TO_PLUGIN_GLUE(forceredraw, nsTable->forceredraw); gNetscapeFuncs.forceredraw = (NPN_ForceRedrawUPP)HOST_TO_PLUGIN_GLUE(forceredraw, nsTable->forceredraw);
if( navMinorVers >= 14 ) if( navMinorVers >= 14 )
{ {
// NPRuntime support // NPRuntime support
gNetscapeFuncs.getstringidentifier = (NPN_GetStringIdentifierUPP)HOST_TO_PLUGIN_GLUE(getstringidentifier, nsTable->getstringidentifier); gNetscapeFuncs.getstringidentifier = (NPN_GetStringIdentifierUPP)HOST_TO_PLUGIN_GLUE(getstringidentifier, nsTable->getstringidentifier);
gNetscapeFuncs.getstringidentifiers = (NPN_GetStringIdentifiersUPP)HOST_TO_PLUGIN_GLUE(getstringidentifiers, nsTable->getstringidentifiers); gNetscapeFuncs.getstringidentifiers = (NPN_GetStringIdentifiersUPP)HOST_TO_PLUGIN_GLUE(getstringidentifiers, nsTable->getstringidentifiers);
...@@ -1005,11 +1002,11 @@ DEFINE_API_C(NPError) main(NPNetscapeFuncs* nsTable, NPPluginFuncs* pluginFuncs, ...@@ -1005,11 +1002,11 @@ DEFINE_API_C(NPError) main(NPNetscapeFuncs* nsTable, NPPluginFuncs* pluginFuncs,
pluginFuncs->writeready = NewNPP_WriteReadyProc(PLUGIN_TO_HOST_GLUE(writeready, Private_WriteReady)); pluginFuncs->writeready = NewNPP_WriteReadyProc(PLUGIN_TO_HOST_GLUE(writeready, Private_WriteReady));
pluginFuncs->write = NewNPP_WriteProc(PLUGIN_TO_HOST_GLUE(write, Private_Write)); pluginFuncs->write = NewNPP_WriteProc(PLUGIN_TO_HOST_GLUE(write, Private_Write));
pluginFuncs->print = NewNPP_PrintProc(PLUGIN_TO_HOST_GLUE(print, Private_Print)); pluginFuncs->print = NewNPP_PrintProc(PLUGIN_TO_HOST_GLUE(print, Private_Print));
pluginFuncs->event = NewNPP_HandleEventProc(PLUGIN_TO_HOST_GLUE(event, Private_HandleEvent)); pluginFuncs->event = NewNPP_HandleEventProc(PLUGIN_TO_HOST_GLUE(event, Private_HandleEvent));
pluginFuncs->getvalue = NewNPP_GetValueProc(PLUGIN_TO_HOST_GLUE(getvalue, Private_GetValue)); pluginFuncs->getvalue = NewNPP_GetValueProc(PLUGIN_TO_HOST_GLUE(getvalue, Private_GetValue));
if( navMinorVers >= NPVERS_HAS_NOTIFICATION ) if( navMinorVers >= NPVERS_HAS_NOTIFICATION )
{ {
pluginFuncs->urlnotify = NewNPP_URLNotifyProc(PLUGIN_TO_HOST_GLUE(urlnotify, Private_URLNotify)); pluginFuncs->urlnotify = NewNPP_URLNotifyProc(PLUGIN_TO_HOST_GLUE(urlnotify, Private_URLNotify));
} }
#ifdef OJI #ifdef OJI
if( navMinorVers >= NPVERS_HAS_LIVECONNECT ) if( navMinorVers >= NPVERS_HAS_LIVECONNECT )
...@@ -1024,7 +1021,7 @@ DEFINE_API_C(NPError) main(NPNetscapeFuncs* nsTable, NPPluginFuncs* pluginFuncs, ...@@ -1024,7 +1021,7 @@ DEFINE_API_C(NPError) main(NPNetscapeFuncs* nsTable, NPPluginFuncs* pluginFuncs,
SetUpQD(); SetUpQD();
err = Private_Initialize(); err = Private_Initialize();
} }
ExitCodeResource(); ExitCodeResource();
return err; return err;
} }
...@@ -1048,12 +1045,12 @@ extern "C" { ...@@ -1048,12 +1045,12 @@ extern "C" {
NPError NP_Initialize(NPNetscapeFuncs* nsTable) NPError NP_Initialize(NPNetscapeFuncs* nsTable)
{ {
PLUGINDEBUGSTR("\pNP_Initialize"); PLUGINDEBUGSTR("\pNP_Initialize");
/* validate input parameters */ /* validate input parameters */
if( NULL == nsTable ) if( NULL == nsTable )
return NPERR_INVALID_FUNCTABLE_ERROR; return NPERR_INVALID_FUNCTABLE_ERROR;
/* /*
* Check the major version passed in Netscape's function table. * Check the major version passed in Netscape's function table.
* We won't load if the major version is newer than what we expect. * We won't load if the major version is newer than what we expect.
...@@ -1068,8 +1065,7 @@ NPError NP_Initialize(NPNetscapeFuncs* nsTable) ...@@ -1068,8 +1065,7 @@ NPError NP_Initialize(NPNetscapeFuncs* nsTable)
if (nsTable->size < sizeof(NPNetscapeFuncs)) if (nsTable->size < sizeof(NPNetscapeFuncs))
return NPERR_INVALID_FUNCTABLE_ERROR; return NPERR_INVALID_FUNCTABLE_ERROR;
int navMinorVers = nsTable->version & 0xFF; int navMinorVers = nsTable->version & 0xFF;
/* /*
...@@ -1099,7 +1095,7 @@ NPError NP_Initialize(NPNetscapeFuncs* nsTable) ...@@ -1099,7 +1095,7 @@ NPError NP_Initialize(NPNetscapeFuncs* nsTable)
gNetscapeFuncs.getJavaPeer = nsTable->getJavaPeer; gNetscapeFuncs.getJavaPeer = nsTable->getJavaPeer;
} }
if( navMinorVers >= NPVERS_HAS_NOTIFICATION ) if( navMinorVers >= NPVERS_HAS_NOTIFICATION )
{ {
gNetscapeFuncs.geturlnotify = nsTable->geturlnotify; gNetscapeFuncs.geturlnotify = nsTable->geturlnotify;
gNetscapeFuncs.posturlnotify = nsTable->posturlnotify; gNetscapeFuncs.posturlnotify = nsTable->posturlnotify;
} }
...@@ -1110,7 +1106,7 @@ NPError NP_Initialize(NPNetscapeFuncs* nsTable) ...@@ -1110,7 +1106,7 @@ NPError NP_Initialize(NPNetscapeFuncs* nsTable)
gNetscapeFuncs.invalidateregion = nsTable->invalidateregion; gNetscapeFuncs.invalidateregion = nsTable->invalidateregion;
gNetscapeFuncs.forceredraw = nsTable->forceredraw; gNetscapeFuncs.forceredraw = nsTable->forceredraw;
if( navMinorVers >= 14 ) if( navMinorVers >= 14 )
{ {
// NPRuntime support // NPRuntime support
gNetscapeFuncs.getstringidentifier = nsTable->getstringidentifier; gNetscapeFuncs.getstringidentifier = nsTable->getstringidentifier;
gNetscapeFuncs.getstringidentifiers = nsTable->getstringidentifiers; gNetscapeFuncs.getstringidentifiers = nsTable->getstringidentifiers;
...@@ -1169,8 +1165,8 @@ NPError NP_GetEntryPoints(NPPluginFuncs* pluginFuncs) ...@@ -1169,8 +1165,8 @@ NPError NP_GetEntryPoints(NPPluginFuncs* pluginFuncs)
pluginFuncs->getvalue = NewNPP_GetValueProc(Private_GetValue); pluginFuncs->getvalue = NewNPP_GetValueProc(Private_GetValue);
pluginFuncs->setvalue = NewNPP_SetValueProc(Private_SetValue); pluginFuncs->setvalue = NewNPP_SetValueProc(Private_SetValue);
if( navMinorVers >= NPVERS_HAS_NOTIFICATION ) if( navMinorVers >= NPVERS_HAS_NOTIFICATION )
{ {
pluginFuncs->urlnotify = Private_URLNotify; pluginFuncs->urlnotify = Private_URLNotify;
} }
#ifdef OJI #ifdef OJI
if( navMinorVers >= NPVERS_HAS_LIVECONNECT ) if( navMinorVers >= NPVERS_HAS_LIVECONNECT )
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment