diff -Naur freepv-0.3.0.orig/CMakeScripts/FindGECKO.cmake freepv-0.3.0/CMakeScripts/FindGECKO.cmake --- freepv-0.3.0.orig/CMakeScripts/FindGECKO.cmake 2009-07-15 14:48:53.000000000 +0200 +++ freepv-0.3.0/CMakeScripts/FindGECKO.cmake 2009-07-15 14:49:03.000000000 +0200 @@ -30,6 +30,11 @@ SET(GECKO_INCLUDE_DIR ${GECKO_ROOT_DIR} ${GECKO_NSPR_DIR}) SET(GECKO_LIBRARY ${Xt_LIBRARY}) + FIND_PATH(NPFUNCTIONS_H_DIR npfunctions.h ${GECKO_ROOT_DIR}) + IF (NPFUNCTIONS_H_DIR) + SET(HAVE_NPFUNCTIONS_H TRUE) + ENDIF (NPFUNCTIONS_H_DIR) + IF (GECKO_INCLUDE_DIR AND GECKO_LIBRARY) SET(GECKO_FOUND TRUE) SET(GECKO_LIBRARIES ${GECKO_LIBRARY}) diff -Naur freepv-0.3.0.orig/src/config.h.in.cmake freepv-0.3.0/src/config.h.in.cmake --- freepv-0.3.0.orig/src/config.h.in.cmake 2009-07-15 14:48:53.000000000 +0200 +++ freepv-0.3.0/src/config.h.in.cmake 2009-07-15 14:49:03.000000000 +0200 @@ -24,3 +24,6 @@ /* Define to 1 if you have are under Windows */ #cmakedefine XP_WIN 1 +/* newer xulrunner has npfunctions.h not npupp.h */ +#cmakedefine HAVE_NPFUNCTIONS_H 1 + diff -Naur freepv-0.3.0.orig/src/freepv-mozilla/npn_gate.cpp freepv-0.3.0/src/freepv-mozilla/npn_gate.cpp --- freepv-0.3.0.orig/src/freepv-mozilla/npn_gate.cpp 2009-07-15 14:48:53.000000000 +0200 +++ freepv-0.3.0/src/freepv-mozilla/npn_gate.cpp 2009-07-15 15:00:25.000000000 +0200 @@ -58,7 +58,7 @@ 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; @@ -67,32 +67,32 @@ 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; } @@ -103,20 +103,20 @@ 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; @@ -129,7 +129,7 @@ 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; @@ -138,37 +138,37 @@ 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); } #ifdef OJI @@ -182,34 +182,34 @@ jref NPN_GetJavaPeer(NPP instance) { jref rv; - rv = CallNPN_GetJavaPeerProc(NPNFuncs.getJavaPeer, instance); + rv = (*NPNFuncs.getJavaPeer)(instance); return rv; } #endif 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); } diff -Naur freepv-0.3.0.orig/src/freepv-mozilla/npp_gate.cpp freepv-0.3.0/src/freepv-mozilla/npp_gate.cpp --- freepv-0.3.0.orig/src/freepv-mozilla/npp_gate.cpp 2009-07-15 14:48:53.000000000 +0200 +++ freepv-0.3.0/src/freepv-mozilla/npp_gate.cpp 2009-07-15 15:03:01.000000000 +0200 @@ -45,7 +45,7 @@ // 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) { if(instance == NULL) return NPERR_INVALID_INSTANCE_ERROR; @@ -130,7 +130,7 @@ return rv; } -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) { if(instance == NULL) return NPERR_INVALID_INSTANCE_ERROR; @@ -143,7 +143,7 @@ return rv; } -int32 NPP_WriteReady (NPP instance, NPStream *stream) +int32_t NPP_WriteReady (NPP instance, NPStream *stream) { if(instance == NULL) return 0x0fffffff; @@ -152,11 +152,11 @@ if(plugin == NULL) return 0x0fffffff; - int32 rv = plugin->WriteReady(stream); + int32_t rv = plugin->WriteReady(stream); return rv; } -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) { if(instance == NULL) return len; @@ -165,7 +165,7 @@ if(plugin == NULL) return len; - int32 rv = plugin->Write(stream, offset, len, buffer); + int32_t rv = plugin->Write(stream, offset, len, buffer); return rv; } @@ -244,7 +244,7 @@ return rv; } -int16 NPP_HandleEvent(NPP instance, void* event) +int16_t NPP_HandleEvent(NPP instance, void* event) { if(instance == NULL) return 0; @@ -253,7 +253,7 @@ if(plugin == NULL) return 0; - uint16 rv = plugin->HandleEvent(event); + uint16_t rv = plugin->HandleEvent(event); return rv; } @@ -274,7 +274,7 @@ #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) { NPError rv = NPP_New(pluginType, instance, mode, argc, argn, argv, saved); return rv; @@ -298,15 +298,15 @@ return rv; } -int32 Private_WriteReady(NPP instance, NPStream* stream) +int32_t Private_WriteReady(NPP instance, NPStream* stream) { - int32 rv = NPP_WriteReady(instance, stream); + int32_t rv = NPP_WriteReady(instance, stream); 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) { - int32 rv = NPP_Write(instance, stream, offset, len, buffer); + int32_t rv = NPP_Write(instance, stream, offset, len, buffer); return rv; } @@ -322,9 +322,9 @@ return rv; } -int16 Private_HandleEvent(NPP instance, void* event) +int16_t Private_HandleEvent(NPP instance, void* event) { - int16 rv = NPP_HandleEvent(instance, event); + int16_t rv = NPP_HandleEvent(instance, event); return rv; } diff -Naur freepv-0.3.0.orig/src/freepv-mozilla/npplat.h freepv-0.3.0/src/freepv-mozilla/npplat.h --- freepv-0.3.0.orig/src/freepv-mozilla/npplat.h 2009-07-15 14:48:53.000000000 +0200 +++ freepv-0.3.0/src/freepv-mozilla/npplat.h 2009-07-15 14:49:03.000000000 +0200 @@ -40,7 +40,11 @@ #include "config.h" #include "npapi.h" +#ifdef HAVE_NPFUNCTIONS_H +#include "npfunctions.h" +#else #include "npupp.h" +#endif /**************************************************/ /* */ diff -Naur freepv-0.3.0.orig/src/freepv-mozilla/pluginbase.h freepv-0.3.0/src/freepv-mozilla/pluginbase.h --- freepv-0.3.0.orig/src/freepv-mozilla/pluginbase.h 2009-07-15 14:48:53.000000000 +0200 +++ freepv-0.3.0/src/freepv-mozilla/pluginbase.h 2009-07-15 14:52:48.000000000 +0200 @@ -44,8 +44,8 @@ { NPP instance; NPMIMEType type; - uint16 mode; - int16 argc; + uint16_t mode; + int16_t argc; char** argn; char** argv; NPSavedData* saved; @@ -64,14 +64,14 @@ // class as needed virtual NPError SetWindow(NPWindow* pNPWindow) { return NPERR_NO_ERROR; } virtual NPError NewStream(NPMIMEType type, NPStream* stream, - NPBool seekable, uint16* stype) { return NPERR_NO_ERROR; } + NPBool seekable, uint16_t* stype) { return NPERR_NO_ERROR; } virtual NPError DestroyStream(NPStream *stream, NPError reason) { return NPERR_NO_ERROR; } virtual void StreamAsFile(NPStream* stream, const char* fname) { return; } - virtual int32 WriteReady(NPStream *stream) { return 0x0fffffff; } - virtual int32 Write(NPStream *stream, int32 offset, - int32 len, void *buffer) { return len; } + virtual int32_t WriteReady(NPStream *stream) { return 0x0fffffff; } + virtual int32_t Write(NPStream *stream, int32_t offset, + int32_t len, void *buffer) { return len; } virtual void Print(NPPrint* printInfo) { return; } - virtual uint16 HandleEvent(void* event) { return 0; } + virtual uint16_t HandleEvent(void* event) { return 0; } virtual void URLNotify(const char* url, NPReason reason, void* notifyData) { return; } virtual NPError GetValue(NPPVariable variable, void *value) { return NPERR_NO_ERROR; } diff -Naur freepv-0.3.0.orig/src/freepv-mozilla/plugin.cpp freepv-0.3.0/src/freepv-mozilla/plugin.cpp --- freepv-0.3.0.orig/src/freepv-mozilla/plugin.cpp 2009-07-15 14:48:53.000000000 +0200 +++ freepv-0.3.0/src/freepv-mozilla/plugin.cpp 2009-07-15 14:52:24.000000000 +0200 @@ -37,6 +37,7 @@ #include +#include #include #include "plugin.h" @@ -64,7 +65,7 @@ nsPluginInstance::nsPluginInstance(nsPluginCreateData *pcd) : nsPluginInstanceBase(), mInstance( pcd->instance ), - mInitialized(FALSE) + mInitialized(0) { DEBUG_TRACE(""); pCData = pcd; @@ -97,7 +98,7 @@ return NPN_UserAgent(mInstance); } -NPError nsPluginInstance::NewStream(NPMIMEType type, NPStream* stream, NPBool seekable, uint16* stype) +NPError nsPluginInstance::NewStream(NPMIMEType type, NPStream* stream, NPBool seekable, uint16_t* stype) { DEBUG_TRACE("mime type:" << type); if( m_fpvIgnoreStreams ) { @@ -161,18 +162,18 @@ return NPERR_NO_ERROR; } -int32 nsPluginInstance::WriteReady(NPStream* stream) +int32_t nsPluginInstance::WriteReady(NPStream* stream) { DEBUG_TRACE(""); return FPV_CHUNKSIZE; } -int32 nsPluginInstance::Write(NPStream* stream, int32 offset, int32 len, void* buffer) +int32_t nsPluginInstance::Write(NPStream* stream, int32_t offset, int32_t len, void* buffer) { DEBUG_TRACE("offset: " << offset << " length: " << len); if (!m_fpvDownloadToFile) { // check if the data fits into the buffer... - if (offset+len >= (int32) m_fpvBufferSize) { + if (offset+len >= (int32_t) m_fpvBufferSize) { // allocate more memory unsigned char * newmem = (unsigned char*) realloc(m_fpvDownBuffer, m_fpvBufferSize*2); if (newmem == 0) { diff -Naur freepv-0.3.0.orig/src/freepv-mozilla/plugin.h freepv-0.3.0/src/freepv-mozilla/plugin.h --- freepv-0.3.0.orig/src/freepv-mozilla/plugin.h 2009-07-15 14:48:53.000000000 +0200 +++ freepv-0.3.0/src/freepv-mozilla/plugin.h 2009-07-15 14:52:29.000000000 +0200 @@ -73,10 +73,10 @@ public: // these functions are called by the browser - NPError NewStream(NPMIMEType type, NPStream* stream, NPBool seekable, uint16* stype); + NPError NewStream(NPMIMEType type, NPStream* stream, NPBool seekable, uint16_t* stype); NPError DestroyStream(NPStream* stream, NPError reason); - int32 WriteReady(NPStream* stream); - int32 Write(NPStream* stream, int32 offset, int32 len, void* buffer); + int32_t WriteReady(NPStream* stream); + int32_t Write(NPStream* stream, int32_t offset, int32_t len, void* buffer); void StreamAsFile(NPStream* stream, const char* fname); protected: diff -Naur freepv-0.3.0.orig/src/libfreepv/SPiVparser.cpp freepv-0.3.0/src/libfreepv/SPiVparser.cpp --- freepv-0.3.0.orig/src/libfreepv/SPiVparser.cpp 2009-07-15 14:48:53.000000000 +0200 +++ freepv-0.3.0/src/libfreepv/SPiVparser.cpp 2009-07-15 14:49:03.000000000 +0200 @@ -490,7 +490,7 @@ { char * aux_url=NULL; char * url=(char*) _url; - if(aux_url = strrchr (_url,'/')) + if(aux_url == strrchr (_url,'/')) { url=aux_url; url++;