Remove old NSPR20 and MOCHA #ifdefs

git-svn-id: svn://10.0.0.236/trunk@11439 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
cyeh%netscape.com
1998-09-29 21:35:57 +00:00
parent 09cba4e0fd
commit 0a4f762689
6 changed files with 3 additions and 102 deletions

View File

@@ -81,11 +81,7 @@ static DDSURFACEDESC ddsd;
extern "C" {
#ifndef NSPR20
PR_LOG_DEFINE(APPLET);
#else
extern PRLogModuleInfo *APPLET;
#endif
#ifdef LAYPROBE_API
extern "C" {

View File

@@ -106,7 +106,6 @@ void EmbedUrlExit(URL_Struct *pUrl, int iStatus, MWContext *pContext)
NET_FreeURLStruct(pUrl);
return;
}
#ifdef MOCHA
{
/* only wait on applets if onload flag */
lo_TopState *top_state = lo_FetchTopState(XP_DOCID(pContext));
@@ -117,7 +116,6 @@ void EmbedUrlExit(URL_Struct *pUrl, int iStatus, MWContext *pContext)
LO_DOCUMENT_LAYER_ID, FALSE);
}
}
#endif /* MOCHA */
// else must be an OLE stream exit
if(iStatus != MK_DATA_LOADED) {

View File

@@ -17,13 +17,9 @@
*/
#define JMC_INIT_IMGCB_ID 1
#ifndef NSPR20
#include "coremem.h"
#include "stdafx.h"
#else
#include "stdafx.h"
#include "coremem.h"
#endif
#include "feimage.h"
#include "il_types.h"
#include "cxdc.h"

View File

@@ -33,27 +33,15 @@
#endif
#include "prefs.h" //To access g_bReloadChangeColor;
#ifdef NSPR20
#include "private/prpriv.h"
#endif
// This is the NSPR priority of the main GUI thread (ie. mozilla)
#ifndef NSPR20
#ifdef XP_WIN32
#define MOZILLA_THREAD_PRIORITY 15
#else
#define MOZILLA_THREAD_PRIORITY 2
#endif
#else
#ifdef XP_WIN32
#define MOZILLA_THREAD_PRIORITY PR_PRIORITY_NORMAL
#else
#define MOZILLA_THREAD_PRIORITY PR_PRIORITY_LOW
#endif
#endif
#if defined(OJI) || defined(JAVA) || defined(MOCHA)
#ifndef XP_PC
#define XP_PC
@@ -74,7 +62,6 @@
#include "nspr.h"
#include "plevent.h"
#endif /* OJI || JAVA || MOCHA */
#if defined(OJI)
#include "jvmmgr.h"
@@ -574,78 +561,11 @@ void fe_InitJava()
void fe_InitNSPR(void* stackBase)
{
#ifdef XP_WIN16
#if !defined(NSPR20)
//
// The 16-bit MS RTL prohibits 16-bit DLLs from calling some RTL functions.
// ie.
// malloc/free
// strftime
// sscanf
// etc...
// To fix this limitation, function pointers are passed to NSPR which
// route the RTL functions "into the EXE" where the actual RTL function
// is available. (Oh what a tangled web we weave :-( )
//
static struct PRMethodCallbackStr DLLCallbacks = {
__ns_malloc,
__ns_realloc,
__ns_calloc,
__ns_free,
__ns_gethostname,
__ns_gethostbyname,
__ns_gethostbyaddr,
__ns_getenv,
__ns_putenv,
__ns_auxOutput,
__ns_exit,
__ns_strftime,
__ns_ntohl,
__ns_ntohs,
__ns_closesocket,
__ns_setsockopt,
__ns_socket,
__ns_getsockname,
__ns_htonl,
__ns_htons,
__ns_inet_addr,
__ns_WSAGetLastError,
__ns_connect,
__ns_recv,
__ns_ioctlsocket,
__ns_recvfrom,
__ns_send,
__ns_sendto,
__ns_accept,
__ns_listen,
__ns_bind,
__ns_select,
__ns_getsockopt,
__ns_getprotobyname,
__ns_WSAAsyncSelect,
__ns_WSASetLastError
};
// Perform the 16-bit ONLY callback initialization...
PR_MDInit(&DLLCallbacks);
#endif /* NSPR20 */
#endif /* XP_WIN16 */
#if defined(OJI) || defined(JAVA) || defined(MOCHA)
#ifndef NSPR20
// Initialize the NSPR library
PR_Init( "mozilla", MOZILLA_THREAD_PRIORITY, 1, stackBase);
mozilla_thread = PR_CurrentThread();
#else
PR_STDIO_INIT()
mozilla_thread = PR_CurrentThread();
PR_SetThreadGCAble();
PR_SetThreadPriority(mozilla_thread, MOZILLA_THREAD_PRIORITY);
PL_InitializeEventsLib("mozilla");
#endif
#endif /* OJI || JAVA || MOCHA */
}
BOOL fe_ShutdownJava()
@@ -805,7 +725,7 @@ BOOL fe_RegisterOLEIcon ( LPSTR szCLSIDObject, // Class ID of the Object
/* BEWARE! BEWARE! BEWARE! BEWARE! BEWARE! BEWARE! BEWARE! BEWARE! BEWARE! */
/* */
/****************************************************************************/
#if defined(MOCHA) && !defined(JAVA)
#if !defined(JAVA)
#include "prevent.h"
#include "prlog.h"
@@ -840,13 +760,11 @@ LJ_ProcessEvent()
}
}
#endif // MOCHA && !JAVA
#endif // !JAVA
#endif // XP_WIN16
#ifdef XP_WIN16
#if defined(NSPR20)
#include "private\prpriv.h"
#endif
void fe_yield(void)
{
PR_Sleep(PR_INTERVAL_NO_WAIT);

View File

@@ -275,9 +275,6 @@ LONG CHiddenFrame::OnForceIOSelect(WPARAM wParam, LPARAM lParam)
LONG CHiddenFrame::OnNetworkActivity(UINT socket, LONG lParam)
{
XP_ASSERT(0);
#ifdef NSPR20_DISABLED
return(OnForceIOSelect((WPARAM)SocketSelect, (LPARAM)socket));
#endif
return 0;
}

View File

@@ -1660,14 +1660,12 @@ int CNetscapeApp::Run()
}
#ifdef XP_WIN16
#if defined(OJI) || defined(JAVA) || defined(MOCHA)
/*
** On Win16 the only way for another thread to run is to explicitly
** yield...
*/
extern void fe_yield(void);
fe_yield();
#endif /* OJI || JAVA || MOCHA */
#endif /* XP_WIN16 */
do {
@@ -1794,14 +1792,12 @@ BOOL CNetscapeApp::OnIdle(LONG lCount)
// already sends a WM_IDLEUPDATECMDUI to each of the frames
#ifdef XP_WIN16
#if defined(OJI) || defined(JAVA) || defined(MOCHA)
/*
** On Win16 the only way for another thread to run is to explicitly
** yield...
*/
extern void fe_yield(void);
fe_yield();
#endif /* OJI || JAVA || MOCHA */
// Update the UI of the frames.
if(lCount == 0) {