- 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())
Remove the __attribute__((dllimport)) and __attribute__((dllexport))
declarations; these are needed only on an obscure platform (Windows NT
on PowerPC using GCC), and were never in previous releases of Expat.
They caused way too many spurious warnings on several platforms where
they aren't actually needed but should be ignored silently.
Removing these cannot break working code.
Deal with issue discussed in SF patch #820946: Expat doesn't handle
the use of modified default calling conventions in client code.
To deal with this issue and generally clean up the mass of macros
being used to support bits of the machinery, two new macros are being
added:
- XMLCALL, which expands to whatever is needed to nail down the
calling convention for all calls across the library boundary. This
must match the convention used for the system's malloc()
implementation.
- XMLIMPORT, defined to be whatever magic is needed to mark an entry
point as imported from a dynamically loaded module (.dll, .so, .sl,
whatever).
These macros are used to define the XMLPARSEAPI macro already being
used to define the API entry points. In addition, XMLCALL is used to
define the types of callback functions, and all example code uses this
explicitly in both the distributed applications and the documentation.
* lib/internal.h:
(FASTCALL, PTRFASTCALL): only define these macros for the GNU C compiler
on i386 platforms. apprently, they do not work well on PPC ports.