]> git.sesse.net Git - vlc/blobdiff - projects/mozilla/vlcshell.cpp
mozilla: rewrite and license npunix.c/npwin.cpp under LGPLv2.1 (or later)
[vlc] / projects / mozilla / vlcshell.cpp
index abf61eb5a94e6009d4c6d8bc9f9cf208d4ba723d..850bcfc3b55cae8511e2a576466bc2f2e49df606 100644 (file)
@@ -42,6 +42,7 @@
 #endif
 
 #include "vlcplugin.h"
+#include "vlcshell.h"
 
 /* Enable/disable debugging printf's for X11 resizing */
 #undef X11_RESIZE_DEBUG
@@ -79,19 +80,20 @@ static LRESULT CALLBACK Manage( HWND p_hwnd, UINT i_msg, WPARAM wpar, LPARAM lpa
  *****************************************************************************/
 char * NPP_GetMIMEDescription( void )
 {
-    return PLUGIN_MIMETYPES;
+    static char mimetype[] = PLUGIN_MIMETYPES;
+    return mimetype;
 }
 
 NPError NPP_GetValue( NPP instance, NPPVariable variable, void *value )
 {
-
+    static char psz_name[] = PLUGIN_NAME;
     static char psz_desc[1000];
 
     /* plugin class variables */
     switch( variable )
     {
         case NPPVpluginNameString:
-            *((char **)value) = PLUGIN_NAME;
+            *((char **)value) = psz_name;
             return NPERR_NO_ERROR;
 
         case NPPVpluginDescriptionString:
@@ -604,7 +606,6 @@ int32 NPP_WriteReady( NPP instance, NPStream *stream )
     return 8*1024;
 }
 
-
 int32 NPP_Write( NPP instance, NPStream *stream, int32 offset,
                  int32 len, void *buffer )
 {
@@ -612,7 +613,6 @@ int32 NPP_Write( NPP instance, NPStream *stream, int32 offset,
     return len;
 }
 
-
 NPError NPP_DestroyStream( NPP instance, NPStream *stream, NPError reason )
 {
     if( instance == NULL )
@@ -622,7 +622,6 @@ NPError NPP_DestroyStream( NPP instance, NPStream *stream, NPError reason )
     return NPERR_NO_ERROR;
 }
 
-
 void NPP_StreamAsFile( NPP instance, NPStream *stream, const char* fname )
 {
     if( instance == NULL )
@@ -645,7 +644,6 @@ void NPP_StreamAsFile( NPP instance, NPStream *stream, const char* fname )
     }
 }
 
-
 void NPP_URLNotify( NPP instance, const char* url,
                     NPReason reason, void* notifyData )
 {