Fix warnings, mostly from conflicts with the index routine declared in string.h on Linux
git-svn-id: svn://10.0.0.236/trunk@37235 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -150,9 +150,9 @@ nsHTMLFragmentContentSink::~nsHTMLFragmentContentSink()
|
||||
NS_IF_RELEASE(mCurrentMap);
|
||||
if (nsnull != mContentStack) {
|
||||
// there shouldn't be anything here except in an error condition
|
||||
PRInt32 index = mContentStack->Count();
|
||||
while (0 < index--) {
|
||||
nsIContent* content = (nsIContent*)mContentStack->ElementAt(index);
|
||||
PRInt32 indx = mContentStack->Count();
|
||||
while (0 < indx--) {
|
||||
nsIContent* content = (nsIContent*)mContentStack->ElementAt(indx);
|
||||
NS_RELEASE(content);
|
||||
}
|
||||
delete mContentStack;
|
||||
@@ -498,8 +498,8 @@ nsIContent*
|
||||
nsHTMLFragmentContentSink::GetCurrentContent()
|
||||
{
|
||||
if (nsnull != mContentStack) {
|
||||
PRInt32 index = mContentStack->Count() - 1;
|
||||
return (nsIContent *)mContentStack->ElementAt(index);
|
||||
PRInt32 indx = mContentStack->Count() - 1;
|
||||
return (nsIContent *)mContentStack->ElementAt(indx);
|
||||
}
|
||||
return nsnull;
|
||||
}
|
||||
@@ -520,9 +520,9 @@ nsHTMLFragmentContentSink::PopContent()
|
||||
{
|
||||
nsIContent* content = nsnull;
|
||||
if (nsnull != mContentStack) {
|
||||
PRInt32 index = mContentStack->Count() - 1;
|
||||
content = (nsIContent *)mContentStack->ElementAt(index);
|
||||
mContentStack->RemoveElementAt(index);
|
||||
PRInt32 indx = mContentStack->Count() - 1;
|
||||
content = (nsIContent *)mContentStack->ElementAt(indx);
|
||||
mContentStack->RemoveElementAt(indx);
|
||||
}
|
||||
return content;
|
||||
}
|
||||
@@ -635,30 +635,30 @@ GetAttributeValueAt(const nsIParserNode& aNode,
|
||||
// should we be doing that? If so then it needs to live in two places (bad)
|
||||
// so we should add a translate numeric entity method from the parser...
|
||||
char cbuf[100];
|
||||
PRInt32 index = 0;
|
||||
while (index < aResult.Length()) {
|
||||
PRInt32 indx = 0;
|
||||
while (indx < aResult.Length()) {
|
||||
// If we have the start of an entity (and it's not at the end of
|
||||
// our string) then translate the entity into it's unicode value.
|
||||
if ((aResult.CharAt(index++) == '&') && (index < aResult.Length())) {
|
||||
PRInt32 start = index - 1;
|
||||
PRUnichar e = aResult.CharAt(index);
|
||||
if ((aResult.CharAt(indx++) == '&') && (indx < aResult.Length())) {
|
||||
PRInt32 start = indx - 1;
|
||||
PRUnichar e = aResult.CharAt(indx);
|
||||
if (e == '#') {
|
||||
// Convert a numeric character reference
|
||||
index++;
|
||||
indx++;
|
||||
char* cp = cbuf;
|
||||
char* limit = cp + sizeof(cbuf) - 1;
|
||||
PRBool ok = PR_FALSE;
|
||||
PRInt32 slen = aResult.Length();
|
||||
while ((index < slen) && (cp < limit)) {
|
||||
PRUnichar e = aResult.CharAt(index);
|
||||
while ((indx < slen) && (cp < limit)) {
|
||||
e = aResult.CharAt(indx);
|
||||
if (e == ';') {
|
||||
index++;
|
||||
indx++;
|
||||
ok = PR_TRUE;
|
||||
break;
|
||||
}
|
||||
if ((e >= '0') && (e <= '9')) {
|
||||
*cp++ = char(e);
|
||||
index++;
|
||||
indx++;
|
||||
continue;
|
||||
}
|
||||
break;
|
||||
@@ -677,23 +677,23 @@ GetAttributeValueAt(const nsIParserNode& aNode,
|
||||
|
||||
// Remove entity from string and replace it with the integer
|
||||
// value.
|
||||
aResult.Cut(start, index - start);
|
||||
aResult.Cut(start, indx - start);
|
||||
aResult.Insert(PRUnichar(ch), start);
|
||||
index = start + 1;
|
||||
indx = start + 1;
|
||||
}
|
||||
else if (((e >= 'A') && (e <= 'Z')) ||
|
||||
((e >= 'a') && (e <= 'z'))) {
|
||||
// Convert a named entity
|
||||
index++;
|
||||
indx++;
|
||||
char* cp = cbuf;
|
||||
char* limit = cp + sizeof(cbuf) - 1;
|
||||
*cp++ = char(e);
|
||||
PRBool ok = PR_FALSE;
|
||||
PRInt32 slen = aResult.Length();
|
||||
while ((index < slen) && (cp < limit)) {
|
||||
PRUnichar e = aResult.CharAt(index);
|
||||
while ((indx < slen) && (cp < limit)) {
|
||||
e = aResult.CharAt(indx);
|
||||
if (e == ';') {
|
||||
index++;
|
||||
indx++;
|
||||
ok = PR_TRUE;
|
||||
break;
|
||||
}
|
||||
@@ -701,7 +701,7 @@ GetAttributeValueAt(const nsIParserNode& aNode,
|
||||
((e >= 'A') && (e <= 'Z')) ||
|
||||
((e >= 'a') && (e <= 'z'))) {
|
||||
*cp++ = char(e);
|
||||
index++;
|
||||
indx++;
|
||||
continue;
|
||||
}
|
||||
break;
|
||||
@@ -717,9 +717,9 @@ GetAttributeValueAt(const nsIParserNode& aNode,
|
||||
|
||||
// Remove entity from string and replace it with the integer
|
||||
// value.
|
||||
aResult.Cut(start, index - start);
|
||||
aResult.Cut(start, indx - start);
|
||||
aResult.Insert(PRUnichar(ch), start);
|
||||
index = start + 1;
|
||||
indx = start + 1;
|
||||
}
|
||||
else if (e == '{') {
|
||||
// Convert a script entity
|
||||
|
||||
Reference in New Issue
Block a user