Added all the nucache files to the memory module project (as a group) so that NU_CACHE can be turned on with a flick of the wrist, made the modular memory library build with the NU_CACHE flag turned on, fixed build warnings and errors. The NU_CACHE flag is still OFF, because the database code doesn't exist for Macintosh or Unix :-(
git-svn-id: svn://10.0.0.236/trunk@17778 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user