[vlc-commits] Make NPMac and NPUnix more similar

Jean-Baptiste Kempf git at videolan.org
Thu Apr 24 10:52:05 CEST 2014


npapi-vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Thu Apr 24 10:24:52 2014 +0200| [297ef07392c7b91c4b5f1a16430376fd8d33e976] | committer: Jean-Baptiste Kempf

Make NPMac and NPUnix more similar

> http://git.videolan.org/gitweb.cgi/npapi-vlc.git/?a=commit;h=297ef07392c7b91c4b5f1a16430376fd8d33e976
---

 npapi/support/npmac.cpp  |   16 ++++++++++------
 npapi/support/npunix.cpp |    7 ++++++-
 2 files changed, 16 insertions(+), 7 deletions(-)

diff --git a/npapi/support/npmac.cpp b/npapi/support/npmac.cpp
index edd85f2..473e067 100644
--- a/npapi/support/npmac.cpp
+++ b/npapi/support/npmac.cpp
@@ -23,18 +23,22 @@
  * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
-#include "config.h"
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
 
 #include <string.h>
 #include <stddef.h>
-
-#include "npapi.h"
-#include "npfunctions.h"
-#define CALL_NPN(unused, FN, ...) ((*FN)(__VA_ARGS__))
+#include <cstring>
 
 #include "../common.h"
+#include "../vlcplugin.h"
 #include "../vlcshell.h"
 
+#include <npapi.h>
+#include "npfunctions.h"
+#define CALL_NPN(unused, FN, ...) ((*FN)(__VA_ARGS__))
+
 #define PLUGIN_TO_HOST_GLUE(name, fp) (fp)
 #define HOST_TO_PLUGIN_GLUE(name, fp) (fp)
 
@@ -42,8 +46,8 @@
 #pragma mark -
 #pragma mark Globals
 
+static NPNetscapeFuncs  *gNetscapeFuncs;    /* Netscape Function table */
 short               gResFile;           // Refnum of the plugin’s resource file
-static NPNetscapeFuncs     *gNetscapeFuncs;      // Function table for procs in Netscape called by plugin
 static inline int getMinorVersion() { return gNetscapeFuncs->version & 0xFF; }
 
 
diff --git a/npapi/support/npunix.cpp b/npapi/support/npunix.cpp
index 520b074..097df6c 100644
--- a/npapi/support/npunix.cpp
+++ b/npapi/support/npunix.cpp
@@ -27,6 +27,10 @@
 # include "config.h"
 #endif
 
+#include <string.h>
+#include <stddef.h>
+#include <cstring>
+
 #include "../common.h"
 #include "../vlcplugin.h"
 #include "../vlcshell.h"
@@ -40,7 +44,6 @@
 #define CALL_NPN(unused, FN, ...) ((*FN)(__VA_ARGS__))
 #endif
 
-#include <cstring>
 
 #ifdef USE_GTK
 # include <gtk/gtk.h>
@@ -51,6 +54,8 @@
  * Globals
  *
  ***********************************************************************/
+#pragma mark -
+#pragma mark Globals
 
 static NPNetscapeFuncs  *gNetscapeFuncs;    /* Netscape Function table */
 static const char       *gUserAgent;        /* User agent string */



More information about the vlc-commits mailing list