From fdrake at users.sourceforge.net Fri Apr 2 16:53:43 2004
From: fdrake at users.sourceforge.net (Fred L. Drake)
Date: Fri Apr 2 17:05:48 2004
Subject: [Expat-checkins] expat README,1.24,1.25
Message-ID: XML::Parser
module is a wrapper built around a
binding to Expat in the XML::Parser::Expat
module.
XML::Parser
module is a wrapper built around a
binding to Expat in the XML::Parser::Expat
module.
(broken into lots of tiny pieces)
(broken into lots of tiny pieces)XML_ERROR_FEATURE_REQUIRES_XML_DTD
. Otherwise, it
returns XML_ERROR_NONE
.
Note: For the purpose of checking WFC: Entity Declared, passing
+useDTD == XML_TRUE
will make the parser behave as if
+the document had a DTD with an external subset. This holds true even if
+the external entity reference handler returns without action.
From kwaclaw at users.sourceforge.net Thu Apr 29 13:53:36 2004 From: kwaclaw at users.sourceforge.net (Karl Waclawek) Date: Thu Apr 29 13:53:42 2004 Subject: [Expat-checkins] expat/lib xmlparse.c,1.131,1.132 Message-ID:Update of /cvsroot/expat/expat/lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13730 Modified Files: xmlparse.c Log Message: Fixed compile errors when XML_DTD and XML_CONTEXT_BYTES were undefined. Index: xmlparse.c =================================================================== RCS file: /cvsroot/expat/expat/lib/xmlparse.c,v retrieving revision 1.131 retrieving revision 1.132 diff -u -d -r1.131 -r1.132 --- xmlparse.c 13 Apr 2004 13:17:59 -0000 1.131 +++ xmlparse.c 29 Apr 2004 17:53:34 -0000 1.132 @@ -1466,10 +1466,10 @@ else if (bufferPtr == bufferEnd) { const char *end; int nLeftOver; + enum XML_Error result; parseEndByteIndex += len; positionPtr = s; finalBuffer = (XML_Bool)isFinal; - enum XML_Error result; errorCode = processor(parser, s, parseEndPtr = s + len, &end); @@ -1483,7 +1483,8 @@ case XML_SUSPENDED: result = XML_STATUS_SUSPENDED; break; - case XML_INITIALIZED, XML_PARSING: + case XML_INITIALIZED: + case XML_PARSING: result = XML_STATUS_OK; if (isFinal) { parsing = XML_FINISHED; @@ -1679,10 +1680,12 @@ return XML_STATUS_ERROR; default: if (resumable) { +#ifdef XML_DTD if (isParamEntity) { errorCode = XML_ERROR_SUSPEND_PE; return XML_STATUS_ERROR; } +#endif parsing = XML_SUSPENDED; } else From fdrake at users.sourceforge.net Thu Apr 29 23:18:22 2004 From: fdrake at users.sourceforge.net (Fred L. Drake) Date: Thu Apr 29 23:18:26 2004 Subject: [Expat-checkins] expat Makefile.in, 1.44, 1.45 README, 1.25, 1.26 configure.in, 1.37, 1.38 Message-ID: Update of /cvsroot/expat/expat In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29945 Modified Files: Makefile.in README configure.in Log Message: If the check library is not available, use an abbreviated implementation of the check API. This allows the unit and regression tests to be run on any system without requiring an external package. Index: Makefile.in =================================================================== RCS file: /cvsroot/expat/expat/Makefile.in,v retrieving revision 1.44 retrieving revision 1.45 diff -u -d -r1.44 -r1.45 --- Makefile.in 2 Nov 2003 08:21:30 -0000 1.44 +++ Makefile.in 30 Apr 2004 03:18:08 -0000 1.45 @@ -146,9 +146,10 @@ $(LINK_EXE) $< $(LIBRARY) tests/chardata.o: tests/chardata.c tests/chardata.h +tests/minicheck.o: tests/minicheck.c tests/minicheck.h tests/runtests.o: tests/runtests.c tests/chardata.h -tests/runtests: tests/runtests.o tests/chardata.o $(LIBRARY) - $(LINK_EXE) $^ -lcheck +tests/runtests: tests/runtests.o tests/chardata.o @MINICHECK_OBJECT@ $(LIBRARY) + $(LINK_EXE) $^ @CHECK_LIBRARY@ tests/xmlts.zip: wget --output-document=tests/xmlts.zip \ Index: README =================================================================== RCS file: /cvsroot/expat/expat/README,v retrieving revision 1.25 retrieving revision 1.26 diff -u -d -r1.25 -r1.26 --- README 2 Apr 2004 21:53:40 -0000 1.25 +++ README 30 Apr 2004 03:18:09 -0000 1.26 @@ -92,12 +92,12 @@ PATH=/usr/ccs/bin:$PATH make -The unit and regression tests for Expat require the "check" library on +The unit and regression tests for Expat can use the "check" library on Unix; more information is available at http://check.sourceforge.net/, and downloadable packages are available from the library's project -page on SourceForge: http://sourceforge.net/projects/check/. You do -not need to install the check library to build and use Expat, only to -build and run Expat's test suite. +page on SourceForge: http://sourceforge.net/projects/check/. If the +check library is not available, a greatly abbreviated implementation +of the check API is used. When using Expat with a project using autoconf for configuration, you can use the probing macro in conftools/expat.m4 to determine how to Index: configure.in =================================================================== RCS file: /cvsroot/expat/expat/configure.in,v retrieving revision 1.37 retrieving revision 1.38 diff -u -d -r1.37 -r1.38 --- configure.in 16 Oct 2003 04:32:39 -0000 1.37 +++ configure.in 30 Apr 2004 03:18:09 -0000 1.38 @@ -104,7 +104,12 @@ AC_SUBST(FILEMAP) dnl Only needed for regression tests: +AC_SUBST(MINICHECK_OBJECT) +AC_SUBST(CHECK_LIBRARY) AC_CHECK_HEADERS(check.h) +AC_CHECK_HEADER(check.h, + CHECK_LIBRARY=-lcheck, + MINICHECK_OBJECT=tests/minicheck.o) dnl Some basic configuration: AC_DEFINE([XML_NS], 1, From fdrake at users.sourceforge.net Thu Apr 29 23:18:22 2004 From: fdrake at users.sourceforge.net (Fred L. Drake) Date: Thu Apr 29 23:18:29 2004 Subject: [Expat-checkins] expat/tests minicheck.c, NONE, 1.1 minicheck.h, NONE, 1.1 chardata.c, 1.6, 1.7 runtests.c, 1.55, 1.56 Message-ID: Update of /cvsroot/expat/expat/tests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29945/tests Modified Files: chardata.c runtests.c Added Files: minicheck.c minicheck.h Log Message: If the check library is not available, use an abbreviated implementation of the check API. This allows the unit and regression tests to be run on any system without requiring an external package. --- NEW FILE: minicheck.c --- /* Miniature re-implementation of the "check" library. * * This is intended to support just enough of check to run the Expat * tests. This interface is based entirely on the portion of the * check library being used. */ #include #include #include #include "minicheck.h" Suite * suite_create(char *name) { Suite *suite = (Suite *) calloc(1, sizeof(Suite)); if (suite != NULL) { suite->name = name; } return suite; } TCase * tcase_create(char *name) { TCase *tc = (TCase *) calloc(1, sizeof(TCase)); if (tc != NULL) { tc->name = name; } return tc; } void suite_add_tcase(Suite *suite, TCase *tc) { assert(suite != NULL); assert(tc != NULL); assert(tc->next_tcase == NULL); tc->next_tcase = suite->tests; suite->tests = tc; } void tcase_add_checked_fixture(TCase *tc, tcase_setup_function setup, tcase_teardown_function teardown) { assert(tc != NULL); tc->setup = setup; tc->teardown = teardown; } void tcase_add_test(TCase *tc, tcase_test_function test) { assert(tc != NULL); if (tc->allocated == tc->ntests) { int nalloc = tc->allocated + 100; size_t new_size = sizeof(tcase_test_function) * nalloc; tcase_test_function *new_tests = realloc(tc->tests, new_size); assert(new_tests != NULL); if (new_tests != tc->tests) { free(tc->tests); tc->tests = new_tests; } tc->allocated = nalloc; } tc->tests[tc->ntests] = test; tc->ntests++; } SRunner * srunner_create(Suite *suite) { SRunner *runner = calloc(1, sizeof(SRunner)); if (runner != NULL) { runner->suite = suite; } return runner; } void srunner_set_fork_status(SRunner *runner, int status) { /* We ignore this. */ } static jmp_buf env; void srunner_run_all(SRunner *runner, int verbosity) { Suite *suite; TCase *tc; assert(runner != NULL); suite = runner->suite; tc = suite->tests; while (tc != NULL) { int i; for (i = 0; i < tc->ntests; ++i) { runner->nchecks++; if (tc->setup != NULL) { /* setup */ if (setjmp(env)) { runner->nfailures++; continue; } tc->setup(); } /* test */ if (setjmp(env)) { runner->nfailures++; continue; } (tc->tests[i])(); /* teardown */ if (tc->teardown != NULL) { if (setjmp(env)) { runner->nfailures++; continue; } tc->teardown(); } } tc = tc->next_tcase; } if (verbosity) { int passed = runner->nchecks - runner->nfailures; double percentage = ((double) passed) / runner->nchecks; int display = (int) (percentage * 100); printf("%d%%: Checks: %d, Failed: %d\n", display, runner->nchecks, runner->nfailures); } } void _fail_unless(int condition, char *const file, int line, char *msg) { longjmp(env, 1); } int srunner_ntests_failed(SRunner *runner) { assert(runner != NULL); return runner->nfailures; } void srunner_free(SRunner *runner) { free(runner); } void suite_free(Suite *suite) { free(suite); } --- NEW FILE: minicheck.h --- /* Miniature re-implementation of the "check" library. * * This is intended to support just enough of check to run the Expat * tests. This interface is based entirely on the portion of the * check library being used. * * This is *source* compatible, but not necessary *link* compatible. */ #define CK_NOFORK 0 #define CK_FORK 1 #define CK_SILENT 0 #define CK_NORMAL 1 #define CK_VERBOSE 2 #define START_TEST(testname) static void testname(void) { #define END_TEST } #define fail(msg) _fail_unless(0, __FILE__, __LINE__, msg) typedef void (*tcase_setup_function)(void); typedef void (*tcase_teardown_function)(void); typedef void (*tcase_test_function)(void); typedef struct SRunner SRunner; typedef struct Suite Suite; typedef struct TCase TCase; struct SRunner { Suite *suite; int forking; int nchecks; int nfailures; }; struct Suite { char *name; TCase *tests; }; struct TCase { char *name; tcase_setup_function setup; tcase_teardown_function teardown; tcase_test_function *tests; int ntests; int allocated; TCase *next_tcase; }; /* * Prototypes for the actual implementation. */ void _fail_unless(int condition, char *const file, int line, char *msg); Suite *suite_create(char *name); TCase *tcase_create(char *name); void suite_add_tcase(Suite *suite, TCase *tc); void tcase_add_checked_fixture(TCase *, tcase_setup_function, tcase_teardown_function); void tcase_add_test(TCase *tc, tcase_test_function test); SRunner *srunner_create(Suite *suite); void srunner_set_fork_status(SRunner *runner, int forking); void srunner_run_all(SRunner *runner, int verbosity); int srunner_ntests_failed(SRunner *runner); void srunner_free(SRunner *runner); void suite_free(Suite *suite); Index: chardata.c =================================================================== RCS file: /cvsroot/expat/expat/tests/chardata.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- chardata.c 16 Oct 2003 04:51:11 -0000 1.6 +++ chardata.c 30 Apr 2004 03:18:10 -0000 1.7 @@ -10,11 +10,10 @@ #ifdef HAVE_CHECK_H #include #else -#error This test suite requires the 'check' unit test framework (http://check.sf.net/) +#include "minicheck.h" #endif #include -#include #include #include Index: runtests.c =================================================================== RCS file: /cvsroot/expat/expat/tests/runtests.c,v retrieving revision 1.55 retrieving revision 1.56 diff -u -d -r1.55 -r1.56 --- runtests.c 2 Nov 2003 08:12:46 -0000 1.55 +++ runtests.c 30 Apr 2004 03:18:11 -0000 1.56 @@ -11,7 +11,7 @@ #ifdef HAVE_CHECK_H #include #else -#error This test suite requires the 'check' unit test framework (http://check.sf.net/) +#include "minicheck.h" #endif #include From fdrake at users.sourceforge.net Thu Apr 29 23:44:36 2004 From: fdrake at users.sourceforge.net (Fred L. Drake) Date: Thu Apr 29 23:44:40 2004 Subject: [Expat-checkins] expat/xmlwf readfilemap.c,1.10,1.11 Message-ID: Update of /cvsroot/expat/expat/xmlwf In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2296 Modified Files: readfilemap.c Log Message: patch from Shard (neoni dot net) to support BeOS Index: readfilemap.c =================================================================== RCS file: /cvsroot/expat/expat/xmlwf/readfilemap.c,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- readfilemap.c 20 Nov 2002 16:20:10 -0000 1.10 +++ readfilemap.c 30 Apr 2004 03:44:34 -0000 1.11 @@ -8,6 +8,10 @@ #include #include +#ifdef __BEOS__ +#include +#endif + #ifndef S_ISREG #ifndef S_IFREG #define S_IFREG _S_IFREG From kwaclaw at users.sourceforge.net Fri Apr 30 11:39:51 2004 From: kwaclaw at users.sourceforge.net (Karl Waclawek) Date: Fri Apr 30 11:39:55 2004 Subject: [Expat-checkins] expat/doc reference.html,1.56,1.57 Message-ID: Update of /cvsroot/expat/expat/doc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7572 Modified Files: reference.html Log Message: Fix for bug #928113 . Index: reference.html =================================================================== RCS file: /cvsroot/expat/expat/doc/reference.html,v retrieving revision 1.56 retrieving revision 1.57 diff -u -d -r1.56 -r1.57 --- reference.html 27 Apr 2004 00:50:50 -0000 1.56 +++ reference.html 30 Apr 2004 15:39:47 -0000 1.57 @@ -1252,8 +1252,8 @@ "#XML_ParseBuffer" >XML_ParseBuffer have been called on the given parser. If the handler knows how to deal with an encoding with the given name, it should fill in the
From kwaclaw at users.sourceforge.net Fri Apr 30 13:28:09 2004 From: kwaclaw at users.sourceforge.net (Karl Waclawek) Date: Fri Apr 30 13:28:12 2004 Subject: [Expat-checkins] expat/win32 README.txt,1.3,1.4 Message-ID:info
data -structure and returnXML_STATUS_ERROR
. Otherwise it -should returnXML_STATUS_OK
. The handler will be called +structure and returnXML_STATUS_OK
. Otherwise it +should returnXML_STATUS_ERROR
. The handler will be called at most once per parsed (external) entity. The optional application data pointerencodingHandlerData
will be passed back to the handler.Update of /cvsroot/expat/expat/win32 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28869 Modified Files: README.txt Log Message: Made note about building under Visual Studio .NET. Index: README.txt =================================================================== RCS file: /cvsroot/expat/expat/win32/README.txt,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- README.txt 24 Oct 2003 00:40:54 -0000 1.3 +++ README.txt 30 Apr 2004 17:28:05 -0000 1.4 @@ -1,6 +1,6 @@ Expat can be built on Windows in three ways: - using MS Visual C++ 6, Borland C++ Builder 5 or Cygwin. + using MS Visual C++ (6.0 or .NET), Borland C++ Builder 5 or Cygwin. * Cygwin: This follows the Unix build procedures. @@ -10,8 +10,12 @@ Details can be found in the ReadMe file located there. * MS Visual C++ 6: - Based on workspace (.dsw) and project files (.dsp) - located in the lib subdirectory. + Based on the workspace file expat.dsw. The related project + files (.dsp) are located in the lib subdirectory. + +* MS Visual Studio .NET 2002, 2003: + The VC++ 6 workspace file (expat.dsw) and project files (.dsp) + can be opened and imported in VS.NET without problems. * Special note about MS VC++ and runtime libraries: