diff --git a/mozilla/content/base/src/nsHTMLContentSerializer.cpp b/mozilla/content/base/src/nsHTMLContentSerializer.cpp
index f38ce8915b4..35aed5a05e1 100644
--- a/mozilla/content/base/src/nsHTMLContentSerializer.cpp
+++ b/mozilla/content/base/src/nsHTMLContentSerializer.cpp
@@ -971,7 +971,7 @@ nsHTMLContentSerializer::HasLongLines(const nsString& text, PRInt32& aLastNewlin
aLastNewlineOffset = kNotFound;
for (start = 0; start < theLen; )
{
- PRInt32 eol = text.FindChar('\n', PR_FALSE, start);
+ PRInt32 eol = text.FindChar('\n', start);
if (eol < 0) {
eol = text.Length();
}
diff --git a/mozilla/content/base/src/nsParserUtils.cpp b/mozilla/content/base/src/nsParserUtils.cpp
index 087aeaa8e84..f8e521508bd 100644
--- a/mozilla/content/base/src/nsParserUtils.cpp
+++ b/mozilla/content/base/src/nsParserUtils.cpp
@@ -93,7 +93,7 @@ nsParserUtils::GetQuotedAttributeValue(nsString& aSource,
if (posnOfValueDelimiter != -1) {
startOfValue = posnOfValueDelimiter + 1;
// Find the ending quote or apostrophe
- posnOfValueDelimiter = aSource.FindChar(delimiter, PR_FALSE, startOfValue);
+ posnOfValueDelimiter = aSource.FindChar(delimiter, startOfValue);
// If found
if (posnOfValueDelimiter != -1) {
// Set the value of the attibute and exit the loop
diff --git a/mozilla/content/html/content/src/nsFormSubmitter.cpp b/mozilla/content/html/content/src/nsFormSubmitter.cpp
index 0969db23d36..82471dd23ff 100644
--- a/mozilla/content/html/content/src/nsFormSubmitter.cpp
+++ b/mozilla/content/html/content/src/nsFormSubmitter.cpp
@@ -351,7 +351,7 @@ nsFormSubmitter::OnSubmit(nsIForm* form,
if (!theScheme.EqualsIgnoreCase("javascript")) {
// Bug 42616: Trim off named anchor and save it to add later
- PRInt32 namedAnchorPos = href.FindChar('#', PR_FALSE, 0);
+ PRInt32 namedAnchorPos = href.FindChar('#');
nsAutoString namedAnchor;
if (kNotFound != namedAnchorPos) {
href.Right(namedAnchor, (href.Length() - namedAnchorPos));
@@ -1162,7 +1162,7 @@ nsFormSubmitter::GetSubmitCharset(nsIForm* form,
nsCOMPtr calias(do_GetService(kCharsetAliasCID, &rv));
if (NS_SUCCEEDED(rv) && calias) {
do {
- spPos = acceptCharsetValue.FindChar(PRUnichar(' '),PR_TRUE, offset);
+ spPos = acceptCharsetValue.FindChar(PRUnichar(' '), offset);
PRInt32 cnt = ((-1==spPos)?(l-offset):(spPos-offset));
if (cnt > 0) {
nsAutoString charset;
diff --git a/mozilla/content/xml/document/src/nsXMLContentSink.cpp b/mozilla/content/xml/document/src/nsXMLContentSink.cpp
index 9183908bafc..2439e490332 100644
--- a/mozilla/content/xml/document/src/nsXMLContentSink.cpp
+++ b/mozilla/content/xml/document/src/nsXMLContentSink.cpp
@@ -277,7 +277,7 @@ GetDocTypeToken(nsString& aStr,
// before Cut() and adjust the cut amount.
if (aQuotedString) {
- PRInt32 endQuote = aStr.FindChar(aStr[0],PR_FALSE,1);
+ PRInt32 endQuote = aStr.FindChar(aStr[0],1);
aStr.Mid(aToken,1,endQuote-1);
aStr.Cut(0,endQuote+1);
} else {
@@ -680,7 +680,7 @@ nsXMLContentSink::LoadXSLStyleSheet(nsIURI* aUrl)
// Hook up the content sink to the parser's output and ask the parser
// to start parsing the URL specified by aURL.
parser->SetContentSink(sink);
- nsAutoString utf8(NS_LITERAL_STRING("UTF-8"));
+ NS_NAMED_LITERAL_STRING(utf8, "UTF-8");
styleDoc->SetDocumentCharacterSet(utf8);
parser->SetDocumentCharset(utf8, kCharsetFromDocTypeDefault);
parser->Parse(aUrl);
diff --git a/mozilla/editor/libeditor/html/nsHTMLEditRules.cpp b/mozilla/editor/libeditor/html/nsHTMLEditRules.cpp
index 5d517374a16..8b5cb5b0a48 100644
--- a/mozilla/editor/libeditor/html/nsHTMLEditRules.cpp
+++ b/mozilla/editor/libeditor/html/nsHTMLEditRules.cpp
@@ -1206,7 +1206,7 @@ nsHTMLEditRules::WillInsertText(PRInt32 aAction,
{
PRInt32 oldPos = pos;
PRInt32 subStrLen;
- pos = tString.FindChar(newlineChar, PR_FALSE, oldPos);
+ pos = tString.FindChar(newlineChar, oldPos);
if (pos != -1)
{
diff --git a/mozilla/editor/libeditor/text/nsTextEditRules.cpp b/mozilla/editor/libeditor/text/nsTextEditRules.cpp
index 76c06734598..5cfadcc7b7b 100644
--- a/mozilla/editor/libeditor/text/nsTextEditRules.cpp
+++ b/mozilla/editor/libeditor/text/nsTextEditRules.cpp
@@ -630,7 +630,7 @@ nsTextEditRules::WillInsertText(PRInt32 aAction,
{
PRInt32 oldPos = pos;
PRInt32 subStrLen;
- pos = tString.FindChar(newlineChar, PR_FALSE, oldPos);
+ pos = tString.FindChar(newlineChar, oldPos);
if (pos != -1)
{
diff --git a/mozilla/extensions/cookie/nsCookies.cpp b/mozilla/extensions/cookie/nsCookies.cpp
index 6efa1dbce69..9c31a89ea48 100644
--- a/mozilla/extensions/cookie/nsCookies.cpp
+++ b/mozilla/extensions/cookie/nsCookies.cpp
@@ -1551,12 +1551,12 @@ COOKIE_Read() {
}
int hostIndex, isDomainIndex, pathIndex, secureIndex, expiresIndex, nameIndex, cookieIndex;
hostIndex = 0;
- if ((isDomainIndex=buffer.FindChar('\t', PR_FALSE,hostIndex)+1) == 0 ||
- (pathIndex=buffer.FindChar('\t', PR_FALSE,isDomainIndex)+1) == 0 ||
- (secureIndex=buffer.FindChar('\t', PR_FALSE,pathIndex)+1) == 0 ||
- (expiresIndex=buffer.FindChar('\t', PR_FALSE,secureIndex)+1) == 0 ||
- (nameIndex=buffer.FindChar('\t', PR_FALSE,expiresIndex)+1) == 0 ||
- (cookieIndex=buffer.FindChar('\t', PR_FALSE,nameIndex)+1) == 0 ) {
+ if ((isDomainIndex=buffer.FindChar('\t', hostIndex)+1) == 0 ||
+ (pathIndex=buffer.FindChar('\t', isDomainIndex)+1) == 0 ||
+ (secureIndex=buffer.FindChar('\t', pathIndex)+1) == 0 ||
+ (expiresIndex=buffer.FindChar('\t', secureIndex)+1) == 0 ||
+ (nameIndex=buffer.FindChar('\t', expiresIndex)+1) == 0 ||
+ (cookieIndex=buffer.FindChar('\t', nameIndex)+1) == 0 ) {
continue;
}
nsAutoString host, isDomain, path, isSecure, expires, name, cookie;
diff --git a/mozilla/extensions/cookie/nsPermissions.cpp b/mozilla/extensions/cookie/nsPermissions.cpp
index a9f06967c28..c28b6eb49b5 100644
--- a/mozilla/extensions/cookie/nsPermissions.cpp
+++ b/mozilla/extensions/cookie/nsPermissions.cpp
@@ -480,7 +480,7 @@ PERMISSION_Read() {
PRUint32 nextPermissionIndex = 0;
hostIndex = 0;
- if ((permissionIndex=buffer.FindChar('\t', PR_FALSE, hostIndex)+1) == 0) {
+ if ((permissionIndex=buffer.FindChar('\t', hostIndex)+1) == 0) {
continue;
}
@@ -497,7 +497,7 @@ PERMISSION_Read() {
if (nextPermissionIndex == buffer.Length()+1) {
break;
}
- if ((nextPermissionIndex=buffer.FindChar('\t', PR_FALSE, permissionIndex)+1) == 0) {
+ if ((nextPermissionIndex=buffer.FindChar('\t', permissionIndex)+1) == 0) {
nextPermissionIndex = buffer.Length()+1;
}
buffer.Mid(permissionString, permissionIndex, nextPermissionIndex-permissionIndex-1);
diff --git a/mozilla/extensions/transformiix/source/base/MozillaString.cpp b/mozilla/extensions/transformiix/source/base/MozillaString.cpp
index 3f246e55b73..04a91de4efb 100644
--- a/mozilla/extensions/transformiix/source/base/MozillaString.cpp
+++ b/mozilla/extensions/transformiix/source/base/MozillaString.cpp
@@ -498,7 +498,7 @@ PRInt32 String::indexOf(UNICODE_CHAR data, PRInt32 offset) const
{
PRInt32 searchIndex = offset < 0 ? searchIndex = 0 : searchIndex = offset;
- return ptrNSString->FindChar(data, PR_FALSE, searchIndex);
+ return ptrNSString->FindChar(data, searchIndex);
} //-- indexOf
//
@@ -575,7 +575,7 @@ PRInt32 String::lastIndexOf(UNICODE_CHAR data) const
**/
PRInt32 String::lastIndexOf(UNICODE_CHAR data, PRInt32 offset) const
{
- return ptrNSString->RFindChar(data, PR_FALSE, offset);
+ return ptrNSString->RFindChar(data, offset);
} //-- lastIndexOf
/**
diff --git a/mozilla/htmlparser/src/nsParser.cpp b/mozilla/htmlparser/src/nsParser.cpp
index 9b045b57cf0..dd618ddfd01 100644
--- a/mozilla/htmlparser/src/nsParser.cpp
+++ b/mozilla/htmlparser/src/nsParser.cpp
@@ -756,7 +756,7 @@ static PRBool ParseDocTypeDecl(const nsString &aBuffer,
// The PI-skipping is a bit of a hack.
PRInt32 theIndex = 0;
do {
- theIndex = aBuffer.FindChar('<', PR_FALSE, theIndex, -1);
+ theIndex = aBuffer.FindChar('<', theIndex);
if (theIndex == kNotFound) break;
PRUnichar nextChar = aBuffer.CharAt(theIndex+1);
if (nextChar == PRUnichar('!')) {
@@ -769,9 +769,9 @@ static PRBool ParseDocTypeDecl(const nsString &aBuffer,
}
theIndex = ParsePS(aBuffer,tmpIndex);
// -1, not 0, in case it's another markup declaration
- theIndex = aBuffer.FindChar('>', PR_FALSE, theIndex, -1);
+ theIndex = aBuffer.FindChar('>', theIndex);
} else if (nextChar == PRUnichar('?')) {
- theIndex = aBuffer.FindChar('>', PR_FALSE, theIndex, -1);
+ theIndex = aBuffer.FindChar('>', theIndex);
} else {
break;
}
@@ -806,7 +806,7 @@ static PRBool ParseDocTypeDecl(const nsString &aBuffer,
PRInt32 PublicIDStart = theIndex + 1;
PRInt32 PublicIDEnd =
- aBuffer.FindChar(lit, PR_FALSE, PublicIDStart, -1);
+ aBuffer.FindChar(lit, PublicIDStart);
if (kNotFound == PublicIDEnd)
return PR_FALSE;
theIndex = ParsePS(aBuffer, PublicIDEnd + 1);
@@ -823,7 +823,7 @@ static PRBool ParseDocTypeDecl(const nsString &aBuffer,
*aResultFlags |= PARSE_DTD_HAVE_SYSTEM_ID;
PRInt32 SystemIDStart = theIndex + 1;
PRInt32 SystemIDEnd =
- aBuffer.FindChar(next, PR_FALSE, SystemIDStart, -1);
+ aBuffer.FindChar(next, SystemIDStart);
if (kNotFound == SystemIDEnd)
return PR_FALSE;
} else if (next == PRUnichar('[')) {
@@ -1587,7 +1587,7 @@ nsresult nsParser::Parse(nsIURI* aURL,nsIRequestObserver* aListener,PRBool aVeri
if (rv != NS_OK) {
return rv;
}
- nsAutoString theName; theName.AssignWithConversion(spec);
+ NS_ConvertUTF8toUCS2 theName(spec);
nsCRT::free(spec);
nsScanner* theScanner=new nsScanner(theName,PR_FALSE,mCharset,mCharsetSource);
diff --git a/mozilla/intl/strres/src/nsStringBundle.cpp b/mozilla/intl/strres/src/nsStringBundle.cpp
index 1e5284b52e5..a9404832940 100644
--- a/mozilla/intl/strres/src/nsStringBundle.cpp
+++ b/mozilla/intl/strres/src/nsStringBundle.cpp
@@ -961,7 +961,7 @@ nsStringBundleService::FormatStatusMessage(nsresult aStatus,
else if (argCount > 1) {
PRInt32 offset = 0;
for (i = 0; i < argCount; i++) {
- PRInt32 pos = args.FindChar('\n', PR_FALSE, offset);
+ PRInt32 pos = args.FindChar('\n', offset);
if (pos == -1)
pos = args.Length();
nsAutoString arg;
diff --git a/mozilla/layout/forms/nsIsIndexFrame.cpp b/mozilla/layout/forms/nsIsIndexFrame.cpp
index 05778806dbb..08d617d5d8d 100644
--- a/mozilla/layout/forms/nsIsIndexFrame.cpp
+++ b/mozilla/layout/forms/nsIsIndexFrame.cpp
@@ -469,7 +469,7 @@ nsIsIndexFrame::OnSubmit(nsIPresContext* aPresContext)
}
// Append the URI encoded variable/value pairs for GET's
if (!isJSURL) { // Not for JS URIs, see bug 26917
- if (href.FindChar('?', PR_FALSE, 0) == kNotFound) { // Add a ? if needed
+ if (href.FindChar('?') == kNotFound) { // Add a ? if needed
href.Append(PRUnichar('?'));
} else { // Adding to existing query string
if (href.Last() != '&' && href.Last() != '?') { // Add a & if needed
diff --git a/mozilla/layout/generic/nsFrameSetFrame.cpp b/mozilla/layout/generic/nsFrameSetFrame.cpp
index c65d265414a..43b53fab225 100644
--- a/mozilla/layout/generic/nsFrameSetFrame.cpp
+++ b/mozilla/layout/generic/nsFrameSetFrame.cpp
@@ -900,7 +900,7 @@ nsHTMLFramesetFrame::ParseRowColSpec(nsIPresContext* aPresContext,
PRInt32 count = 1;
while (commaX >= 0) {
count++;
- commaX = aSpec.FindChar(COMMA, PR_FALSE,commaX + 1);
+ commaX = aSpec.FindChar(COMMA, commaX + 1);
}
if (count > aMaxNumValues) {
@@ -915,7 +915,7 @@ nsHTMLFramesetFrame::ParseRowColSpec(nsIPresContext* aPresContext,
for (PRInt32 i = 0; i < count; i++) {
// Find our comma
- commaX = aSpec.FindChar(COMMA, PR_FALSE,start);
+ commaX = aSpec.FindChar(COMMA, start);
PRInt32 end = (commaX < 0) ? specLen : commaX;
// Note: If end == start then it means that the token has no
diff --git a/mozilla/layout/html/document/src/nsFrameSetFrame.cpp b/mozilla/layout/html/document/src/nsFrameSetFrame.cpp
index c65d265414a..43b53fab225 100644
--- a/mozilla/layout/html/document/src/nsFrameSetFrame.cpp
+++ b/mozilla/layout/html/document/src/nsFrameSetFrame.cpp
@@ -900,7 +900,7 @@ nsHTMLFramesetFrame::ParseRowColSpec(nsIPresContext* aPresContext,
PRInt32 count = 1;
while (commaX >= 0) {
count++;
- commaX = aSpec.FindChar(COMMA, PR_FALSE,commaX + 1);
+ commaX = aSpec.FindChar(COMMA, commaX + 1);
}
if (count > aMaxNumValues) {
@@ -915,7 +915,7 @@ nsHTMLFramesetFrame::ParseRowColSpec(nsIPresContext* aPresContext,
for (PRInt32 i = 0; i < count; i++) {
// Find our comma
- commaX = aSpec.FindChar(COMMA, PR_FALSE,start);
+ commaX = aSpec.FindChar(COMMA, start);
PRInt32 end = (commaX < 0) ? specLen : commaX;
// Note: If end == start then it means that the token has no
diff --git a/mozilla/layout/html/forms/src/nsIsIndexFrame.cpp b/mozilla/layout/html/forms/src/nsIsIndexFrame.cpp
index 05778806dbb..08d617d5d8d 100644
--- a/mozilla/layout/html/forms/src/nsIsIndexFrame.cpp
+++ b/mozilla/layout/html/forms/src/nsIsIndexFrame.cpp
@@ -469,7 +469,7 @@ nsIsIndexFrame::OnSubmit(nsIPresContext* aPresContext)
}
// Append the URI encoded variable/value pairs for GET's
if (!isJSURL) { // Not for JS URIs, see bug 26917
- if (href.FindChar('?', PR_FALSE, 0) == kNotFound) { // Add a ? if needed
+ if (href.FindChar('?') == kNotFound) { // Add a ? if needed
href.Append(PRUnichar('?'));
} else { // Adding to existing query string
if (href.Last() != '&' && href.Last() != '?') { // Add a & if needed
diff --git a/mozilla/mailnews/news/src/nsNewsFolder.cpp b/mozilla/mailnews/news/src/nsNewsFolder.cpp
index d3a05061031..fc70c40cb35 100644
--- a/mozilla/mailnews/news/src/nsNewsFolder.cpp
+++ b/mozilla/mailnews/news/src/nsNewsFolder.cpp
@@ -698,7 +698,7 @@ nsresult nsMsgNewsFolder::AbbreviatePrettyName(PRUnichar ** prettyName, PRInt32
PRInt32 pos = 0;
while(1)
{
- pos = name.FindChar('.', PR_FALSE, pos);
+ pos = name.FindChar('.', pos);
if(pos == -1)
{
totalwords++;
diff --git a/mozilla/netwerk/streamconv/converters/mozTXTToHTMLConv.cpp b/mozilla/netwerk/streamconv/converters/mozTXTToHTMLConv.cpp
index 1428eff89a2..d46abaf4d53 100644
--- a/mozilla/netwerk/streamconv/converters/mozTXTToHTMLConv.cpp
+++ b/mozilla/netwerk/streamconv/converters/mozTXTToHTMLConv.cpp
@@ -1157,7 +1157,7 @@ mozTXTToHTMLConv::ScanHTML(nsString& aInString, PRUint32 whattodo, nsString &aOu
}
else // just skip tag (attributes etc.)
{
- i = aInString.FindChar('>', PR_FALSE, i);
+ i = aInString.FindChar('>', i);
if (i == kNotFound)
i = lengthOfInString;
else
@@ -1168,7 +1168,7 @@ mozTXTToHTMLConv::ScanHTML(nsString& aInString, PRUint32 whattodo, nsString &aOu
else
{
PRUint32 start = PRUint32(i);
- i = aInString.FindChar('<', PR_FALSE, i);
+ i = aInString.FindChar('<', i);
if (i == kNotFound)
i = lengthOfInString;
diff --git a/mozilla/parser/htmlparser/src/nsParser.cpp b/mozilla/parser/htmlparser/src/nsParser.cpp
index 9b045b57cf0..dd618ddfd01 100644
--- a/mozilla/parser/htmlparser/src/nsParser.cpp
+++ b/mozilla/parser/htmlparser/src/nsParser.cpp
@@ -756,7 +756,7 @@ static PRBool ParseDocTypeDecl(const nsString &aBuffer,
// The PI-skipping is a bit of a hack.
PRInt32 theIndex = 0;
do {
- theIndex = aBuffer.FindChar('<', PR_FALSE, theIndex, -1);
+ theIndex = aBuffer.FindChar('<', theIndex);
if (theIndex == kNotFound) break;
PRUnichar nextChar = aBuffer.CharAt(theIndex+1);
if (nextChar == PRUnichar('!')) {
@@ -769,9 +769,9 @@ static PRBool ParseDocTypeDecl(const nsString &aBuffer,
}
theIndex = ParsePS(aBuffer,tmpIndex);
// -1, not 0, in case it's another markup declaration
- theIndex = aBuffer.FindChar('>', PR_FALSE, theIndex, -1);
+ theIndex = aBuffer.FindChar('>', theIndex);
} else if (nextChar == PRUnichar('?')) {
- theIndex = aBuffer.FindChar('>', PR_FALSE, theIndex, -1);
+ theIndex = aBuffer.FindChar('>', theIndex);
} else {
break;
}
@@ -806,7 +806,7 @@ static PRBool ParseDocTypeDecl(const nsString &aBuffer,
PRInt32 PublicIDStart = theIndex + 1;
PRInt32 PublicIDEnd =
- aBuffer.FindChar(lit, PR_FALSE, PublicIDStart, -1);
+ aBuffer.FindChar(lit, PublicIDStart);
if (kNotFound == PublicIDEnd)
return PR_FALSE;
theIndex = ParsePS(aBuffer, PublicIDEnd + 1);
@@ -823,7 +823,7 @@ static PRBool ParseDocTypeDecl(const nsString &aBuffer,
*aResultFlags |= PARSE_DTD_HAVE_SYSTEM_ID;
PRInt32 SystemIDStart = theIndex + 1;
PRInt32 SystemIDEnd =
- aBuffer.FindChar(next, PR_FALSE, SystemIDStart, -1);
+ aBuffer.FindChar(next, SystemIDStart);
if (kNotFound == SystemIDEnd)
return PR_FALSE;
} else if (next == PRUnichar('[')) {
@@ -1587,7 +1587,7 @@ nsresult nsParser::Parse(nsIURI* aURL,nsIRequestObserver* aListener,PRBool aVeri
if (rv != NS_OK) {
return rv;
}
- nsAutoString theName; theName.AssignWithConversion(spec);
+ NS_ConvertUTF8toUCS2 theName(spec);
nsCRT::free(spec);
nsScanner* theScanner=new nsScanner(theName,PR_FALSE,mCharset,mCharsetSource);
diff --git a/mozilla/profile/pref-migrator/src/nsPrefMigration.cpp b/mozilla/profile/pref-migrator/src/nsPrefMigration.cpp
index 30cc15914a2..8826c183ee7 100644
--- a/mozilla/profile/pref-migrator/src/nsPrefMigration.cpp
+++ b/mozilla/profile/pref-migrator/src/nsPrefMigration.cpp
@@ -1670,12 +1670,12 @@ Fix4xCookies(nsIFileSpec * profilePath) {
/* locate expire field, skip line if it does not contain all its fields */
int hostIndex, isDomainIndex, pathIndex, xxxIndex, expiresIndex, nameIndex, cookieIndex;
hostIndex = 0;
- if ((isDomainIndex=inBuffer.FindChar('\t', PR_FALSE,hostIndex)+1) == 0 ||
- (pathIndex=inBuffer.FindChar('\t', PR_FALSE,isDomainIndex)+1) == 0 ||
- (xxxIndex=inBuffer.FindChar('\t', PR_FALSE,pathIndex)+1) == 0 ||
- (expiresIndex=inBuffer.FindChar('\t', PR_FALSE,xxxIndex)+1) == 0 ||
- (nameIndex=inBuffer.FindChar('\t', PR_FALSE,expiresIndex)+1) == 0 ||
- (cookieIndex=inBuffer.FindChar('\t', PR_FALSE,nameIndex)+1) == 0 ) {
+ if ((isDomainIndex=inBuffer.FindChar('\t', hostIndex)+1) == 0 ||
+ (pathIndex=inBuffer.FindChar('\t', isDomainIndex)+1) == 0 ||
+ (xxxIndex=inBuffer.FindChar('\t', pathIndex)+1) == 0 ||
+ (expiresIndex=inBuffer.FindChar('\t', xxxIndex)+1) == 0 ||
+ (nameIndex=inBuffer.FindChar('\t', expiresIndex)+1) == 0 ||
+ (cookieIndex=inBuffer.FindChar('\t', nameIndex)+1) == 0 ) {
continue;
}
diff --git a/mozilla/rdf/base/src/nsRDFParserUtils.cpp b/mozilla/rdf/base/src/nsRDFParserUtils.cpp
index 68d5a02587f..c6291a100ee 100644
--- a/mozilla/rdf/base/src/nsRDFParserUtils.cpp
+++ b/mozilla/rdf/base/src/nsRDFParserUtils.cpp
@@ -231,14 +231,14 @@ static const char kApostrophe = '\'';
offset = aSource.Find(aAttribute);
if (-1 != offset) {
- offset = aSource.FindChar('=', PR_FALSE,offset);
+ offset = aSource.FindChar('=', offset);
PRUnichar next = aSource.CharAt(++offset);
if (kQuote == next) {
- endOffset = aSource.FindChar(kQuote, PR_FALSE,++offset);
+ endOffset = aSource.FindChar(kQuote, ++offset);
}
else if (kApostrophe == next) {
- endOffset = aSource.FindChar(kApostrophe, PR_FALSE,++offset);
+ endOffset = aSource.FindChar(kApostrophe, ++offset);
}
if (-1 != endOffset) {
diff --git a/mozilla/rdf/base/src/nsRDFXMLSerializer.cpp b/mozilla/rdf/base/src/nsRDFXMLSerializer.cpp
index 813824d1c6b..d5866a3072a 100644
--- a/mozilla/rdf/base/src/nsRDFXMLSerializer.cpp
+++ b/mozilla/rdf/base/src/nsRDFXMLSerializer.cpp
@@ -262,21 +262,21 @@ rdf_EscapeAmpersandsAndAngleBrackets(nsString& s)
// Do ampersands first, so we don't double-escape.
i = 0;
- while ((i = s.FindChar('&', PR_FALSE, i)) != -1) {
+ while ((i = s.FindChar('&', i)) != -1) {
s.SetCharAt('&', i);
s.Insert(NS_LITERAL_STRING("amp;"), i + 1);
i += 4;
}
i = 0;
- while ((i = s.FindChar('<', PR_FALSE, i)) != -1) {
+ while ((i = s.FindChar('<', i)) != -1) {
s.SetCharAt('&', i);
s.Insert(NS_LITERAL_STRING("lt;"), i + 1);
i += 3;
}
i = 0;
- while ((i = s.FindChar('>', PR_FALSE, i)) != -1) {
+ while ((i = s.FindChar('>', i)) != -1) {
s.SetCharAt('&', i);
s.Insert(NS_LITERAL_STRING("gt;"), i + 1);
i += 3;
@@ -288,7 +288,7 @@ static void
rdf_EscapeQuotes(nsString& s)
{
PRInt32 i = 0;
- while ((i = s.FindChar('"', PR_FALSE, i)) != -1) {
+ while ((i = s.FindChar('"', i)) != -1) {
s.SetCharAt('&', i);
s.Insert(NS_LITERAL_STRING("quot;"), i + 1);
i += 5;
diff --git a/mozilla/string/obsolete/bufferRoutines.h b/mozilla/string/obsolete/bufferRoutines.h
index 41e6cd315eb..65c812997c1 100644
--- a/mozilla/string/obsolete/bufferRoutines.h
+++ b/mozilla/string/obsolete/bufferRoutines.h
@@ -528,8 +528,7 @@ inline PRInt32 FindChar1(const char* aDest,PRUint32 aDestLength,PRInt32 anOffset
* @param aCount tells us how many characters to iterate through (which may be different than aLength); -1 means use full length.
* @return index of pos if found, else -1 (kNotFound)
*/
-inline PRInt32 FindChar2(const PRUnichar* aDest,PRUint32 aDestLength,PRInt32 anOffset,const PRUnichar aChar,PRBool aIgnoreCase,PRInt32 aCount) {
-#ifndef XPCOM_STANDALONE
+inline PRInt32 FindChar2(const PRUnichar* aDest,PRUint32 aDestLength,PRInt32 anOffset,const PRUnichar aChar,PRInt32 aCount) {
if(anOffset<0)
anOffset=0;
@@ -547,33 +546,14 @@ inline PRInt32 FindChar2(const PRUnichar* aDest,PRUint32 aDestLength,PRInt32 anO
const PRUnichar* max = root+aDestLength;
const PRUnichar* end = (lastToUpper(aChar, &theChar);
- while(leftToUpper(*left, &leftChar);
- if (leftChar == theChar)
- return left-root;
- ++left;
- }
- }
- else {
- while(leftToUpper(aChar, &theChar);
- while(leftmostToUpper(*rightmost, &rightChar);
- if(rightChar==theChar)
- return rightmost-root;
- --rightmost;
- }
- }
- else {
-
- while(leftmost<=rightmost){
- if((*rightmost)==aChar)
- return rightmost-root;
- --rightmost;
- }
+ while(leftmost<=rightmost){
+ if((*rightmost)==aChar)
+ return rightmost-root;
+ --rightmost;
}
}
}
-#else
- NS_ERROR("call not supported in XPCOM_STANDALONE");
-#endif
return kNotFound;
}
diff --git a/mozilla/string/obsolete/nsStr.cpp b/mozilla/string/obsolete/nsStr.cpp
index 55961a934bc..b51cf007f31 100644
--- a/mozilla/string/obsolete/nsStr.cpp
+++ b/mozilla/string/obsolete/nsStr.cpp
@@ -781,9 +781,9 @@ PRInt32 nsStr::FindChar1(const nsStr& aDest,PRUnichar aChar, PRBool aIgnoreCase,
return ::FindChar1(aDest.mStr,aDest.mLength,anOffset,aChar,aIgnoreCase,aCount);
}
-PRInt32 nsStr::FindChar2(const nsStr& aDest,PRUnichar aChar, PRBool aIgnoreCase,PRInt32 anOffset,PRInt32 aCount) {
+PRInt32 nsStr::FindChar2(const nsStr& aDest,PRUnichar aChar, PRInt32 anOffset,PRInt32 aCount) {
NS_ASSERTION(aDest.GetCharSize() == eTwoByte, "Must be 2 byte");
- return ::FindChar2(aDest.mUStr,aDest.mLength,anOffset,aChar,aIgnoreCase,aCount);
+ return ::FindChar2(aDest.mUStr,aDest.mLength,anOffset,aChar,aCount);
}
@@ -817,7 +817,7 @@ PRInt32 nsStr::FindCharInSet1(const nsStr& aDest,const nsStr& aSet,PRBool aIgnor
}
return kNotFound;
}
-PRInt32 nsStr::FindCharInSet2(const nsStr& aDest,const nsStr& aSet,PRBool aIgnoreCase,PRInt32 anOffset) {
+PRInt32 nsStr::FindCharInSet2(const nsStr& aDest,const nsStr& aSet,PRInt32 anOffset) {
NS_ASSERTION(aSet.GetCharSize() == eTwoByte, "Must be 2 byte");
@@ -830,7 +830,7 @@ PRInt32 nsStr::FindCharInSet2(const nsStr& aDest,const nsStr& aSet,PRBool aIgnor
if((0=0) {
PRUnichar theChar=GetCharAt(aDest,index);
- thePos=::FindChar2(aSet.mUStr,aSet.mLength,0,theChar,aIgnoreCase,aSet.mLength);
+ thePos=::FindChar2(aSet.mUStr,aSet.mLength,0,theChar,aSet.mLength);
if(kNotFound!=thePos)
return index;
} //while
diff --git a/mozilla/string/obsolete/nsStr.h b/mozilla/string/obsolete/nsStr.h
index 5b05c98f300..cbac9cf1894 100644
--- a/mozilla/string/obsolete/nsStr.h
+++ b/mozilla/string/obsolete/nsStr.h
@@ -450,10 +450,10 @@ protected:
static PRInt32 FindSubstr2in2(const nsStr& aDest,const nsStr& aSource, PRBool aIgnoreCase,PRInt32 anOffset,PRInt32 aCount);
static PRInt32 FindChar1(const nsStr& aDest,PRUnichar aChar, PRBool aIgnoreCase,PRInt32 anOffset,PRInt32 aCount);
- static PRInt32 FindChar2(const nsStr& aDest,PRUnichar aChar, PRBool aIgnoreCase,PRInt32 anOffset,PRInt32 aCount);
+ static PRInt32 FindChar2(const nsStr& aDest,PRUnichar aChar, PRInt32 anOffset,PRInt32 aCount);
static PRInt32 FindCharInSet1(const nsStr& aDest,const nsStr& aSet,PRBool aIgnoreCase,PRInt32 anOffset);
- static PRInt32 FindCharInSet2(const nsStr& aDest,const nsStr& aSet,PRBool aIgnoreCase,PRInt32 anOffset);
+ static PRInt32 FindCharInSet2(const nsStr& aDest,const nsStr& aSet,PRInt32 anOffset);
static PRInt32 RFindSubstr1in1(const nsStr& aDest,const nsStr& aSource, PRBool aIgnoreCase,PRInt32 anOffset,PRInt32 aCount);
static PRInt32 RFindSubstr2in1(const nsStr& aDest,const nsStr& aSource, PRBool aIgnoreCase,PRInt32 anOffset,PRInt32 aCount);
@@ -461,10 +461,10 @@ protected:
static PRInt32 RFindSubstr2in2(const nsStr& aDest,const nsStr& aSource, PRBool aIgnoreCase,PRInt32 anOffset,PRInt32 aCount);
static PRInt32 RFindChar1(const nsStr& aDest,PRUnichar aChar, PRBool aIgnoreCase,PRInt32 anOffset,PRInt32 aCount);
- static PRInt32 RFindChar2(const nsStr& aDest,PRUnichar aChar, PRBool aIgnoreCase,PRInt32 anOffset,PRInt32 aCount);
+ static PRInt32 RFindChar2(const nsStr& aDest,PRUnichar aChar, PRInt32 anOffset,PRInt32 aCount);
static PRInt32 RFindCharInSet1(const nsStr& aDest,const nsStr& aSet,PRBool aIgnoreCase,PRInt32 anOffset);
- static PRInt32 RFindCharInSet2(const nsStr& aDest,const nsStr& aSet,PRBool aIgnoreCase,PRInt32 anOffset);
+ static PRInt32 RFindCharInSet2(const nsStr& aDest,const nsStr& aSet,PRInt32 anOffset);
static void Overwrite(nsStr& aDest,const nsStr& aSource,PRInt32 anOffset);
diff --git a/mozilla/string/obsolete/nsString.cpp b/mozilla/string/obsolete/nsString.cpp
index bcaf84b2a0f..93d2cc8c48c 100644
--- a/mozilla/string/obsolete/nsString.cpp
+++ b/mozilla/string/obsolete/nsString.cpp
@@ -612,7 +612,7 @@ void nsCString::AssignWithConversion(const PRUnichar* aString,PRInt32 aCount) {
// If this assertion fires, the caller is probably lying about the length of
// the passed-in string. File a bug on the caller.
#ifdef NS_DEBUG
- PRInt32 len=nsStr::FindChar2(temp,0,PR_FALSE,0,temp.mLength);
+ PRInt32 len=nsStr::FindChar2(temp,0,PR_FALSE,temp.mLength);
if(kNotFoundGetSpec(getter_Copies(cStrSpec));
if (NS_FAILED(rv)) return rv;
- nsAutoString specStr; specStr.AssignWithConversion(cStrSpec);
+ nsCAutoString specStr(cStrSpec);
// find the file extension (if any)
- nsAutoString extStr;
+ nsCAutoString extStr;
PRInt32 extLoc = specStr.RFindChar('.');
if (-1 != extLoc)
{
specStr.Right(extStr, specStr.Length() - extLoc - 1);
- char *ext = ToNewCString(extStr);
- if (!ext) return NS_ERROR_OUT_OF_MEMORY;
- rv = GetTypeFromExtension(ext, aContentType);
- nsMemory::Free(ext);
+ rv = GetTypeFromExtension(extStr.get(), aContentType);
}
else
return NS_ERROR_FAILURE;
diff --git a/mozilla/xpcom/string/obsolete/bufferRoutines.h b/mozilla/xpcom/string/obsolete/bufferRoutines.h
index 41e6cd315eb..65c812997c1 100644
--- a/mozilla/xpcom/string/obsolete/bufferRoutines.h
+++ b/mozilla/xpcom/string/obsolete/bufferRoutines.h
@@ -528,8 +528,7 @@ inline PRInt32 FindChar1(const char* aDest,PRUint32 aDestLength,PRInt32 anOffset
* @param aCount tells us how many characters to iterate through (which may be different than aLength); -1 means use full length.
* @return index of pos if found, else -1 (kNotFound)
*/
-inline PRInt32 FindChar2(const PRUnichar* aDest,PRUint32 aDestLength,PRInt32 anOffset,const PRUnichar aChar,PRBool aIgnoreCase,PRInt32 aCount) {
-#ifndef XPCOM_STANDALONE
+inline PRInt32 FindChar2(const PRUnichar* aDest,PRUint32 aDestLength,PRInt32 anOffset,const PRUnichar aChar,PRInt32 aCount) {
if(anOffset<0)
anOffset=0;
@@ -547,33 +546,14 @@ inline PRInt32 FindChar2(const PRUnichar* aDest,PRUint32 aDestLength,PRInt32 anO
const PRUnichar* max = root+aDestLength;
const PRUnichar* end = (lastToUpper(aChar, &theChar);
- while(leftToUpper(*left, &leftChar);
- if (leftChar == theChar)
- return left-root;
- ++left;
- }
- }
- else {
- while(leftToUpper(aChar, &theChar);
- while(leftmostToUpper(*rightmost, &rightChar);
- if(rightChar==theChar)
- return rightmost-root;
- --rightmost;
- }
- }
- else {
-
- while(leftmost<=rightmost){
- if((*rightmost)==aChar)
- return rightmost-root;
- --rightmost;
- }
+ while(leftmost<=rightmost){
+ if((*rightmost)==aChar)
+ return rightmost-root;
+ --rightmost;
}
}
}
-#else
- NS_ERROR("call not supported in XPCOM_STANDALONE");
-#endif
return kNotFound;
}
diff --git a/mozilla/xpcom/string/obsolete/nsStr.cpp b/mozilla/xpcom/string/obsolete/nsStr.cpp
index 55961a934bc..b51cf007f31 100644
--- a/mozilla/xpcom/string/obsolete/nsStr.cpp
+++ b/mozilla/xpcom/string/obsolete/nsStr.cpp
@@ -781,9 +781,9 @@ PRInt32 nsStr::FindChar1(const nsStr& aDest,PRUnichar aChar, PRBool aIgnoreCase,
return ::FindChar1(aDest.mStr,aDest.mLength,anOffset,aChar,aIgnoreCase,aCount);
}
-PRInt32 nsStr::FindChar2(const nsStr& aDest,PRUnichar aChar, PRBool aIgnoreCase,PRInt32 anOffset,PRInt32 aCount) {
+PRInt32 nsStr::FindChar2(const nsStr& aDest,PRUnichar aChar, PRInt32 anOffset,PRInt32 aCount) {
NS_ASSERTION(aDest.GetCharSize() == eTwoByte, "Must be 2 byte");
- return ::FindChar2(aDest.mUStr,aDest.mLength,anOffset,aChar,aIgnoreCase,aCount);
+ return ::FindChar2(aDest.mUStr,aDest.mLength,anOffset,aChar,aCount);
}
@@ -817,7 +817,7 @@ PRInt32 nsStr::FindCharInSet1(const nsStr& aDest,const nsStr& aSet,PRBool aIgnor
}
return kNotFound;
}
-PRInt32 nsStr::FindCharInSet2(const nsStr& aDest,const nsStr& aSet,PRBool aIgnoreCase,PRInt32 anOffset) {
+PRInt32 nsStr::FindCharInSet2(const nsStr& aDest,const nsStr& aSet,PRInt32 anOffset) {
NS_ASSERTION(aSet.GetCharSize() == eTwoByte, "Must be 2 byte");
@@ -830,7 +830,7 @@ PRInt32 nsStr::FindCharInSet2(const nsStr& aDest,const nsStr& aSet,PRBool aIgnor
if((0=0) {
PRUnichar theChar=GetCharAt(aDest,index);
- thePos=::FindChar2(aSet.mUStr,aSet.mLength,0,theChar,aIgnoreCase,aSet.mLength);
+ thePos=::FindChar2(aSet.mUStr,aSet.mLength,0,theChar,aSet.mLength);
if(kNotFound!=thePos)
return index;
} //while
diff --git a/mozilla/xpcom/string/obsolete/nsStr.h b/mozilla/xpcom/string/obsolete/nsStr.h
index 5b05c98f300..cbac9cf1894 100644
--- a/mozilla/xpcom/string/obsolete/nsStr.h
+++ b/mozilla/xpcom/string/obsolete/nsStr.h
@@ -450,10 +450,10 @@ protected:
static PRInt32 FindSubstr2in2(const nsStr& aDest,const nsStr& aSource, PRBool aIgnoreCase,PRInt32 anOffset,PRInt32 aCount);
static PRInt32 FindChar1(const nsStr& aDest,PRUnichar aChar, PRBool aIgnoreCase,PRInt32 anOffset,PRInt32 aCount);
- static PRInt32 FindChar2(const nsStr& aDest,PRUnichar aChar, PRBool aIgnoreCase,PRInt32 anOffset,PRInt32 aCount);
+ static PRInt32 FindChar2(const nsStr& aDest,PRUnichar aChar, PRInt32 anOffset,PRInt32 aCount);
static PRInt32 FindCharInSet1(const nsStr& aDest,const nsStr& aSet,PRBool aIgnoreCase,PRInt32 anOffset);
- static PRInt32 FindCharInSet2(const nsStr& aDest,const nsStr& aSet,PRBool aIgnoreCase,PRInt32 anOffset);
+ static PRInt32 FindCharInSet2(const nsStr& aDest,const nsStr& aSet,PRInt32 anOffset);
static PRInt32 RFindSubstr1in1(const nsStr& aDest,const nsStr& aSource, PRBool aIgnoreCase,PRInt32 anOffset,PRInt32 aCount);
static PRInt32 RFindSubstr2in1(const nsStr& aDest,const nsStr& aSource, PRBool aIgnoreCase,PRInt32 anOffset,PRInt32 aCount);
@@ -461,10 +461,10 @@ protected:
static PRInt32 RFindSubstr2in2(const nsStr& aDest,const nsStr& aSource, PRBool aIgnoreCase,PRInt32 anOffset,PRInt32 aCount);
static PRInt32 RFindChar1(const nsStr& aDest,PRUnichar aChar, PRBool aIgnoreCase,PRInt32 anOffset,PRInt32 aCount);
- static PRInt32 RFindChar2(const nsStr& aDest,PRUnichar aChar, PRBool aIgnoreCase,PRInt32 anOffset,PRInt32 aCount);
+ static PRInt32 RFindChar2(const nsStr& aDest,PRUnichar aChar, PRInt32 anOffset,PRInt32 aCount);
static PRInt32 RFindCharInSet1(const nsStr& aDest,const nsStr& aSet,PRBool aIgnoreCase,PRInt32 anOffset);
- static PRInt32 RFindCharInSet2(const nsStr& aDest,const nsStr& aSet,PRBool aIgnoreCase,PRInt32 anOffset);
+ static PRInt32 RFindCharInSet2(const nsStr& aDest,const nsStr& aSet,PRInt32 anOffset);
static void Overwrite(nsStr& aDest,const nsStr& aSource,PRInt32 anOffset);
diff --git a/mozilla/xpcom/string/obsolete/nsString.cpp b/mozilla/xpcom/string/obsolete/nsString.cpp
index bcaf84b2a0f..93d2cc8c48c 100644
--- a/mozilla/xpcom/string/obsolete/nsString.cpp
+++ b/mozilla/xpcom/string/obsolete/nsString.cpp
@@ -612,7 +612,7 @@ void nsCString::AssignWithConversion(const PRUnichar* aString,PRInt32 aCount) {
// If this assertion fires, the caller is probably lying about the length of
// the passed-in string. File a bug on the caller.
#ifdef NS_DEBUG
- PRInt32 len=nsStr::FindChar2(temp,0,PR_FALSE,0,temp.mLength);
+ PRInt32 len=nsStr::FindChar2(temp,0,PR_FALSE,temp.mLength);
if(kNotFound= 0)
+ while((offset = text.FindChar((PRUnichar('&')), offset)) >= 0)
{
// XXX get max of 6 chars; change the value below if
// we ever start looking for longer HTML-escaped values
@@ -993,7 +993,7 @@ BookmarkParser::ParseMetaTag(const nsString &aLine, nsIUnicodeDecoder **decoder)
// Skip past the first double-quote
start += (sizeof(kHTTPEquivEquals) - 1);
// ...and find the next so we can chop the HTTP-EQUIV attribute
- PRInt32 end = aLine.FindChar(PRUnichar('"'), PR_FALSE, start);
+ PRInt32 end = aLine.FindChar(PRUnichar('"'), start);
nsAutoString httpEquiv;
aLine.Mid(httpEquiv, start, end - start);
@@ -1008,7 +1008,7 @@ BookmarkParser::ParseMetaTag(const nsString &aLine, nsIUnicodeDecoder **decoder)
// Skip past the first double-quote
start += (sizeof(kContentEquals) - 1);
// ...and find the next so we can chop the CONTENT attribute
- end = aLine.FindChar(PRUnichar('"'), PR_FALSE, start);
+ end = aLine.FindChar(PRUnichar('"'), start);
nsAutoString content;
aLine.Mid(content, start, end - start);
@@ -1145,7 +1145,7 @@ BookmarkParser::ParseBookmarkInfo(BookmarkField *fields, PRBool isBookmarkFlag,
attrStart += nsCRT::strlen(field->mName);
// skip to terminating quote of string
- PRInt32 termQuote = aLine.FindChar(PRUnichar('\"'), PR_FALSE, attrStart);
+ PRInt32 termQuote = aLine.FindChar(PRUnichar('\"'), attrStart);
if (termQuote > attrStart)
{
// process data
diff --git a/mozilla/xpfe/components/related/src/nsRelatedLinksHandler.cpp b/mozilla/xpfe/components/related/src/nsRelatedLinksHandler.cpp
index aeb0c51d9dd..0dfcebb42e2 100644
--- a/mozilla/xpfe/components/related/src/nsRelatedLinksHandler.cpp
+++ b/mozilla/xpfe/components/related/src/nsRelatedLinksHandler.cpp
@@ -554,7 +554,7 @@ RelatedLinksStreamListener::Unescape(nsString &text)
PRInt32 offset=0;
- while((offset = text.FindChar((PRUnichar('&')), PR_FALSE, offset)) >= 0)
+ while((offset = text.FindChar((PRUnichar('&')), offset)) >= 0)
{
// XXX get max of 6 chars; change the value below if
// we ever start looking for longer HTML-escaped values
diff --git a/mozilla/xpfe/components/search/src/nsInternetSearchService.cpp b/mozilla/xpfe/components/search/src/nsInternetSearchService.cpp
index 2dd80556d99..02679200865 100755
--- a/mozilla/xpfe/components/search/src/nsInternetSearchService.cpp
+++ b/mozilla/xpfe/components/search/src/nsInternetSearchService.cpp
@@ -1944,7 +1944,7 @@ InternetSearchDataSource::filterSite(nsIRDFResource *aResource)
// determine site (host name)
PRInt32 slashOffset1 = host.Find("://");
if (slashOffset1 < 1) return(NS_ERROR_UNEXPECTED);
- PRInt32 slashOffset2 = host.FindChar(PRUnichar('/'), PR_FALSE, slashOffset1 + 3);
+ PRInt32 slashOffset2 = host.FindChar(PRUnichar('/'), slashOffset1 + 3);
if (slashOffset2 <= slashOffset1) return(NS_ERROR_UNEXPECTED);
host.Truncate(slashOffset2 + 1);
@@ -2037,7 +2037,7 @@ InternetSearchDataSource::filterSite(nsIRDFResource *aResource)
// determine site (host name)
slashOffset1 = site.Find("://");
if (slashOffset1 < 1) return(NS_ERROR_UNEXPECTED);
- slashOffset2 = site.FindChar(PRUnichar('/'), PR_FALSE, slashOffset1 + 3);
+ slashOffset2 = site.FindChar(PRUnichar('/'), slashOffset1 + 3);
if (slashOffset2 <= slashOffset1) return(NS_ERROR_UNEXPECTED);
site.Truncate(slashOffset2 + 1);
@@ -2143,7 +2143,7 @@ InternetSearchDataSource::isSearchResultFiltered(const nsString &hrefStr)
nsAutoString host(hrefStr);
PRInt32 slashOffset1 = host.Find("://");
if (slashOffset1 < 1) return(NS_ERROR_UNEXPECTED);
- PRInt32 slashOffset2 = host.FindChar(PRUnichar('/'), PR_FALSE, slashOffset1 + 3);
+ PRInt32 slashOffset2 = host.FindChar(PRUnichar('/'), slashOffset1 + 3);
if (slashOffset2 <= slashOffset1) return(NS_ERROR_UNEXPECTED);
host.Truncate(slashOffset2 + 1);
@@ -4182,7 +4182,7 @@ InternetSearchDataSource::GetData(const PRUnichar *dataUni, const char *sectionT
len = value.Length();
if ((len > 0) && (foundQuoteChar == PR_TRUE))
{
- PRInt32 quoteEnd = value.FindChar(quoteChar, PR_TRUE);
+ PRInt32 quoteEnd = value.FindChar(quoteChar);
if (quoteEnd >= 0)
{
value.Truncate(quoteEnd);
@@ -4257,13 +4257,13 @@ InternetSearchDataSource::GetInputs(const PRUnichar *dataUni, nsString &userVar,
PRInt32 nameOffset = line.Find("name", PR_TRUE);
if (nameOffset >= 0)
{
- PRInt32 equal = line.FindChar(PRUnichar('='), PR_TRUE, nameOffset);
+ PRInt32 equal = line.FindChar(PRUnichar('='), nameOffset);
if (equal >= 0)
{
- PRInt32 startQuote = line.FindChar(PRUnichar('\"'), PR_TRUE, equal + 1);
+ PRInt32 startQuote = line.FindChar(PRUnichar('\"'), equal + 1);
if (startQuote >= 0)
{
- PRInt32 endQuote = line.FindChar(PRUnichar('\"'), PR_TRUE, startQuote + 1);
+ PRInt32 endQuote = line.FindChar(PRUnichar('\"'), startQuote + 1);
if (endQuote > 0)
{
line.Mid(nameAttrib, startQuote+1, endQuote-startQuote-1);
@@ -4296,13 +4296,13 @@ InternetSearchDataSource::GetInputs(const PRUnichar *dataUni, nsString &userVar,
PRInt32 valueOffset = line.Find("value", PR_TRUE);
if (valueOffset >= 0)
{
- PRInt32 equal = line.FindChar(PRUnichar('='), PR_TRUE, valueOffset);
+ PRInt32 equal = line.FindChar(PRUnichar('='), valueOffset);
if (equal >= 0)
{
- PRInt32 startQuote = line.FindChar(PRUnichar('\"'), PR_TRUE, equal + 1);
+ PRInt32 startQuote = line.FindChar(PRUnichar('\"'), equal + 1);
if (startQuote >= 0)
{
- PRInt32 endQuote = line.FindChar(PRUnichar('\"'), PR_TRUE, startQuote + 1);
+ PRInt32 endQuote = line.FindChar(PRUnichar('\"'), startQuote + 1);
if (endQuote >= 0)
{
line.Mid(valueAttrib, startQuote+1, endQuote-startQuote-1);
@@ -5277,7 +5277,7 @@ InternetSearchDataSource::ParseHTML(nsIURI *aURL, nsIRDFResource *mParent,
PRInt32 ltOffset, gtOffset;
while ((ltOffset = dateItem.FindChar(PRUnichar('<'))) >= 0)
{
- if ((gtOffset = dateItem.FindChar(PRUnichar('>'), PR_FALSE, ltOffset)) <= ltOffset)
+ if ((gtOffset = dateItem.FindChar(PRUnichar('>'), ltOffset)) <= ltOffset)
break;
dateItem.Cut(ltOffset, gtOffset - ltOffset + 1);
}
@@ -5645,16 +5645,16 @@ InternetSearchDataSource::ConvertEntities(nsString &nameStr, PRBool removeHTMLFl
if (removeHTMLFlag == PR_TRUE)
{
// munge out anything inside of HTML "<" / ">" tags
- while ((offset = nameStr.FindChar(PRUnichar('<'), PR_FALSE, 0)) >= 0)
+ while ((offset = nameStr.FindChar(PRUnichar('<'), 0)) >= 0)
{
- PRInt32 offsetEnd = nameStr.FindChar(PRUnichar('>'), PR_FALSE, offset+1);
+ PRInt32 offsetEnd = nameStr.FindChar(PRUnichar('>'), offset+1);
if (offsetEnd <= offset) break;
nameStr.Cut(offset, offsetEnd - offset + 1);
}
}
- while ((ampOffset = nameStr.FindChar(PRUnichar('&'), PR_FALSE, startOffset)) >= 0)
+ while ((ampOffset = nameStr.FindChar(PRUnichar('&'), startOffset)) >= 0)
{
- if ((semiOffset = nameStr.FindChar(PRUnichar(';'), PR_FALSE, ampOffset+1)) <= ampOffset)
+ if ((semiOffset = nameStr.FindChar(PRUnichar(';'), ampOffset+1)) <= ampOffset)
break;
nsAutoString entityStr;
diff --git a/mozilla/xpinstall/src/nsInstallFile.cpp b/mozilla/xpinstall/src/nsInstallFile.cpp
index 24d7a36050d..ca08cb9eedb 100644
--- a/mozilla/xpinstall/src/nsInstallFile.cpp
+++ b/mozilla/xpinstall/src/nsInstallFile.cpp
@@ -113,7 +113,7 @@ nsInstallFile::nsInstallFile(nsInstall* inInstall,
PRInt32 location = 0, nodeLength = 0;
nsString subString;
- location = inPartialPath.FindChar('/',PR_FALSE, offset);
+ location = inPartialPath.FindChar('/', offset);
if (location == ((PRInt32)inPartialPath.Length() - 1)) //trailing slash
{
*error = nsInstall::INVALID_ARGUMENTS;
@@ -143,7 +143,7 @@ nsInstallFile::nsInstallFile(nsInstall* inInstall,
mFinalFile->Append(NS_LossyConvertUCS2toASCII(subString).get());
offset += nodeLength + 1;
if (!finished)
- location = inPartialPath.FindChar('/',PR_FALSE, offset);
+ location = inPartialPath.FindChar('/', offset);
}
}
diff --git a/mozilla/xpinstall/src/nsInstallFolder.cpp b/mozilla/xpinstall/src/nsInstallFolder.cpp
index 80bd96f70db..b196c2d7007 100644
--- a/mozilla/xpinstall/src/nsInstallFolder.cpp
+++ b/mozilla/xpinstall/src/nsInstallFolder.cpp
@@ -544,7 +544,7 @@ nsInstallFolder::AppendXPPath(const nsString& aRelativePath)
NS_ASSERTION(!aRelativePath.IsEmpty(),"InstallFolder appending null path");
do {
- curr = aRelativePath.FindChar('/',PR_FALSE,start);
+ curr = aRelativePath.FindChar('/',start);
if ( curr == start )
{
// illegal, two slashes in a row (or not a relative path)
diff --git a/mozilla/xpinstall/src/nsInstallVersion.cpp b/mozilla/xpinstall/src/nsInstallVersion.cpp
index f873e2c44d7..85e87ad42f2 100644
--- a/mozilla/xpinstall/src/nsInstallVersion.cpp
+++ b/mozilla/xpinstall/src/nsInstallVersion.cpp
@@ -300,7 +300,7 @@ nsInstallVersion::StringToVersionNumbers(const nsString& version, PRInt32 *aMajo
{
PRInt32 errorCode;
- int dot = version.FindChar('.', PR_FALSE,0);
+ int dot = version.FindChar('.', 0);
if ( dot == -1 )
{
@@ -313,7 +313,7 @@ nsInstallVersion::StringToVersionNumbers(const nsString& version, PRInt32 *aMajo
*aMajor = majorStr.ToInteger(&errorCode);
int prev = dot+1;
- dot = version.FindChar('.',PR_FALSE,prev);
+ dot = version.FindChar('.',prev);
if ( dot == -1 )
{
nsString minorStr;
@@ -327,7 +327,7 @@ nsInstallVersion::StringToVersionNumbers(const nsString& version, PRInt32 *aMajo
*aMinor = minorStr.ToInteger(&errorCode);
prev = dot+1;
- dot = version.FindChar('.',PR_FALSE,prev);
+ dot = version.FindChar('.',prev);
if ( dot == -1 )
{
nsString releaseStr;
diff --git a/mozilla/xpinstall/src/nsWinReg.cpp b/mozilla/xpinstall/src/nsWinReg.cpp
index 2f76a08029a..0fa12fafee2 100644
--- a/mozilla/xpinstall/src/nsWinReg.cpp
+++ b/mozilla/xpinstall/src/nsWinReg.cpp
@@ -509,7 +509,7 @@ nsWinReg::NativeIsKeyWritable(const nsString& subkey)
rv = NativeKeyExists(subkeyParent);
if(!rv)
{
- index = subkeyParent.RFindChar('\\', PR_FALSE, -1, -1);
+ index = subkeyParent.RFindChar('\\', -1, -1);
if(index > 0)
/* delete everything from the '\\' found to the end of the string */
subkeyParent.SetLength(index);