- doc/encoding.html doc/xml.html: added I18N doc
- encoding.[ch] HTMLtree.[ch] parser.c HTMLparser.c: I18N encoding
improvements, both parser and filters, added ASCII & HTML,
fixed the ISO-Latin-1 one
- xmllint.c testHTML.c: added/made visible --encode
- debugXML.c : cleanup
- most .c files: applied patches due to warning on Windows and
when using Sun Pro cc compiler
- xpath.c : cleanup memleaks
- nanoftp.c : added a TESTING preprocessor flag for standalong
compile so that people can report bugs more easilly
- nanohttp.c : ditched socklen_t which was a portability mess
and replaced it with unsigned int.
- tree.[ch]: added xmlHasProp()
- TODO: updated
- test/ : added more test for entities, NS, encoding, HTML, wap
- configure.in: preparing for 2.2.0 release
Daniel
diff --git a/valid.c b/valid.c
index 5235991..3fb7911 100644
--- a/valid.c
+++ b/valid.c
@@ -33,7 +33,7 @@
scope int name##VPush(xmlValidCtxtPtr ctxt, type value) { \
if (ctxt->name##Nr >= ctxt->name##Max) { \
ctxt->name##Max *= 2; \
- ctxt->name##Tab = (void *) xmlRealloc(ctxt->name##Tab, \
+ ctxt->name##Tab = (type *) xmlRealloc(ctxt->name##Tab, \
ctxt->name##Max * sizeof(ctxt->name##Tab[0])); \
if (ctxt->name##Tab == NULL) { \
fprintf(stderr, "realloc failed !\n"); \
@@ -538,9 +538,11 @@
/*
* Create the Element table if needed.
*/
- table = dtd->elements;
- if (table == NULL)
- table = dtd->elements = xmlCreateElementTable();
+ table = (xmlElementTablePtr) dtd->elements;
+ if (table == NULL) {
+ table = xmlCreateElementTable();
+ dtd->elements = (void *) table;
+ }
if (table == NULL) {
fprintf(stderr, "xmlAddElementDecl: Table creation failed!\n");
return(NULL);
@@ -909,7 +911,7 @@
fprintf(stderr, "xmlScanAttributeDecl: elem == NULL\n");
return(NULL);
}
- table = dtd->attributes;
+ table = (xmlAttributeTablePtr) dtd->attributes;
if (table == NULL)
return(NULL);
@@ -1029,9 +1031,11 @@
/*
* Create the Attribute table if needed.
*/
- table = dtd->attributes;
- if (table == NULL)
- table = dtd->attributes = xmlCreateAttributeTable();
+ table = (xmlAttributeTablePtr) dtd->attributes;
+ if (table == NULL) {
+ table = xmlCreateAttributeTable();
+ dtd->attributes = (void *) table;
+ }
if (table == NULL) {
fprintf(stderr, "xmlAddAttributeDecl: Table creation failed!\n");
return(NULL);
@@ -1388,9 +1392,9 @@
/*
* Create the Notation table if needed.
*/
- table = dtd->notations;
+ table = (xmlNotationTablePtr) dtd->notations;
if (table == NULL)
- table = dtd->notations = xmlCreateNotationTable();
+ dtd->notations = table = xmlCreateNotationTable();
if (table == NULL) {
fprintf(stderr, "xmlAddNotationDecl: Table creation failed!\n");
return(NULL);
@@ -1657,9 +1661,9 @@
/*
* Create the ID table if needed.
*/
- table = doc->ids;
+ table = (xmlIDTablePtr) doc->ids;
if (table == NULL)
- table = doc->ids = xmlCreateIDTable();
+ doc->ids = table = xmlCreateIDTable();
if (table == NULL) {
fprintf(stderr, "xmlAddID: Table creation failed!\n");
return(NULL);
@@ -1804,7 +1808,7 @@
if (doc == NULL) return(-1);
if (attr == NULL) return(-1);
- table = doc->ids;
+ table = (xmlIDTablePtr) doc->ids;
if (table == NULL)
return(-1);
@@ -1848,7 +1852,7 @@
return(NULL);
}
- table = doc->ids;
+ table = (xmlIDTablePtr) doc->ids;
if (table == NULL)
return(NULL);
@@ -1935,9 +1939,9 @@
/*
* Create the Ref table if needed.
*/
- table = doc->refs;
+ table = (xmlRefTablePtr) doc->refs;
if (table == NULL)
- table = doc->refs = xmlCreateRefTable();
+ doc->refs = table = xmlCreateRefTable();
if (table == NULL) {
fprintf(stderr, "xmlAddRef: Table creation failed!\n");
return(NULL);
@@ -2065,7 +2069,7 @@
if (doc == NULL) return(-1);
if (attr == NULL) return(-1);
- table = doc->refs;
+ table = (xmlRefTablePtr) doc->refs;
if (table == NULL)
return(-1);
@@ -2109,7 +2113,7 @@
return(NULL);
}
- table = doc->refs;
+ table = (xmlRefTablePtr) doc->refs;
if (table == NULL)
return(NULL);
@@ -2150,7 +2154,7 @@
if (dtd == NULL) return(NULL);
if (dtd->elements == NULL) return(NULL);
- table = dtd->elements;
+ table = (xmlElementTablePtr) dtd->elements;
for (i = 0;i < table->nb_elements;i++) {
cur = table->table[i];
@@ -2200,7 +2204,7 @@
if (dtd == NULL) return(NULL);
if (dtd->elements == NULL) return(NULL);
- table = dtd->elements;
+ table = (xmlElementTablePtr) dtd->elements;
for (i = 0;i < table->nb_elements;i++) {
cur = table->table[i];
@@ -2234,7 +2238,7 @@
if (dtd == NULL) return(NULL);
if (dtd->attributes == NULL) return(NULL);
- table = dtd->attributes;
+ table = (xmlAttributeTablePtr) dtd->attributes;
for (i = 0;i < table->nb_attributes;i++) {
cur = table->table[i];
@@ -2288,7 +2292,7 @@
if (dtd == NULL) return(NULL);
if (dtd->attributes == NULL) return(NULL);
- table = dtd->attributes;
+ table = (xmlAttributeTablePtr) dtd->attributes;
for (i = 0;i < table->nb_attributes;i++) {
cur = table->table[i];
@@ -2320,7 +2324,7 @@
if (dtd == NULL) return(NULL);
if (dtd->notations == NULL) return(NULL);
- table = dtd->notations;
+ table = (xmlNotationTablePtr) dtd->notations;
for (i = 0;i < table->nb_notations;i++) {
cur = table->table[i];
@@ -2890,7 +2894,7 @@
* element in the external subset.
*/
nbId = 0;
- table = doc->intSubset->attributes;
+ table = (xmlAttributeTablePtr) doc->intSubset->attributes;
if (table != NULL) {
for (i = 0;i < table->nb_attributes;i++) {
if ((table->table[i]->atype == XML_ATTRIBUTE_ID) &&
@@ -3902,7 +3906,7 @@
/*
* Check all the IDREF/IDREFS attributes definition for validity
*/
- table = doc->refs;
+ table = (xmlRefTablePtr) doc->refs;
if (table != NULL) {
for (i = 0; i < table->nb_refs; i++) {
if (table->table[i]->attr->atype == XML_ATTRIBUTE_IDREF) {
@@ -4008,7 +4012,7 @@
return(0);
dtd = doc->intSubset;
if ((dtd != NULL) && (dtd->attributes != NULL)) {
- table = dtd->attributes;
+ table = (xmlAttributeTablePtr) dtd->attributes;
for (i = 0;i < table->nb_attributes;i++) {
cur = table->table[i];
@@ -4041,7 +4045,7 @@
}
dtd = doc->extSubset;
if ((dtd != NULL) && (dtd->attributes != NULL)) {
- table = dtd->attributes;
+ table = (xmlAttributeTablePtr) dtd->attributes;
for (i = 0;i < table->nb_attributes;i++) {
cur = table->table[i];