1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-07-13 09:01: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

@ -49,6 +49,7 @@ static int sax = 0;
static int repeat = 0;
static int noout = 0;
static int push = 0;
static char *encoding = NULL;
xmlSAXHandler emptySAXHandlerStruct = {
NULL, /* internalSubset */
@ -638,12 +639,18 @@ void parseAndPrintFile(char *filename) {
*/
if (!noout) {
#ifdef LIBXML_DEBUG_ENABLED
if (!debug)
htmlDocDump(stdout, doc);
else
if (!debug) {
if (encoding)
htmlSaveFileEnc("-", doc, encoding);
else
htmlDocDump(stdout, doc);
} else
xmlDebugDumpDocument(stdout, doc);
#else
htmlDocDump(stdout, doc);
if (encoding)
htmlSaveFileEnc("-", doc, encoding);
else
htmlDocDump(stdout, doc);
#endif
}
@ -674,8 +681,18 @@ int main(int argc, char **argv) {
else if ((!strcmp(argv[i], "-repeat")) ||
(!strcmp(argv[i], "--repeat")))
repeat++;
else if ((!strcmp(argv[i], "-encode")) ||
(!strcmp(argv[i], "--encode"))) {
i++;
encoding = argv[i];
}
}
for (i = 1; i < argc ; i++) {
if ((!strcmp(argv[i], "-encode")) ||
(!strcmp(argv[i], "--encode"))) {
i++;
continue;
}
if (argv[i][0] != '-') {
if (repeat) {
for (count = 0;count < 100 * repeat;count++) {
@ -705,6 +722,7 @@ int main(int argc, char **argv) {
printf("\t--repeat : parse the file 100 times, for timing\n");
printf("\t--noout : do not print the result\n");
printf("\t--push : use the push mode parser\n");
printf("\t--encode encoding : output in the given encoding\n");
}
xmlCleanupParser();
xmlMemoryDump();