A bunch of plugin SDK build fixes. b=471759 r=josh sr=jst
authorWalter Meinl <wuno@lsvw.de>
Tue, 13 Jan 2009 12:14:40 -0500
changeset 23604 d813cc048225cc775142d55dea1d379a4903ba8d
parent 23603 ea1497b987568a5da42cb413d757e6c1ce243125
child 23605 f0e0daaa675959999b944a48d32ee216b574238c
push id1
push userroot
push dateTue, 26 Apr 2011 22:38:44 +0000
treeherdermozilla-beta@bfdb6e623a36 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjosh, jst
bugs471759
milestone1.9.2a1pre
A bunch of plugin SDK build fixes. b=471759 r=josh sr=jst
modules/plugin/tools/tester/common/npn_gate.cpp
modules/plugin/tools/tester/common/npp_gate.cpp
modules/plugin/tools/tester/include/logger.h
modules/plugin/tools/tester/include/xp.h
--- a/modules/plugin/tools/tester/common/npn_gate.cpp
+++ b/modules/plugin/tools/tester/common/npn_gate.cpp
@@ -75,147 +75,147 @@ void NPN_Version(int* plugin_major, int*
 }
 
 NPError NPN_GetURLNotify(NPP instance, const char *url, const char *target, void* notifyData)
 {
 	int navMinorVers = NPNFuncs.version & 0xFF;
   NPError rv = NPERR_NO_ERROR;
 
   if( navMinorVers >= NPVERS_HAS_NOTIFICATION )
-		rv = CallNPN_GetURLNotifyProc(NPNFuncs.geturlnotify, instance, url, target, notifyData);
+		rv = (*NPNFuncs.geturlnotify) (instance, url, target, notifyData);
 	else
 		rv = NPERR_INCOMPATIBLE_VERSION_ERROR;
 
   return rv;
 }
 
 NPError NPN_GetURL(NPP instance, const char *url, const char *target)
 {
-  NPError rv = CallNPN_GetURLProc(NPNFuncs.geturl, instance, url, target);
+  NPError rv = (*NPNFuncs.geturl) (instance, url, target);
   return rv;
 }
 
-NPError NPN_PostURLNotify(NPP instance, const char* url, const char* window, uint32 len, const char* buf, NPBool file, void* notifyData)
+NPError NPN_PostURLNotify(NPP instance, const char* url, const char* window, uint32_t len, const char* buf, NPBool file, void* notifyData)
 {
 	int navMinorVers = NPNFuncs.version & 0xFF;
   NPError rv = NPERR_NO_ERROR;
 
 	if( navMinorVers >= NPVERS_HAS_NOTIFICATION )
-		rv = CallNPN_PostURLNotifyProc(NPNFuncs.posturlnotify, instance, url, window, len, buf, file, notifyData);
+		rv = (*NPNFuncs.posturlnotify) (instance, url, window, len, buf, file, notifyData);
 	else
 		rv = NPERR_INCOMPATIBLE_VERSION_ERROR;
 
   return rv;
 }
 
-NPError NPN_PostURL(NPP instance, const char* url, const char* window, uint32 len, const char* buf, NPBool file)
+NPError NPN_PostURL(NPP instance, const char* url, const char* window, uint32_t len, const char* buf, NPBool file)
 {
-  NPError rv = CallNPN_PostURLProc(NPNFuncs.posturl, instance, url, window, len, buf, file);
+  NPError rv = (*NPNFuncs.posturl) (instance, url, window, len, buf, file);
   return rv;
 } 
 
 NPError NPN_RequestRead(NPStream* stream, NPByteRange* rangeList)
 {
-  NPError rv = CallNPN_RequestReadProc(NPNFuncs.requestread, stream, rangeList);
+  NPError rv = (*NPNFuncs.requestread) (stream, rangeList);
   return rv;
 }
 
 NPError NPN_NewStream(NPP instance, NPMIMEType type, const char* target, NPStream** stream)
 {
 	int navMinorVersion = NPNFuncs.version & 0xFF;
 
   NPError rv = NPERR_NO_ERROR;
 
 	if( navMinorVersion >= NPVERS_HAS_STREAMOUTPUT )
-		rv = CallNPN_NewStreamProc(NPNFuncs.newstream, instance, type, target, stream);
+		rv = (*NPNFuncs.newstream) (instance, type, target, stream);
 	else
 		rv = NPERR_INCOMPATIBLE_VERSION_ERROR;
 
   return rv;
 }
 
-int32 NPN_Write(NPP instance, NPStream *stream, int32 len, void *buffer)
+int32_t NPN_Write(NPP instance, NPStream *stream, int32_t len, void *buffer)
 {
 	int navMinorVersion = NPNFuncs.version & 0xFF;
-  int32 rv = 0;
+  int32_t rv = 0;
 
   if( navMinorVersion >= NPVERS_HAS_STREAMOUTPUT )
-		rv = CallNPN_WriteProc(NPNFuncs.write, instance, stream, len, buffer);
+		rv = (*NPNFuncs.write) (instance, stream, len, buffer);
 	else
 		rv = -1;
 
   return rv;
 }
 
 NPError NPN_DestroyStream(NPP instance, NPStream* stream, NPError reason)
 {
 	int navMinorVersion = NPNFuncs.version & 0xFF;
   NPError rv = NPERR_NO_ERROR;
 
   if( navMinorVersion >= NPVERS_HAS_STREAMOUTPUT )
-		rv = CallNPN_DestroyStreamProc(NPNFuncs.destroystream, instance, stream, reason);
+		rv = (*NPNFuncs.destroystream) (instance, stream, reason);
 	else
 		rv = NPERR_INCOMPATIBLE_VERSION_ERROR;
 
   return rv;
 }
 
 void NPN_Status(NPP instance, const char *message)
 {
-  CallNPN_StatusProc(NPNFuncs.status, instance, message);
+  (*NPNFuncs.status) (instance, message);
 }
 
 const char* NPN_UserAgent(NPP instance)
 {
   const char * rv = NULL;
-  rv = CallNPN_UserAgentProc(NPNFuncs.uagent, instance);
+  rv = (*NPNFuncs.uagent) (instance);
   return rv;
 }
 
-void* NPN_MemAlloc(uint32 size)
+void* NPN_MemAlloc(uint32_t size)
 {
   void * rv = NULL;
-  rv = CallNPN_MemAllocProc(NPNFuncs.memalloc, size);
+  rv = (*NPNFuncs.memalloc) (size);
   return rv;
 }
 
 void NPN_MemFree(void* ptr)
 {
-  CallNPN_MemFreeProc(NPNFuncs.memfree, ptr);
+  (*NPNFuncs.memfree) (ptr);
 }
 
-uint32 NPN_MemFlush(uint32 size)
+uint32_t NPN_MemFlush(uint32_t size)
 {
-  uint32 rv = CallNPN_MemFlushProc(NPNFuncs.memflush, size);
+  uint32_t rv = (*NPNFuncs.memflush) (size);
   return rv;
 }
 
 void NPN_ReloadPlugins(NPBool reloadPages)
 {
-  CallNPN_ReloadPluginsProc(NPNFuncs.reloadplugins, reloadPages);
+  (*NPNFuncs.reloadplugins) (reloadPages);
 }
 
 NPError NPN_GetValue(NPP instance, NPNVariable variable, void *value)
 {
-  NPError rv = CallNPN_GetValueProc(NPNFuncs.getvalue, instance, variable, value);
+  NPError rv = (*NPNFuncs.getvalue) (instance, variable, value);
   return rv;
 }
 
 NPError NPN_SetValue(NPP instance, NPPVariable variable, void *value)
 {
-  NPError rv = CallNPN_SetValueProc(NPNFuncs.setvalue, instance, variable, value);
+  NPError rv = (*NPNFuncs.setvalue) (instance, variable, value);
   return rv;
 }
 
 void NPN_InvalidateRect(NPP instance, NPRect *invalidRect)
 {
-  CallNPN_InvalidateRectProc(NPNFuncs.invalidaterect, instance, invalidRect);
+  (*NPNFuncs.invalidaterect) (instance, invalidRect);
 }
 
 void NPN_InvalidateRegion(NPP instance, NPRegion invalidRegion)
 {
-  CallNPN_InvalidateRegionProc(NPNFuncs.invalidateregion, instance, invalidRegion);
+  (*NPNFuncs.invalidateregion) (instance, invalidRegion);
 }
 
 void NPN_ForceRedraw(NPP instance)
 {
-  CallNPN_ForceRedrawProc(NPNFuncs.forceredraw, instance);
+  (*NPNFuncs.forceredraw) (instance);
 }
--- a/modules/plugin/tools/tester/common/npp_gate.cpp
+++ b/modules/plugin/tools/tester/common/npp_gate.cpp
@@ -45,17 +45,17 @@
 extern CLogger * pLogger;
 
 static char szINIFile[] = NPAPI_INI_FILE_NAME;
 static char szTarget[] = LOGGER_DEFAULT_TARGET;
 
 // here the plugin creates a plugin instance object which 
 // will be associated with this newly created NPP instance and 
 // will do all the necessary job
-NPError NPP_New(NPMIMEType pluginType, NPP instance, uint16 mode, int16 argc, char* argn[], char* argv[], NPSavedData* saved)
+NPError NPP_New(NPMIMEType pluginType, NPP instance, uint16_t mode, int16_t argc, char* argn[], char* argv[], NPSavedData* saved)
 {   
   DWORD dwTickEnter = XP_GetTickCount();
   NPError ret = NPERR_NO_ERROR;
   CPluginBase * pPlugin = NULL;
 
   if(!instance) {
     ret = NPERR_INVALID_INSTANCE_ERROR;
     goto Return;
@@ -198,17 +198,17 @@ NPError NPP_SetWindow (NPP instance, NPW
   }
 
 Return:
   DWORD dwTickReturn = XP_GetTickCount();
   pLogger->appendToLog(action_npp_set_window, dwTickEnter, dwTickReturn, (DWORD)ret, (DWORD)instance, (DWORD)pNPWindow);
   return ret;
 }
 
-NPError NPP_NewStream(NPP instance, NPMIMEType type, NPStream* stream, NPBool seekable, uint16* stype)
+NPError NPP_NewStream(NPP instance, NPMIMEType type, NPStream* stream, NPBool seekable, uint16_t* stype)
 {
   DWORD dwTickEnter = XP_GetTickCount();
   CPluginBase * pPlugin = NULL;
   NPError ret = NPERR_NO_ERROR;
 
   if(!instance) {
     ret = NPERR_INVALID_INSTANCE_ERROR;
     goto Return;
@@ -222,41 +222,41 @@ Return:
   pLogger->appendToLog(action_npp_new_stream, dwTickEnter, dwTickReturn, (DWORD)ret, (DWORD)instance, 
                        (DWORD)type, (DWORD)stream, (DWORD)seekable, (DWORD)stype);
   if (pPlugin->m_firstAction == action_npn_request_read && seekable) {
     *stype = NP_SEEK;
   }
   return ret;
 }
 
-int32 NPP_WriteReady (NPP instance, NPStream *stream)
+int32_t NPP_WriteReady (NPP instance, NPStream *stream)
 {
   DWORD dwTickEnter = XP_GetTickCount();
   CPluginBase * pPlugin = NULL;
-  int32 ret = 0x0FFFFFFF;
+  int32_t ret = 0x0FFFFFFF;
 
   if(!instance) {
     ret = 0L;
     goto Return;
   }
 
   pPlugin = (CPluginBase *)instance->pdata;
 
 Return:
   DWORD dwTickReturn = XP_GetTickCount();
   pLogger->appendToLog(action_npp_write_ready, dwTickEnter, dwTickReturn, (DWORD)ret, 
                        (DWORD)instance, (DWORD)stream);
   return ret;
 }
 
-int32 NPP_Write (NPP instance, NPStream *stream, int32 offset, int32 len, void *buffer)
+int32_t NPP_Write (NPP instance, NPStream *stream, int32_t offset, int32_t len, void *buffer)
 {   
   DWORD dwTickEnter = XP_GetTickCount();
   CPluginBase * pPlugin = NULL;
-  int32 ret = len;
+  int32_t ret = len;
 
   if(!instance)
     goto Return;
   
   pPlugin = (CPluginBase *)instance->pdata;
 
 Return:
   DWORD dwTickReturn = XP_GetTickCount();
@@ -395,21 +395,21 @@ NPError NPP_SetValue(NPP instance, NPNVa
 
 Return:
   DWORD dwTickReturn = XP_GetTickCount();
   pLogger->appendToLog(action_npp_set_value, dwTickEnter, dwTickReturn, (DWORD)ret, 
                        (DWORD)instance, (DWORD)variable, (DWORD)value);
   return ret;
 }
 
-int16	NPP_HandleEvent(NPP instance, void* event)
+int16_t	NPP_HandleEvent(NPP instance, void* event)
 {
   DWORD dwTickEnter = XP_GetTickCount();
   CPluginBase * pPlugin = NULL;
-  int16 ret = (int16)TRUE;
+  int16_t ret = (int16_t)TRUE;
 
   if(!instance)
     goto Return;
 
   pPlugin = (CPluginBase *)instance->pdata;
 
 Return:
   DWORD dwTickReturn = XP_GetTickCount();
@@ -423,17 +423,17 @@ Return:
 /*                     Mac                        */
 /*                                                */
 /**************************************************/
 
 // Mac needs these wrappers, see npplat.h for more info
 
 #ifdef XP_MAC
 
-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_t mode, int16_t argc, char* argn[], char* argv[], NPSavedData* saved)
 {
   EnterCodeResource();
   NPError rv = NPP_New(pluginType, instance, mode, argc, argn, argv, saved);
   ExitCodeResource();
   return rv;	
 }
 
 NPError Private_Destroy(NPP instance, NPSavedData** save)
@@ -447,36 +447,36 @@ NPError Private_Destroy(NPP instance, NP
 NPError Private_SetWindow(NPP instance, NPWindow* window)
 {
   EnterCodeResource();
   NPError rv = NPP_SetWindow(instance, window);
   ExitCodeResource();
   return rv;
 }
 
-NPError Private_NewStream(NPP instance, NPMIMEType type, NPStream* stream, NPBool seekable, uint16* stype)
+NPError Private_NewStream(NPP instance, NPMIMEType type, NPStream* stream, NPBool seekable, uint16_t* stype)
 {
   EnterCodeResource();
   NPError rv = NPP_NewStream(instance, type, stream, seekable, stype);
   ExitCodeResource();
   return rv;
 }
 
-int32 Private_WriteReady(NPP instance, NPStream* stream)
+int32_t Private_WriteReady(NPP instance, NPStream* stream)
 {
   EnterCodeResource();
-  int32 rv = NPP_WriteReady(instance, stream);
+  int32_t rv = NPP_WriteReady(instance, stream);
   ExitCodeResource();
   return rv;
 }
 
-int32 Private_Write(NPP instance, NPStream* stream, int32 offset, int32 len, void* buffer)
+int32_t Private_Write(NPP instance, NPStream* stream, int32_t offset, int32_t len, void* buffer)
 {
   EnterCodeResource();
-  int32 rv = NPP_Write(instance, stream, offset, len, buffer);
+  int32_t rv = NPP_Write(instance, stream, offset, len, buffer);
   ExitCodeResource();
   return rv;
 }
 
 void Private_StreamAsFile(NPP instance, NPStream* stream, const char* fname)
 {
   EnterCodeResource();
   NPP_StreamAsFile(instance, stream, fname);
@@ -487,20 +487,20 @@ void Private_StreamAsFile(NPP instance, 
 NPError Private_DestroyStream(NPP instance, NPStream* stream, NPError reason)
 {
   EnterCodeResource();
   NPError rv = NPP_DestroyStream(instance, stream, reason);
   ExitCodeResource();
   return rv;
 }
 
-int16 Private_HandleEvent(NPP instance, void* event)
+int16_t Private_HandleEvent(NPP instance, void* event)
 {
   EnterCodeResource();
-  int16 rv = NPP_HandleEvent(instance, event);
+  int16_t rv = NPP_HandleEvent(instance, event);
   ExitCodeResource();
   return rv;
 }
 
 void Private_Print(NPP instance, NPPrint* platformPrint)
 {
   EnterCodeResource();
   NPP_Print(instance, platformPrint);
--- a/modules/plugin/tools/tester/include/logger.h
+++ b/modules/plugin/tools/tester/include/logger.h
@@ -36,17 +36,17 @@
  * ***** END LICENSE BLOCK ***** */
 
 #ifndef __LOGGER_H__
 #define __LOGGER_H__
 
 #include "plugbase.h"
 #include "action.h"
 #include "log.h"
-#include "logFile.h"
+#include "logfile.h"
 
 class CLogger
 {
 private:
   CPluginBase * m_pPlugin;
   NPP m_pPluginInstance;
   CLogItemList * m_pLog;
   CLogFile * m_pLogFile;
--- a/modules/plugin/tools/tester/include/xp.h
+++ b/modules/plugin/tools/tester/include/xp.h
@@ -45,17 +45,17 @@
 /**************************************************/
 #ifdef XP_WIN
 
 #include <windows.h>
 #include <io.h>
 #include <stdio.h>
 
 #include "npapi.h"
-#include "npupp.h"
+#include "npfunctions.h"
 
 #define XP_HFILE HFILE
 
 #endif //XP_WIN
 
 /**************************************************/
 /*                                                */
 /*                     OS/2                       */
@@ -70,17 +70,17 @@
 #include <io.h>
 #include <stdio.h>
 #include <string.h>
 #include <ctype.h>
 #include <sys/types.h>    /* stat() */
 #include <sys/stat.h>
 
 #include "npapi.h"
-#include "npupp.h"
+#include "npfunctions.h"
 
 #define XP_HFILE FILE*
 
 #endif //XP_OS2
 
 /**************************************************/
 /*                                                */
 /*                    Unix                        */
@@ -92,17 +92,17 @@
 #include <string.h>       /* strcat() */
 #include <sys/types.h>    /* stat() */
 #include <sys/stat.h>
 #include <stdlib.h>       /* atoi() */
 #include <assert.h>       /* assert() */
 #include <ctype.h>        /* isprint() */
 
 #include "npapi.h"
-#include "npupp.h"
+#include "npfunctions.h"
 
 #define XP_HFILE FILE*
 
 #define HIBYTE(i) (i >> 8)
 #define LOBYTE(i) (i & 0xff)
 
 #endif //XP_UNIX
 
@@ -124,32 +124,32 @@
 // EnterCodeResource, used for setting up the code resourcešs
 // globals for 68K (analagous to the function SetCurrentA5
 // defined by the toolbox).
 //
 #include <A4Stuff.h>
 
 #include "npapi.h"
 
-// The Mixed Mode procInfos defined in npupp.h assume Think C-
+// The Mixed Mode procInfos defined in npfunctions.h assume Think C-
 // style calling conventions.  These conventions are used by
 // Metrowerks with the exception of pointer return types, which
 // in Metrowerks 68K are returned in A0, instead of the standard
 // D0. Thus, since NPN_MemAlloc and NPN_UserAgent return pointers,
 // Mixed Mode will return the values to a 68K plugin in D0, but 
 // a 68K plugin compiled by Metrowerks will expect the result in
 // A0.  The following pragma forces Metrowerks to use D0 instead.
 //
 #ifdef __MWERKS__
 #ifndef powerc
 #pragma pointers_in_D0
 #endif
 #endif
 
-#include "npupp.h"
+#include "npfunctions.h"
 
 #ifdef __MWERKS__
 #ifndef powerc
 #pragma pointers_in_A0
 #endif
 #endif
 
 // The following fix for static initializers (which fixes a preious