diff --git a/mozilla/lib/xp/xp_stub.c b/mozilla/lib/xp/xp_stub.c index 37cf00c6f5d..ca269225db0 100644 --- a/mozilla/lib/xp/xp_stub.c +++ b/mozilla/lib/xp/xp_stub.c @@ -72,12 +72,12 @@ XP_GetBuiltinString(int16 i) if ( - ((ret = mcom_include_merrors_i_strings (i))) || - ((ret = mcom_include_secerr_i_strings (i))) || - ((ret = mcom_include_sec_dialog_strings(i))) || - ((ret = mcom_include_sslerr_i_strings (i))) || - ((ret = mcom_include_xp_error_i_strings(i))) || - ((ret = mcom_include_xp_msg_i_strings (i))) + ((ret = mcom_include_merrors_i_strings (i)) != 0) || + ((ret = mcom_include_secerr_i_strings (i)) != 0) || + ((ret = mcom_include_sec_dialog_strings(i)) != 0) || + ((ret = mcom_include_sslerr_i_strings (i)) != 0) || + ((ret = mcom_include_xp_error_i_strings(i)) != 0) || + ((ret = mcom_include_xp_msg_i_strings (i)) != 0) ) { return ret; diff --git a/mozilla/network/cache/nu/src/nsCachePref.cpp b/mozilla/network/cache/nu/src/nsCachePref.cpp index 858ff19eeb1..61b94ce94f3 100644 --- a/mozilla/network/cache/nu/src/nsCachePref.cpp +++ b/mozilla/network/cache/nu/src/nsCachePref.cpp @@ -113,50 +113,19 @@ nsCachePref::SetupPrefs(const char* i_Pref) if (bSetupAll || !PL_strcmp(i_Pref,CACHE_DIR_PREF)) { -#ifdef XP_MAC - tempPref = CPrefs::GetCachePath(); - if (tempPref) - { - if (m_DiskCacheFolder) - delete m_DiskCacheFolder; + if (PREF_OK == PREF_CopyPathPref(CACHE_DIR_PREF,&tempPref)) + { + PR_ASSERT(tempPref); + delete [] m_DiskCacheFolder; m_DiskCacheFolder = new char[PL_strlen(tempPref)+2]; - if (!m_DiskCacheFolder) { if (tempPref) PR_Free(tempPref); return; } - /* Changing the mac path to unix because nspr converts - it the other way round and cant deal with it being a mac path */ - m_DiskCacheFolder[0]='/'; - m_DiskCacheFolder[1]='\0'; - PL_strcat(m_DiskCacheFolder, tempPref); - char *tempPref2 = m_DiskCacheFolder+1; - while (*tempPref2) - { - if (*tempPref2 == ':') - *tempPref2 = '/'; - tempPref2++; - } - - } -#else - if (PREF_OK == PREF_CopyCharPref(CACHE_DIR_PREF,&tempPref)) - { - PR_ASSERT(tempPref); - if (m_DiskCacheFolder) - delete m_DiskCacheFolder; - m_DiskCacheFolder = new char[PL_strlen(tempPref)+1]; - if (!m_DiskCacheFolder) - { - if (tempPref) - PR_Free(tempPref); - return; - } PL_strcpy(m_DiskCacheFolder, tempPref); - } -#endif + } else //TODO set to temp folder { #if defined(MODULAR_NETLIB) && defined(XP_PC) diff --git a/mozilla/network/macbuild/network.mcp b/mozilla/network/macbuild/network.mcp index 6c0bedfc8ee..9cf18d49b26 100644 Binary files a/mozilla/network/macbuild/network.mcp and b/mozilla/network/macbuild/network.mcp differ diff --git a/mozilla/network/main/mkautocf.c b/mozilla/network/main/mkautocf.c index f02ebe637e1..f4729cf165e 100644 --- a/mozilla/network/main/mkautocf.c +++ b/mozilla/network/main/mkautocf.c @@ -55,6 +55,7 @@ #include "jsapi.h" #include "jscompat.h" #include "jspubtd.h" +#include "jsautocf.h" /* for XP_GetString() */ #include "xpgetstr.h" diff --git a/mozilla/network/main/mkgeturl.c b/mozilla/network/main/mkgeturl.c index 47e06ae45e1..26da1e0b278 100644 --- a/mozilla/network/main/mkgeturl.c +++ b/mozilla/network/main/mkgeturl.c @@ -2982,7 +2982,7 @@ redo_load_switch: /* come here on file/ftp retry */ this_entry->proxy_conf, &this_entry->proxy_addr, &this_entry->socks_host, - &this_entry->socks_port)) + &this_entry->socks_port)) != 0 && this_entry->proxy_addr ) { diff --git a/mozilla/network/main/mkstream.c b/mozilla/network/main/mkstream.c index a2db4e9c228..aa6f278eda0 100644 --- a/mozilla/network/main/mkstream.c +++ b/mozilla/network/main/mkstream.c @@ -607,7 +607,7 @@ NET_DumpDecoders() net_ConverterStruct * cs_ptr; XP_List *list_ptr = net_decoder_list[FO_PRESENT]; - while((cs_ptr = XP_ListNextObject(list_ptr))) + while((cs_ptr = XP_ListNextObject(list_ptr)) != 0) { char *msg = PR_smprintf("in: %s out: %d\n",cs_ptr->encoding_in, cs_ptr->format_out); diff --git a/mozilla/network/module/nsHttpURLFactory.cpp b/mozilla/network/module/nsHttpURLFactory.cpp index 92f60215698..09b4555f704 100644 --- a/mozilla/network/module/nsHttpURLFactory.cpp +++ b/mozilla/network/module/nsHttpURLFactory.cpp @@ -19,6 +19,7 @@ #include "nsIProtocolURLFactory.h" #include "nsHttpUrl.h" #include "nsINetService.h" +#include "nsNetThread.h" #include "nsIServiceManager.h" #include "nsString.h" diff --git a/mozilla/network/module/nsHttpUrl.cpp b/mozilla/network/module/nsHttpUrl.cpp index 635a12b6227..07e645b5e39 100644 --- a/mozilla/network/module/nsHttpUrl.cpp +++ b/mozilla/network/module/nsHttpUrl.cpp @@ -30,8 +30,7 @@ #include "prmem.h" #include "plstr.h" #include "nsCRT.h" - -MWContext *new_stub_context(URL_Struct *URL_s); +#include "nsStubContext.h" static NS_DEFINE_IID(kIOutputStreamIID, NS_IOUTPUTSTREAM_IID); static NS_DEFINE_IID(kISupportsIID, NS_ISUPPORTS_IID); diff --git a/mozilla/network/module/nsIRelatedLinks.h b/mozilla/network/module/nsIRelatedLinks.h index 8bcb2fc2766..c7004d0d898 100644 --- a/mozilla/network/module/nsIRelatedLinks.h +++ b/mozilla/network/module/nsIRelatedLinks.h @@ -68,6 +68,7 @@ public: }; +extern "C" void RL_Init(); extern "C" nsIRelatedLinks * NS_NewRelatedLinks(); #endif diff --git a/mozilla/network/module/nsNetFactory.cpp b/mozilla/network/module/nsNetFactory.cpp index 166b73a432a..659dd69e680 100644 --- a/mozilla/network/module/nsNetFactory.cpp +++ b/mozilla/network/module/nsNetFactory.cpp @@ -21,6 +21,7 @@ #include "nsISupports.h" #include "nsINetService.h" #include "nsNetService.h" +#include "nsRepository.h" /* This implementation of the network service factory is presently * only taking advantage of the service retrieval benefit that the diff --git a/mozilla/network/protocol/about/mkabout.c b/mozilla/network/protocol/about/mkabout.c index 26a1256772e..c01346c7011 100644 --- a/mozilla/network/protocol/about/mkabout.c +++ b/mozilla/network/protocol/about/mkabout.c @@ -79,7 +79,7 @@ static PRHashTable *net_AboutTable = NULL; PRIVATE PRIntn net_AboutComparator(const void *v1, const void *v2) { char *idx = NULL; - if (idx = PL_strchr((char *) v1, '?')) { + if ((idx = PL_strchr((char *) v1, '?')) != 0) { int len = (int)(idx - (char *) v1); return PL_strncasecmp((char *) v1, (char *) v2, len) == 0; } else { @@ -101,7 +101,7 @@ PRIVATE PLHashNumber net_HashAbout(const void *key) PRIVATE PRBool net_DoRegisteredAbout(const char *which, ActiveEntry *entry) { NET_AboutCB cb; - if (cb = (NET_AboutCB) PL_HashTableLookup(net_AboutTable, which)) { + if ((cb = (NET_AboutCB) PL_HashTableLookup(net_AboutTable, which))!= 0) { return cb(which, entry->format_out, entry->URL_s, entry->window_id); } return PR_FALSE; @@ -138,7 +138,7 @@ net_OutputURLDocInfo(MWContext *ctxt, char *which, char **data, int32 *length) char buf[64]; char *tmp=0; char *escaped; - char *sec_msg, *il_msg; + char *il_msg; NET_FindURLInCache(URL_s, ctxt); diff --git a/mozilla/network/protocol/http/mkaccess.c b/mozilla/network/protocol/http/mkaccess.c index acc225b6238..dc8b14a619a 100644 --- a/mozilla/network/protocol/http/mkaccess.c +++ b/mozilla/network/protocol/http/mkaccess.c @@ -216,7 +216,7 @@ net_CheckForAuthorization(char * address, Bool exact_match) * http://uname:pwd@host.com, so make sure we don't compare an address * passed in with one with an auth struct->path until we remove/reduce the * address passed in. */ - if( (afterProto=PL_strstr(address, "://")) ) { + if( (afterProto=PL_strstr(address, "://")) != 0 ) { afterProto=afterProto+3; tmp=*afterProto; *afterProto='\0'; @@ -224,7 +224,7 @@ net_CheckForAuthorization(char * address, Bool exact_match) *afterProto=tmp; /* temporarily truncate after first slash, if any. */ - if( (fSlash=PL_strchr(afterProto, '/')) ) + if( (fSlash=PL_strchr(afterProto, '/')) != 0) *fSlash='\0'; atSign=PL_strchr(afterProto, '@'); if(fSlash) @@ -915,8 +915,8 @@ NET_AskForAuthString(MWContext *context, prev_auth->password = password; prev_auth->path = 0; /* Don't save username/password info in the auth struct path. */ - if( (atSign=PL_strchr(new_address, '@')) ) { - if( (host=PL_strstr(new_address, "://")) ) { + if( (atSign=PL_strchr(new_address, '@')) != 0) { + if( (host=PL_strstr(new_address, "://")) != 0) { char tmp; host+=3; tmp=*host; diff --git a/mozilla/network/protocol/http/mkhttp.c b/mozilla/network/protocol/http/mkhttp.c index 66ad120c911..fa758df8d72 100644 --- a/mozilla/network/protocol/http/mkhttp.c +++ b/mozilla/network/protocol/http/mkhttp.c @@ -88,7 +88,7 @@ extern int XP_PROGRESS_TRYAGAIN; extern int XP_PROGRESS_WAIT_REPLY; extern int XP_HR_TRANSFER_INTERRUPTED; extern int XP_TRANSFER_INTERRUPTED; -extern int XP_ERRNO_EIO; +extern int XP_ERRNO_EIO; #ifdef TRUST_LABELS extern void ProcessCookiesAndTrustLabels( ActiveEntry *ce ); @@ -1264,9 +1264,9 @@ net_build_http_request (URL_Struct * URL_s, char *atSign=NULL; char *path=NULL; - if( (path=PL_strchr(colon+3, '/')) ) + if( (path=PL_strchr(colon+3, '/')) != 0) *path='\0'; - if( (atSign=PL_strchr(colon, '@')) ) { + if( (atSign=PL_strchr(colon, '@')) != 0) { /* We found a username and/or a password, don't let it through */ char temp; if(path) @@ -1467,7 +1467,7 @@ net_build_http_request (URL_Struct * URL_s, /* Figure out which kind of proxy we're using: PAC or straight proxy. * DON'T FREE tempURL!!! */ - if ( (tempURL = net_GetPACUrl()) && (*tempURL) ) + if ( (tempURL = net_GetPACUrl()) != NULL && (*tempURL) ) proxyServer = NET_ParseURL(tempURL, GET_HOST_PART | GET_PATH_PART @@ -2545,7 +2545,7 @@ net_setup_http_stream(ActiveEntry * ce) { /* Figure out which kind of proxy we're using: PAC or straight proxy. * DON'T FREE tempURL!!! */ - if ( (tempURL = net_GetPACUrl()) && (*tempURL) ) + if ( (tempURL = net_GetPACUrl()) != NULL && (*tempURL) ) proxyServer = NET_ParseURL(tempURL, GET_HOST_PART | GET_PATH_PART | GET_USERNAME_PART | GET_PASSWORD_PART); else proxyServer = cd->proxy_server; @@ -3788,7 +3788,7 @@ HTTP_ReadPrefs(void) NET_SetSendRefererHeader(b); } -MODULE_PRIVATE int PR_CALLBACK HTTP_PrefChangedFunc(const char *pref, void *data) +static int PR_CALLBACK HTTP_PrefChangedFunc(const char *pref, void *data) { HTTP_ReadPrefs(); return TRUE;