diff --git a/cmd/xfe/commands.c b/cmd/xfe/commands.c index 1c328821fe2c..bc60f6233662 100644 --- a/cmd/xfe/commands.c +++ b/cmd/xfe/commands.c @@ -1274,11 +1274,7 @@ xfe_go_get_url_relnotes(void) ? HTTP_BETA_VERSION_PREFIX : H_REL_VERSION_PREFIX; -#ifdef GOLD - sprintf(buf, "%sGold.html", fe_version); -#else sprintf(buf, "%s.html", fe_version); -#endif for ( ptr = buf; *ptr; ptr++ ) { *ptr+= HTTP_OFF; diff --git a/cmd/xfe/icons/mkicons.cpp b/cmd/xfe/icons/mkicons.cpp index eb4998c3883d..abbae9f729f4 100644 --- a/cmd/xfe/icons/mkicons.cpp +++ b/cmd/xfe/icons/mkicons.cpp @@ -69,10 +69,8 @@ PR_BEGIN_EXTERN_C void lo_view_title(MWContext *context, char *title_str) {} PR_END_EXTERN_C -#ifdef MOCHA void LM_SendImageEvent(MWContext *context, LO_ImageStruct *image_data, void * event) { return;} -#endif int NET_URL_Type(const char *URL) {return 0;} diff --git a/cmd/xfe/mozilla.c b/cmd/xfe/mozilla.c index 3abe2842fed2..44d5da45c191 100644 --- a/cmd/xfe/mozilla.c +++ b/cmd/xfe/mozilla.c @@ -45,9 +45,7 @@ #ifdef MOZ_SMARTUPDATE #include "softupdt.h" #endif -#ifdef NSPR20 #include "private/prpriv.h" /* for PR_NewNamedMonitor */ -#endif /* NSPR20 */ #ifdef MOZ_SMARTUPDATE #include "softupdt.h" #endif @@ -63,11 +61,7 @@ #include "xeditor.h" #endif #include "prnetdb.h" -#ifndef NSPR20 -#include "prevent.h" -#else #include "plevent.h" -#endif #include "e_kit.h" #include "icons.h" @@ -1073,16 +1067,12 @@ fe_EventLoop () */ if (first_time) { #ifndef I_KNOW_MY_Xt_IS_BAD -#ifdef NSPR20 /* * XXX - TO BE FIXED * with NSPR20 this count seems to go as high as 7 or 8; needs to * be investigated further */ XP_ASSERT(spinning_wildly < 12); -#else - XP_ASSERT(spinning_wildly < 3); -#endif #endif /* I_KNOW_MY_Xt_IS_BAD */ spinning_wildly++; } @@ -1927,10 +1917,6 @@ build_user_agent_string(char *versionLocale) strcpy (buf, fe_version); -#ifdef GOLD - strcat(buf, "Gold"); -#endif - if ( ekit_Enabled() && ekit_UserAgent() ) { strcat(buf, "C-"); strcat(buf, ekit_UserAgent()); @@ -2137,7 +2123,6 @@ main ** a higher priority than any java applet. Java's priority range is ** 1-10, and we're mapping that to 11-20 (in sysThreadSetPriority). */ -#ifdef NSPR20 /* No explicit initialization needed for NSPR 2.0 */ { #ifdef DEBUG @@ -2161,18 +2146,6 @@ main PR_BlockClockInterrupts(); } -#elif defined(NSPR_SPLASH) /* !NSPR20 && NSPR_SPLASH */ - /* - ** if we're using the splash screen, we need the mozilla thread to - ** be at a lower priority (so the label gets updated and we handle X - ** events quickly. It may make the startup time longer, but the user - ** will be happier. We'll set it back after fe_splashStop(). - */ - PR_Init("mozilla", 20, 1, 0); -#else /* !NSPR20 && !NSPR_SPLASH */ - PR_Init("mozilla", 24, 1, 0); -#endif /* NSRP20 */ - #ifdef JAVA LJ_SetProgramName(argv[0]); #endif @@ -2539,12 +2512,7 @@ main fe_display = dpy = XtDisplay (toplevel); -#if defined(NSPR20) PR_UnblockClockInterrupts(); -#else - /* Now we can turn the nspr clock on */ - PR_StartEvents(0); -#endif /* NSPR20 */ #ifdef JAVA { @@ -2765,10 +2733,7 @@ main const char *host; inaddr.s_addr = addr; -#ifndef NSPR20 - hp = PR_gethostbyaddr((char *)&inaddr, sizeof inaddr, AF_INET, - &hpbuf, dbbuf, sizeof(dbbuf), 0); -#else + { PRStatus sts; PRNetAddr pr_addr; @@ -2781,7 +2746,6 @@ main else hp = &hpbuf; } -#endif host = (hp == NULL) ? inet_ntoa(inaddr) : hp->h_name; fmt = PR_sprintf_append(fmt, XP_GetString(XFE_APPEARS_TO_BE_RUNNING_ON_HOST_UNDER_PID), @@ -3172,11 +3136,8 @@ main while (*s && *s != ':' && *s != '/') s++; -#ifndef NSPR20 - if (*s == ':' || PR_gethostbyname (argv [i], &hpbuf, dbbuf, sizeof(dbbuf), 0)) -#else + if (*s == ':' || (PR_GetHostByName (argv [i], dbbuf, sizeof(dbbuf), &hpbuf) == PR_SUCCESS)) -#endif { /* There is a : before the first / so it's a URL. Or it is a host name, which are also magically URLs. @@ -3710,13 +3671,7 @@ fe_create_pidlock (const char *name, unsigned long *paddr, pid_t *ppid) char *colon, *after; pid_t pid; -#ifndef NSPR20 - if (gethostname (hostname, sizeof hostname) < 0 || - (hp = PR_gethostbyname (hostname, &hpbuf, dbbuf, sizeof(dbbuf), 0)) == NULL) - inaddr.s_addr = INADDR_LOOPBACK; - else - memcpy (&inaddr, hp->h_addr, sizeof inaddr); -#else + { PRStatus sts; @@ -3733,7 +3688,7 @@ fe_create_pidlock (const char *name, unsigned long *paddr, pid_t *ppid) } } } -#endif + myaddr = inaddr.s_addr; signature = PR_smprintf ("%s:%u", inet_ntoa (inaddr), (unsigned)getpid ()); diff --git a/cmd/xfe/mozjava.h b/cmd/xfe/mozjava.h index d41637f92218..e53c6daf836a 100644 --- a/cmd/xfe/mozjava.h +++ b/cmd/xfe/mozjava.h @@ -22,15 +22,9 @@ #if defined(NSPR) || defined(JAVA) #include "prthread.h" #include "prmon.h" -#ifndef NSPR20 -#include "prfile.h" -#include "prglobal.h" -#include "prevent.h" -#else #include "prio.h" #include "prtypes.h" #include "plevent.h" -#endif /* NSPR20 */ #include "prlog.h" #ifdef JAVA #include "java.h" diff --git a/cmd/xfe/src/Splash.cpp b/cmd/xfe/src/Splash.cpp index c96594ead46c..6d1e8b0638b1 100644 --- a/cmd/xfe/src/Splash.cpp +++ b/cmd/xfe/src/Splash.cpp @@ -30,11 +30,7 @@ #include #include -#ifdef NSPR20 #include "private/prpriv.h" /* For PR_NewNamedMonitor */ -#else -#define PR_INTERVAL_NO_TIMEOUT LL_MAXINT -#endif #ifdef DEBUG_username #define D(x) x @@ -69,13 +65,10 @@ XFE_Splash::XFE_Splash(Widget toplevel) m_context = XP_NewContext(); m_context->fe.data = XP_NEW_ZAP(fe_ContextData); -#ifdef NSPR20 m_thread = PR_CreateThread(PR_USER_THREAD, splashThreadProc, this, PR_PRIORITY_NORMAL, PR_GLOBAL_THREAD, PR_UNJOINABLE_THREAD, 0); /* default stack size */ -#else - m_thread = PR_CreateThread("splash-thread", 24, 0); -#endif + m_eventqueue = PR_CreateEventQueue("splash-events", m_thread); ac = 0; @@ -139,9 +132,6 @@ XFE_Splash::XFE_Splash(Widget toplevel) XtAddEventHandler(m_splashlabel, ExposureMask, False, splashExpose_eh, this); -#ifndef NSPR20 - PR_Start(m_thread, splashThreadProc, this, NULL); -#endif } XFE_Splash::~XFE_Splash() @@ -317,11 +307,9 @@ XFE_Splash::splashThreadProc() } void -#ifndef NSPR20 -XFE_Splash::splashThreadProc(void *a, void *) -#else + XFE_Splash::splashThreadProc(void *a) -#endif /* NSPR20 */ + { XFE_Splash *splash = (XFE_Splash*)a; PRMonitor *monitor = splash->getStopMonitor(); @@ -336,9 +324,6 @@ XFE_Splash::splashThreadProc(void *a) D(printf ("exiting the splash thread\n");) -#ifndef NSPR20 - PR_Exit(); -#endif } void diff --git a/cmd/xfe/src/Splash.h b/cmd/xfe/src/Splash.h index d180590dfd01..92529f98ccd7 100644 --- a/cmd/xfe/src/Splash.h +++ b/cmd/xfe/src/Splash.h @@ -30,11 +30,7 @@ #include "Component.h" #include "prmon.h" #include "prthread.h" -#ifndef NSPR20 -#include "prevent.h" -#else #include "plevent.h" -#endif #include "xfe.h" #include "icons.h" @@ -82,11 +78,8 @@ private: static void splashExpose_eh(Widget, XtPointer, XEvent *, Boolean *); void splashThreadProc(); -#ifndef NSPR20 - static void splashThreadProc(void *, void*); -#else + static void splashThreadProc(void *); -#endif /* NSPR20 */ }; diff --git a/cmd/xfe/src/plugin.cpp b/cmd/xfe/src/plugin.cpp index 7be97b759385..61b11b25adc4 100644 --- a/cmd/xfe/src/plugin.cpp +++ b/cmd/xfe/src/plugin.cpp @@ -38,9 +38,7 @@ #include "prlink.h" #include "prthread.h" #include "prlog.h" -#ifdef NSPR20 #include "prerror.h" -#endif /* NSPR20 */ #include "pref_helpers.h" #include "edt.h" #ifdef JAVA @@ -494,11 +492,7 @@ static NPX_PlugIn *readPluginInfo(NPX_PlugInList *list, char *filename) } } else { -#ifndef NSPR20 - fct = (char *(*)())PR_FindSymbol("NP_GetMIMEDescription", obj); -#else fct = (char *(*)())PR_FindSymbol(obj, "NP_GetMIMEDescription"); -#endif /* NSPR20 */ if (fct == NULL || (newInfo = (*fct)()) == NULL) { int err = PR_UnloadLibrary(obj); @@ -517,12 +511,7 @@ static NPX_PlugIn *readPluginInfo(NPX_PlugInList *list, char *filename) currentInfo->Delete = 1; return NULL; } - -#ifndef NSPR20 - getvalue = (NPError (*)(void *, int, void *)) PR_FindSymbol("NP_GetValue", obj); -#else getvalue = (NPError (*)(void *, int, void *)) PR_FindSymbol(obj, "NP_GetValue"); -#endif /* NSPR20 */ if (getvalue != NULL) { char *value; NPError err; @@ -1011,11 +1000,8 @@ FE_LoadPlugin(void *pdesc, NPNetscapeFuncs *funcs, np_handle* handle) #endif } else { -#ifndef NSPR20 - f = (NPError(*)(NPNetscapeFuncs *, NPPluginFuncs *)) PR_FindSymbol("NP_Initialize", plugin->dlopen_obj); -#else + f = (NPError(*)(NPNetscapeFuncs *, NPPluginFuncs *)) PR_FindSymbol(plugin->dlopen_obj, "NP_Initialize"); -#endif /* NSPR20 */ if (f == NULL) { int err = PR_UnloadLibrary(plugin->dlopen_obj); @@ -1034,11 +1020,7 @@ FE_LoadPlugin(void *pdesc, NPNetscapeFuncs *funcs, np_handle* handle) return NULL; } -#ifndef NSPR20 - plugin->shutdown = (NPError(*)(void)) PR_FindSymbol("NP_Shutdown", plugin->dlopen_obj); -#else plugin->shutdown = (NPError(*)(void)) PR_FindSymbol(plugin->dlopen_obj, "NP_Shutdown"); -#endif /* NSPR20 */ } } diff --git a/cmd/xfe/xfe-dns.c b/cmd/xfe/xfe-dns.c index d86f1161abed..285207736b91 100644 --- a/cmd/xfe/xfe-dns.c +++ b/cmd/xfe/xfe-dns.c @@ -261,10 +261,6 @@ xfe_dns_done_cb (void *id, void *closure, called underneath FE_ClearDNSSelect/DNS_AbortHostLookup, and are thus already in netlib.) */ -#ifdef NSPR20_DISABLED - if (status != 0) - NET_ProcessNet (obj->socket, NET_SOCKET_FD); -#endif return 0; } diff --git a/cmd/xfe/xfe.c b/cmd/xfe/xfe.c index 3ee5613c8ba0..d8ed5bde6c04 100644 --- a/cmd/xfe/xfe.c +++ b/cmd/xfe/xfe.c @@ -29,15 +29,9 @@ #include "intl_csi.h" #include "selection.h" #include "rdf.h" -#ifdef NSPR20 #include "private/prpriv.h" /* for PR_GetMonitorEntryCount */ -#endif /* NSPR20 */ -#ifndef NSPR20 -#include /* for mocha */ -#else #include /* for mocha */ -#endif #include #include #include @@ -599,10 +593,6 @@ fe_stream_callback (void *closure, int *source, XtInputId *id) quantify_start_recording_data(); #endif /* QUANTIFY */ -#ifdef NSPR20_DISABLED - NET_ProcessNet (*source, NET_UNKNOWN_FD); -#endif - #ifdef QUANTIFY quantify_stop_recording_data(); #endif /* QUANTIFY */