From f7ee18f04484c5699eb473a586c4e37cab9f18a1 Mon Sep 17 00:00:00 2001 From: "alecf%netscape.com" Date: Fri, 1 Feb 2002 01:53:09 +0000 Subject: [PATCH] one more part of fix for bug 107575, including the much coveted whitespace remove aIgnoreCase parameter from all nsString and nsCString consumers sr=jag, r=shaver git-svn-id: svn://10.0.0.236/trunk@113390 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/caps/src/nsScriptSecurityManager.cpp | 2 +- .../content/xml/content/src/nsXMLElement.cpp | 4 +- .../extensions/p3p/src/nsP3PPolicyRefFile.cpp | 2 +- .../xmlterm/base/mozXMLTermSession.cpp | 2 +- mozilla/gfx/src/mac/nsUnicodeMappingUtil.cpp | 4 +- mozilla/gfx/src/qt/nsFontMetricsQT.cpp | 2 +- mozilla/htmlparser/src/nsExpatTokenizer.cpp | 2 +- mozilla/mailnews/base/util/nsMsgUtils.cpp | 4 +- .../msgdb/src/nsMsgOfflineImapOperation.cpp | 2 +- mozilla/mailnews/imap/src/nsImapProtocol.cpp | 2 +- .../import/eudora/src/nsEudoraAddress.cpp | 2 +- .../import/eudora/src/nsEudoraWin32.cpp | 16 ++-- .../htmlparser/src/nsExpatTokenizer.cpp | 2 +- mozilla/string/obsolete/bufferRoutines.h | 87 +++++++++---------- mozilla/string/obsolete/nsStr.cpp | 8 +- mozilla/string/obsolete/nsStr.h | 4 +- mozilla/string/obsolete/nsString.cpp | 8 +- mozilla/string/obsolete/nsString.h | 4 +- mozilla/string/obsolete/nsString2.cpp | 4 +- .../exthandler/nsExternalHelperAppService.cpp | 2 +- .../exthandler/os2/nsOSHelperAppService.cpp | 2 +- .../exthandler/win/nsOSHelperAppService.cpp | 4 +- mozilla/xpcom/components/xcDll.cpp | 2 +- .../xpcom/string/obsolete/bufferRoutines.h | 87 +++++++++---------- mozilla/xpcom/string/obsolete/nsStr.cpp | 8 +- mozilla/xpcom/string/obsolete/nsStr.h | 4 +- mozilla/xpcom/string/obsolete/nsString.cpp | 8 +- mozilla/xpcom/string/obsolete/nsString.h | 4 +- mozilla/xpcom/string/obsolete/nsString2.cpp | 4 +- .../xpfe/bootstrap/nsNativeAppSupportOS2.cpp | 4 +- .../xpfe/bootstrap/nsNativeAppSupportWin.cpp | 4 +- .../xpinstall/src/nsUpdateNotification.cpp | 6 +- 32 files changed, 149 insertions(+), 151 deletions(-) diff --git a/mozilla/caps/src/nsScriptSecurityManager.cpp b/mozilla/caps/src/nsScriptSecurityManager.cpp index 0a4de858dc5..b97e8cd1261 100644 --- a/mozilla/caps/src/nsScriptSecurityManager.cpp +++ b/mozilla/caps/src/nsScriptSecurityManager.cpp @@ -603,7 +603,7 @@ struct nsDomainEntry int thisLen = mOrigin.Length(); if (len < thisLen) return PR_FALSE; - if (mOrigin.RFindChar(':', PR_FALSE, thisLen-1, 1) != -1) + if (mOrigin.RFindChar(':', thisLen-1, 1) != -1) //-- Policy applies to all URLs of this scheme, compare scheme only return mOrigin.EqualsWithConversion(anOrigin, PR_TRUE, thisLen); diff --git a/mozilla/content/xml/content/src/nsXMLElement.cpp b/mozilla/content/xml/content/src/nsXMLElement.cpp index a77a3accc8a..6a2db9119e9 100644 --- a/mozilla/content/xml/content/src/nsXMLElement.cpp +++ b/mozilla/content/xml/content/src/nsXMLElement.cpp @@ -195,8 +195,8 @@ nsXMLElement::GetXMLBaseURI(nsIURI **aURI) rv = content->GetAttr(kNameSpaceID_XML,kBaseAtom,value); PRInt32 value_len; if (rv == NS_CONTENT_ATTR_HAS_VALUE) { - PRInt32 colon = value.FindChar(':',PR_FALSE); - PRInt32 slash = value.FindChar('/',PR_FALSE); + PRInt32 colon = value.FindChar(':'); + PRInt32 slash = value.FindChar('/'); if (colon > 0 && !( slash >= 0 && slash < colon)) { // Yay, we have absolute path! // The complex looking if above is to make sure that we do not erroneously diff --git a/mozilla/extensions/p3p/src/nsP3PPolicyRefFile.cpp b/mozilla/extensions/p3p/src/nsP3PPolicyRefFile.cpp index 8eab83eb5f8..7b46151a87b 100644 --- a/mozilla/extensions/p3p/src/nsP3PPolicyRefFile.cpp +++ b/mozilla/extensions/p3p/src/nsP3PPolicyRefFile.cpp @@ -1179,7 +1179,7 @@ nsP3PPolicyRefFile::UnEscapeURILegalCharacters( nsString& aString ) { do { - iPercentOffset = aString.FindChar( '%', PR_FALSE, iPercentOffset + 1 ); + iPercentOffset = aString.FindChar( '%', iPercentOffset + 1 ); if (iPercentOffset > 0) { // Found an escaped character diff --git a/mozilla/extensions/xmlterm/base/mozXMLTermSession.cpp b/mozilla/extensions/xmlterm/base/mozXMLTermSession.cpp index 1870b9df222..be919b57af4 100644 --- a/mozilla/extensions/xmlterm/base/mozXMLTermSession.cpp +++ b/mozilla/extensions/xmlterm/base/mozXMLTermSession.cpp @@ -2290,7 +2290,7 @@ NS_IMETHODIMP mozXMLTermSession::AppendLineLS(const nsString& aString, // Locate pure filename, with possible type suffix PRInt32 nameBegin; if (wordEnd > wordBegin) { - nameBegin = aString.RFindChar(U_SLASH, PR_FALSE, wordEnd-1); + nameBegin = aString.RFindChar(U_SLASH, wordEnd-1); if (nameBegin >= wordBegin) { nameBegin++; } else { diff --git a/mozilla/gfx/src/mac/nsUnicodeMappingUtil.cpp b/mozilla/gfx/src/mac/nsUnicodeMappingUtil.cpp index 1c1abff26ba..11a6d8be6ef 100644 --- a/mozilla/gfx/src/mac/nsUnicodeMappingUtil.cpp +++ b/mozilla/gfx/src/mac/nsUnicodeMappingUtil.cpp @@ -300,10 +300,10 @@ nsUnicodeMappingUtil::PrefEnumCallback(const char* aName, void* aClosure) nsUnicodeMappingUtil* Self = (nsUnicodeMappingUtil*)aClosure; nsCAutoString curPrefName(aName); - PRInt32 p1 = curPrefName.RFindChar('.', PR_TRUE); + PRInt32 p1 = curPrefName.RFindChar('.'); if(-1==p1) return; - PRInt32 p2 = curPrefName.RFindChar('.', PR_TRUE, p1-1); + PRInt32 p2 = curPrefName.RFindChar('.', p1-1); if(-1==p1) return; diff --git a/mozilla/gfx/src/qt/nsFontMetricsQT.cpp b/mozilla/gfx/src/qt/nsFontMetricsQT.cpp index 5e0d1662635..ecc87ca38a1 100644 --- a/mozilla/gfx/src/qt/nsFontMetricsQT.cpp +++ b/mozilla/gfx/src/qt/nsFontMetricsQT.cpp @@ -591,7 +591,7 @@ static void ParseFontPref(nsCAutoString &aPrefValue,QString &aFontName, /* Try both foundry-name and name */ start = aPrefValue.FindChar('-'); - end = aPrefValue.FindChar('-',PR_FALSE,start + 1); + end = aPrefValue.FindChar('-',start + 1); aPrefValue.Left(fontFoundryName,end); aPrefValue.Right(fontCharSetName,len - end - 1); aPrefValue.Mid(fontName,start + 1,end - start - 1); diff --git a/mozilla/htmlparser/src/nsExpatTokenizer.cpp b/mozilla/htmlparser/src/nsExpatTokenizer.cpp index 1b08fb62583..f91b1f7eed0 100644 --- a/mozilla/htmlparser/src/nsExpatTokenizer.cpp +++ b/mozilla/htmlparser/src/nsExpatTokenizer.cpp @@ -776,7 +776,7 @@ void Tokenizer_HandleDefault(void *userData, const XML_Char *s, int len) { PRInt32 offset = -1; CToken* newLine = 0; - while ((offset = str.FindChar('\n', PR_FALSE, offset + 1)) != -1) { + while ((offset = str.FindChar('\n', offset + 1)) != -1) { newLine = state->tokenAllocator->CreateTokenOfType(eToken_newline, eHTMLTag_unknown); nsExpatTokenizer::AddToken(newLine, NS_OK, state->tokenDeque, state->tokenAllocator); } diff --git a/mozilla/mailnews/base/util/nsMsgUtils.cpp b/mozilla/mailnews/base/util/nsMsgUtils.cpp index 5fce488dc74..a2c6350d487 100644 --- a/mozilla/mailnews/base/util/nsMsgUtils.cpp +++ b/mozilla/mailnews/base/util/nsMsgUtils.cpp @@ -302,7 +302,7 @@ nsresult NS_MsgCreatePathStringFromFolderURI(const char *folderURI, nsCString& p PRInt32 startSlashPos = oldPath.FindChar('/'); PRInt32 endSlashPos = (startSlashPos >= 0) - ? oldPath.FindChar('/', PR_FALSE, startSlashPos + 1) - 1 : oldPath.Length() - 1; + ? oldPath.FindChar('/', startSlashPos + 1) - 1 : oldPath.Length() - 1; if (endSlashPos == -1) endSlashPos = oldPath.Length(); // trick to make sure we only add the path to the first n-1 folders @@ -326,7 +326,7 @@ nsresult NS_MsgCreatePathStringFromFolderURI(const char *folderURI, nsCString& p startSlashPos = endSlashPos + 1; endSlashPos = (startSlashPos >= 0) - ? oldPath.FindChar('/', PR_FALSE, startSlashPos + 1) - 1: oldPath.Length() - 1; + ? oldPath.FindChar('/', startSlashPos + 1) - 1: oldPath.Length() - 1; if (endSlashPos == -1) endSlashPos = oldPath.Length(); diff --git a/mozilla/mailnews/db/msgdb/src/nsMsgOfflineImapOperation.cpp b/mozilla/mailnews/db/msgdb/src/nsMsgOfflineImapOperation.cpp index 30a9f3e23f4..3ec59d1a6f1 100644 --- a/mozilla/mailnews/db/msgdb/src/nsMsgOfflineImapOperation.cpp +++ b/mozilla/mailnews/db/msgdb/src/nsMsgOfflineImapOperation.cpp @@ -217,7 +217,7 @@ nsresult nsMsgOfflineImapOperation::GetCopiesFromDB() while (nextCopyDestPos != -1) { nsCString curDest; - nextCopyDestPos = copyDestsCString.FindChar(FOLDER_SEP_CHAR, PR_FALSE, curCopyDestStart); + nextCopyDestPos = copyDestsCString.FindChar(FOLDER_SEP_CHAR, curCopyDestStart); if (nextCopyDestPos > 0) copyDestsCString.Mid(curDest, curCopyDestStart, nextCopyDestPos - curCopyDestStart); else diff --git a/mozilla/mailnews/imap/src/nsImapProtocol.cpp b/mozilla/mailnews/imap/src/nsImapProtocol.cpp index ff8ee9a5601..8a63701bfd8 100644 --- a/mozilla/mailnews/imap/src/nsImapProtocol.cpp +++ b/mozilla/mailnews/imap/src/nsImapProtocol.cpp @@ -4388,7 +4388,7 @@ void nsImapProtocol::Language() { nsCAutoString extractedLanguage; extractedLanguage.AssignWithConversion(mAcceptLanguages.get()); - PRInt32 pos = extractedLanguage.FindChar(',', PR_TRUE); + PRInt32 pos = extractedLanguage.FindChar(','); if (pos > 0) // we have a comma separated list of languages... extractedLanguage.Truncate(pos); // truncate everything after the first comma (including the comma) diff --git a/mozilla/mailnews/import/eudora/src/nsEudoraAddress.cpp b/mozilla/mailnews/import/eudora/src/nsEudoraAddress.cpp index 544988a8f95..89cab91de4f 100644 --- a/mozilla/mailnews/import/eudora/src/nsEudoraAddress.cpp +++ b/mozilla/mailnews/import/eudora/src/nsEudoraAddress.cpp @@ -654,7 +654,7 @@ void nsEudoraAddress::ExtractNoteField( nsCString& note, nsCString& value, const PRInt32 idx = note.Find( field); if (idx != -1) { idx += field.Length(); - PRInt32 endIdx = note.FindChar( '>', PR_FALSE, idx); + PRInt32 endIdx = note.FindChar( '>', idx); if (endIdx == -1) endIdx = note.Length() - 1; note.Mid( value, idx, endIdx - idx); diff --git a/mozilla/mailnews/import/eudora/src/nsEudoraWin32.cpp b/mozilla/mailnews/import/eudora/src/nsEudoraWin32.cpp index f6caf90a02e..8910eff507e 100644 --- a/mozilla/mailnews/import/eudora/src/nsEudoraWin32.cpp +++ b/mozilla/mailnews/import/eudora/src/nsEudoraWin32.cpp @@ -104,7 +104,7 @@ PRBool nsEudoraWin32::FindEudoraLocation( nsIFileSpec *pFolder, PRBool findIni) // Command line is Eudora mailfolder eudora.ini int idx = -1; if (str.CharAt( 0) == '"') { - idx = str.FindChar( '"', PR_FALSE, 1); + idx = str.FindChar( '"', 1); if (idx != -1) idx++; } @@ -117,10 +117,10 @@ PRBool nsEudoraWin32::FindEudoraLocation( nsIFileSpec *pFolder, PRBool findIni) while (str.CharAt( idx) == ' ') idx++; int eIdx = -1; if (str.CharAt( idx) == '"') { - eIdx = str.FindChar( '"', PR_FALSE, idx); + eIdx = str.FindChar( '"', idx); } else { - eIdx = str.FindChar( ' ', PR_FALSE, idx); + eIdx = str.FindChar( ' ', idx); } idx = eIdx; } @@ -130,10 +130,10 @@ PRBool nsEudoraWin32::FindEudoraLocation( nsIFileSpec *pFolder, PRBool findIni) while (str.CharAt( idx) == ' ') idx++; int endIdx = -1; if (str.CharAt( idx) == '"') { - endIdx = str.FindChar( '"', PR_FALSE, idx); + endIdx = str.FindChar( '"', idx); } else { - endIdx = str.FindChar( ' ', PR_FALSE, idx); + endIdx = str.FindChar( ' ', idx); } if (endIdx != -1) { nsCString path; @@ -1419,11 +1419,11 @@ void nsEudoraWin32::ConvertPath( nsCString& str) PRInt32 start = 0; nsCString search; - idx = str.FindChar( '\\', PR_FALSE, idx); + idx = str.FindChar( '\\', idx); if ((idx == 2) && (str.CharAt( 1) == ':')) { str.Left( path, 3); idx++; - idx = str.FindChar( '\\', PR_FALSE, idx); + idx = str.FindChar( '\\', idx); start = 3; if ((idx == -1) && (str.Length() > 3)) { str.Right( temp, str.Length() - start); @@ -1442,7 +1442,7 @@ void nsEudoraWin32::ConvertPath( nsCString& str) path.Append( findFileData.cFileName); idx++; start = idx; - idx = str.FindChar( '\\', PR_FALSE, idx); + idx = str.FindChar( '\\', idx); FindClose( h); if (idx != -1) path.Append( '\\'); diff --git a/mozilla/parser/htmlparser/src/nsExpatTokenizer.cpp b/mozilla/parser/htmlparser/src/nsExpatTokenizer.cpp index 1b08fb62583..f91b1f7eed0 100644 --- a/mozilla/parser/htmlparser/src/nsExpatTokenizer.cpp +++ b/mozilla/parser/htmlparser/src/nsExpatTokenizer.cpp @@ -776,7 +776,7 @@ void Tokenizer_HandleDefault(void *userData, const XML_Char *s, int len) { PRInt32 offset = -1; CToken* newLine = 0; - while ((offset = str.FindChar('\n', PR_FALSE, offset + 1)) != -1) { + while ((offset = str.FindChar('\n', offset + 1)) != -1) { newLine = state->tokenAllocator->CreateTokenOfType(eToken_newline, eHTMLTag_unknown); nsExpatTokenizer::AddToken(newLine, NS_OK, state->tokenDeque, state->tokenAllocator); } diff --git a/mozilla/string/obsolete/bufferRoutines.h b/mozilla/string/obsolete/bufferRoutines.h index 65c812997c1..1364f29de08 100644 --- a/mozilla/string/obsolete/bufferRoutines.h +++ b/mozilla/string/obsolete/bufferRoutines.h @@ -358,7 +358,7 @@ void CopyChars1To2(char* aDest,PRInt32 anDestOffset,const char* aSource,PRUint32 PRBool illegal= PR_FALSE; #endif //now loop over characters, shifting them left... - while(first