зеркало из https://github.com/mozilla/pjs.git
removed calls to deprecated nsString methods
This commit is contained in:
Родитель
61c6d0ae1e
Коммит
c617e3f2e9
|
@ -3816,11 +3816,11 @@ HTMLContentSink::ProcessMETATag(const nsIParserNode& aNode)
|
|||
PRBool done = PR_FALSE;
|
||||
while (!done && !token.IsEmpty()) {
|
||||
token.CompressWhitespace();
|
||||
if (millis == -1 && nsString::IsDigit(token.First())) {
|
||||
if (millis == -1 && nsCRT::IsAsciiDigit(token.First())) {
|
||||
PRInt32 i = 0;
|
||||
PRUnichar value = nsnull;
|
||||
while ((value = token[i++])) {
|
||||
if (!nsString::IsDigit(value)) {
|
||||
if (!nsCRT::IsAsciiDigit(value)) {
|
||||
i = -1;
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -109,12 +109,12 @@ nsClassList::ParseClasses(nsClassList** aList, const nsString& aClassString)
|
|||
PRUnichar* end = start;
|
||||
|
||||
while (kNullCh != *start) {
|
||||
while ((kNullCh != *start) && nsString::IsSpace(*start)) { // skip leading space
|
||||
while ((kNullCh != *start) && nsCRT::IsAsciiSpace(*start)) { // skip leading space
|
||||
start++;
|
||||
}
|
||||
end = start;
|
||||
|
||||
while ((kNullCh != *end) && (PR_FALSE == nsString::IsSpace(*end))) { // look for space or end
|
||||
while ((kNullCh != *end) && (PR_FALSE == nsCRT::IsAsciiSpace(*end))) { // look for space or end
|
||||
end++;
|
||||
}
|
||||
*end = kNullCh; // end string here
|
||||
|
|
|
@ -479,13 +479,13 @@ nsXULCommandDispatcher::Matches(const nsString& aList, const nsString& aElement)
|
|||
// found inside of 'blur'.
|
||||
if (indx > 0) {
|
||||
PRUnichar ch = aList[indx - 1];
|
||||
if (! nsString::IsSpace(ch) && ch != PRUnichar(','))
|
||||
if (! nsCRT::IsAsciiSpace(ch) && ch != PRUnichar(','))
|
||||
return PR_FALSE;
|
||||
}
|
||||
|
||||
if (indx + aElement.Length() < aList.Length()) {
|
||||
PRUnichar ch = aList[indx + aElement.Length()];
|
||||
if (! nsString::IsSpace(ch) && ch != PRUnichar(','))
|
||||
if (! nsCRT::IsAsciiSpace(ch) && ch != PRUnichar(','))
|
||||
return PR_FALSE;
|
||||
}
|
||||
|
||||
|
|
|
@ -5252,14 +5252,14 @@ nsXULDocument::CheckTemplateBuilder(nsIContent* aElement)
|
|||
PRInt32 first = 0;
|
||||
|
||||
while(1) {
|
||||
while (first < datasources.Length() && nsString::IsSpace(datasources.CharAt(first)))
|
||||
while (first < datasources.Length() && nsCRT::IsAsciiSpace(datasources.CharAt(first)))
|
||||
++first;
|
||||
|
||||
if (first >= datasources.Length())
|
||||
break;
|
||||
|
||||
PRInt32 last = first;
|
||||
while (last < datasources.Length() && !nsString::IsSpace(datasources.CharAt(last)))
|
||||
while (last < datasources.Length() && !nsCRT::IsAsciiSpace(datasources.CharAt(last)))
|
||||
++last;
|
||||
|
||||
nsAutoString uriStr;
|
||||
|
|
|
@ -3816,11 +3816,11 @@ HTMLContentSink::ProcessMETATag(const nsIParserNode& aNode)
|
|||
PRBool done = PR_FALSE;
|
||||
while (!done && !token.IsEmpty()) {
|
||||
token.CompressWhitespace();
|
||||
if (millis == -1 && nsString::IsDigit(token.First())) {
|
||||
if (millis == -1 && nsCRT::IsAsciiDigit(token.First())) {
|
||||
PRInt32 i = 0;
|
||||
PRUnichar value = nsnull;
|
||||
while ((value = token[i++])) {
|
||||
if (!nsString::IsDigit(value)) {
|
||||
if (!nsCRT::IsAsciiDigit(value)) {
|
||||
i = -1;
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -349,7 +349,7 @@ MimeExternalBody_parse_eof (MimeObject *obj, PRBool abort_p)
|
|||
{
|
||||
char *in, *out;
|
||||
for (in = url, out = url; *in; in++)
|
||||
if (!nsString::IsSpace(*in))
|
||||
if (!nsCRT::IsAsciiSpace(*in))
|
||||
*out++ = *in;
|
||||
*out = 0;
|
||||
}
|
||||
|
@ -404,14 +404,14 @@ MimeExternalBody_parse_eof (MimeObject *obj, PRBool abort_p)
|
|||
if (bod->body && all_headers_p)
|
||||
{
|
||||
char *s = bod->body;
|
||||
while (nsString::IsSpace(*s)) s++;
|
||||
while (nsCRT::IsAsciiSpace(*s)) s++;
|
||||
if (*s)
|
||||
{
|
||||
char *s2;
|
||||
const char *pre = "<P><PRE>";
|
||||
const char *suf = "</PRE>";
|
||||
PRInt32 i;
|
||||
for(i = nsCRT::strlen(s)-1; i >= 0 && nsString::IsSpace(s[i]); i--)
|
||||
for(i = nsCRT::strlen(s)-1; i >= 0 && nsCRT::IsAsciiSpace(s[i]); i--)
|
||||
s[i] = 0;
|
||||
s2 = nsEscapeHTML(s);
|
||||
if (!s2) goto FAIL;
|
||||
|
|
|
@ -278,7 +278,7 @@ MimeMultipart_check_boundary(MimeObject *obj, const char *line, PRInt32 length)
|
|||
term_p = PR_FALSE;
|
||||
|
||||
/* strip trailing whitespace (including the newline.) */
|
||||
while(length > 2 && nsString::IsSpace(line[length-1]))
|
||||
while(length > 2 && nsCRT::IsAsciiSpace(line[length-1]))
|
||||
length--;
|
||||
|
||||
/* Could this be a terminating boundary? */
|
||||
|
|
|
@ -140,7 +140,7 @@ nsIOService::ExtractScheme(const char* inURI, PRUint32 *startPos, PRUint32 *endP
|
|||
const char* uri = inURI;
|
||||
|
||||
// skip leading white space
|
||||
while (nsString::IsSpace(*uri))
|
||||
while (nsCRT::IsAsciiSpace(*uri))
|
||||
uri++;
|
||||
|
||||
PRUint32 start = uri - inURI;
|
||||
|
@ -166,7 +166,7 @@ nsIOService::ExtractScheme(const char* inURI, PRUint32 *startPos, PRUint32 *endP
|
|||
}
|
||||
return NS_OK;
|
||||
}
|
||||
else if (nsString::IsAlpha(c)) {
|
||||
else if (nsCRT::IsAsciiAlpha(c)) {
|
||||
length++;
|
||||
}
|
||||
else
|
||||
|
|
|
@ -159,7 +159,7 @@ nsProtocolProxyService::CanUseProxy(nsIURI* aURI)
|
|||
char* np= mFilters;
|
||||
while (*np)
|
||||
{
|
||||
while (*np && (*np == ',' || nsString::IsSpace(*np)))
|
||||
while (*np && (*np == ',' || nsCRT::IsAsciiSpace(*np)))
|
||||
np++;
|
||||
|
||||
char* endproxy = np+1;
|
||||
|
|
|
@ -109,12 +109,12 @@ nsClassList::ParseClasses(nsClassList** aList, const nsString& aClassString)
|
|||
PRUnichar* end = start;
|
||||
|
||||
while (kNullCh != *start) {
|
||||
while ((kNullCh != *start) && nsString::IsSpace(*start)) { // skip leading space
|
||||
while ((kNullCh != *start) && nsCRT::IsAsciiSpace(*start)) { // skip leading space
|
||||
start++;
|
||||
}
|
||||
end = start;
|
||||
|
||||
while ((kNullCh != *end) && (PR_FALSE == nsString::IsSpace(*end))) { // look for space or end
|
||||
while ((kNullCh != *end) && (PR_FALSE == nsCRT::IsAsciiSpace(*end))) { // look for space or end
|
||||
end++;
|
||||
}
|
||||
*end = kNullCh; // end string here
|
||||
|
|
|
@ -479,13 +479,13 @@ nsXULCommandDispatcher::Matches(const nsString& aList, const nsString& aElement)
|
|||
// found inside of 'blur'.
|
||||
if (indx > 0) {
|
||||
PRUnichar ch = aList[indx - 1];
|
||||
if (! nsString::IsSpace(ch) && ch != PRUnichar(','))
|
||||
if (! nsCRT::IsAsciiSpace(ch) && ch != PRUnichar(','))
|
||||
return PR_FALSE;
|
||||
}
|
||||
|
||||
if (indx + aElement.Length() < aList.Length()) {
|
||||
PRUnichar ch = aList[indx + aElement.Length()];
|
||||
if (! nsString::IsSpace(ch) && ch != PRUnichar(','))
|
||||
if (! nsCRT::IsAsciiSpace(ch) && ch != PRUnichar(','))
|
||||
return PR_FALSE;
|
||||
}
|
||||
|
||||
|
|
|
@ -5252,14 +5252,14 @@ nsXULDocument::CheckTemplateBuilder(nsIContent* aElement)
|
|||
PRInt32 first = 0;
|
||||
|
||||
while(1) {
|
||||
while (first < datasources.Length() && nsString::IsSpace(datasources.CharAt(first)))
|
||||
while (first < datasources.Length() && nsCRT::IsAsciiSpace(datasources.CharAt(first)))
|
||||
++first;
|
||||
|
||||
if (first >= datasources.Length())
|
||||
break;
|
||||
|
||||
PRInt32 last = first;
|
||||
while (last < datasources.Length() && !nsString::IsSpace(datasources.CharAt(last)))
|
||||
while (last < datasources.Length() && !nsCRT::IsAsciiSpace(datasources.CharAt(last)))
|
||||
++last;
|
||||
|
||||
nsAutoString uriStr;
|
||||
|
|
Загрузка…
Ссылка в новой задаче