#!/bin/sh cd ${WRKSRC} && patch << "qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq" --- common/npunix.c.orig Thu Jul 4 05:45:27 1996 +++ common/npunix.c Wed Jan 7 22:34:53 1998 @@ -15,8 +15,8 @@ #define XP_UNIX 1 #include -#include "npapi.h" -#include "npupp.h" +#include +#include /* * Define PLUGIN_TRACE to have the wrapper functions print --- include/jri.h.orig Sun Jun 23 14:01:02 1996 +++ include/jri.h Wed Jan 7 22:19:00 1998 @@ -3,11 +3,12 @@ * Java Runtime Interface * Copyright (c) 1996 Netscape Communications Corporation. All rights reserved. ******************************************************************************/ +/* @BABOLO patched 1998 Jan 7 */ #ifndef JRI_H #define JRI_H -#include "jritypes.h" +#include #ifdef __cplusplus extern "C" { --- include/jri_md.h.orig Fri Jul 12 14:02:05 1996 +++ include/jri_md.h Wed Jan 7 22:19:11 1998 @@ -3,6 +3,7 @@ * Java Runtime Interface - Machine Dependent Types * Copyright (c) 1996 Netscape Communications Corporation. All rights reserved. ******************************************************************************/ +/* @BABOLO patched 1998 Jan 7 */ #ifndef JRI_MD_H #define JRI_MD_H @@ -29,66 +30,15 @@ * HAVE_ALIGNED_DOUBLES must be defined if doubles must be 8 byte aligned * IS_64 must be defined on 64-bit machines (like Dec Alpha) ******************************************************************************/ +#define IS_LITTLE_ENDIAN +#define HAVE_LONG_LONG -/* DLL Entry modifiers... */ -/* PC */ -#if defined(XP_PC) || defined(_WINDOWS) || defined(WIN32) || defined(_WIN32) -# include -# if defined(_MSC_VER) -# if defined(WIN32) || defined(_WIN32) -# define JRI_PUBLIC_API(ResultType) _declspec(dllexport) ResultType -# define JRI_CALLBACK -# else /* !_WIN32 */ -# if defined(_WINDLL) -# define JRI_PUBLIC_API(ResultType) ResultType __cdecl __export __loadds -# define JRI_CALLBACK __loadds -# else /* !WINDLL */ -# define JRI_PUBLIC_API(ResultType) ResultType __cdecl __export -# define JRI_CALLBACK __export -# endif /* !WINDLL */ -# endif /* !_WIN32 */ -# elif defined(__BORLANDC__) -# if defined(WIN32) || defined(_WIN32) -# define JRI_PUBLIC_API(ResultType) __export ResultType -# define JRI_CALLBACK -# else /* !_WIN32 */ -# define JRI_PUBLIC_API(ResultType) ResultType _cdecl _export _loadds -# define JRI_CALLBACK _loadds -# endif -# else -# error Unsupported PC development environment. -# endif -# ifndef IS_LITTLE_ENDIAN -# define IS_LITTLE_ENDIAN -# endif - -/* Mac */ -#elif macintosh || Macintosh || THINK_C -# if defined(__MWERKS__) /* Metrowerks */ -# if !__option(enumsalwaysint) -# error You need to define 'Enums Always Int' for your project. -# endif -# if defined(GENERATING68K) && !GENERATINGCFM -# if !__option(fourbyteints) -# error You need to define 'Struct Alignment: 68k' for your project. -# endif -# endif /* !GENERATINGCFM */ -# elif defined(__SC__) /* Symantec */ -# error What are the Symantec defines? (warren@netscape.com) -# elif macintosh && applec /* MPW */ -# error Please upgrade to the latest MPW compiler (SC). -# else -# error Unsupported Mac development environment. -# endif -# define JRI_PUBLIC_API(ResultType) ResultType -# define JRI_CALLBACK +/* DLL Entry modifiers... */ /* Unix or else */ -#else # define JRI_PUBLIC_API(ResultType) ResultType # define JRI_CALLBACK -#endif #ifndef FAR /* for non-Win16 */ #define FAR @@ -126,23 +76,12 @@ #ifdef HAVE_LONG_LONG -#if !(defined(WIN32) || defined(_WIN32)) typedef long long jlong; typedef unsigned long long julong; #define jlong_MAXINT 0x7fffffffffffffffLL #define jlong_MININT 0x8000000000000000LL #define jlong_ZERO 0x0LL - -#else -typedef LONGLONG jlong; -typedef DWORDLONG julong; - -#define jlong_MAXINT 0x7fffffffffffffffi64 -#define jlong_MININT 0x8000000000000000i64 -#define jlong_ZERO 0x0i64 - -#endif #define jlong_IS_ZERO(a) ((a) == 0) #define jlong_EQ(a, b) ((a) == (b)) --- include/jritypes.h.orig Sat Jun 22 15:08:01 1996 +++ include/jritypes.h Wed Jan 7 22:19:25 1998 @@ -3,11 +3,12 @@ * Java Runtime Interface * Copyright (c) 1996 Netscape Communications Corporation. All rights reserved. ******************************************************************************/ +/* @BABOLO patched 1998 Jan 7 */ #ifndef JRITYPES_H #define JRITYPES_H -#include "jri_md.h" +#include #include #include #include --- include/npapi.h.orig Fri Jul 12 14:02:06 1996 +++ include/npapi.h Wed Jan 7 22:24:44 1998 @@ -3,21 +3,12 @@ * npapi.h $Revision: 1.1 $ * Netscape client plug-in API spec */ +/* @BABOLO patched 1998 Jan 7 */ #ifndef _NPAPI_H_ #define _NPAPI_H_ -#include "jri.h" /* Java Runtime Interface */ - - -/* XXX this needs to get out of here */ -#if defined(__MWERKS__) -#ifndef XP_MAC -#define XP_MAC -#endif -#endif - - +#include /* Java Runtime Interface */ /*----------------------------------------------------------------------*/ /* Plugin Version Constants */ @@ -122,7 +113,6 @@ } NPRect; -#ifdef XP_UNIX /* * Unix specific structures and definitions */ @@ -167,8 +157,6 @@ NPNVxtAppContext } NPNVariable; -#endif /* XP_UNIX */ - typedef struct _NPWindow { @@ -179,9 +167,7 @@ uint32 height; NPRect clipRect; /* Clipping rectangle in port coordinates */ /* Used by MAC only. */ -#ifdef XP_UNIX void * ws_info; /* Platform-dependent additonal data */ -#endif /* XP_UNIX */ } NPWindow; @@ -211,31 +197,6 @@ } NPPrint; -#ifdef XP_MAC -/* - * Mac-specific structures and definitions. - */ - -#include -#include - -typedef struct NP_Port -{ - CGrafPtr port; /* Grafport */ - int32 portx; /* position inside the topmost window */ - int32 porty; -} NP_Port; - -/* - * Non-standard event types that can be passed to HandleEvent - */ -#define getFocusEvent (osEvt + 16) -#define loseFocusEvent (osEvt + 17) -#define adjustCursorEvent (osEvt + 18) - -#endif /* XP_MAC */ - - /* * Values for mode passed to NPP_New: */ @@ -304,11 +265,7 @@ /* Function Prototypes */ /*----------------------------------------------------------------------*/ -#if defined(_WINDOWS) && !defined(WIN32) -#define NP_LOADDS _loadds -#else #define NP_LOADDS -#endif #ifdef __cplusplus extern "C" { @@ -318,11 +275,9 @@ * NPP_* functions are provided by the plugin and called by the navigator. */ -#ifdef XP_UNIX char* NPP_GetMIMEDescription(void); NPError NPP_GetValue(void *instance, NPPVariable variable, void *value); -#endif /* XP_UNIX */ NPError NPP_Initialize(void); void NPP_Shutdown(void); NPError NP_LOADDS NPP_New(NPMIMEType pluginType, NPP instance, @@ -351,10 +306,8 @@ * NPN_* functions are provided by the navigator and called by the plugin. */ -#ifdef XP_UNIX NPError NPN_GetValue(NPP instance, NPNVariable variable, void *value); -#endif /* XP_UNIX */ void NPN_Version(int* plugin_major, int* plugin_minor, int* netscape_major, int* netscape_minor); NPError NPN_GetURLNotify(NPP instance, const char* url, --- include/npupp.h.orig Tue May 14 04:10:31 1996 +++ include/npupp.h Wed Jan 7 22:30:05 1998 @@ -3,6 +3,7 @@ * npupp.h $Revision: 1.1 $ * function call mecahnics needed by platform specific glue code. */ +/* @BABOLO patched 1998 Jan 7 */ #ifndef _NPUPP_H_ @@ -13,10 +14,10 @@ #endif #ifndef _NPAPI_H_ -#include "npapi.h" +#include #endif -#include "jri.h" +#include /****************************************************************************************** plug-in function table macros @@ -397,7 +398,6 @@ * Netscape entry points */ -#ifdef XP_UNIX /* NPN_GetValue */ @@ -424,9 +424,6 @@ (*(FUNC))((ARG1), (ARG2), (ARG3)) #endif -#endif /* XP_UNIX */ - - /* NPN_GetUrlNotify */ @@ -908,74 +905,11 @@ NPN_GetJavaPeerUPP getJavaPeer; NPN_GetURLNotifyUPP geturlnotify; NPN_PostURLNotifyUPP posturlnotify; -#ifdef XP_UNIX NPN_GetValueUPP getvalue; -#endif /* XP_UNIX */ } NPNetscapeFuncs; -#ifdef XP_MAC -/****************************************************************************************** - * Mac platform-specific plugin glue stuff - *******************************************************************************************/ - -/* - * Main entry point of the plugin. - * This routine will be called when the plugin is loaded. The function - * tables are passed in and the plugin fills in the NPPluginFuncs table - * and NPPShutdownUPP for Netscape's use. - */ - -#if GENERATINGCFM - -typedef UniversalProcPtr NPP_MainEntryUPP; -enum { - uppNPP_MainEntryProcInfo = kThinkCStackBased - | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPNetscapeFuncs*))) - | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPPluginFuncs*))) - | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(NPP_ShutdownUPP*))) - | RESULT_SIZE(SIZE_CODE(sizeof(NPError))) -}; -#define NewNPP_MainEntryProc(FUNC) \ - (NPP_MainEntryUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPP_MainEntryProcInfo, GetCurrentArchitecture()) -#define CallNPP_MainEntryProc(FUNC, netscapeFunc, pluginFunc, shutdownUPP) \ - CallUniversalProc((UniversalProcPtr)(FUNC), (ProcInfoType)uppNPP_MainEntryProcInfo, (netscapeFunc), (pluginFunc), (shutdownUPP)) - -#else - -typedef NPError (*NPP_MainEntryUPP)(NPNetscapeFuncs*, NPPluginFuncs*, NPP_ShutdownUPP*); -#define NewNPP_MainEntryProc(FUNC) \ - ((NPP_MainEntryUPP) (FUNC)) -#define CallNPP_MainEntryProc(FUNC, netscapeFunc, pluginFunc, shutdownUPP) \ - (*(FUNC))((netscapeFunc), (pluginFunc), (shutdownUPP)) - -#endif -#endif /* MAC */ - - -#ifdef _WINDOWS - -#ifdef __cplusplus -extern "C" { -#endif - -/* plugin meta member functions */ - -NPError WINAPI NP_GetEntryPoints(NPPluginFuncs* pFuncs); - -NPError WINAPI NP_Initialize(NPNetscapeFuncs* pFuncs); - -NPError WINAPI NP_Shutdown(); - -#ifdef __cplusplus -} -#endif - -#endif /* _WINDOWS */ - -#ifdef XP_UNIX - #ifdef __cplusplus extern "C" { #endif @@ -990,6 +924,4 @@ } #endif -#endif /* XP_UNIX */ - #endif /* _NPUPP_H_ */ qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq