1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-07-29 11:41:22 +03:00

- configure.in: releasing 2.2.4

- parser.[ch]: added xmlStrEqual()
- HTMLparser.c HTMLtree.c SAX.c debugXML.c entities.c parser.c
  tree.c valid.c xlink.c xpath.c: converted all !xmlStrcmp to
  use xmlStrEqual instead
- TODO: updated
- added an XPath test
Daniel
This commit is contained in:
Daniel Veillard
2000-10-01 20:28:44 +00:00
parent bc765307ff
commit 8b5dd83f46
18 changed files with 256 additions and 203 deletions

View File

@ -61,11 +61,11 @@ htmlGetMetaEncoding(htmlDocPtr doc) {
*/
while (cur != NULL) {
if (cur->name != NULL) {
if (!xmlStrcmp(cur->name, BAD_CAST"html"))
if (xmlStrEqual(cur->name, BAD_CAST"html"))
break;
if (!xmlStrcmp(cur->name, BAD_CAST"head"))
if (xmlStrEqual(cur->name, BAD_CAST"head"))
goto found_head;
if (!xmlStrcmp(cur->name, BAD_CAST"meta"))
if (xmlStrEqual(cur->name, BAD_CAST"meta"))
goto found_meta;
}
cur = cur->next;
@ -79,9 +79,9 @@ htmlGetMetaEncoding(htmlDocPtr doc) {
*/
while (cur != NULL) {
if (cur->name != NULL) {
if (!xmlStrcmp(cur->name, BAD_CAST"head"))
if (xmlStrEqual(cur->name, BAD_CAST"head"))
break;
if (!xmlStrcmp(cur->name, BAD_CAST"meta"))
if (xmlStrEqual(cur->name, BAD_CAST"meta"))
goto found_meta;
}
cur = cur->next;
@ -97,7 +97,7 @@ found_head:
found_meta:
while (cur != NULL) {
if (cur->name != NULL) {
if (!xmlStrcmp(cur->name, BAD_CAST"meta")) {
if (xmlStrEqual(cur->name, BAD_CAST"meta")) {
xmlAttrPtr attr = cur->properties;
int http;
const xmlChar *value;
@ -191,9 +191,9 @@ htmlSetMetaEncoding(htmlDocPtr doc, const xmlChar *encoding) {
*/
while (cur != NULL) {
if (cur->name != NULL) {
if (!xmlStrcmp(cur->name, BAD_CAST"html"))
if (xmlStrEqual(cur->name, BAD_CAST"html"))
break;
if (!xmlStrcmp(cur->name, BAD_CAST"body")) {
if (xmlStrEqual(cur->name, BAD_CAST"body")) {
if (encoding == NULL)
return(0);
meta = xmlNewDocNode(doc, NULL, BAD_CAST"head", NULL);
@ -205,9 +205,9 @@ htmlSetMetaEncoding(htmlDocPtr doc, const xmlChar *encoding) {
xmlNewProp(meta, BAD_CAST"content", BAD_CAST newcontent);
return(0);
}
if (!xmlStrcmp(cur->name, BAD_CAST"head"))
if (xmlStrEqual(cur->name, BAD_CAST"head"))
goto found_head;
if (!xmlStrcmp(cur->name, BAD_CAST"meta"))
if (xmlStrEqual(cur->name, BAD_CAST"meta"))
goto found_meta;
}
cur = cur->next;
@ -221,9 +221,9 @@ htmlSetMetaEncoding(htmlDocPtr doc, const xmlChar *encoding) {
*/
while (cur != NULL) {
if (cur->name != NULL) {
if (!xmlStrcmp(cur->name, BAD_CAST"head"))
if (xmlStrEqual(cur->name, BAD_CAST"head"))
break;
if (!xmlStrcmp(cur->name, BAD_CAST"body")) {
if (xmlStrEqual(cur->name, BAD_CAST"body")) {
if (encoding == NULL)
return(0);
meta = xmlNewDocNode(doc, NULL, BAD_CAST"head", NULL);
@ -235,7 +235,7 @@ htmlSetMetaEncoding(htmlDocPtr doc, const xmlChar *encoding) {
xmlNewProp(meta, BAD_CAST"content", BAD_CAST newcontent);
return(0);
}
if (!xmlStrcmp(cur->name, BAD_CAST"meta"))
if (xmlStrEqual(cur->name, BAD_CAST"meta"))
goto found_meta;
}
cur = cur->next;
@ -272,7 +272,7 @@ found_meta:
*/
while (cur != NULL) {
if (cur->name != NULL) {
if (!xmlStrcmp(cur->name, BAD_CAST"meta")) {
if (xmlStrEqual(cur->name, BAD_CAST"meta")) {
xmlAttrPtr attr = cur->properties;
int http;
const xmlChar *value;