Commit 1d567c16 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

NPUnix: remove nonsensicall assignations...

parent 3d0d4248
......@@ -860,99 +860,10 @@ NP_Initialize(NPNetscapeFuncs* nsTable, NPPluginFuncs* pluginFuncs)
* the whole structure, because the Netscape function table
* could actually be bigger than what we expect.
*/
int minor = nsTable->version & 0xFF;
gNetscapeFuncs = *nsTable;
gNetscapeFuncs.version = nsTable->version;
gNetscapeFuncs.size = nsTable->size;
gNetscapeFuncs.posturl = nsTable->posturl;
gNetscapeFuncs.geturl = nsTable->geturl;
gNetscapeFuncs.requestread = nsTable->requestread;
gNetscapeFuncs.newstream = nsTable->newstream;
gNetscapeFuncs.write = nsTable->write;
gNetscapeFuncs.destroystream = nsTable->destroystream;
gNetscapeFuncs.status = nsTable->status;
gNetscapeFuncs.uagent = nsTable->uagent;
gNetscapeFuncs.memalloc = nsTable->memalloc;
gNetscapeFuncs.memfree = nsTable->memfree;
gNetscapeFuncs.memflush = nsTable->memflush;
gNetscapeFuncs.reloadplugins = nsTable->reloadplugins;
#if (((NP_VERSION_MAJOR << 8) + NP_VERSION_MINOR) >= 20)
gNetscapeFuncs.pluginthreadasynccall =
nsTable->pluginthreadasynccall;
#endif
gNetscapeFuncs.getvalue = nsTable->getvalue;
gNetscapeFuncs.setvalue = nsTable->setvalue;
if( minor >= NPVERS_HAS_NOTIFICATION )
{
gNetscapeFuncs.geturlnotify = nsTable->geturlnotify;
gNetscapeFuncs.posturlnotify = nsTable->posturlnotify;
}
if (nsTable->size >= ((char *)&nsTable->setexception - (char *)nsTable))
{
gNetscapeFuncs.invalidaterect = nsTable->invalidaterect;
gNetscapeFuncs.invalidateregion = nsTable->invalidateregion;
gNetscapeFuncs.forceredraw = nsTable->forceredraw;
/* npruntime support */
if (minor >= 14)
{
gNetscapeFuncs.getstringidentifier = nsTable->getstringidentifier;
gNetscapeFuncs.getstringidentifiers = nsTable->getstringidentifiers;
gNetscapeFuncs.getintidentifier = nsTable->getintidentifier;
gNetscapeFuncs.identifierisstring = nsTable->identifierisstring;
gNetscapeFuncs.utf8fromidentifier = nsTable->utf8fromidentifier;
gNetscapeFuncs.intfromidentifier = nsTable->intfromidentifier;
gNetscapeFuncs.createobject = nsTable->createobject;
gNetscapeFuncs.retainobject = nsTable->retainobject;
gNetscapeFuncs.releaseobject = nsTable->releaseobject;
gNetscapeFuncs.invoke = nsTable->invoke;
gNetscapeFuncs.invokeDefault = nsTable->invokeDefault;
gNetscapeFuncs.evaluate = nsTable->evaluate;
gNetscapeFuncs.getproperty = nsTable->getproperty;
gNetscapeFuncs.setproperty = nsTable->setproperty;
gNetscapeFuncs.removeproperty = nsTable->removeproperty;
gNetscapeFuncs.hasproperty = nsTable->hasproperty;
gNetscapeFuncs.hasmethod = nsTable->hasmethod;
gNetscapeFuncs.releasevariantvalue = nsTable->releasevariantvalue;
gNetscapeFuncs.setexception = nsTable->setexception;
}
}
else
{
gNetscapeFuncs.invalidaterect = NULL;
gNetscapeFuncs.invalidateregion = NULL;
gNetscapeFuncs.forceredraw = NULL;
gNetscapeFuncs.getstringidentifier = NULL;
gNetscapeFuncs.getstringidentifiers = NULL;
gNetscapeFuncs.getintidentifier = NULL;
gNetscapeFuncs.identifierisstring = NULL;
gNetscapeFuncs.utf8fromidentifier = NULL;
gNetscapeFuncs.intfromidentifier = NULL;
gNetscapeFuncs.createobject = NULL;
gNetscapeFuncs.retainobject = NULL;
gNetscapeFuncs.releaseobject = NULL;
gNetscapeFuncs.invoke = NULL;
gNetscapeFuncs.invokeDefault = NULL;
gNetscapeFuncs.evaluate = NULL;
gNetscapeFuncs.getproperty = NULL;
gNetscapeFuncs.setproperty = NULL;
gNetscapeFuncs.removeproperty = NULL;
gNetscapeFuncs.hasproperty = NULL;
gNetscapeFuncs.releasevariantvalue = NULL;
gNetscapeFuncs.setexception = NULL;
}
if (nsTable->size >=
((char *)&nsTable->poppopupsenabledstate - (char *)nsTable))
{
gNetscapeFuncs.pushpopupsenabledstate = nsTable->pushpopupsenabledstate;
gNetscapeFuncs.poppopupsenabledstate = nsTable->poppopupsenabledstate;
}
else
{
gNetscapeFuncs.pushpopupsenabledstate = NULL;
gNetscapeFuncs.poppopupsenabledstate = NULL;
}
int minor = nsTable->version & 0xFF;
/*
* Set up the plugin function table that Netscape will use to
......
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