Karl Waclawek [Fri, 24 Dec 2004 16:30:25 +0000 (16:30 +0000)]
Fix for bug # 1090885: Problem with Suspend/Resume mechanism.
The code path through XML_Parse() when XML_CONTEXT_BYTES
was not defined, did not take into account that XML_ResumParser()
uses bufferPtr and parseEndPtr as the pointers into the working buffer.
Karl Waclawek [Mon, 20 Dec 2004 05:04:41 +0000 (05:04 +0000)]
Made it consistent that in the case of namespace triplets, the namespace
separator between local name and prefix is always present, even when
it is omitted between uri and local name.
- avoided assumptions that glob patterns before a trailing slash will
be expanded; this seems to be a problem in some non-bash shells
(see SF bug #1033923)
- move counter updates to a shared function
- modified one of the output messages to be (hopefully) less confusing
- avoid using the "check" library's suite_free() function; it is not
available in all versions of the library, and srunner_free() is
sufficient
(closes SF bug #985192)
- avoid some compiler warnings
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.
Karl Waclawek [Tue, 16 Mar 2004 20:29:28 +0000 (20:29 +0000)]
Removed ability to suspend while parsing an external parameter entity.
The problem is that on return from the externalEntityRefHandler() call-back
the parser currently assumes that parsing of the parameter entity is finished,
and updates its internal state accordingly. I do not have the time at this
point to implement and test a solution. Being able to suspend while parsing
the DTD is also less desirable than doing the same while parsing content.
Karl Waclawek [Tue, 16 Mar 2004 04:41:54 +0000 (04:41 +0000)]
When the parser was suspended while processing an internal entity,
an XML_ERROR_NO_ELEMENTS condition could happen.
The reason was that the internal entity's start tag level was not preserved
when parsing was suspended. This has been corrected.
Karl Waclawek [Tue, 16 Mar 2004 04:27:18 +0000 (04:27 +0000)]
Fixed the XML_GetCurrentLine/ColumnNumber() functions so that
they don't produce an access violation when the value of eventPtr is
less than the value of positionPtr. This can happen when a handler
raises an exception or potentially in some border cases.
Karl Waclawek [Tue, 16 Mar 2004 03:53:24 +0000 (03:53 +0000)]
Changed signature of XML_GetParsingStatus(), changing the return value
to a parameter passed by reference (pointer). It seems that the processing
of return values is not standardized, even when calling convention and
platform are specified. This should make Expat more usable as a shared library.
Karl Waclawek [Fri, 13 Feb 2004 18:11:51 +0000 (18:11 +0000)]
Applied a simplified version of Jeremy Kloth's patch for bug #896188.
Also removed some code that was never executed, because the condition
(prologState.documentEntity && role == XML_ROLE_INNER_PARAM_ENTITY_REF)
can never be true. Improved some comments as well.
Karl Waclawek [Wed, 11 Feb 2004 16:42:40 +0000 (16:42 +0000)]
Made these compiler warnings go away:
- not all cases handled for switch based an enumeration:
added default: ; where appropriate
- char* passed where const char* was expected:
changed variable declarations to const char*
added regression test for SF bug #824420:
in non-namespace mode, Expat reported the use of an unbound namespace
when encountering an element that looks like it has a namespace prefix
(were namespaces enabled) and there's a definition for that prefix in
the DTD
Started a new page with some notes about what's changing in Expat 3.
Largely a placeholder at this point, but this can be used to tell the
community about what Expat 3 will "look like."
Make it possible to avoid the import of expat_config.h. This makes it
easier to compile Expat without the autoconf support.
This closes SF patch #458907.
- reorganize by the components that need what we're checking for
- remove the check for memcmp(); we didn't use the result of the check
(though we do use memcmp())