From 5dc7d01987ef23e1b182e1c2cbe627edeb217d5a Mon Sep 17 00:00:00 2001 From: "rickg%netscape.com" Date: Sun, 12 Mar 2000 11:06:57 +0000 Subject: [PATCH] removed calls to deprecated nsString methods --- content/html/document/src/nsHTMLContentSink.cpp | 4 ++-- content/xul/content/src/nsXULAttributes.cpp | 4 ++-- content/xul/document/src/nsXULCommandDispatcher.cpp | 4 ++-- content/xul/document/src/nsXULDocument.cpp | 4 ++-- layout/html/document/src/nsHTMLContentSink.cpp | 4 ++-- mailnews/mime/src/mimeebod.cpp | 6 +++--- mailnews/mime/src/mimemult.cpp | 2 +- netwerk/base/src/nsIOService.cpp | 4 ++-- netwerk/base/src/nsProtocolProxyService.cpp | 2 +- rdf/content/src/nsXULAttributes.cpp | 4 ++-- rdf/content/src/nsXULCommandDispatcher.cpp | 4 ++-- rdf/content/src/nsXULDocument.cpp | 4 ++-- 12 files changed, 23 insertions(+), 23 deletions(-) diff --git a/content/html/document/src/nsHTMLContentSink.cpp b/content/html/document/src/nsHTMLContentSink.cpp index 6ce675757c6b..bbfb7475c677 100644 --- a/content/html/document/src/nsHTMLContentSink.cpp +++ b/content/html/document/src/nsHTMLContentSink.cpp @@ -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; } diff --git a/content/xul/content/src/nsXULAttributes.cpp b/content/xul/content/src/nsXULAttributes.cpp index 88ab7266478b..86911f01df6a 100644 --- a/content/xul/content/src/nsXULAttributes.cpp +++ b/content/xul/content/src/nsXULAttributes.cpp @@ -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 diff --git a/content/xul/document/src/nsXULCommandDispatcher.cpp b/content/xul/document/src/nsXULCommandDispatcher.cpp index a403b9d5a7e4..e190e4939df6 100644 --- a/content/xul/document/src/nsXULCommandDispatcher.cpp +++ b/content/xul/document/src/nsXULCommandDispatcher.cpp @@ -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; } diff --git a/content/xul/document/src/nsXULDocument.cpp b/content/xul/document/src/nsXULDocument.cpp index 4202d0755473..bc97d12bb598 100644 --- a/content/xul/document/src/nsXULDocument.cpp +++ b/content/xul/document/src/nsXULDocument.cpp @@ -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; diff --git a/layout/html/document/src/nsHTMLContentSink.cpp b/layout/html/document/src/nsHTMLContentSink.cpp index 6ce675757c6b..bbfb7475c677 100644 --- a/layout/html/document/src/nsHTMLContentSink.cpp +++ b/layout/html/document/src/nsHTMLContentSink.cpp @@ -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; } diff --git a/mailnews/mime/src/mimeebod.cpp b/mailnews/mime/src/mimeebod.cpp index 4e86c093bbd8..6f486ed6275e 100644 --- a/mailnews/mime/src/mimeebod.cpp +++ b/mailnews/mime/src/mimeebod.cpp @@ -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 = "

";
 			  const char *suf = "
"; 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; diff --git a/mailnews/mime/src/mimemult.cpp b/mailnews/mime/src/mimemult.cpp index a9418309bf8a..c76265795416 100644 --- a/mailnews/mime/src/mimemult.cpp +++ b/mailnews/mime/src/mimemult.cpp @@ -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? */ diff --git a/netwerk/base/src/nsIOService.cpp b/netwerk/base/src/nsIOService.cpp index a61e2228cd8f..1a6a7e411710 100644 --- a/netwerk/base/src/nsIOService.cpp +++ b/netwerk/base/src/nsIOService.cpp @@ -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 diff --git a/netwerk/base/src/nsProtocolProxyService.cpp b/netwerk/base/src/nsProtocolProxyService.cpp index 8f18e8dc3f56..6f55220415c5 100644 --- a/netwerk/base/src/nsProtocolProxyService.cpp +++ b/netwerk/base/src/nsProtocolProxyService.cpp @@ -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; diff --git a/rdf/content/src/nsXULAttributes.cpp b/rdf/content/src/nsXULAttributes.cpp index 88ab7266478b..86911f01df6a 100644 --- a/rdf/content/src/nsXULAttributes.cpp +++ b/rdf/content/src/nsXULAttributes.cpp @@ -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 diff --git a/rdf/content/src/nsXULCommandDispatcher.cpp b/rdf/content/src/nsXULCommandDispatcher.cpp index a403b9d5a7e4..e190e4939df6 100644 --- a/rdf/content/src/nsXULCommandDispatcher.cpp +++ b/rdf/content/src/nsXULCommandDispatcher.cpp @@ -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; } diff --git a/rdf/content/src/nsXULDocument.cpp b/rdf/content/src/nsXULDocument.cpp index 4202d0755473..bc97d12bb598 100644 --- a/rdf/content/src/nsXULDocument.cpp +++ b/rdf/content/src/nsXULDocument.cpp @@ -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;