diff --git a/mozilla/htmlparser/src/nsHTMLTags.cpp b/mozilla/htmlparser/src/nsHTMLTags.cpp
index 8a937172e53..beedb77d168 100644
--- a/mozilla/htmlparser/src/nsHTMLTags.cpp
+++ b/mozilla/htmlparser/src/nsHTMLTags.cpp
@@ -37,17 +37,6 @@ static char* tagTable[] = {
"TR", "TT", "U", "UL", "VAR", "WBR", "XMP"
};
-
-/**
- * This method converts a tagname (string) into an int.
- * Note that we use a caseless comparision, because the tag
- * data we get is so inconsistent. It seems that doing a
- * caseless compare is faster than constantly copying the
- * tag name to a buffer, uppercasing, then comparing.
- * @update gess8/4/98
- * @param aTagname is the name of the tag to find an id for
- * @return enumerated tag value (may be eHTMLTag_unknown).
- */
nsHTMLTag NS_TagToEnum(const char* aTagName) {
int low = 0;
int high = NS_HTML_TAG_MAX - 1;
@@ -57,7 +46,7 @@ nsHTMLTag NS_TagToEnum(const char* aTagName) {
if (result == 0)
return (nsHTMLTag) (middle + 1);
if (result < 0)
- high = middle - 1;
+ high = middle - 1;
else
low = middle + 1;
}
diff --git a/mozilla/htmlparser/tools/gentags.pl b/mozilla/htmlparser/tools/gentags.pl
index aefa6284baa..8d47d5b2fd2 100644
--- a/mozilla/htmlparser/tools/gentags.pl
+++ b/mozilla/htmlparser/tools/gentags.pl
@@ -245,7 +245,7 @@ close(HEADER_FILE);
# Generate the source file
open(CPP_FILE, ">$file_base.cpp");
print CPP_FILE $copyright;
-print CPP_FILE "#include \n";
+print CPP_FILE "#include \"nsCRT.h\"\n";
print CPP_FILE "#include \"$file_base.h\"\n\n";
# Print out table of tag names
@@ -276,7 +276,7 @@ nsHTMLTag NS_TagToEnum(const char* aTagName) {
int high = NS_HTML_TAG_MAX - 1;
while (low <= high) {
int middle = (low + high) >> 1;
- int result = strcmp(aTagName, tagTable[middle]);
+ int result = nsCRT::strcasecmp(aTagName, tagTable[middle]);
if (result == 0)
return (nsHTMLTag) (middle + 1);
if (result < 0)
diff --git a/mozilla/parser/htmlparser/src/nsHTMLTags.cpp b/mozilla/parser/htmlparser/src/nsHTMLTags.cpp
index 8a937172e53..beedb77d168 100644
--- a/mozilla/parser/htmlparser/src/nsHTMLTags.cpp
+++ b/mozilla/parser/htmlparser/src/nsHTMLTags.cpp
@@ -37,17 +37,6 @@ static char* tagTable[] = {
"TR", "TT", "U", "UL", "VAR", "WBR", "XMP"
};
-
-/**
- * This method converts a tagname (string) into an int.
- * Note that we use a caseless comparision, because the tag
- * data we get is so inconsistent. It seems that doing a
- * caseless compare is faster than constantly copying the
- * tag name to a buffer, uppercasing, then comparing.
- * @update gess8/4/98
- * @param aTagname is the name of the tag to find an id for
- * @return enumerated tag value (may be eHTMLTag_unknown).
- */
nsHTMLTag NS_TagToEnum(const char* aTagName) {
int low = 0;
int high = NS_HTML_TAG_MAX - 1;
@@ -57,7 +46,7 @@ nsHTMLTag NS_TagToEnum(const char* aTagName) {
if (result == 0)
return (nsHTMLTag) (middle + 1);
if (result < 0)
- high = middle - 1;
+ high = middle - 1;
else
low = middle + 1;
}
diff --git a/mozilla/parser/htmlparser/tools/gentags.pl b/mozilla/parser/htmlparser/tools/gentags.pl
index aefa6284baa..8d47d5b2fd2 100644
--- a/mozilla/parser/htmlparser/tools/gentags.pl
+++ b/mozilla/parser/htmlparser/tools/gentags.pl
@@ -245,7 +245,7 @@ close(HEADER_FILE);
# Generate the source file
open(CPP_FILE, ">$file_base.cpp");
print CPP_FILE $copyright;
-print CPP_FILE "#include \n";
+print CPP_FILE "#include \"nsCRT.h\"\n";
print CPP_FILE "#include \"$file_base.h\"\n\n";
# Print out table of tag names
@@ -276,7 +276,7 @@ nsHTMLTag NS_TagToEnum(const char* aTagName) {
int high = NS_HTML_TAG_MAX - 1;
while (low <= high) {
int middle = (low + high) >> 1;
- int result = strcmp(aTagName, tagTable[middle]);
+ int result = nsCRT::strcasecmp(aTagName, tagTable[middle]);
if (result == 0)
return (nsHTMLTag) (middle + 1);
if (result < 0)