1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-07-28 00:21:53 +03:00

- 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
This commit is contained in:
Daniel Veillard
2000-07-14 14:49:25 +00:00
parent 8d86964a4a
commit 32bc74ef98
41 changed files with 2068 additions and 928 deletions

View File

@ -17,6 +17,7 @@
#ifdef LIBXML_DEBUG_ENABLED
#include <stdio.h>
#include <string.h>
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#endif
@ -39,6 +40,8 @@ void xmlDebugDumpString(FILE *output, const xmlChar *str) {
for (i = 0;i < 40;i++)
if (str[i] == 0) return;
else if (IS_BLANK(str[i])) fputc(' ', output);
else if (str[i] >= 0x80)
fprintf(output, "#%X", str[i]);
else fputc(str[i], output);
fprintf(output, "...");
}
@ -221,9 +224,11 @@ void xmlDebugDumpElemDecl(FILE *output, xmlElementPtr elem, int depth) {
fprintf(output, "PBM: not a Elem\n");
return;
}
if (elem->name != NULL)
fprintf(output, "ELEMDECL(%s)", elem->name);
else
if (elem->name != NULL) {
fprintf(output, "ELEMDECL(");
xmlDebugDumpString(output, elem->name);
fprintf(output, ")");
} else
fprintf(output, "PBM ELEMDECL noname!!!");
switch (elem->etype) {
case XML_ELEMENT_TYPE_EMPTY:
@ -288,9 +293,11 @@ void xmlDebugDumpEntityDecl(FILE *output, xmlEntityPtr ent, int depth) {
fprintf(output, "PBM: not a Entity decl\n");
return;
}
if (ent->name != NULL)
fprintf(output, "ENTITYDECL(%s)", ent->name);
else
if (ent->name != NULL) {
fprintf(output, "ENTITYDECL(");
xmlDebugDumpString(output, ent->name);
fprintf(output, ")");
} else
fprintf(output, "PBM ENTITYDECL noname!!!");
switch (ent->etype) {
case XML_INTERNAL_GENERAL_ENTITY:
@ -434,7 +441,9 @@ void xmlDebugDumpAttr(FILE *output, xmlAttrPtr attr, int depth) {
fprintf(output, shift);
fprintf(output, "ATTRIBUTE %s\n", attr->name);
fprintf(output, "ATTRIBUTE ");
xmlDebugDumpString(output, attr->name);
fprintf(output, "\n");
if (attr->children != NULL)
xmlDebugDumpNodeList(output, attr->children, depth + 1);
@ -479,10 +488,12 @@ void xmlDebugDumpOneNode(FILE *output, xmlNodePtr node, int depth) {
case XML_ELEMENT_NODE:
fprintf(output, shift);
fprintf(output, "ELEMENT ");
if (node->ns != NULL)
fprintf(output, "%s:%s\n", node->ns->prefix, node->name);
else
fprintf(output, "%s\n", node->name);
if (node->ns != NULL) {
xmlDebugDumpString(output, node->ns->prefix);
fprintf(output, ":");
}
xmlDebugDumpString(output, node->name);
fprintf(output, "\n");
break;
case XML_ATTRIBUTE_NODE:
fprintf(output, shift);