diff options
author | Daniel Veillard <veillard@src.gnome.org> | 2000-10-22 16:56:02 +0000 |
---|---|---|
committer | Daniel Veillard <veillard@src.gnome.org> | 2000-10-22 16:56:02 +0000 |
commit | 52afe800ace426d98ef98f742cabbbf08c7d83e3 (patch) | |
tree | 8124d4cf20521252920384e4af5e9923d2d54dff /debugXML.c | |
parent | 683cb026362f6f41000bda3a541b19c17e81ae48 (diff) | |
download | android_external_libxml2-52afe800ace426d98ef98f742cabbbf08c7d83e3.tar.gz android_external_libxml2-52afe800ace426d98ef98f742cabbbf08c7d83e3.tar.bz2 android_external_libxml2-52afe800ace426d98ef98f742cabbbf08c7d83e3.zip |
Started working on the hash table module integration, fixed a bug:
- entities.[ch] xpath.[ch] hash.[ch] debugXML.c tree.h: added/hacked
hash tables from Bjorn Reese <breese@mail1.stofanet.dk>. Switched
XPath functions and XML entities table to them. More to come...
- xmlIO.c: fixed libxml closing FILEs it didn't open.
Daniel
Diffstat (limited to 'debugXML.c')
-rw-r--r-- | debugXML.c | 19 |
1 files changed, 11 insertions, 8 deletions
@@ -773,6 +773,7 @@ void xmlDebugDumpDTD(FILE *output, xmlDtdPtr dtd) { void xmlDebugDumpEntities(FILE *output, xmlDocPtr doc) { int i; + xmlHashEntryPtr ent; xmlEntityPtr cur; if (output == NULL) output = stdout; @@ -828,9 +829,10 @@ void xmlDebugDumpEntities(FILE *output, xmlDocPtr doc) { xmlEntitiesTablePtr table = (xmlEntitiesTablePtr) doc->intSubset->entities; fprintf(output, "Entities in internal subset\n"); - for (i = 0;i < table->max_entities;i++) { - cur = table->table[i]; - while (cur != NULL) { + for (i = 0;i < table->size;i++) { + ent = table->table[i]; + while (ent != NULL) { + cur = (xmlEntityPtr) ent->payload; fprintf(output, "%d : %s : ", i, cur->name); switch (cur->etype) { case XML_INTERNAL_GENERAL_ENTITY: @@ -861,7 +863,7 @@ void xmlDebugDumpEntities(FILE *output, xmlDocPtr doc) { if (cur->content != NULL) fprintf(output, "\n content \"%s\"", cur->content); fprintf(output, "\n"); - cur = cur->nexte; + ent = ent->next; } } } else @@ -870,9 +872,10 @@ void xmlDebugDumpEntities(FILE *output, xmlDocPtr doc) { xmlEntitiesTablePtr table = (xmlEntitiesTablePtr) doc->extSubset->entities; fprintf(output, "Entities in external subset\n"); - for (i = 0;i < table->max_entities;i++) { - cur = table->table[i]; - while (cur != NULL) { + for (i = 0;i < table->size;i++) { + ent = table->table[i]; + while (ent != NULL) { + cur = (xmlEntityPtr) ent->payload; fprintf(output, "%d : %s : ", i, cur->name); switch (cur->etype) { case XML_INTERNAL_GENERAL_ENTITY: @@ -903,7 +906,7 @@ void xmlDebugDumpEntities(FILE *output, xmlDocPtr doc) { if (cur->content != NULL) fprintf(output, "\n content \"%s\"", cur->content); fprintf(output, "\n"); - cur = cur->nexte; + ent = ent->next; } } } else |