Bug 438331 - Remove WIN16 (support) code everywhere; (Iv1) </embedding/>; r=joshmoz sr=jst
--- a/embedding/browser/activex/src/plugin/LegacyPlugin.cpp
+++ b/embedding/browser/activex/src/plugin/LegacyPlugin.cpp
@@ -895,17 +895,17 @@ NewControl(const char *pluginType,
}
// NPP_New
//
// create a new plugin instance
// handle any instance specific code initialization here
//
-NPError NP_LOADDS NPP_New(NPMIMEType pluginType,
+NPError NPP_New(NPMIMEType pluginType,
NPP instance,
uint16_t mode,
int16_t argc,
char* argn[],
char* argv[],
NPSavedData* saved)
{
ATLTRACE(_T("NPP_New()\n"));
@@ -959,17 +959,17 @@ NPError NP_LOADDS NPP_New(NPMIMEType plu
return NPERR_NO_ERROR;
}
// NPP_Destroy
//
// Deletes a plug-in instance and releases all of its resources.
//
-NPError NP_LOADDS
+NPError
NPP_Destroy(NPP instance, NPSavedData** save)
{
ATLTRACE(_T("NPP_Destroy()\n"));
PluginInstanceData *pData = (PluginInstanceData *) instance->pdata;
if (pData == NULL)
{
return NPERR_INVALID_INSTANCE_ERROR;
@@ -1030,17 +1030,17 @@ NPP_Destroy(NPP instance, NPSavedData**
// 3. A window has been destroyed
//
// There is also the degenerate case; that it was called spuriously, and
// the window handle and or coords may have or have not changed, or
// the window handle and or coords may be ZERO. State information
// must be maintained by the plug-in to correctly handle the degenerate
// case.
//
-NPError NP_LOADDS
+NPError
NPP_SetWindow(NPP instance, NPWindow* window)
{
ATLTRACE(_T("NPP_SetWindow()\n"));
// Reject silly parameters
if (!window)
{
return NPERR_GENERIC_ERROR;
@@ -1097,17 +1097,17 @@ NPP_SetWindow(NPP instance, NPWindow* wi
// a complete disk file. It will still call the write functions but it will also
// pass the filename of the cached file in a later NPE_StreamAsFile call when it
// is done transferring the file.
//
// If a plugin handles the data in a streaming manner, it should set streamtype to
// NPNormal (e.g. *streamtype = NPNormal)...the NPE_StreamAsFile function will
// never be called in this case
//
-NPError NP_LOADDS
+NPError
NPP_NewStream(NPP instance,
NPMIMEType type,
NPStream *stream,
NPBool seekable,
uint16_t *stype)
{
ATLTRACE(_T("NPP_NewStream()\n"));
@@ -1123,17 +1123,17 @@ NPP_NewStream(NPP instance,
}
// NPP_StreamAsFile
//
// The stream is done transferring and here is a pointer to the file in the cache
// This function is only called if the streamtype was set to NPAsFile.
//
-void NP_LOADDS
+void
NPP_StreamAsFile(NPP instance, NPStream *stream, const char* fname)
{
ATLTRACE(_T("NPP_StreamAsFile()\n"));
if(fname == NULL || fname[0] == NULL)
{
return;
}
@@ -1156,56 +1156,56 @@ int32_t STREAMBUFSIZE = 0X0FFFFFFF; //
// call (since we ignore it)
// NPP_WriteReady
//
// The number of bytes that a plug-in is willing to accept in a subsequent
// NPO_Write call.
//
-int32_t NP_LOADDS
+int32_t
NPP_WriteReady(NPP instance, NPStream *stream)
{
return STREAMBUFSIZE;
}
// NPP_Write
//
// Provides len bytes of data.
//
-int32_t NP_LOADDS
+int32_t
NPP_Write(NPP instance, NPStream *stream, int32_t offset, int32_t len, void *buffer)
{
return len;
}
// NPP_DestroyStream
//
// Closes a stream object.
// reason indicates why the stream was closed. Possible reasons are
// that it was complete, because there was some error, or because
// the user aborted it.
//
-NPError NP_LOADDS
+NPError
NPP_DestroyStream(NPP instance, NPStream *stream, NPError reason)
{
// because I am handling the stream as a file, I don't do anything here...
// If I was streaming, I would know that I was done and do anything appropriate
// to the end of the stream...
return NPERR_NO_ERROR;
}
// NPP_Print
//
// Printing the plugin (to be continued...)
//
-void NP_LOADDS
+void
NPP_Print(NPP instance, NPPrint* printInfo)
{
if(printInfo == NULL) // trap invalid parm
{
return;
}
// if (instance != NULL) {
@@ -1240,23 +1240,23 @@ NPP_URLNotify(NPP instance, const char*
if (pData)
{
if (pData->szUrl)
free(pData->szUrl);
pData->szUrl = strdup(url);
}
}
-NPError NP_LOADDS
+NPError
NPP_GetValue(NPP instance, NPPVariable variable, void *value)
{
NPError rv = NPERR_GENERIC_ERROR;
#ifdef MOZ_ACTIVEX_PLUGIN_XPCONNECT
rv = MozAxPlugin::GetValue(instance, variable, value);
#endif
return rv;
}
-NPError NP_LOADDS
+NPError
NPP_SetValue(NPP instance, NPNVariable variable, void *value)
{
return NPERR_GENERIC_ERROR;
}
--- a/embedding/browser/activex/src/plugin/XPConnect.cpp
+++ b/embedding/browser/activex/src/plugin/XPConnect.cpp
@@ -447,17 +447,17 @@ nsScriptablePeer::InternalInvoke(const c
IDispatchPtr disp;
if (FAILED(GetIDispatch(&disp)))
{
return NPERR_GENERIC_ERROR;
}
USES_CONVERSION;
- OLECHAR FAR* szMember = A2OLE(aMethod);
+ OLECHAR* szMember = A2OLE(aMethod);
hr = disp->GetIDsOfNames(IID_NULL, &szMember, 1, LOCALE_USER_DEFAULT, &dispid);
if (FAILED(hr))
{
return NPERR_GENERIC_ERROR;
}
_variant_t *pArgs = NULL;
if (aNumArgs > 0)
@@ -557,17 +557,17 @@ nsScriptablePeer::GetProperty(const char
HRESULT hr;
DISPID dispid;
IDispatchPtr disp;
if (FAILED(GetIDispatch(&disp)))
{
return NPERR_GENERIC_ERROR;
}
USES_CONVERSION;
- OLECHAR FAR* szMember = A2OLE(propertyName);
+ OLECHAR* szMember = A2OLE(propertyName);
hr = disp->GetIDsOfNames(IID_NULL, &szMember, 1, LOCALE_USER_DEFAULT, &dispid);
if (FAILED(hr))
{
return NPERR_GENERIC_ERROR;
}
_variant_t vResult;
@@ -599,17 +599,17 @@ nsScriptablePeer::SetProperty(const char
HRESULT hr;
DISPID dispid;
IDispatchPtr disp;
if (FAILED(GetIDispatch(&disp)))
{
return NPERR_GENERIC_ERROR;
}
USES_CONVERSION;
- OLECHAR FAR* szMember = A2OLE(propertyName);
+ OLECHAR* szMember = A2OLE(propertyName);
hr = disp->GetIDsOfNames(IID_NULL, &szMember, 1, LOCALE_USER_DEFAULT, &dispid);
if (FAILED(hr))
{
return NPERR_GENERIC_ERROR;
}
_variant_t v;
ConvertVariants(propertyValue, &v);
--- a/embedding/browser/activex/src/plugin/npwin.cpp
+++ b/embedding/browser/activex/src/plugin/npwin.cpp
@@ -31,18 +31,17 @@ NPNetscapeFuncs* g_pNavigatorFuncs = 0;
// which is called after NP_GetEntryPoint
static NPPluginFuncs* g_pluginFuncs;
//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\.
////\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//.
// NP_GetEntryPoints
//
// fills in the func table used by Navigator to call entry points in
-// plugin DLL. Note that these entry points ensure that DS is loaded
-// by using the NP_LOADDS macro, when compiling for Win16
+// plugin DLL.
//
NPError WINAPI NP_EXPORT
NP_GetEntryPoints(NPPluginFuncs* pFuncs)
{
// trap a NULL ptr
if(pFuncs == NULL)
return NPERR_INVALID_FUNCTABLE_ERROR;
@@ -121,18 +120,17 @@ NP_Shutdown()
////\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//.
//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\.
/* NAVIGATOR Entry points */
/* These entry points expect to be called from within the plugin. The
noteworthy assumption is that DS has already been set to point to the
plugin's DLL data segment. Don't call these functions from outside
- the plugin without ensuring DS is set to the DLLs data segment first,
- typically using the NP_LOADDS macro
+ the plugin without ensuring DS is set to the DLLs data segment first.
*/
/* returns the major/minor version numbers of the Plugin API for the plugin
and the Navigator
*/
void NPN_Version(int* plugin_major, int* plugin_minor, int* netscape_major, int* netscape_minor)
{
*plugin_major = NP_VERSION_MAJOR;
--- a/embedding/browser/activex/src/pluginhostctrl/pluginsdk_include/jni_md.h
+++ b/embedding/browser/activex/src/pluginhostctrl/pluginsdk_include/jni_md.h
@@ -1,11 +1,8 @@
-/*
- * @(#)jni_md.h 1.3 97/01/10
- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
@@ -39,18 +36,15 @@
#ifndef JNI_MD_H
#define JNI_MD_H
#include "jri_md.h"
#define JNICALL JRI_CALLBACK
-/* XXX don't use this -- it doesn't work for Win16 */
#ifdef XP_WIN
#define JNIEXPORT __declspec(dllexport)
#else
#define JNIEXPORT
#endif
-
-
#endif /* JNI_MD_H */
--- a/embedding/browser/activex/src/pluginhostctrl/pluginsdk_include/jri_md.h
+++ b/embedding/browser/activex/src/pluginhostctrl/pluginsdk_include/jri_md.h
@@ -130,20 +130,16 @@ extern "C" {
/* Unix or else */
#else
# define JRI_PUBLIC_API(ResultType) ResultType
# define JRI_PUBLIC_VAR(VarType) VarType
# define JRI_NATIVE_STUB(ResultType) ResultType
# define JRI_CALLBACK
#endif
-#ifndef FAR /* for non-Win16 */
-#define FAR
-#endif
-
/******************************************************************************/
/* Java Scalar Types */
#if 0 /* now in jni.h */
typedef short jchar;
typedef short jshort;
typedef float jfloat;
--- a/embedding/browser/activex/src/pluginhostctrl/pluginsdk_include/npapi.h
+++ b/embedding/browser/activex/src/pluginhostctrl/pluginsdk_include/npapi.h
@@ -363,65 +363,58 @@ typedef struct NP_Port
#define NP_EABORT NP_EABORT_is_obsolete_use_NPRES_USER_BREAK
/*
* Version feature information
*/
#define NPVERS_HAS_STREAMOUTPUT 8
#define NPVERS_HAS_NOTIFICATION 9
#define NPVERS_HAS_LIVECONNECT 9
-#define NPVERS_WIN16_HAS_LIVECONNECT 9
#define NPVERS_68K_HAS_LIVECONNECT 11
#define NPVERS_HAS_WINDOWLESS 11
/*----------------------------------------------------------------------*/
/* Function Prototypes */
/*----------------------------------------------------------------------*/
-#if defined(_WINDOWS) && !defined(WIN32)
-#define NP_LOADDS _loadds
-#else
-#define NP_LOADDS
-#endif
-
#ifdef __cplusplus
extern "C" {
#endif
/*
* NPP_* functions are provided by the plugin and called by the navigator.
*/
#ifdef XP_UNIX
char* NPP_GetMIMEDescription(void);
#endif /* XP_UNIX */
NPError NPP_Initialize(void);
void NPP_Shutdown(void);
-NPError NP_LOADDS NPP_New(NPMIMEType pluginType, NPP instance,
+NPError NPP_New(NPMIMEType pluginType, NPP instance,
uint16 mode, int16 argc, char* argn[],
char* argv[], NPSavedData* saved);
-NPError NP_LOADDS NPP_Destroy(NPP instance, NPSavedData** save);
-NPError NP_LOADDS NPP_SetWindow(NPP instance, NPWindow* window);
-NPError NP_LOADDS NPP_NewStream(NPP instance, NPMIMEType type,
+NPError NPP_Destroy(NPP instance, NPSavedData** save);
+NPError NPP_SetWindow(NPP instance, NPWindow* window);
+NPError NPP_NewStream(NPP instance, NPMIMEType type,
NPStream* stream, NPBool seekable,
uint16* stype);
-NPError NP_LOADDS NPP_DestroyStream(NPP instance, NPStream* stream,
+NPError NPP_DestroyStream(NPP instance, NPStream* stream,
NPReason reason);
-int32 NP_LOADDS NPP_WriteReady(NPP instance, NPStream* stream);
-int32 NP_LOADDS NPP_Write(NPP instance, NPStream* stream, int32 offset,
+int32 NPP_WriteReady(NPP instance, NPStream* stream);
+int32 NPP_Write(NPP instance, NPStream* stream, int32 offset,
int32 len, void* buffer);
-void NP_LOADDS NPP_StreamAsFile(NPP instance, NPStream* stream,
+void NPP_StreamAsFile(NPP instance, NPStream* stream,
const char* fname);
-void NP_LOADDS NPP_Print(NPP instance, NPPrint* platformPrint);
+void NPP_Print(NPP instance, NPPrint* platformPrint);
int16 NPP_HandleEvent(NPP instance, void* event);
-void NP_LOADDS NPP_URLNotify(NPP instance, const char* url,
+void NPP_URLNotify(NPP instance, const char* url,
NPReason reason, void* notifyData);
-jref NP_LOADDS NPP_GetJavaClass(void);
+jref NPP_GetJavaClass(void);
NPError NPP_GetValue(void *instance, NPPVariable variable,
void *value);
NPError NPP_SetValue(void *instance, NPNVariable variable,
void *value);
/*
* NPN_* functions are provided by the navigator and called by the plugin.
*/
--- a/embedding/browser/activex/src/tlb2xpt/tlb2xpt.cpp
+++ b/embedding/browser/activex/src/tlb2xpt/tlb2xpt.cpp
@@ -355,17 +355,17 @@ void DumpXPCOMInterfaceIDL(FILE *f, ITyp
BSTR bstrName = NULL;
tiInterface->GetDocumentation(func->memid, &bstrName, NULL, NULL, NULL);
fprintf(f, "%s (\n", W2A(bstrName));
SysFreeString(bstrName);
// Get the names of all the arguments
UINT cNames;
BSTR rgbstrNames[100];
- hr = tiInterface->GetNames(func->memid, rgbstrNames, 100, (UINT FAR*) &cNames);
+ hr = tiInterface->GetNames(func->memid, rgbstrNames, 100, (UINT*) &cNames);
// Dump out all parameters
for (int p = 0; p < func->cParams; p++)
{
fputs(" ", f);
BOOL isIn = FALSE;
BOOL isOut = FALSE;