bug=80906

ra=edburns
author=Nikolay Igotti

Major cleanup and new component architecture for Waterfall.


git-svn-id: svn://10.0.0.236/trunk@99134 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
edburns%acm.org
2001-07-12 19:58:29 +00:00
parent f6e053accb
commit ebef5f4da8
95 changed files with 1180 additions and 1009 deletions

View File

@@ -1,4 +1,4 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Mozilla Public
* License Version 1.1 (the "License"); you may not use this file
@@ -9,19 +9,18 @@
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
*
* The Original Code is The Waterfall Java Plugin Module
*
*
* The Initial Developer of the Original Code is Sun Microsystems Inc
* Portions created by Sun Microsystems Inc are Copyright (C) 2001
* All Rights Reserved.
*
* $Id: host.cpp,v 1.1.1.1 2001-05-10 18:12:33 edburns%acm.org Exp $
*
*
* Contributor(s):
*
* Nikolay N. Igotti <inn@sparc.spb.su>
* $Id: host.cpp,v 1.2 2001-07-12 19:58:14 edburns%acm.org Exp $
*
* Contributor(s):
*
* Nikolay N. Igotti <nikolay.igotti@Sun.Com>
*/
#include <stdio.h>

View File

@@ -1,4 +1,4 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Mozilla Public
* License Version 1.1 (the "License"); you may not use this file
@@ -9,19 +9,18 @@
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
*
* The Original Code is The Waterfall Java Plugin Module
*
*
* The Initial Developer of the Original Code is Sun Microsystems Inc
* Portions created by Sun Microsystems Inc are Copyright (C) 2001
* All Rights Reserved.
*
* $Id: test_extension.c,v 1.1.1.1 2001-05-10 18:12:34 edburns%acm.org Exp $
*
*
* Contributor(s):
*
* Nikolay N. Igotti <inn@sparc.spb.su>
* $Id: test_extension.c,v 1.2 2001-07-12 19:58:14 edburns%acm.org Exp $
*
* Contributor(s):
*
* Nikolay N. Igotti <nikolay.igotti@Sun.Com>
*/
#include "jvmp.h"

View File

@@ -1,4 +1,4 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Mozilla Public
* License Version 1.1 (the "License"); you may not use this file
@@ -9,19 +9,18 @@
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
*
* The Original Code is The Waterfall Java Plugin Module
*
*
* The Initial Developer of the Original Code is Sun Microsystems Inc
* Portions created by Sun Microsystems Inc are Copyright (C) 2001
* All Rights Reserved.
*
* $Id: java_plugin.c,v 1.1.1.1 2001-05-10 18:12:35 edburns%acm.org Exp $
*
*
* Contributor(s):
*
* Nikolay N. Igotti <inn@sparc.spb.su>
* $Id: java_plugin.c,v 1.2 2001-07-12 19:58:15 edburns%acm.org Exp $
*
* Contributor(s):
*
* Nikolay N. Igotti <nikolay.igotti@Sun.Com>
*/
/**
@@ -78,8 +77,11 @@ static MUTEX_T* jvm_mutex = NULL;
#endif
/* default JNI version used by Waterfall */
#ifdef WF_PJAVA
#define DEFAULT_JNI_VERSION JNI_VERSION_1_1
#else
#define DEFAULT_JNI_VERSION JNI_VERSION_1_2
#endif
/* level of verbosity printed with PlugableJVM.trace method:
lesser number - lesser output */
#define DEBUG_LEVEL 10
@@ -297,7 +299,7 @@ static jint loadJVM(const char* name) {
free(java_home);
free(jre_home);
free(newlibpath); */
//PLUGIN_LOG2("loading JVM from %s", libjvm);
/* PLUGIN_LOG2("loading JVM from %s", libjvm); */
handle = JVMP_LoadDLL (libjvm, DL_MODE);
free (libjvm);
if (!handle) {

View File

@@ -1,4 +1,4 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Mozilla Public
* License Version 1.1 (the "License"); you may not use this file
@@ -9,19 +9,18 @@
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
*
* The Original Code is The Waterfall Java Plugin Module
*
*
* The Initial Developer of the Original Code is Sun Microsystems Inc
* Portions created by Sun Microsystems Inc are Copyright (C) 2001
* All Rights Reserved.
*
* $Id: jpthreads.c,v 1.1.1.1 2001-05-10 18:12:36 edburns%acm.org Exp $
*
*
* Contributor(s):
*
* Nikolay N. Igotti <inn@sparc.spb.su>
* $Id: jpthreads.c,v 1.2 2001-07-12 19:58:16 edburns%acm.org Exp $
*
* Contributor(s):
*
* Nikolay N. Igotti <nikolay.igotti@Sun.Com>
*/
#include "jpthreads.h"
@@ -153,7 +152,7 @@ void* JVMP_FindSymbol(dll_t dll, const char* sym)
int JVMP_UnloadDLL(dll_t dll)
{
// XXX: fix me
/* XXX: fix me */
return 0;
}

View File

@@ -1,4 +1,4 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Mozilla Public
* License Version 1.1 (the "License"); you may not use this file
@@ -9,19 +9,18 @@
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
*
* The Original Code is The Waterfall Java Plugin Module
*
*
* The Initial Developer of the Original Code is Sun Microsystems Inc
* Portions created by Sun Microsystems Inc are Copyright (C) 2001
* All Rights Reserved.
*
* $Id: jpthreads.h,v 1.1.1.1 2001-05-10 18:12:36 edburns%acm.org Exp $
*
*
* Contributor(s):
*
* Nikolay N. Igotti <inn@sparc.spb.su>
* $Id: jpthreads.h,v 1.2 2001-07-12 19:58:16 edburns%acm.org Exp $
*
* Contributor(s):
*
* Nikolay N. Igotti <nikolay.igotti@Sun.Com>
*/
#include "jvmp.h"

View File

@@ -1,4 +1,4 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Mozilla Public
* License Version 1.1 (the "License"); you may not use this file
@@ -9,19 +9,18 @@
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
*
* The Original Code is The Waterfall Java Plugin Module
*
*
* The Initial Developer of the Original Code is Sun Microsystems Inc
* Portions created by Sun Microsystems Inc are Copyright (C) 2001
* All Rights Reserved.
*
* $Id: XmHelper.c,v 1.1.1.1 2001-05-10 18:12:36 edburns%acm.org Exp $
*
*
* Contributor(s):
*
* Nikolay N. Igotti <inn@sparc.spb.su>
* $Id: XmHelper.c,v 1.2 2001-07-12 19:58:19 edburns%acm.org Exp $
*
* Contributor(s):
*
* Nikolay N. Igotti <nikolay.igotti@Sun.Com>
*/
#include <dlfcn.h>

View File

@@ -1,4 +1,4 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Mozilla Public
* License Version 1.1 (the "License"); you may not use this file
@@ -9,19 +9,18 @@
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
*
* The Original Code is The Waterfall Java Plugin Module
*
*
* The Initial Developer of the Original Code is Sun Microsystems Inc
* Portions created by Sun Microsystems Inc are Copyright (C) 2001
* All Rights Reserved.
*
* $Id: wf_moz6_common.h,v 1.1.1.1 2001-05-10 18:12:36 edburns%acm.org Exp $
*
*
* Contributor(s):
*
* Nikolay N. Igotti <inn@sparc.spb.su>
* $Id: wf_moz6_common.h,v 1.2 2001-07-12 19:58:19 edburns%acm.org Exp $
*
* Contributor(s):
*
* Nikolay N. Igotti <nikolay.igotti@Sun.Com>
*/
#ifndef __wf_moz6_common_h
@@ -69,7 +68,7 @@ typedef struct JavaObjectWrapper JavaObjectWrapper;
#define WF_APPLETPEER_CID "@sun.com/wf/mozilla/appletpeer;1"
enum JSCallType { // Possible JS call type
enum JSCallType { /* Possible JS call type */
JS_Unknown = 0,
JS_GetWindow = 1,
JS_ToString,
@@ -85,65 +84,65 @@ enum JSCallType { // Possible JS call type
struct JSObject_CallInfo
{
const char* pszUrl; // URL of the CodeSource object in the Java call
jobjectArray jCertArray; // Certificate array of the CodeSource object
jintArray jCertLengthArray; // Certificate length array of the CodeSource object
int iNumOfCerts; // Number of certificates in the cert and cert length array
jobject jAccessControlContext; // AccessControlContext object that represents the Java callstack
enum JSCallType type; // Type of JSObject call
jthrowable jException; // Java exception object as the result of the call
JavaObjectWrapper* pWrapper; // native-Java glueing object
const char* pszUrl;
jobjectArray jCertArray;
jintArray jCertLengthArray;
int iNumOfCerts;
jobject jAccessControlContext;
enum JSCallType type;
jthrowable jException;
JavaObjectWrapper* pWrapper;
union {
struct __GetWindow {
void* pPlugin; // Plug-in instance corresponded to the JSObject call
jint iNativeJSObject; // Native JS object as the result of the GetWindow call
void* pPlugin;
jint iNativeJSObject;
} __getWindow;
struct __Finalize {
jint iNativeJSObject; // Native JS object that needs to be finalized
jint iNativeJSObject;
} __finalize;
struct __ToString {
jint iNativeJSObject; // Native JS object that corresponded to the JSObject.toString
jstring jResult; // Result of JSObject.toString
jint iNativeJSObject;
jstring jResult;
} __toString;
struct __Call {
const jchar* pszMethodName; // Method name
int iMethodNameLen; // Length of method name
jobjectArray jArgs; // Argument for the JSObject.Call
jint iNativeJSObject; // Native JS object corresponded to the JSObject.call
jobject jResult; // Result of JSObject.call
const jchar* pszMethodName;
int iMethodNameLen;
jobjectArray jArgs;
jint iNativeJSObject;
jobject jResult;
} __call;
struct __Eval {
const jchar* pszEval; // String to be evaluated
int iEvalLen; // Length of the evaluatation string
jint iNativeJSObject; // Native JS object corresponded to the JSObject.eval
jobject jResult; // Result of JSObject.eval
const jchar* pszEval;
int iEvalLen;
jint iNativeJSObject;
jobject jResult;
} __eval;
struct __GetMember {
const jchar* pszName; // Member name
int iNameLen; // Length of member name
jint iNativeJSObject; // Native JS object corresponded to the JSObject.getMember
jobject jResult; // Result of JSObject.getMember
const jchar* pszName;
int iNameLen;
jint iNativeJSObject;
jobject jResult;
} __getMember;
struct __SetMember {
const jchar* pszName; // Member name
int iNameLen; // Length of member name
jint iNativeJSObject; // Native JS object corresponded to the JSObject.setMember
jobject jValue; // Result of JSObject.setMember
const jchar* pszName;
int iNameLen;
jint iNativeJSObject;
jobject jValue;
} __setMember;
struct __RemoveMember {
const jchar* pszName; // Member name
int iNameLen; // Length of member name
jint iNativeJSObject; // Native JS object corresponded to the JSObject.removeMember
const jchar* pszName;
int iNameLen;
jint iNativeJSObject;
} __removeMember;
struct __GetSlot {
int iIndex; // Slot number
jint iNativeJSObject; // Native JS object corresponded to the JSObject.getSlot
jobject jResult; // Result of JSObject.getSlot
int iIndex;
jint iNativeJSObject;
jobject jResult;
} __getSlot;
struct __SetSlot {
int iIndex; // Slot number
jobject jValue; // Value to set in the slot
jint iNativeJSObject; // Native JS object corresponded to the JSObject.setSlot
int iIndex;
jobject jValue;
jint iNativeJSObject;
} __setSlot;
} data;
};

View File

@@ -1,4 +1,4 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Mozilla Public
* License Version 1.1 (the "License"); you may not use this file
@@ -9,19 +9,18 @@
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
*
* The Original Code is The Waterfall Java Plugin Module
*
*
* The Initial Developer of the Original Code is Sun Microsystems Inc
* Portions created by Sun Microsystems Inc are Copyright (C) 2001
* All Rights Reserved.
*
* $Id: wfe_mozilla.c,v 1.1.1.1 2001-05-10 18:12:36 edburns%acm.org Exp $
*
*
* Contributor(s):
*
* Nikolay N. Igotti <inn@sparc.spb.su>
* $Id: wfe_mozilla.c,v 1.2 2001-07-12 19:58:19 edburns%acm.org Exp $
*
* Contributor(s):
*
* Nikolay N. Igotti <nikolay.igotti@Sun.Com>
*/
#include "jvmp.h"
@@ -87,8 +86,13 @@ static jint JNICALL JVMPExt_GetBootstrapClass(char* *bootstrapClassPath,
fprintf(stderr, "Env variable WFHOME not set");
return JNI_FALSE;
}
classpath = (char*)malloc(strlen(home)+20);
sprintf(classpath, "file://%s/classes/", home);
classpath = (char*)malloc(strlen(home)+25);
/* those DOSish disk letters make me crazy!!! */
#ifdef XP_WIN32
sprintf(classpath, "file:/%s/ext/moz6.jar", home);
#else
sprintf(classpath, "file://%s/ext/moz6.jar", home);
#endif
/* should be defined in installation time */
*bootstrapClassPath = classpath;
*bootstrapClassName = "sun.jvmp.mozilla.MozillaPeerFactory";

View File

@@ -1,4 +1,4 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Mozilla Public
* License Version 1.1 (the "License"); you may not use this file
@@ -9,19 +9,18 @@
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
*
* The Original Code is The Waterfall Java Plugin Module
*
*
* The Initial Developer of the Original Code is Sun Microsystems Inc
* Portions created by Sun Microsystems Inc are Copyright (C) 2001
* All Rights Reserved.
*
* $Id: wfm6_native.c,v 1.1.1.1 2001-05-10 18:12:36 edburns%acm.org Exp $
*
*
* Contributor(s):
*
* Nikolay N. Igotti <inn@sparc.spb.su>
* $Id: wfm6_native.c,v 1.2 2001-07-12 19:58:20 edburns%acm.org Exp $
*
* Contributor(s):
*
* Nikolay N. Igotti <nikolay.igotti@Sun.Com>
*/
#include <stdlib.h>
@@ -323,7 +322,7 @@ Java_sun_jvmp_mozilla_MozillaPeerFactory_nativeHandleCall
JS object? */
static jmethodID m = NULL;
jobject jObj = NULL;
fprintf(stderr, "Java_WrapJSObject: %lx %lx\n",
fprintf(stderr, "Java_WrapJSObject: %x %x\n",
call->data.__wrapJSObject.jstid,
call->data.__wrapJSObject.jsObject);
if (!m)
@@ -534,9 +533,19 @@ Java_sun_jvmp_mozilla_MozillaPeerFactory_nativeHandleCall
jException = (*env)->ExceptionOccurred(env);
if (jException)
{
fprintf(stderr, "hmm, exception in handle call\n");
fprintf(stderr, "wfm6_native.c: hmm, exception in handle call %d\n", call->type);
/* XXX: this behavior is kinda incorrect, but otherwise
* Mozilla with no LiveConnect just crashes on pages like
* http://javaapplets.com, when call goes in JS->Java direction.
* I have no complete understanding of reason of this crash, maybe
* incorrect Mozilla code - I'm not sure.
*/
#if 0
jException = (*env)->NewLocalRef(env, jException);
call->jException = jException;
#else
(*env)->ExceptionDescribe(env);
#endif
(*env)->ExceptionClear(env);
}
return 1;
@@ -744,7 +753,7 @@ Java_sun_jvmp_mozilla_JSObject_JSFinalize
{
struct JSObject_CallInfo* pInfo = NULL;
fprintf(stderr, "Java_sun_jvmp_mozilla_JSObject_JSFinalize: %lx\n",
fprintf(stderr, "Java_sun_jvmp_mozilla_JSObject_JSFinalize: %x\n",
nativeJSObject);
if (getBrowserWrapper(env, NULL, jsClass) == NULL)
return;

View File

@@ -1,4 +1,4 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Mozilla Public
* License Version 1.1 (the "License"); you may not use this file
@@ -9,19 +9,18 @@
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
*
* The Original Code is The Waterfall Java Plugin Module
*
*
* The Initial Developer of the Original Code is Sun Microsystems Inc
* Portions created by Sun Microsystems Inc are Copyright (C) 2001
* All Rights Reserved.
*
* $Id: JavaPlugin.c,v 1.1.1.1 2001-05-10 18:12:36 edburns%acm.org Exp $
*
*
* Contributor(s):
*
* Nikolay N. Igotti <inn@sparc.spb.su>
* $Id: JavaPlugin.c,v 1.2 2001-07-12 19:58:21 edburns%acm.org Exp $
*
* Contributor(s):
*
* Nikolay N. Igotti <nikolay.igotti@Sun.Com>
*/
/* -*- Mode: C; tab-width: 4; -*- */

View File

@@ -1,28 +1,26 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Mozilla Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is The Waterfall Java Plugin Module
*
* The Initial Developer of the Original Code is Sun Microsystems Inc
* Portions created by Sun Microsystems Inc are Copyright (C) 2001
* All Rights Reserved.
*
* $Id: Makefile,v 1.1.1.1 2001-05-10 18:12:36 edburns%acm.org Exp $
*
*
* Contributor(s):
*
* Nikolay N. Igotti <inn@sparc.spb.su>
*/
#
# The contents of this file are subject to the Mozilla Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is The Waterfall Java Plugin Module
#
# The Initial Developer of the Original Code is Sun Microsystems Inc
# Portions created by Sun Microsystems Inc are Copyright (C) 2001
# All Rights Reserved.
#
# $Id: Makefile,v 1.2 2001-07-12 19:58:21 edburns%acm.org Exp $
#
# Contributor(s):
#
# Nikolay N. Igotti <nikolay.igotti@Sun.Com>
#
#!make
################################################################################

View File

@@ -1,4 +1,4 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Mozilla Public
* License Version 1.1 (the "License"); you may not use this file
@@ -9,19 +9,18 @@
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
*
* The Original Code is The Waterfall Java Plugin Module
*
*
* The Initial Developer of the Original Code is Sun Microsystems Inc
* Portions created by Sun Microsystems Inc are Copyright (C) 2001
* All Rights Reserved.
*
* $Id: wfe_netscape4.c,v 1.1.1.1 2001-05-10 18:12:37 edburns%acm.org Exp $
*
*
* Contributor(s):
*
* Nikolay N. Igotti <inn@sparc.spb.su>
* $Id: wfe_netscape4.c,v 1.2 2001-07-12 19:58:22 edburns%acm.org Exp $
*
* Contributor(s):
*
* Nikolay N. Igotti <nikolay.igotti@Sun.Com>
*/
#include "jvmp.h"

View File

@@ -8,19 +8,19 @@
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
#
# The Original Code is The Waterfall Java Plugin Module
#
#
# The Initial Developer of the Original Code is Sun Microsystems Inc
# Portions created by Sun Microsystems Inc are Copyright (C) 2001
# All Rights Reserved.
#
# $Id: Makefile,v 1.1.1.1 2001-05-10 18:12:37 edburns%acm.org Exp $
#
#
# Contributor(s):
#
# Nikolay N. Igotti <inn@sparc.spb.su>
# $Id: Makefile,v 1.2 2001-07-12 19:58:23 edburns%acm.org Exp $
#
# Contributor(s):
#
# Nikolay N. Igotti <nikolay.igotti@Sun.Com>
#
CFLAGS=-Wall -g -I../../../public/ -DJVMP_USE_SHM
all: shmtran.o jvmp_exec host

View File

@@ -1,4 +1,4 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Mozilla Public
* License Version 1.1 (the "License"); you may not use this file
@@ -9,19 +9,18 @@
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
*
* The Original Code is The Waterfall Java Plugin Module
*
*
* The Initial Developer of the Original Code is Sun Microsystems Inc
* Portions created by Sun Microsystems Inc are Copyright (C) 2001
* All Rights Reserved.
*
* $Id: java_plugin_shm.c,v 1.1.1.1 2001-05-10 18:12:37 edburns%acm.org Exp $
*
*
* Contributor(s):
*
* Nikolay N. Igotti <inn@sparc.spb.su>
* $Id: java_plugin_shm.c,v 1.2 2001-07-12 19:58:23 edburns%acm.org Exp $
*
* Contributor(s):
*
* Nikolay N. Igotti <nikolay.igotti@Sun.Com>
*/
/*

View File

@@ -1,4 +1,4 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Mozilla Public
* License Version 1.1 (the "License"); you may not use this file
@@ -9,19 +9,18 @@
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
*
* The Original Code is The Waterfall Java Plugin Module
*
*
* The Initial Developer of the Original Code is Sun Microsystems Inc
* Portions created by Sun Microsystems Inc are Copyright (C) 2001
* All Rights Reserved.
*
* $Id: java_plugin_shm_host.c,v 1.1.1.1 2001-05-10 18:12:37 edburns%acm.org Exp $
*
*
* Contributor(s):
*
* Nikolay N. Igotti <inn@sparc.spb.su>
* $Id: java_plugin_shm_host.c,v 1.2 2001-07-12 19:58:23 edburns%acm.org Exp $
*
* Contributor(s):
*
* Nikolay N. Igotti <nikolay.igotti@Sun.Com>
*/
/*

View File

@@ -1,4 +1,4 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Mozilla Public
* License Version 1.1 (the "License"); you may not use this file
@@ -9,19 +9,18 @@
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
*
* The Original Code is The Waterfall Java Plugin Module
*
*
* The Initial Developer of the Original Code is Sun Microsystems Inc
* Portions created by Sun Microsystems Inc are Copyright (C) 2001
* All Rights Reserved.
*
* $Id: jvmp_exec.c,v 1.1.1.1 2001-05-10 18:12:37 edburns%acm.org Exp $
*
*
* Contributor(s):
*
* Nikolay N. Igotti <inn@sparc.spb.su>
* $Id: jvmp_exec.c,v 1.2 2001-07-12 19:58:24 edburns%acm.org Exp $
*
* Contributor(s):
*
* Nikolay N. Igotti <nikolay.igotti@Sun.Com>
*/
#include <stdio.h>

View File

@@ -1,4 +1,4 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Mozilla Public
* License Version 1.1 (the "License"); you may not use this file
@@ -9,19 +9,18 @@
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
*
* The Original Code is The Waterfall Java Plugin Module
*
*
* The Initial Developer of the Original Code is Sun Microsystems Inc
* Portions created by Sun Microsystems Inc are Copyright (C) 2001
* All Rights Reserved.
*
* $Id: native.c,v 1.1.1.1 2001-05-10 18:12:37 edburns%acm.org Exp $
*
*
* Contributor(s):
*
* Nikolay N. Igotti <inn@sparc.spb.su>
* $Id: native.c,v 1.2 2001-07-12 19:58:24 edburns%acm.org Exp $
*
* Contributor(s):
*
* Nikolay N. Igotti <nikolay.igotti@Sun.Com>
*/
/* Waterfall headers */
@@ -102,14 +101,16 @@ static WidgetClass getVendorShellWidgetClass() {
static int initAWTGlue()
{
static int inited = 0;
#define AWT_RESOLVE(method) awt.##method = \
(method##_t) dlsym(awtDLL, #method); \
if (awt.##method == NULL) { \
fprintf(stderr, "dlsyn: %s", dlerror()); \
fprintf(stderr, "dlsym: %s", dlerror()); \
return 0; \
}
char awtPath[MAXPATHLEN];
if (inited) return 1;
/* JAVA_HOME/JAVAHOME set by Waterfall before, see java_plugin.c */
#ifdef _JVMP_SUNJVM
sprintf(awtPath, "%s/lib/" ARCH "/" AWTDLL,
@@ -119,7 +120,7 @@ static int initAWTGlue()
sprintf(awtPath, "%s/bin/" AWTDLL,
getenv("JAVAHOME"));
#endif
//fprintf(stderr,"loading %s\n", awtPath);
/* fprintf(stderr,"loading %s\n", awtPath); */
awtDLL = dlopen(awtPath, RTLD_NOW);
if (awtDLL == NULL)
{
@@ -130,6 +131,7 @@ static int initAWTGlue()
awt.getAwtLockFunctions(&LockIt, &UnLockIt, &NoFlushUnlockIt, NULL);
AWT_RESOLVE(getAwtData);
AWT_RESOLVE(getAwtDisplay);
inited = 1;
return 1;
}
@@ -211,12 +213,30 @@ Java_sun_jvmp_generic_motif_Plugin_getWidget(JNIEnv *env, jclass clz,
return PTR_TO_JLONG(w);
}
/** the only reason of this #if is request of pjava team - they don't have
* working JNI_OnLoad. If it will be fixed - remove it at all, as it looks
* nasty.
**/
#if (defined WF_PJAVA)
#if (defined __GNUC__)
void init() __attribute__ ((constructor));
void init()
{
fprintf(stderr, "pJava-ready WF native code\n");
initAWTGlue();
}
#else
#error "Implement constructor-like init() function for your compiler"
#endif
#else
JNIEXPORT jint JNICALL
JNI_OnLoad(JavaVM *vm, void *reserved)
{
if (!initAWTGlue()) return 0;
return JNI_VERSION_1_2;
}
#endif
static jlong getTimeMillis()
{

View File

@@ -1,4 +1,4 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Mozilla Public
* License Version 1.1 (the "License"); you may not use this file
@@ -9,19 +9,18 @@
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
*
* The Original Code is The Waterfall Java Plugin Module
*
*
* The Initial Developer of the Original Code is Sun Microsystems Inc
* Portions created by Sun Microsystems Inc are Copyright (C) 2001
* All Rights Reserved.
*
* $Id: shmtran.c,v 1.1.1.1 2001-05-10 18:12:37 edburns%acm.org Exp $
*
*
* Contributor(s):
*
* Nikolay N. Igotti <inn@sparc.spb.su>
* $Id: shmtran.c,v 1.2 2001-07-12 19:58:24 edburns%acm.org Exp $
*
* Contributor(s):
*
* Nikolay N. Igotti <nikolay.igotti@Sun.Com>
*/
#include "shmtran.h"

View File

@@ -1,4 +1,4 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Mozilla Public
* License Version 1.1 (the "License"); you may not use this file
@@ -9,19 +9,18 @@
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
*
* The Original Code is The Waterfall Java Plugin Module
*
*
* The Initial Developer of the Original Code is Sun Microsystems Inc
* Portions created by Sun Microsystems Inc are Copyright (C) 2001
* All Rights Reserved.
*
* $Id: native.c,v 1.1.1.1 2001-05-10 18:12:37 edburns%acm.org Exp $
*
*
* Contributor(s):
*
* Nikolay N. Igotti <inn@sparc.spb.su>
* $Id: native.c,v 1.2 2001-07-12 19:58:26 edburns%acm.org Exp $
*
* Contributor(s):
*
* Nikolay N. Igotti <nikolay.igotti@Sun.Com>
*/
// nothing here yet
// nothing here yet