From 0a4f762689ffdff1616cd466d2f12ab81f333fec Mon Sep 17 00:00:00 2001 From: "cyeh%netscape.com" Date: Tue, 29 Sep 1998 21:35:57 +0000 Subject: [PATCH] Remove old NSPR20 and MOCHA #ifdefs git-svn-id: svn://10.0.0.236/trunk@11439 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/cmd/winfe/cxwin.cpp | 4 -- mozilla/cmd/winfe/feembed.cpp | 2 - mozilla/cmd/winfe/feimage.cpp | 6 +-- mozilla/cmd/winfe/feorphan.cpp | 86 +--------------------------------- mozilla/cmd/winfe/hiddenfr.cpp | 3 -- mozilla/cmd/winfe/nsapp.cpp | 4 -- 6 files changed, 3 insertions(+), 102 deletions(-) diff --git a/mozilla/cmd/winfe/cxwin.cpp b/mozilla/cmd/winfe/cxwin.cpp index 9d6ef851ea6..5a8ba3bfa19 100644 --- a/mozilla/cmd/winfe/cxwin.cpp +++ b/mozilla/cmd/winfe/cxwin.cpp @@ -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" { diff --git a/mozilla/cmd/winfe/feembed.cpp b/mozilla/cmd/winfe/feembed.cpp index 09c1d69d9b6..91d2ed51dbf 100755 --- a/mozilla/cmd/winfe/feembed.cpp +++ b/mozilla/cmd/winfe/feembed.cpp @@ -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) { diff --git a/mozilla/cmd/winfe/feimage.cpp b/mozilla/cmd/winfe/feimage.cpp index 1363afab5a6..28b973e1aae 100755 --- a/mozilla/cmd/winfe/feimage.cpp +++ b/mozilla/cmd/winfe/feimage.cpp @@ -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" diff --git a/mozilla/cmd/winfe/feorphan.cpp b/mozilla/cmd/winfe/feorphan.cpp index ad236eb75b4..1c724a7758b 100644 --- a/mozilla/cmd/winfe/feorphan.cpp +++ b/mozilla/cmd/winfe/feorphan.cpp @@ -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); diff --git a/mozilla/cmd/winfe/hiddenfr.cpp b/mozilla/cmd/winfe/hiddenfr.cpp index 9b11ace7af5..1af598c6157 100644 --- a/mozilla/cmd/winfe/hiddenfr.cpp +++ b/mozilla/cmd/winfe/hiddenfr.cpp @@ -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; } diff --git a/mozilla/cmd/winfe/nsapp.cpp b/mozilla/cmd/winfe/nsapp.cpp index 8b56f8a3030..05eac6ed6d2 100644 --- a/mozilla/cmd/winfe/nsapp.cpp +++ b/mozilla/cmd/winfe/nsapp.cpp @@ -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) {