diff --git a/reactos/lib/expat/Changes b/reactos/lib/expat/Changes index b724f96a5f9..c3ed3a669fa 100644 --- a/reactos/lib/expat/Changes +++ b/reactos/lib/expat/Changes @@ -1,3 +1,20 @@ +Release 1.95.9 TBD + - We no longer use the "check" library for C unit testing; we + always use the (partial) internal implementation of the API. + - Report XML_NS setting via XML_GetFeatureList(). + - Fixed headers for use from C++. + - Updated to use libtool 1.5.10 (the most recent). + +Release 1.95.8 Fri Jul 23 2004 + - Major new feature: suspend/resume. Handlers can now request + that a parse be suspended for later resumption or aborted + altogether. See "Temporarily Stopping Parsing" in the + documentation for more details. + - Some mostly minor bug fixes, but compilation should no + longer generate warnings on most platforms. SF issues + include: 827319, 840173, 846309, 888329, 896188, 923913, + 928113, 961698, 985192. + Release 1.95.7 Mon Oct 20 2003 - Fixed enum XML_Status issue (reported on SourceForge many times), so compilers that are properly picky will be happy. diff --git a/reactos/lib/expat/MANIFEST b/reactos/lib/expat/MANIFEST index 28541205fe9..252a43918d3 100644 --- a/reactos/lib/expat/MANIFEST +++ b/reactos/lib/expat/MANIFEST @@ -1,13 +1,5 @@ -Changes -COPYING -MANIFEST -Makefile.in -README -configure -configure.in -expat_config.h.in -expat.dsw bcb5/README.txt +bcb5/all_projects.bpg bcb5/elements.bpf bcb5/elements.bpr bcb5/elements.mak @@ -33,37 +25,53 @@ bcb5/setup.bat bcb5/xmlwf.bpf bcb5/xmlwf.bpr bcb5/xmlwf.mak -conftools/PrintPath -conftools/ac_c_bigendian_cross.m4 -conftools/config.guess -conftools/config.sub -conftools/expat.m4 -conftools/install-sh -conftools/libtool.m4 -conftools/ltmain.sh -conftools/mkinstalldirs +doc/expat.png doc/reference.html doc/style.css doc/valid-xhtml10.png doc/xmlwf.1 doc/xmlwf.sgml +COPYING +Changes +MANIFEST +Makefile.in +README +configure +configure.in +expat_config.h.in +expat.dsw +conftools/PrintPath +conftools/ac_c_bigendian_cross.m4 +conftools/config.guess +conftools/config.sub +conftools/expat.m4 +conftools/get-version.sh +conftools/install-sh +conftools/libtool.m4 +conftools/ltmain.sh +conftools/mkinstalldirs examples/elements.c examples/elements.dsp examples/outline.c examples/outline.dsp +lib/Makefile.MPW lib/ascii.h lib/asciitab.h lib/expat.dsp lib/expat.h -lib/expatw.dsp +lib/expat_external.h lib/expat_static.dsp +lib/expatw.dsp lib/expatw_static.dsp lib/iasciitab.h lib/internal.h lib/latin1tab.h +lib/libexpat.def lib/libexpatw.def +lib/macconfig.h lib/nametab.h lib/utf8tab.h +lib/winconfig.h lib/xmlparse.c lib/xmlrole.c lib/xmlrole.h @@ -72,17 +80,24 @@ lib/xmltok.h lib/xmltok_impl.c lib/xmltok_impl.h lib/xmltok_ns.c -lib/winconfig.h +tests/benchmark/README.txt +tests/benchmark/benchmark.c +tests/benchmark/benchmark.dsp +tests/benchmark/benchmark.dsw tests/README.txt tests/chardata.c tests/chardata.h +tests/minicheck.c +tests/minicheck.h tests/runtests.c +tests/runtestspp.cpp tests/xmltest.sh +vms/README.vms vms/descrip.mms vms/expat_config.h -vms/README.vms -win32/expat.iss win32/MANIFEST.txt +win32/README.txt +win32/expat.iss xmlwf/codepage.c xmlwf/codepage.h xmlwf/ct.c diff --git a/reactos/lib/expat/Makefile b/reactos/lib/expat/Makefile index 7972187d4c5..b48d4df825c 100644 --- a/reactos/lib/expat/Makefile +++ b/reactos/lib/expat/Makefile @@ -1,4 +1,4 @@ -# $Id$ +# $Id: Makefile 13593 2005-02-16 14:01:34Z weiden $ PATH_TO_TOP = ../.. diff --git a/reactos/lib/expat/Makefile.in b/reactos/lib/expat/Makefile.in index f85920c188f..aadeda1ca17 100644 --- a/reactos/lib/expat/Makefile.in +++ b/reactos/lib/expat/Makefile.in @@ -41,9 +41,12 @@ INSTALL_DATA = @INSTALL_DATA@ mkinstalldirs = $(SHELL) $(top_srcdir)/conftools/mkinstalldirs MANFILE = $(srcdir)/doc/xmlwf.1 -APIHEADER = $(srcdir)/lib/expat.h +APIHEADER = $(srcdir)/lib/expat.h $(srcdir)/lib/expat_external.h LIBRARY = libexpat.la +ifndef INSTALL_ROOT +INSTALL_ROOT=$(DESTDIR) +endif default: buildlib xmlwf/xmlwf @@ -55,7 +58,8 @@ clean: cd lib && rm -f $(LIBRARY) *.o *.lo && rm -rf .libs _libs cd xmlwf && rm -f xmlwf *.o *.lo && rm -rf .libs _libs cd examples && rm -f elements outline *.o *.lo && rm -rf .libs _libs - cd tests && rm -rf .libs runtests runtests.o chardata.o + cd tests && rm -rf .libs runtests runtests.o runtestspp runtestspp.o + cd tests && rm -f chardata.o minicheck.o rm -rf .libs libexpat.la rm -f examples/core tests/core xmlwf/core @@ -69,26 +73,28 @@ extraclean: distclean rm -f expat_config.h.in configure rm -f conftools/ltconfig conftools/ltmain.sh conftools/libtool.m4 -check: tests/runtests +check: tests/runtests tests/runtestspp tests/runtests + tests/runtestspp install: xmlwf/xmlwf installlib - $(mkinstalldirs) $(bindir) $(man1dir) - $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) xmlwf/xmlwf $(bindir)/xmlwf - $(INSTALL_DATA) $(MANFILE) $(man1dir) + $(mkinstalldirs) $(INSTALL_ROOT)$(bindir) $(INSTALL_ROOT)$(man1dir) + $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) xmlwf/xmlwf $(INSTALL_ROOT)$(bindir)/xmlwf + $(INSTALL_DATA) $(MANFILE) $(INSTALL_ROOT)$(man1dir) installlib: $(LIBRARY) $(APIHEADER) - $(mkinstalldirs) $(libdir) $(includedir) - $(LIBTOOL) --mode=install $(INSTALL) $(LIBRARY) $(libdir)/$(LIBRARY) - $(INSTALL_DATA) $(APIHEADER) $(includedir) + $(mkinstalldirs) $(INSTALL_ROOT)$(libdir) $(INSTALL_ROOT)$(includedir) + $(LIBTOOL) --mode=install $(INSTALL) $(LIBRARY) $(INSTALL_ROOT)$(libdir)/$(LIBRARY) + for FN in $(APIHEADER) ; do $(INSTALL_DATA) $$FN $(INSTALL_ROOT)$(includedir) ; done uninstall: uninstalllib - $(LIBTOOL) --mode=uninstall rm -f $(bindir)/xmlwf - rm -f $(man1dir)/xmlwf.1 + $(LIBTOOL) --mode=uninstall rm -f $(INSTALL_ROOT)$(bindir)/xmlwf + rm -f $(INSTALL_ROOT)$(man1dir)/xmlwf.1 uninstalllib: - $(LIBTOOL) --mode=uninstall rm -f $(libdir)/$(LIBRARY) - rm -f $(includedir)/$(APIHEADER) + $(LIBTOOL) --mode=uninstall rm -f $(INSTALL_ROOT)$(libdir)/$(LIBRARY) + rm -f $(INSTALL_ROOT)$(includedir)/expat.h + rm -f $(INSTALL_ROOT)$(includedir)/expat_external.h # for VPATH builds (invoked by configure) mkdir-init: @@ -108,25 +114,27 @@ VSNFLAG = -version-info @LIBCURRENT@:@LIBREVISION@:@LIBAGE@ ### autoconf this? LTFLAGS = --silent -COMPILE = $(CC) $(CFLAGS) $(DEFS) $(CPPFLAGS) $(INCLUDES) +COMPILE = $(CC) $(INCLUDES) $(CFLAGS) $(DEFS) $(CPPFLAGS) +CXXCOMPILE = $(CXX) $(INCLUDES) $(CFLAGS) $(DEFS) $(CPPFLAGS) LTCOMPILE = $(LIBTOOL) $(LTFLAGS) --mode=compile $(COMPILE) LINK_LIB = $(LIBTOOL) $(LTFLAGS) --mode=link $(COMPILE) -no-undefined $(VSNFLAG) -rpath $(libdir) $(LDFLAGS) -o $@ LINK_EXE = $(LIBTOOL) $(LTFLAGS) --mode=link $(COMPILE) $(LDFLAGS) -o $@ +LINK_CXX_EXE = $(LIBTOOL) $(LTFLAGS) --mode=link $(CXXCOMPILE) $(LDFLAGS) -o $@ LIB_OBJS = lib/xmlparse.lo lib/xmltok.lo lib/xmlrole.lo $(LIBRARY): $(LIB_OBJS) $(LINK_LIB) $(LIB_OBJS) lib/xmlparse.lo: lib/xmlparse.c lib/expat.h lib/xmlrole.h lib/xmltok.h \ - $(top_builddir)/expat_config.h lib/internal.h + $(top_builddir)/expat_config.h lib/expat_external.h lib/internal.h lib/xmlrole.lo: lib/xmlrole.c lib/ascii.h lib/xmlrole.h \ - $(top_builddir)/expat_config.h lib/internal.h + $(top_builddir)/expat_config.h lib/expat_external.h lib/internal.h lib/xmltok.lo: lib/xmltok.c lib/xmltok_impl.c lib/xmltok_ns.c \ lib/ascii.h lib/asciitab.h lib/iasciitab.h lib/latin1tab.h \ lib/nametab.h lib/utf8tab.h lib/xmltok.h lib/xmltok_impl.h \ - $(top_builddir)/expat_config.h + $(top_builddir)/expat_config.h lib/expat_external.h lib/internal.h XMLWF_OBJS = xmlwf/xmlwf.o xmlwf/xmlfile.o xmlwf/codepage.o xmlwf/@FILEMAP@.o @@ -146,9 +154,13 @@ examples/outline: examples/outline.o $(LIBRARY) $(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 tests/minicheck.o $(LIBRARY) + $(LINK_EXE) $^ +tests/runtestspp.o: tests/runtestspp.cpp tests/runtests.c tests/chardata.h +tests/runtestspp: tests/runtestspp.o tests/chardata.o tests/minicheck.o $(LIBRARY) + $(LINK_CXX_EXE) $^ tests/xmlts.zip: wget --output-document=tests/xmlts.zip \ diff --git a/reactos/lib/expat/README b/reactos/lib/expat/README index d391c7e1935..0885292cf0b 100644 --- a/reactos/lib/expat/README +++ b/reactos/lib/expat/README @@ -1,5 +1,5 @@ - Expat, Release 1.95.7 + Expat, Release 1.95.8 This is Expat, a C library for parsing XML, written by James Clark. Expat is a stream-oriented XML parser. This means that you register @@ -92,13 +92,6 @@ you're using ksh or bash, use this command to build: PATH=/usr/ccs/bin:$PATH make -The unit and regression tests for Expat require 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. - When using Expat with a project using autoconf for configuration, you can use the probing macro in conftools/expat.m4 to determine how to include Expat. See the comments at the top of that file for more @@ -116,4 +109,4 @@ Discussion related to the direction of future expat development takes place on expat-discuss@mail.libexpat.org. Archives of this list and other Expat-related lists may be found at: - http://mail.libexpat.org/mailman-21/listinfo/ + http://mail.libexpat.org/mailman/listinfo/ diff --git a/reactos/lib/expat/configure.in b/reactos/lib/expat/configure.in index 035cd421595..b53e4556a0a 100644 --- a/reactos/lib/expat/configure.in +++ b/reactos/lib/expat/configure.in @@ -103,8 +103,37 @@ else fi AC_SUBST(FILEMAP) -dnl Only needed for regression tests: -AC_CHECK_HEADERS(check.h) +dnl Needed for the test support code; this was found at +dnl http://lists.gnu.org/archive/html/bug-autoconf/2002-07/msg00028.html + +# AC_CPP_FUNC +# ------------------ # +# Checks to see if ANSI C99 CPP variable __func__ works. +# If not, perhaps __FUNCTION__ works instead. +# If not, we'll just define __func__ to "". +AC_DEFUN([AC_CPP_FUNC], +[AC_REQUIRE([AC_PROG_CC_STDC])dnl +AC_CACHE_CHECK([for an ANSI C99-conforming __func__], ac_cv_cpp_func, +[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], +[[char *foo = __func__;]])], + [ac_cv_cpp_func=yes], + [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], +[[char *foo = __FUNCTION__;]])], + [ac_cv_cpp_func=__FUNCTION__], + [ac_cv_cpp_func=no])])]) +if test $ac_cv_cpp_func = __FUNCTION__; then + AC_DEFINE(__func__,__FUNCTION__, + [Define to __FUNCTION__ or "" if `__func__' does not conform to +ANSI C.]) +elif test $ac_cv_cpp_func = no; then + AC_DEFINE(__func__,"", + [Define to __FUNCTION__ or "" if `__func__' does not conform to +ANSI C.]) +fi +])# AC_CPP_FUNC + +AC_CPP_FUNC + dnl Some basic configuration: AC_DEFINE([XML_NS], 1, diff --git a/reactos/lib/expat/conftools/ac_c_bigendian_cross.m4 b/reactos/lib/expat/conftools/ac_c_bigendian_cross.m4 index 59912635b64..8ed3edb24fb 100644 --- a/reactos/lib/expat/conftools/ac_c_bigendian_cross.m4 +++ b/reactos/lib/expat/conftools/ac_c_bigendian_cross.m4 @@ -7,7 +7,7 @@ dnl The implementation will create a binary, and instead of running dnl the binary it will be grep'ed for some symbols that will look dnl different for different endianess of the binary. dnl -dnl @version $Id$ +dnl @version $Id: ac_c_bigendian_cross.m4,v 1.2 2001/10/01 20:03:13 fdrake Exp $ dnl @author Guido Draheim dnl AC_DEFUN([AC_C_BIGENDIAN_CROSS], diff --git a/reactos/lib/expat/conftools/mkinstalldirs b/reactos/lib/expat/conftools/mkinstalldirs index 6b3b5fc5d4d..c5291db0365 100644 --- a/reactos/lib/expat/conftools/mkinstalldirs +++ b/reactos/lib/expat/conftools/mkinstalldirs @@ -4,7 +4,7 @@ # Created: 1993-05-16 # Public domain -# $Id$ +# $Id: mkinstalldirs,v 1.1 2000/09/18 16:26:21 coopercc Exp $ errstatus=0 diff --git a/reactos/lib/expat/doc/reference.html b/reactos/lib/expat/doc/reference.html index 16a0050ea30..ebcde6cf3a6 100644 --- a/reactos/lib/expat/doc/reference.html +++ b/reactos/lib/expat/doc/reference.html @@ -19,7 +19,7 @@

The Expat XML Parser

- Release 1.95.7 + Release 1.95.8 @@ -72,6 +72,9 @@ interface.

  • XML_Parse
  • XML_ParseBuffer
  • XML_GetBuffer
  • +
  • XML_StopParser
  • +
  • XML_ResumeParser
  • +
  • XML_GetParsingStatus
  • Handler Setting Functions @@ -317,12 +320,12 @@ and the definition of character types in the case of
    XML_DTD
    Include support for using and reporting DTD-based content. If -this is defined, default attribute values from the DTD are reported -and attribute value normalization occurs based on the type of -attributes. Callbacks can be registered which report information from -the DTD (including content models and attribute definitions) only if -this is defined. Without this, Expat has a smaller memory footprint -and can be faster.
    +this is defined, default attribute values from an external DTD subset +are reported and attribute value normalization occurs based on the +type of attributes defined in the external subset. Without +this, Expat has a smaller memory footprint and can be faster, but will +not load external entities or process conditional sections. This does +not affect the set of functions available in the API.
    XML_NS
    When defined, support for the is used. Defining this implies
    The number of input bytes of markup context which the parser will ensure are available for reporting via XML_GetInputContext. This is -normally set to 1024. If this is not defined, the input context will -not be available and XML_GetInputContext will always report NULL. Without -this, Expat has a smaller memory footprint and can be faster.
    +normally set to 1024, and must be set to a positive interger. If this +is not defined, the input context will not be available and XML_GetInputContext will +always report NULL. Without this, Expat has a smaller memory +footprint and can be faster.
    XML_STATIC
    On Windows, this should be set if Expat is going to be linked @@ -415,7 +419,7 @@ by these functions is an opaque pointer (i.e. "expat.h" declares it as void *) to data with further internal structure. In order to free the memory associated with this object you must call XML_ParserFree. Note that if you have -provided any user data that gets stored in the +provided any user data that gets stored in the parser, then your application is responsible for freeing it prior to calling XML_ParserFree.

    @@ -509,7 +513,7 @@ argument received by most handlers. In the XML_Parser if the parser itself is passed. When the parser is passed, the user data may be retrieved using XML_GetUserData.

    +>XML_GetUserData.

    One common case where multiple calls to a single handler may need to communicate using an application data structure is the case when @@ -587,12 +591,12 @@ this expanded form is a concatenation of the namespace URI, the separator character (which is the 2nd argument to XML_ParserCreateNS), and the local name (i.e. the part after the colon). Names with undeclared prefixes -are passed through to the handlers unchanged, with the prefix and -colon still attached. Unprefixed attribute names are never expanded, +are not well-formed when namespace processing is enabled, and will +trigger an error. Unprefixed attribute names are never expanded, and unprefixed element names are only expanded when they are in the scope of a default namespace.

    -

    However if However if XML_SetReturnNSTriplet has been called with a non-zero do_nst parameter, then the expanded form for names with an explicit prefix is a concatenation of: URI, separator, local name, @@ -602,7 +606,7 @@ separator, prefix.

    for the end of a scope of a declaration with the XML_SetNamespaceDeclHandler function. The StartNamespaceDeclHandler is called prior to the start -tag handler and the EndNamespaceDeclHandler is called before the +tag handler and the EndNamespaceDeclHandler is called after the corresponding end tag that ends the namespace's scope. The namespace start handler gets passed the prefix and URI for the namespace. For a default namespace declaration (xmlns='...'), the prefix will be null. @@ -727,6 +731,149 @@ arguments:

    In order to read an external DTD, you also have to set an external entity reference handler as described above.

    +

    Temporarily Stopping Parsing

    + +

    Expat 1.95.8 introduces a new feature: its now possible to stop +parsing temporarily from within a handler function, even if more data +has already been passed into the parser. Applications for this +include

    + +
      +
    • Supporting the XInclude specification.
    • + +
    • Delaying further processing until additional information is + available from some other source.
    • + +
    • Adjusting processor load as task priorities shift within an + application.
    • + +
    • Stopping parsing completely (simply free or reset the parser + instead of resuming in the outer parsing loop). This can be useful + if a application-domain error is found in the XML being parsed or if + the result of the parse is determined not to be useful after + all.
    • +
    + +

    To take advantage of this feature, the main parsing loop of an +application needs to support this specifically. It cannot be +supported with a parsing loop compatible with Expat 1.95.7 or +earlier (though existing loops will continue to work without +supporting the stop/resume feature).

    + +

    An application that uses this feature for a single parser will have +the rough structure (in pseudo-code):

    + +
    +fd = open_input()
    +p = create_parser()
    +
    +if parse_xml(p, fd) {
    +  /* suspended */
    +
    +  int suspended = 1;
    +
    +  while (suspended) {
    +    do_something_else()
    +    if ready_to_resume() {
    +      suspended = continue_parsing(p, fd);
    +    }
    +  }
    +}
    +
    + +

    An application that may resume any of several parsers based on +input (either from the XML being parsed or some other source) will +certainly have more interesting control structures.

    + +

    This C function could be used for the parse_xml +function mentioned in the pseudo-code above:

    + +
    +#define BUFF_SIZE 10240
    +
    +/* Parse a document from the open file descriptor 'fd' until the parse
    +   is complete (the document has been completely parsed, or there's
    +   been an error), or the parse is stopped.  Return non-zero when
    +   the parse is merely suspended.
    +*/
    +int
    +parse_xml(XML_Parser p, int fd)
    +{
    +  for (;;) {
    +    int last_chunk;
    +    int bytes_read;
    +    enum XML_Status status;
    +
    +    void *buff = XML_GetBuffer(p, BUFF_SIZE);
    +    if (buff == NULL) {
    +      /* handle error... */
    +      return 0;
    +    }
    +    bytes_read = read(fd, buff, BUFF_SIZE);
    +    if (bytes_read < 0) {
    +      /* handle error... */
    +      return 0;
    +    }
    +    status = XML_ParseBuffer(p, bytes_read, bytes_read == 0);
    +    switch (status) {
    +      case XML_STATUS_ERROR:
    +        /* handle error... */
    +        return 0;
    +      case XML_STATUS_SUSPENDED:
    +        return 1;
    +    }
    +    if (bytes_read == 0)
    +      return 0;
    +  }
    +}
    +
    + +

    The corresponding continue_parsing function is +somewhat simpler, since it only need deal with the return code from +XML_ResumeParser; it can +delegate the input handling to the parse_xml +function:

    + +
    +/* Continue parsing a document which had been suspended.  The 'p' and
    +   'fd' arguments are the same as passed to parse_xml().  Return
    +   non-zero when the parse is suspended.
    +*/
    +int
    +continue_parsing(XML_Parser p, int fd)
    +{
    +  enum XML_Status status = XML_ResumeParser(p);
    +  switch (status) {
    +    case XML_STATUS_ERROR:
    +      /* handle error... */
    +      return 0;
    +    case XML_ERROR_NOT_SUSPENDED:
    +      /* handle error... */
    +      return 0;.
    +    case XML_STATUS_SUSPENDED:
    +      return 1;
    +  }
    +  return parse_xml(p, fd);
    +}
    +
    + +

    Now that we've seen what a mess the top-level parsing loop can +become, what have we gained? Very simply, we can now use the XML_StopParser function to stop +parsing, without having to go to great lengths to avoid additional +processing that we're expecting to ignore. As a bonus, we get to stop +parsing temporarily, and come back to it when we're +ready.

    + +

    To stop parsing from a handler function, use the XML_StopParser function. This function +takes two arguments; the parser being stopped and a flag indicating +whether the parse can be resumed in the future.

    + + + +
    @@ -761,7 +908,11 @@ Constructs a new parser that has namespace processing in effect. Namespace expanded element names and attribute names are returned as a concatenation of the namespace URI, sep, and the local part of the name. This means that you should pick a character for sep that can't be -part of a legal URI. +part of a legal URI. There is a special case when sep is the null +character '\0': the namespace URI and the local part will be +concatenated without any separator - this is intended to support RDF processors. +It is a programming error to use the null separator with +namespace triplets.
     XML_Parser XMLCALL
    @@ -818,8 +969,10 @@ XML_ParserReset(XML_Parser p,
     
    Clean up the memory structures maintained by the parser so that it may be used again. After this has been called, parser is -ready to start parsing a new document. This function may not be used -on a parser created using XML_ExternalEntityParserCreate; it will return XML_FALSE in that case. Returns XML_TRUE on success. Your application is responsible for @@ -915,6 +1068,125 @@ for (;;) {
    +
    +enum XML_Status XMLCALL
    +XML_StopParser(XML_Parser p,
    +               XML_Bool resumable);
    +
    +
    + +

    Stops parsing, causing XML_Parse or XML_ParseBuffer to return. Must be called from within a +call-back handler, except when aborting (when resumable +is XML_FALSE) an already suspended parser. Some +call-backs may still follow because they would otherwise get +lost, including +

      +
    • the end element handler for empty elements when stopped in the + start element handler,
    • +
    • end namespace declaration handler when stopped in the end + element handler,
    • +
    +and possibly others.

    + +

    This can be called from most handlers, including DTD related +call-backs, except when parsing an external parameter entity and +resumable is XML_TRUE. Returns +XML_STATUS_OK when successful, +XML_STATUS_ERROR otherwise. The possible error codes +are:

    +
    +
    XML_ERROR_SUSPENDED
    +
    when suspending an already suspended parser.
    +
    XML_ERROR_FINISHED
    +
    when the parser has already finished.
    +
    XML_ERROR_SUSPEND_PE
    +
    when suspending while parsing an external PE.
    +
    + +

    Since the stop/resume feature requires application support in the +outer parsing loop, it is an error to call this function for a parser +not being handled appropriately; see Temporarily Stopping Parsing for more information.

    + +

    When resumable is XML_TRUE then parsing +is suspended, that is, XML_Parse and XML_ParseBuffer return XML_STATUS_SUSPENDED. +Otherwise, parsing is aborted, that is, XML_Parse and XML_ParseBuffer return +XML_STATUS_ERROR with error code +XML_ERROR_ABORTED.

    + +

    Note: +This will be applied to the current parser instance only, that is, if +there is a parent parser then it will continue parsing when the +external entity reference handler returns. It is up to the +implementation of that handler to call XML_StopParser on the parent parser +(recursively), if one wants to stop parsing altogether.

    + +

    When suspended, parsing can be resumed by calling XML_ResumeParser.

    + +

    New in Expat 1.95.8.

    +
    + +
    +enum XML_Status XMLCALL
    +XML_ResumeParser(XML_Parser p);
    +
    +
    +

    Resumes parsing after it has been suspended with XML_StopParser. Must not be called from +within a handler call-back. Returns same status codes as XML_Parse or XML_ParseBuffer. An additional error +code, XML_ERROR_NOT_SUSPENDED, will be returned if the +parser was not currently suspended.

    + +

    Note: +This must be called on the most deeply nested child parser instance +first, and on its parent parser only after the child parser has +finished, to be applied recursively until the document entity's parser +is restarted. That is, the parent parser will not resume by itself +and it is up to the application to call XML_ResumeParser on it at the +appropriate moment.

    + +

    New in Expat 1.95.8.

    +
    + +
    +void XMLCALL
    +XML_GetParsingStatus(XML_Parser p,
    +                     XML_ParsingStatus *status);
    +
    +
    +enum XML_Parsing {
    +  XML_INITIALIZED,
    +  XML_PARSING,
    +  XML_FINISHED,
    +  XML_SUSPENDED
    +};
    +
    +typedef struct {
    +  enum XML_Parsing parsing;
    +  XML_Bool finalBuffer;
    +} XML_ParsingStatus;
    +
    +
    +

    Returns status of parser with respect to being initialized, +parsing, finished, or suspended, and whether the final buffer is being +processed. The status parameter must not be +NULL.

    + +

    New in Expat 1.95.8.

    +
    + +

    Handler Setting

    Although handlers are typically set prior to parsing and left alone, an @@ -1252,8 +1524,8 @@ href="#builtin_encodings">built in set. This should be done before "#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 info data -structure and return XML_STATUS_ERROR. Otherwise it -should return XML_STATUS_OK. The handler will be called +structure and return XML_STATUS_OK. Otherwise it +should return XML_STATUS_ERROR. The handler will be called at most once per parsed (external) entity. The optional application data pointer encodingHandlerData will be passed back to the handler.

    @@ -1685,6 +1957,9 @@ untranslated bytes of the input.

    Only a limited amount of context is kept, so if the event triggering a call spans over a very large amount of input, the actual parse position may be before the beginning of the buffer.

    + +

    If XML_CONTEXT_BYTES is not defined, this will always +return NULL.

    Miscellaneous functions

    @@ -1837,6 +2112,11 @@ external entity reference handler set via 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.

    diff --git a/reactos/lib/expat/doc/style.css b/reactos/lib/expat/doc/style.css
    index 8f19fbd55fd..69df30bcecb 100644
    --- a/reactos/lib/expat/doc/style.css
    +++ b/reactos/lib/expat/doc/style.css
    @@ -49,6 +49,17 @@ body {
       margin-right: 10%;
     }
     
    +.pseudocode {
    +  padding-left: 1em;
    +  padding-top: .5em;
    +  padding-bottom: .5em;
    +  border: solid thin;
    +  margin: 1em 0;
    +  background-color: rgb(250,220,180);
    +  margin-left: 2em;
    +  margin-right: 10%;
    +}
    +
     .handler {
       width: 100%;
       border-top-width: thin;  
    diff --git a/reactos/lib/expat/examples/elements.c b/reactos/lib/expat/examples/elements.c
    index 78d7d933407..52f47adf46d 100644
    --- a/reactos/lib/expat/examples/elements.c
    +++ b/reactos/lib/expat/examples/elements.c
    @@ -11,7 +11,7 @@ static void XMLCALL
     startElement(void *userData, const char *name, const char **atts)
     {
       int i;
    -  int *depthPtr = userData;
    +  int *depthPtr = (int *)userData;
       for (i = 0; i < *depthPtr; i++)
         putchar('\t');
       puts(name);
    @@ -21,7 +21,7 @@ startElement(void *userData, const char *name, const char **atts)
     static void XMLCALL
     endElement(void *userData, const char *name)
     {
    -  int *depthPtr = userData;
    +  int *depthPtr = (int *)userData;
       *depthPtr -= 1;
     }
     
    diff --git a/reactos/lib/expat/examples/elements.dsp b/reactos/lib/expat/examples/elements.dsp
    index 8caa2798dee..57ac706fe43 100644
    --- a/reactos/lib/expat/examples/elements.dsp
    +++ b/reactos/lib/expat/examples/elements.dsp
    @@ -1,103 +1,103 @@
    -# Microsoft Developer Studio Project File - Name="elements" - Package Owner=<4>
    -# Microsoft Developer Studio Generated Build File, Format Version 6.00
    -# ** DO NOT EDIT **
    -
    -# TARGTYPE "Win32 (x86) Console Application" 0x0103
    -
    -CFG=elements - Win32 Debug
    -!MESSAGE This is not a valid makefile. To build this project using NMAKE,
    -!MESSAGE use the Export Makefile command and run
    -!MESSAGE 
    -!MESSAGE NMAKE /f "elements.mak".
    -!MESSAGE 
    -!MESSAGE You can specify a configuration when running NMAKE
    -!MESSAGE by defining the macro CFG on the command line. For example:
    -!MESSAGE 
    -!MESSAGE NMAKE /f "elements.mak" CFG="elements - Win32 Debug"
    -!MESSAGE 
    -!MESSAGE Possible choices for configuration are:
    -!MESSAGE 
    -!MESSAGE "elements - Win32 Release" (based on "Win32 (x86) Console Application")
    -!MESSAGE "elements - Win32 Debug" (based on "Win32 (x86) Console Application")
    -!MESSAGE 
    -
    -# Begin Project
    -# PROP AllowPerConfigDependencies 0
    -# PROP Scc_ProjName ""
    -# PROP Scc_LocalPath ""
    -CPP=cl.exe
    -RSC=rc.exe
    -
    -!IF  "$(CFG)" == "elements - Win32 Release"
    -
    -# PROP BASE Use_MFC 0
    -# PROP BASE Use_Debug_Libraries 0
    -# PROP BASE Output_Dir "Release"
    -# PROP BASE Intermediate_Dir "Release"
    -# PROP BASE Target_Dir ""
    -# PROP Use_MFC 0
    -# PROP Use_Debug_Libraries 0
    -# PROP Output_Dir "Release"
    -# PROP Intermediate_Dir "Release"
    -# PROP Ignore_Export_Lib 0
    -# PROP Target_Dir ""
    -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
    -# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\lib" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "XML_STATIC" /FD /c
    -# SUBTRACT CPP /X /YX
    -# ADD BASE RSC /l 0x409 /d "NDEBUG"
    -# ADD RSC /l 0x409 /d "NDEBUG"
    -BSC32=bscmake.exe
    -# ADD BASE BSC32 /nologo
    -# ADD BSC32 /nologo
    -LINK32=link.exe
    -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
    -# ADD LINK32 odbccp32.lib libexpatMT.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib /nologo /subsystem:console /pdb:none /machine:I386 /libpath:"..\lib\Release_static"
    -
    -!ELSEIF  "$(CFG)" == "elements - Win32 Debug"
    -
    -# PROP BASE Use_MFC 0
    -# PROP BASE Use_Debug_Libraries 1
    -# PROP BASE Output_Dir "Debug"
    -# PROP BASE Intermediate_Dir "Debug"
    -# PROP BASE Target_Dir ""
    -# PROP Use_MFC 0
    -# PROP Use_Debug_Libraries 1
    -# PROP Output_Dir "Debug"
    -# PROP Intermediate_Dir "Debug"
    -# PROP Ignore_Export_Lib 0
    -# PROP Target_Dir ""
    -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
    -# ADD CPP /nologo /MTd /W3 /GX /ZI /Od /I "..\lib" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "XML_STATIC" /FR /FD /GZ /c
    -# ADD BASE RSC /l 0x409 /d "_DEBUG"
    -# ADD RSC /l 0x409 /d "_DEBUG"
    -BSC32=bscmake.exe
    -# ADD BASE BSC32 /nologo
    -# ADD BSC32 /nologo
    -LINK32=link.exe
    -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
    -# ADD LINK32 odbccp32.lib libexpatMT.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib /nologo /subsystem:console /pdb:none /debug /machine:I386 /libpath:"..\lib\Debug_static"
    -
    -!ENDIF 
    -
    -# Begin Target
    -
    -# Name "elements - Win32 Release"
    -# Name "elements - Win32 Debug"
    -# Begin Group "Source Files"
    -
    -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
    -# Begin Source File
    -
    -SOURCE=.\elements.c
    -# End Source File
    -# End Group
    -# Begin Group "Header Files"
    -
    -# PROP Default_Filter "h;hpp;hxx;hm;inl"
    -# End Group
    -# Begin Group "Resource Files"
    -
    -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
    -# End Group
    -# End Target
    -# End Project
    +# Microsoft Developer Studio Project File - Name="elements" - Package Owner=<4>
    +# Microsoft Developer Studio Generated Build File, Format Version 6.00
    +# ** DO NOT EDIT **
    +
    +# TARGTYPE "Win32 (x86) Console Application" 0x0103
    +
    +CFG=elements - Win32 Debug
    +!MESSAGE This is not a valid makefile. To build this project using NMAKE,
    +!MESSAGE use the Export Makefile command and run
    +!MESSAGE 
    +!MESSAGE NMAKE /f "elements.mak".
    +!MESSAGE 
    +!MESSAGE You can specify a configuration when running NMAKE
    +!MESSAGE by defining the macro CFG on the command line. For example:
    +!MESSAGE 
    +!MESSAGE NMAKE /f "elements.mak" CFG="elements - Win32 Debug"
    +!MESSAGE 
    +!MESSAGE Possible choices for configuration are:
    +!MESSAGE 
    +!MESSAGE "elements - Win32 Release" (based on "Win32 (x86) Console Application")
    +!MESSAGE "elements - Win32 Debug" (based on "Win32 (x86) Console Application")
    +!MESSAGE 
    +
    +# Begin Project
    +# PROP AllowPerConfigDependencies 0
    +# PROP Scc_ProjName ""
    +# PROP Scc_LocalPath ""
    +CPP=cl.exe
    +RSC=rc.exe
    +
    +!IF  "$(CFG)" == "elements - Win32 Release"
    +
    +# PROP BASE Use_MFC 0
    +# PROP BASE Use_Debug_Libraries 0
    +# PROP BASE Output_Dir "Release"
    +# PROP BASE Intermediate_Dir "Release"
    +# PROP BASE Target_Dir ""
    +# PROP Use_MFC 0
    +# PROP Use_Debug_Libraries 0
    +# PROP Output_Dir "Release"
    +# PROP Intermediate_Dir "Release"
    +# PROP Ignore_Export_Lib 0
    +# PROP Target_Dir ""
    +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
    +# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\lib" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "XML_STATIC" /FD /c
    +# SUBTRACT CPP /X /YX
    +# ADD BASE RSC /l 0x409 /d "NDEBUG"
    +# ADD RSC /l 0x409 /d "NDEBUG"
    +BSC32=bscmake.exe
    +# ADD BASE BSC32 /nologo
    +# ADD BSC32 /nologo
    +LINK32=link.exe
    +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
    +# ADD LINK32 odbccp32.lib libexpatMT.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib /nologo /subsystem:console /pdb:none /machine:I386 /libpath:"..\lib\Release_static"
    +
    +!ELSEIF  "$(CFG)" == "elements - Win32 Debug"
    +
    +# PROP BASE Use_MFC 0
    +# PROP BASE Use_Debug_Libraries 1
    +# PROP BASE Output_Dir "Debug"
    +# PROP BASE Intermediate_Dir "Debug"
    +# PROP BASE Target_Dir ""
    +# PROP Use_MFC 0
    +# PROP Use_Debug_Libraries 1
    +# PROP Output_Dir "Debug"
    +# PROP Intermediate_Dir "Debug"
    +# PROP Ignore_Export_Lib 0
    +# PROP Target_Dir ""
    +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
    +# ADD CPP /nologo /MTd /W3 /GX /ZI /Od /I "..\lib" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "XML_STATIC" /FR /FD /GZ /c
    +# ADD BASE RSC /l 0x409 /d "_DEBUG"
    +# ADD RSC /l 0x409 /d "_DEBUG"
    +BSC32=bscmake.exe
    +# ADD BASE BSC32 /nologo
    +# ADD BSC32 /nologo
    +LINK32=link.exe
    +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
    +# ADD LINK32 odbccp32.lib libexpatMT.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib /nologo /subsystem:console /pdb:none /debug /machine:I386 /libpath:"..\lib\Debug_static"
    +
    +!ENDIF 
    +
    +# Begin Target
    +
    +# Name "elements - Win32 Release"
    +# Name "elements - Win32 Debug"
    +# Begin Group "Source Files"
    +
    +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
    +# Begin Source File
    +
    +SOURCE=.\elements.c
    +# End Source File
    +# End Group
    +# Begin Group "Header Files"
    +
    +# PROP Default_Filter "h;hpp;hxx;hm;inl"
    +# End Group
    +# Begin Group "Resource Files"
    +
    +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
    +# End Group
    +# End Target
    +# End Project
    diff --git a/reactos/lib/expat/examples/elements.vcproj b/reactos/lib/expat/examples/elements.vcproj
    new file mode 100644
    index 00000000000..da6389c845d
    --- /dev/null
    +++ b/reactos/lib/expat/examples/elements.vcproj
    @@ -0,0 +1,174 @@
    +
    +
    +	
    +		
    +	
    +	
    +		
    +			
    +			
    +			
    +			
    +			
    +			
    +			
    +			
    +			
    +			
    +			
    +			
    +			
    +		
    +		
    +			
    +			
    +			
    +			
    +			
    +			
    +			
    +			
    +			
    +			
    +			
    +			
    +			
    +		
    +	
    +	
    +	
    +	
    +		
    +			
    +				
    +					
    +				
    +				
    +					
    +				
    +			
    +		
    +		
    +		
    +		
    +		
    +	
    +	
    +	
    +
    diff --git a/reactos/lib/expat/examples/outline.dsp b/reactos/lib/expat/examples/outline.dsp
    index c74481d9c20..7075dbf52d9 100644
    --- a/reactos/lib/expat/examples/outline.dsp
    +++ b/reactos/lib/expat/examples/outline.dsp
    @@ -1,103 +1,103 @@
    -# Microsoft Developer Studio Project File - Name="outline" - Package Owner=<4>
    -# Microsoft Developer Studio Generated Build File, Format Version 6.00
    -# ** DO NOT EDIT **
    -
    -# TARGTYPE "Win32 (x86) Console Application" 0x0103
    -
    -CFG=outline - Win32 Debug
    -!MESSAGE This is not a valid makefile. To build this project using NMAKE,
    -!MESSAGE use the Export Makefile command and run
    -!MESSAGE 
    -!MESSAGE NMAKE /f "outline.mak".
    -!MESSAGE 
    -!MESSAGE You can specify a configuration when running NMAKE
    -!MESSAGE by defining the macro CFG on the command line. For example:
    -!MESSAGE 
    -!MESSAGE NMAKE /f "outline.mak" CFG="outline - Win32 Debug"
    -!MESSAGE 
    -!MESSAGE Possible choices for configuration are:
    -!MESSAGE 
    -!MESSAGE "outline - Win32 Release" (based on "Win32 (x86) Console Application")
    -!MESSAGE "outline - Win32 Debug" (based on "Win32 (x86) Console Application")
    -!MESSAGE 
    -
    -# Begin Project
    -# PROP AllowPerConfigDependencies 0
    -# PROP Scc_ProjName ""
    -# PROP Scc_LocalPath ""
    -CPP=cl.exe
    -RSC=rc.exe
    -
    -!IF  "$(CFG)" == "outline - Win32 Release"
    -
    -# PROP BASE Use_MFC 0
    -# PROP BASE Use_Debug_Libraries 0
    -# PROP BASE Output_Dir "Release"
    -# PROP BASE Intermediate_Dir "Release"
    -# PROP BASE Target_Dir ""
    -# PROP Use_MFC 0
    -# PROP Use_Debug_Libraries 0
    -# PROP Output_Dir "Release"
    -# PROP Intermediate_Dir "Release"
    -# PROP Ignore_Export_Lib 0
    -# PROP Target_Dir ""
    -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
    -# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\lib" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c
    -# SUBTRACT CPP /X /YX
    -# ADD BASE RSC /l 0x409 /d "NDEBUG"
    -# ADD RSC /l 0x409 /d "NDEBUG"
    -BSC32=bscmake.exe
    -# ADD BASE BSC32 /nologo
    -# ADD BSC32 /nologo
    -LINK32=link.exe
    -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
    -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /pdb:none /machine:I386
    -
    -!ELSEIF  "$(CFG)" == "outline - Win32 Debug"
    -
    -# PROP BASE Use_MFC 0
    -# PROP BASE Use_Debug_Libraries 1
    -# PROP BASE Output_Dir "Debug"
    -# PROP BASE Intermediate_Dir "Debug"
    -# PROP BASE Target_Dir ""
    -# PROP Use_MFC 0
    -# PROP Use_Debug_Libraries 1
    -# PROP Output_Dir "Debug"
    -# PROP Intermediate_Dir "Debug"
    -# PROP Ignore_Export_Lib 0
    -# PROP Target_Dir ""
    -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
    -# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "..\lib" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FD /GZ /c
    -# ADD BASE RSC /l 0x409 /d "_DEBUG"
    -# ADD RSC /l 0x409 /d "_DEBUG"
    -BSC32=bscmake.exe
    -# ADD BASE BSC32 /nologo
    -# ADD BSC32 /nologo
    -LINK32=link.exe
    -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
    -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /pdb:none /debug /machine:I386
    -
    -!ENDIF 
    -
    -# Begin Target
    -
    -# Name "outline - Win32 Release"
    -# Name "outline - Win32 Debug"
    -# Begin Group "Source Files"
    -
    -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
    -# Begin Source File
    -
    -SOURCE=.\outline.c
    -# End Source File
    -# End Group
    -# Begin Group "Header Files"
    -
    -# PROP Default_Filter "h;hpp;hxx;hm;inl"
    -# End Group
    -# Begin Group "Resource Files"
    -
    -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
    -# End Group
    -# End Target
    -# End Project
    +# Microsoft Developer Studio Project File - Name="outline" - Package Owner=<4>
    +# Microsoft Developer Studio Generated Build File, Format Version 6.00
    +# ** DO NOT EDIT **
    +
    +# TARGTYPE "Win32 (x86) Console Application" 0x0103
    +
    +CFG=outline - Win32 Debug
    +!MESSAGE This is not a valid makefile. To build this project using NMAKE,
    +!MESSAGE use the Export Makefile command and run
    +!MESSAGE 
    +!MESSAGE NMAKE /f "outline.mak".
    +!MESSAGE 
    +!MESSAGE You can specify a configuration when running NMAKE
    +!MESSAGE by defining the macro CFG on the command line. For example:
    +!MESSAGE 
    +!MESSAGE NMAKE /f "outline.mak" CFG="outline - Win32 Debug"
    +!MESSAGE 
    +!MESSAGE Possible choices for configuration are:
    +!MESSAGE 
    +!MESSAGE "outline - Win32 Release" (based on "Win32 (x86) Console Application")
    +!MESSAGE "outline - Win32 Debug" (based on "Win32 (x86) Console Application")
    +!MESSAGE 
    +
    +# Begin Project
    +# PROP AllowPerConfigDependencies 0
    +# PROP Scc_ProjName ""
    +# PROP Scc_LocalPath ""
    +CPP=cl.exe
    +RSC=rc.exe
    +
    +!IF  "$(CFG)" == "outline - Win32 Release"
    +
    +# PROP BASE Use_MFC 0
    +# PROP BASE Use_Debug_Libraries 0
    +# PROP BASE Output_Dir "Release"
    +# PROP BASE Intermediate_Dir "Release"
    +# PROP BASE Target_Dir ""
    +# PROP Use_MFC 0
    +# PROP Use_Debug_Libraries 0
    +# PROP Output_Dir "Release"
    +# PROP Intermediate_Dir "Release"
    +# PROP Ignore_Export_Lib 0
    +# PROP Target_Dir ""
    +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
    +# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\lib" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c
    +# SUBTRACT CPP /X /YX
    +# ADD BASE RSC /l 0x409 /d "NDEBUG"
    +# ADD RSC /l 0x409 /d "NDEBUG"
    +BSC32=bscmake.exe
    +# ADD BASE BSC32 /nologo
    +# ADD BSC32 /nologo
    +LINK32=link.exe
    +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
    +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /pdb:none /machine:I386
    +
    +!ELSEIF  "$(CFG)" == "outline - Win32 Debug"
    +
    +# PROP BASE Use_MFC 0
    +# PROP BASE Use_Debug_Libraries 1
    +# PROP BASE Output_Dir "Debug"
    +# PROP BASE Intermediate_Dir "Debug"
    +# PROP BASE Target_Dir ""
    +# PROP Use_MFC 0
    +# PROP Use_Debug_Libraries 1
    +# PROP Output_Dir "Debug"
    +# PROP Intermediate_Dir "Debug"
    +# PROP Ignore_Export_Lib 0
    +# PROP Target_Dir ""
    +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
    +# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "..\lib" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FD /GZ /c
    +# ADD BASE RSC /l 0x409 /d "_DEBUG"
    +# ADD RSC /l 0x409 /d "_DEBUG"
    +BSC32=bscmake.exe
    +# ADD BASE BSC32 /nologo
    +# ADD BSC32 /nologo
    +LINK32=link.exe
    +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
    +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /pdb:none /debug /machine:I386
    +
    +!ENDIF 
    +
    +# Begin Target
    +
    +# Name "outline - Win32 Release"
    +# Name "outline - Win32 Debug"
    +# Begin Group "Source Files"
    +
    +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
    +# Begin Source File
    +
    +SOURCE=.\outline.c
    +# End Source File
    +# End Group
    +# Begin Group "Header Files"
    +
    +# PROP Default_Filter "h;hpp;hxx;hm;inl"
    +# End Group
    +# Begin Group "Resource Files"
    +
    +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
    +# End Group
    +# End Target
    +# End Project
    diff --git a/reactos/lib/expat/examples/outline.vcproj b/reactos/lib/expat/examples/outline.vcproj
    new file mode 100644
    index 00000000000..255d427781d
    --- /dev/null
    +++ b/reactos/lib/expat/examples/outline.vcproj
    @@ -0,0 +1,168 @@
    +
    +
    +	
    +		
    +	
    +	
    +		
    +			
    +			
    +			
    +			
    +			
    +			
    +			
    +			
    +			
    +			
    +			
    +			
    +			
    +		
    +		
    +			
    +			
    +			
    +			
    +			
    +			
    +			
    +			
    +			
    +			
    +			
    +			
    +			
    +		
    +	
    +	
    +	
    +	
    +		
    +			
    +				
    +					
    +				
    +				
    +					
    +				
    +			
    +		
    +		
    +		
    +		
    +		
    +	
    +	
    +	
    +
    diff --git a/reactos/lib/expat/examples/poem.xml b/reactos/lib/expat/examples/poem.xml
    new file mode 100644
    index 00000000000..a11fc95e199
    --- /dev/null
    +++ b/reactos/lib/expat/examples/poem.xml
    @@ -0,0 +1,8 @@
    +
    + 
    +  Roses are red, 
    +  Violets are blue. 
    +  Sugar is sweet, 
    +  and I love you with a line much longer than 15 characters long.
    +  
    +
    diff --git a/reactos/lib/expat/expat.dsw b/reactos/lib/expat/expat.dsw
    index 2d62eec5f6c..9282da5a72d 100644
    --- a/reactos/lib/expat/expat.dsw
    +++ b/reactos/lib/expat/expat.dsw
    @@ -1,110 +1,110 @@
    -Microsoft Developer Studio Workspace File, Format Version 6.00
    -# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
    -
    -###############################################################################
    -
    -Project: "elements"=.\examples\elements.dsp - Package Owner=<4>
    -
    -Package=<5>
    -{{{
    -}}}
    -
    -Package=<4>
    -{{{
    -    Begin Project Dependency
    -    Project_Dep_Name expat_static
    -    End Project Dependency
    -}}}
    -
    -###############################################################################
    -
    -Project: "expat"=.\lib\expat.dsp - Package Owner=<4>
    -
    -Package=<5>
    -{{{
    -}}}
    -
    -Package=<4>
    -{{{
    -}}}
    -
    -###############################################################################
    -
    -Project: "expat_static"=.\lib\expat_static.dsp - Package Owner=<4>
    -
    -Package=<5>
    -{{{
    -}}}
    -
    -Package=<4>
    -{{{
    -}}}
    -
    -###############################################################################
    -
    -Project: "expatw"=.\lib\expatw.dsp - Package Owner=<4>
    -
    -Package=<5>
    -{{{
    -}}}
    -
    -Package=<4>
    -{{{
    -}}}
    -
    -###############################################################################
    -
    -Project: "expatw_static"=.\lib\expatw_static.dsp - Package Owner=<4>
    -
    -Package=<5>
    -{{{
    -}}}
    -
    -Package=<4>
    -{{{
    -}}}
    -
    -###############################################################################
    -
    -Project: "outline"=.\examples\outline.dsp - Package Owner=<4>
    -
    -Package=<5>
    -{{{
    -}}}
    -
    -Package=<4>
    -{{{
    -    Begin Project Dependency
    -    Project_Dep_Name expat
    -    End Project Dependency
    -}}}
    -
    -###############################################################################
    -
    -Project: "xmlwf"=.\xmlwf\xmlwf.dsp - Package Owner=<4>
    -
    -Package=<5>
    -{{{
    -}}}
    -
    -Package=<4>
    -{{{
    -    Begin Project Dependency
    -    Project_Dep_Name expat
    -    End Project Dependency
    -}}}
    -
    -###############################################################################
    -
    -Global:
    -
    -Package=<5>
    -{{{
    -}}}
    -
    -Package=<3>
    -{{{
    -}}}
    -
    -###############################################################################
    -
    +Microsoft Developer Studio Workspace File, Format Version 6.00
    +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
    +
    +###############################################################################
    +
    +Project: "elements"=.\examples\elements.dsp - Package Owner=<4>
    +
    +Package=<5>
    +{{{
    +}}}
    +
    +Package=<4>
    +{{{
    +    Begin Project Dependency
    +    Project_Dep_Name expat_static
    +    End Project Dependency
    +}}}
    +
    +###############################################################################
    +
    +Project: "expat"=.\lib\expat.dsp - Package Owner=<4>
    +
    +Package=<5>
    +{{{
    +}}}
    +
    +Package=<4>
    +{{{
    +}}}
    +
    +###############################################################################
    +
    +Project: "expat_static"=.\lib\expat_static.dsp - Package Owner=<4>
    +
    +Package=<5>
    +{{{
    +}}}
    +
    +Package=<4>
    +{{{
    +}}}
    +
    +###############################################################################
    +
    +Project: "expatw"=.\lib\expatw.dsp - Package Owner=<4>
    +
    +Package=<5>
    +{{{
    +}}}
    +
    +Package=<4>
    +{{{
    +}}}
    +
    +###############################################################################
    +
    +Project: "expatw_static"=.\lib\expatw_static.dsp - Package Owner=<4>
    +
    +Package=<5>
    +{{{
    +}}}
    +
    +Package=<4>
    +{{{
    +}}}
    +
    +###############################################################################
    +
    +Project: "outline"=.\examples\outline.dsp - Package Owner=<4>
    +
    +Package=<5>
    +{{{
    +}}}
    +
    +Package=<4>
    +{{{
    +    Begin Project Dependency
    +    Project_Dep_Name expat
    +    End Project Dependency
    +}}}
    +
    +###############################################################################
    +
    +Project: "xmlwf"=.\xmlwf\xmlwf.dsp - Package Owner=<4>
    +
    +Package=<5>
    +{{{
    +}}}
    +
    +Package=<4>
    +{{{
    +    Begin Project Dependency
    +    Project_Dep_Name expat
    +    End Project Dependency
    +}}}
    +
    +###############################################################################
    +
    +Global:
    +
    +Package=<5>
    +{{{
    +}}}
    +
    +Package=<3>
    +{{{
    +}}}
    +
    +###############################################################################
    +
    diff --git a/reactos/lib/expat/expat.spec b/reactos/lib/expat/expat.spec
    index 33ba187a877..3d28d259aa2 100644
    --- a/reactos/lib/expat/expat.spec
    +++ b/reactos/lib/expat/expat.spec
    @@ -1,4 +1,4 @@
    -%define version 1.95.7
    +%define version 1.95.8
     %define release 1
     
     Summary: Expat is an XML 1.0 parser written in C.
    @@ -35,9 +35,15 @@ install -D xmlwf/xmlwf $RPM_BUILD_ROOT/usr/bin/xmlwf
     /usr/bin/xmlwf
     /usr/lib
     /usr/include/expat.h
    +/usr/include/expat_external.h
     /usr/man/man1/xmlwf.1.gz
     
     %changelog
    +* Fri Jul 16 2004 Fred L. Drake, Jr. 
    +[Release 1.95.8-1]
    +- Update for the 1.95.8 release.
    +- Add the expat_external.h header to the installed files.
    +
     * Tue Oct 21 2003 Fred L. Drake, Jr. 
     - Update list of documentation files; we missed a .png file in the
       previous release.
    diff --git a/reactos/lib/expat/gennmtab/gennmtab.dsp b/reactos/lib/expat/gennmtab/gennmtab.dsp
    index bdbbe3cd36f..97e6e2bfd75 100644
    --- a/reactos/lib/expat/gennmtab/gennmtab.dsp
    +++ b/reactos/lib/expat/gennmtab/gennmtab.dsp
    @@ -1,101 +1,101 @@
    -# Microsoft Developer Studio Project File - Name="gennmtab" - Package Owner=<4>
    -# Microsoft Developer Studio Generated Build File, Format Version 6.00
    -# ** DO NOT EDIT **
    -
    -# TARGTYPE "Win32 (x86) Console Application" 0x0103
    -
    -CFG=gennmtab - Win32 Release
    -!MESSAGE This is not a valid makefile. To build this project using NMAKE,
    -!MESSAGE use the Export Makefile command and run
    -!MESSAGE 
    -!MESSAGE NMAKE /f "gennmtab.mak".
    -!MESSAGE 
    -!MESSAGE You can specify a configuration when running NMAKE
    -!MESSAGE by defining the macro CFG on the command line. For example:
    -!MESSAGE 
    -!MESSAGE NMAKE /f "gennmtab.mak" CFG="gennmtab - Win32 Release"
    -!MESSAGE 
    -!MESSAGE Possible choices for configuration are:
    -!MESSAGE 
    -!MESSAGE "gennmtab - Win32 Release" (based on "Win32 (x86) Console Application")
    -!MESSAGE "gennmtab - Win32 Debug" (based on "Win32 (x86) Console Application")
    -!MESSAGE 
    -
    -# Begin Project
    -# PROP AllowPerConfigDependencies 0
    -# PROP Scc_ProjName ""
    -# PROP Scc_LocalPath ""
    -CPP=cl.exe
    -RSC=rc.exe
    -
    -!IF  "$(CFG)" == "gennmtab - Win32 Release"
    -
    -# PROP BASE Use_MFC 0
    -# PROP BASE Use_Debug_Libraries 0
    -# PROP BASE Output_Dir ".\Release"
    -# PROP BASE Intermediate_Dir ".\Release"
    -# PROP BASE Target_Dir "."
    -# PROP Use_MFC 0
    -# PROP Use_Debug_Libraries 0
    -# PROP Output_Dir ".\Release"
    -# PROP Intermediate_Dir ".\Release"
    -# PROP Target_Dir "."
    -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /c
    -# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /FD /c
    -# ADD BASE RSC /l 0x809 /d "NDEBUG"
    -# ADD RSC /l 0x809 /d "NDEBUG"
    -BSC32=bscmake.exe
    -# ADD BASE BSC32 /nologo
    -# ADD BSC32 /nologo
    -LINK32=link.exe
    -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
    -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
    -
    -!ELSEIF  "$(CFG)" == "gennmtab - Win32 Debug"
    -
    -# PROP BASE Use_MFC 0
    -# PROP BASE Use_Debug_Libraries 1
    -# PROP BASE Output_Dir ".\Debug"
    -# PROP BASE Intermediate_Dir ".\Debug"
    -# PROP BASE Target_Dir "."
    -# PROP Use_MFC 0
    -# PROP Use_Debug_Libraries 1
    -# PROP Output_Dir ".\Debug"
    -# PROP Intermediate_Dir ".\Debug"
    -# PROP Ignore_Export_Lib 0
    -# PROP Target_Dir "."
    -# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /YX /c
    -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /YX /FD /c
    -# ADD BASE RSC /l 0x809 /d "_DEBUG"
    -# ADD RSC /l 0x809 /d "_DEBUG"
    -BSC32=bscmake.exe
    -# ADD BASE BSC32 /nologo
    -# ADD BSC32 /nologo
    -LINK32=link.exe
    -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386
    -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386
    -
    -!ENDIF 
    -
    -# Begin Target
    -
    -# Name "gennmtab - Win32 Release"
    -# Name "gennmtab - Win32 Debug"
    -# Begin Group "Source Files"
    -
    -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat;for;f90"
    -# Begin Source File
    -
    -SOURCE=.\gennmtab.c
    -# End Source File
    -# End Group
    -# Begin Group "Header Files"
    -
    -# PROP Default_Filter "h;hpp;hxx;hm;inl;fi;fd"
    -# End Group
    -# Begin Group "Resource Files"
    -
    -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe"
    -# End Group
    -# End Target
    -# End Project
    +# Microsoft Developer Studio Project File - Name="gennmtab" - Package Owner=<4>
    +# Microsoft Developer Studio Generated Build File, Format Version 6.00
    +# ** DO NOT EDIT **
    +
    +# TARGTYPE "Win32 (x86) Console Application" 0x0103
    +
    +CFG=gennmtab - Win32 Release
    +!MESSAGE This is not a valid makefile. To build this project using NMAKE,
    +!MESSAGE use the Export Makefile command and run
    +!MESSAGE 
    +!MESSAGE NMAKE /f "gennmtab.mak".
    +!MESSAGE 
    +!MESSAGE You can specify a configuration when running NMAKE
    +!MESSAGE by defining the macro CFG on the command line. For example:
    +!MESSAGE 
    +!MESSAGE NMAKE /f "gennmtab.mak" CFG="gennmtab - Win32 Release"
    +!MESSAGE 
    +!MESSAGE Possible choices for configuration are:
    +!MESSAGE 
    +!MESSAGE "gennmtab - Win32 Release" (based on "Win32 (x86) Console Application")
    +!MESSAGE "gennmtab - Win32 Debug" (based on "Win32 (x86) Console Application")
    +!MESSAGE 
    +
    +# Begin Project
    +# PROP AllowPerConfigDependencies 0
    +# PROP Scc_ProjName ""
    +# PROP Scc_LocalPath ""
    +CPP=cl.exe
    +RSC=rc.exe
    +
    +!IF  "$(CFG)" == "gennmtab - Win32 Release"
    +
    +# PROP BASE Use_MFC 0
    +# PROP BASE Use_Debug_Libraries 0
    +# PROP BASE Output_Dir ".\Release"
    +# PROP BASE Intermediate_Dir ".\Release"
    +# PROP BASE Target_Dir "."
    +# PROP Use_MFC 0
    +# PROP Use_Debug_Libraries 0
    +# PROP Output_Dir ".\Release"
    +# PROP Intermediate_Dir ".\Release"
    +# PROP Target_Dir "."
    +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /c
    +# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /FD /c
    +# ADD BASE RSC /l 0x809 /d "NDEBUG"
    +# ADD RSC /l 0x809 /d "NDEBUG"
    +BSC32=bscmake.exe
    +# ADD BASE BSC32 /nologo
    +# ADD BSC32 /nologo
    +LINK32=link.exe
    +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
    +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
    +
    +!ELSEIF  "$(CFG)" == "gennmtab - Win32 Debug"
    +
    +# PROP BASE Use_MFC 0
    +# PROP BASE Use_Debug_Libraries 1
    +# PROP BASE Output_Dir ".\Debug"
    +# PROP BASE Intermediate_Dir ".\Debug"
    +# PROP BASE Target_Dir "."
    +# PROP Use_MFC 0
    +# PROP Use_Debug_Libraries 1
    +# PROP Output_Dir ".\Debug"
    +# PROP Intermediate_Dir ".\Debug"
    +# PROP Ignore_Export_Lib 0
    +# PROP Target_Dir "."
    +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /YX /c
    +# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /YX /FD /c
    +# ADD BASE RSC /l 0x809 /d "_DEBUG"
    +# ADD RSC /l 0x809 /d "_DEBUG"
    +BSC32=bscmake.exe
    +# ADD BASE BSC32 /nologo
    +# ADD BSC32 /nologo
    +LINK32=link.exe
    +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386
    +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386
    +
    +!ENDIF 
    +
    +# Begin Target
    +
    +# Name "gennmtab - Win32 Release"
    +# Name "gennmtab - Win32 Debug"
    +# Begin Group "Source Files"
    +
    +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat;for;f90"
    +# Begin Source File
    +
    +SOURCE=.\gennmtab.c
    +# End Source File
    +# End Group
    +# Begin Group "Header Files"
    +
    +# PROP Default_Filter "h;hpp;hxx;hm;inl;fi;fd"
    +# End Group
    +# Begin Group "Resource Files"
    +
    +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe"
    +# End Group
    +# End Target
    +# End Project
    diff --git a/reactos/lib/expat/lib/expat.dsp b/reactos/lib/expat/lib/expat.dsp
    index 0724cb5bd2f..ffe307fb7b0 100644
    --- a/reactos/lib/expat/lib/expat.dsp
    +++ b/reactos/lib/expat/lib/expat.dsp
    @@ -1,168 +1,176 @@
    -# Microsoft Developer Studio Project File - Name="expat" - Package Owner=<4>
    -# Microsoft Developer Studio Generated Build File, Format Version 6.00
    -# ** DO NOT EDIT **
    -
    -# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
    -
    -CFG=expat - Win32 Debug
    -!MESSAGE This is not a valid makefile. To build this project using NMAKE,
    -!MESSAGE use the Export Makefile command and run
    -!MESSAGE 
    -!MESSAGE NMAKE /f "expat.mak".
    -!MESSAGE 
    -!MESSAGE You can specify a configuration when running NMAKE
    -!MESSAGE by defining the macro CFG on the command line. For example:
    -!MESSAGE 
    -!MESSAGE NMAKE /f "expat.mak" CFG="expat - Win32 Debug"
    -!MESSAGE 
    -!MESSAGE Possible choices for configuration are:
    -!MESSAGE 
    -!MESSAGE "expat - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
    -!MESSAGE "expat - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
    -!MESSAGE 
    -
    -# Begin Project
    -# PROP AllowPerConfigDependencies 0
    -# PROP Scc_ProjName ""
    -# PROP Scc_LocalPath ""
    -CPP=cl.exe
    -MTL=midl.exe
    -RSC=rc.exe
    -
    -!IF  "$(CFG)" == "expat - Win32 Release"
    -
    -# PROP BASE Use_MFC 0
    -# PROP BASE Use_Debug_Libraries 0
    -# PROP BASE Output_Dir "Release"
    -# PROP BASE Intermediate_Dir "Release"
    -# PROP BASE Target_Dir ""
    -# PROP Use_MFC 0
    -# PROP Use_Debug_Libraries 0
    -# PROP Output_Dir "Release"
    -# PROP Intermediate_Dir "Release"
    -# PROP Ignore_Export_Lib 0
    -# PROP Target_Dir ""
    -# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "EXPAT_EXPORTS" /Yu"stdafx.h" /FD /c
    -# ADD CPP /nologo /MT /W3 /GX /O2 /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "COMPILED_FROM_DSP" /FD /c
    -# SUBTRACT CPP /YX /Yc /Yu
    -# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
    -# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
    -# ADD BASE RSC /l 0x409 /d "NDEBUG"
    -# ADD RSC /l 0x409 /d "NDEBUG"
    -BSC32=bscmake.exe
    -# ADD BASE BSC32 /nologo
    -# ADD BSC32 /nologo
    -LINK32=link.exe
    -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
    -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /pdb:none /machine:I386 /out:"Release\libexpat.dll"
    -
    -!ELSEIF  "$(CFG)" == "expat - Win32 Debug"
    -
    -# PROP BASE Use_MFC 0
    -# PROP BASE Use_Debug_Libraries 1
    -# PROP BASE Output_Dir "Debug"
    -# PROP BASE Intermediate_Dir "Debug"
    -# PROP BASE Target_Dir ""
    -# PROP Use_MFC 0
    -# PROP Use_Debug_Libraries 1
    -# PROP Output_Dir "Debug"
    -# PROP Intermediate_Dir "Debug"
    -# PROP Target_Dir ""
    -# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "EXPAT_EXPORTS" /Yu"stdafx.h" /FD /GZ /c
    -# ADD CPP /nologo /MTd /W3 /GX /ZI /Od /D "_DEBUG" /D "COMPILED_FROM_DSP" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /FR /FD /GZ /c
    -# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
    -# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
    -# ADD BASE RSC /l 0x409 /d "_DEBUG"
    -# ADD RSC /l 0x409 /d "_DEBUG"
    -BSC32=bscmake.exe
    -# ADD BASE BSC32 /nologo
    -# ADD BSC32 /nologo
    -LINK32=link.exe
    -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
    -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /pdb:none /debug /machine:I386 /out:"Debug\libexpat.dll"
    -
    -!ENDIF 
    -
    -# Begin Target
    -
    -# Name "expat - Win32 Release"
    -# Name "expat - Win32 Debug"
    -# Begin Group "Source Files"
    -
    -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
    -# Begin Source File
    -
    -SOURCE=.\libexpat.def
    -# End Source File
    -# Begin Source File
    -
    -SOURCE=.\xmlparse.c
    -
    -!IF  "$(CFG)" == "expat - Win32 Release"
    -
    -!ELSEIF  "$(CFG)" == "expat - Win32 Debug"
    -
    -# ADD CPP /GX- /Od
    -
    -!ENDIF 
    -
    -# End Source File
    -# Begin Source File
    -
    -SOURCE=.\xmlrole.c
    -# End Source File
    -# Begin Source File
    -
    -SOURCE=.\xmltok.c
    -# End Source File
    -# End Group
    -# Begin Group "Header Files"
    -
    -# PROP Default_Filter "h;hpp;hxx;hm;inl"
    -# Begin Source File
    -
    -SOURCE=.\ascii.h
    -# End Source File
    -# Begin Source File
    -
    -SOURCE=.\asciitab.h
    -# End Source File
    -# Begin Source File
    -
    -SOURCE=.\expat.h
    -# End Source File
    -# Begin Source File
    -
    -SOURCE=.\iasciitab.h
    -# End Source File
    -# Begin Source File
    -
    -SOURCE=.\latin1tab.h
    -# End Source File
    -# Begin Source File
    -
    -SOURCE=.\nametab.h
    -# End Source File
    -# Begin Source File
    -
    -SOURCE=.\utf8tab.h
    -# End Source File
    -# Begin Source File
    -
    -SOURCE=.\xmlrole.h
    -# End Source File
    -# Begin Source File
    -
    -SOURCE=.\xmltok.h
    -# End Source File
    -# Begin Source File
    -
    -SOURCE=.\xmltok_impl.h
    -# End Source File
    -# End Group
    -# Begin Group "Resource Files"
    -
    -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
    -# End Group
    -# End Target
    -# End Project
    +# Microsoft Developer Studio Project File - Name="expat" - Package Owner=<4>
    +# Microsoft Developer Studio Generated Build File, Format Version 6.00
    +# ** DO NOT EDIT **
    +
    +# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
    +
    +CFG=expat - Win32 Debug
    +!MESSAGE This is not a valid makefile. To build this project using NMAKE,
    +!MESSAGE use the Export Makefile command and run
    +!MESSAGE 
    +!MESSAGE NMAKE /f "expat.mak".
    +!MESSAGE 
    +!MESSAGE You can specify a configuration when running NMAKE
    +!MESSAGE by defining the macro CFG on the command line. For example:
    +!MESSAGE 
    +!MESSAGE NMAKE /f "expat.mak" CFG="expat - Win32 Debug"
    +!MESSAGE 
    +!MESSAGE Possible choices for configuration are:
    +!MESSAGE 
    +!MESSAGE "expat - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
    +!MESSAGE "expat - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
    +!MESSAGE 
    +
    +# Begin Project
    +# PROP AllowPerConfigDependencies 0
    +# PROP Scc_ProjName ""
    +# PROP Scc_LocalPath ""
    +CPP=cl.exe
    +MTL=midl.exe
    +RSC=rc.exe
    +
    +!IF  "$(CFG)" == "expat - Win32 Release"
    +
    +# PROP BASE Use_MFC 0
    +# PROP BASE Use_Debug_Libraries 0
    +# PROP BASE Output_Dir "Release"
    +# PROP BASE Intermediate_Dir "Release"
    +# PROP BASE Target_Dir ""
    +# PROP Use_MFC 0
    +# PROP Use_Debug_Libraries 0
    +# PROP Output_Dir "Release"
    +# PROP Intermediate_Dir "Release"
    +# PROP Ignore_Export_Lib 0
    +# PROP Target_Dir ""
    +# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "EXPAT_EXPORTS" /Yu"stdafx.h" /FD /c
    +# ADD CPP /nologo /MT /W3 /GX /O2 /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "COMPILED_FROM_DSP" /FD /c
    +# SUBTRACT CPP /YX /Yc /Yu
    +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
    +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
    +# ADD BASE RSC /l 0x409 /d "NDEBUG"
    +# ADD RSC /l 0x409 /d "NDEBUG"
    +BSC32=bscmake.exe
    +# ADD BASE BSC32 /nologo
    +# ADD BSC32 /nologo
    +LINK32=link.exe
    +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
    +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /pdb:none /machine:I386 /out:"Release\libexpat.dll"
    +
    +!ELSEIF  "$(CFG)" == "expat - Win32 Debug"
    +
    +# PROP BASE Use_MFC 0
    +# PROP BASE Use_Debug_Libraries 1
    +# PROP BASE Output_Dir "Debug"
    +# PROP BASE Intermediate_Dir "Debug"
    +# PROP BASE Target_Dir ""
    +# PROP Use_MFC 0
    +# PROP Use_Debug_Libraries 1
    +# PROP Output_Dir "Debug"
    +# PROP Intermediate_Dir "Debug"
    +# PROP Target_Dir ""
    +# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "EXPAT_EXPORTS" /Yu"stdafx.h" /FD /GZ /c
    +# ADD CPP /nologo /MTd /W3 /GX /ZI /Od /D "_DEBUG" /D "COMPILED_FROM_DSP" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /FR /FD /GZ /c
    +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
    +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
    +# ADD BASE RSC /l 0x409 /d "_DEBUG"
    +# ADD RSC /l 0x409 /d "_DEBUG"
    +BSC32=bscmake.exe
    +# ADD BASE BSC32 /nologo
    +# ADD BSC32 /nologo
    +LINK32=link.exe
    +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
    +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /pdb:none /debug /machine:I386 /out:"Debug\libexpat.dll"
    +
    +!ENDIF 
    +
    +# Begin Target
    +
    +# Name "expat - Win32 Release"
    +# Name "expat - Win32 Debug"
    +# Begin Group "Source Files"
    +
    +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
    +# Begin Source File
    +
    +SOURCE=.\libexpat.def
    +# End Source File
    +# Begin Source File
    +
    +SOURCE=.\xmlparse.c
    +
    +!IF  "$(CFG)" == "expat - Win32 Release"
    +
    +!ELSEIF  "$(CFG)" == "expat - Win32 Debug"
    +
    +# ADD CPP /GX- /Od
    +
    +!ENDIF 
    +
    +# End Source File
    +# Begin Source File
    +
    +SOURCE=.\xmlrole.c
    +# End Source File
    +# Begin Source File
    +
    +SOURCE=.\xmltok.c
    +# End Source File
    +# End Group
    +# Begin Group "Header Files"
    +
    +# PROP Default_Filter "h;hpp;hxx;hm;inl"
    +# Begin Source File
    +
    +SOURCE=.\ascii.h
    +# End Source File
    +# Begin Source File
    +
    +SOURCE=.\asciitab.h
    +# End Source File
    +# Begin Source File
    +
    +SOURCE=.\expat.h
    +# End Source File
    +# Begin Source File
    +
    +SOURCE=.\expat_external.h
    +# End Source File
    +# Begin Source File
    +
    +SOURCE=.\iasciitab.h
    +# End Source File
    +# Begin Source File
    +
    +SOURCE=.\internal.h
    +# End Source File
    +# Begin Source File
    +
    +SOURCE=.\latin1tab.h
    +# End Source File
    +# Begin Source File
    +
    +SOURCE=.\nametab.h
    +# End Source File
    +# Begin Source File
    +
    +SOURCE=.\utf8tab.h
    +# End Source File
    +# Begin Source File
    +
    +SOURCE=.\xmlrole.h
    +# End Source File
    +# Begin Source File
    +
    +SOURCE=.\xmltok.h
    +# End Source File
    +# Begin Source File
    +
    +SOURCE=.\xmltok_impl.h
    +# End Source File
    +# End Group
    +# Begin Group "Resource Files"
    +
    +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
    +# End Group
    +# End Target
    +# End Project
    diff --git a/reactos/lib/expat/lib/expat.h b/reactos/lib/expat/lib/expat.h
    index d6e06d1694d..ac1053f692f 100644
    --- a/reactos/lib/expat/lib/expat.h
    +++ b/reactos/lib/expat/lib/expat.h
    @@ -2,8 +2,8 @@
        See the file COPYING for copying permission.
     */
     
    -#ifndef XmlParse_INCLUDED
    -#define XmlParse_INCLUDED 1
    +#ifndef Expat_INCLUDED
    +#define Expat_INCLUDED 1
     
     #ifdef __VMS
     /*      0        1         2         3      0        1         2         3
    @@ -15,97 +15,15 @@
     #endif
     
     #include 
    -
    -#if defined(_MSC_EXTENSIONS) && !defined(__BEOS__) && !defined(__CYGWIN__)
    -#define XML_USE_MSC_EXTENSIONS 1
    -#endif
    -
    -/* Expat tries very hard to make the API boundary very specifically
    -   defined.  There are two macros defined to control this boundary;
    -   each of these can be defined before including this header to
    -   achieve some different behavior, but doing so it not recommended or
    -   tested frequently.
    -
    -   XMLCALL    - The calling convention to use for all calls across the
    -                "library boundary."  This will default to cdecl, and
    -                try really hard to tell the compiler that's what we
    -                want.
    -
    -   XMLIMPORT  - Whatever magic is needed to note that a function is
    -                to be imported from a dynamically loaded library
    -                (.dll, .so, or .sl, depending on your platform).
    -
    -   The XMLCALL macro was added in Expat 1.95.7.  The only one which is
    -   expected to be directly useful in client code is XMLCALL.
    -
    -   Note that on at least some Unix versions, the Expat library must be
    -   compiled with the cdecl calling convention as the default since
    -   system headers may assume the cdecl convention.
    -*/
    -#ifndef XMLCALL
    -#if defined(XML_USE_MSC_EXTENSIONS)
    -#define XMLCALL __cdecl
    -#elif defined(__GNUC__) && defined(__i386)
    -#define XMLCALL __attribute__((cdecl))
    -#else
    -/* For any platform which uses this definition and supports more than
    -   one calling convention, we need to extend this definition to
    -   declare the convention used on that platform, if it's possible to
    -   do so.
    -
    -   If this is the case for your platform, please file a bug report
    -   with information on how to identify your platform via the C
    -   pre-processor and how to specify the same calling convention as the
    -   platform's malloc() implementation.
    -*/
    -#define XMLCALL
    -#endif
    -#endif  /* not defined XMLCALL */
    -
    -
    -#if !defined(XML_STATIC) && !defined(XMLIMPORT)
    -#ifndef XML_BUILDING_EXPAT
    -/* using Expat from an application */
    -
    -#ifdef XML_USE_MSC_EXTENSIONS
    -#define XMLIMPORT __declspec(dllimport)
    -#endif
    -
    -#endif
    -#endif  /* not defined XML_STATIC */
    -
    -/* If we didn't define it above, define it away: */
    -#ifndef XMLIMPORT
    -#define XMLIMPORT
    -#endif
    -
    -
    -#define XMLPARSEAPI(type) XMLIMPORT type XMLCALL
    +#include "expat_external.h"
     
     #ifdef __cplusplus
     extern "C" {
     #endif
     
    -#ifdef XML_UNICODE_WCHAR_T
    -#define XML_UNICODE
    -#endif
    -
     struct XML_ParserStruct;
     typedef struct XML_ParserStruct *XML_Parser;
     
    -#ifdef XML_UNICODE     /* Information is UTF-16 encoded. */
    -#ifdef XML_UNICODE_WCHAR_T
    -typedef wchar_t XML_Char;
    -typedef wchar_t XML_LChar;
    -#else
    -typedef unsigned short XML_Char;
    -typedef char XML_LChar;
    -#endif /* XML_UNICODE_WCHAR_T */
    -#else                  /* Information is UTF-8 encoded. */
    -typedef char XML_Char;
    -typedef char XML_LChar;
    -#endif /* XML_UNICODE */
    -
     /* Should this be defined using stdbool.h when C99 is available? */
     typedef unsigned char XML_Bool;
     #define XML_TRUE   ((XML_Bool) 1)
    @@ -129,7 +47,7 @@ enum XML_Status {
     #define XML_STATUS_ERROR XML_STATUS_ERROR
       XML_STATUS_OK = 1,
     #define XML_STATUS_OK XML_STATUS_OK
    -  XML_STATUS_SUSPENDED = 2,
    +  XML_STATUS_SUSPENDED = 2
     #define XML_STATUS_SUSPENDED XML_STATUS_SUSPENDED
     };
     
    @@ -161,12 +79,23 @@ enum XML_Error {
       XML_ERROR_ENTITY_DECLARED_IN_PE,
       XML_ERROR_FEATURE_REQUIRES_XML_DTD,
       XML_ERROR_CANT_CHANGE_FEATURE_ONCE_PARSING,
    +  /* Added in 1.95.7. */
       XML_ERROR_UNBOUND_PREFIX,
    +  /* Added in 1.95.8. */
    +  XML_ERROR_UNDECLARING_PREFIX,
    +  XML_ERROR_INCOMPLETE_PE,
    +  XML_ERROR_XML_DECL,
    +  XML_ERROR_TEXT_DECL,
    +  XML_ERROR_PUBLICID,
       XML_ERROR_SUSPENDED,
       XML_ERROR_NOT_SUSPENDED,
       XML_ERROR_ABORTED,
       XML_ERROR_FINISHED,
    -  XML_ERROR_SUSPEND_PE
    +  XML_ERROR_SUSPEND_PE,
    +  /* Added in 2.0. */
    +  XML_ERROR_RESERVED_PREFIX_XML,
    +  XML_ERROR_RESERVED_PREFIX_XMLNS,
    +  XML_ERROR_RESERVED_NAMESPACE_URI
     };
     
     enum XML_Content_Type {
    @@ -265,9 +194,9 @@ XML_SetXmlDeclHandler(XML_Parser parser,
     
     
     typedef struct {
    -  void *(XMLCALL *malloc_fcn)(size_t size);
    -  void *(XMLCALL *realloc_fcn)(void *ptr, size_t size);
    -  void (XMLCALL *free_fcn)(void *ptr);
    +  void *(*malloc_fcn)(size_t size);
    +  void *(*realloc_fcn)(void *ptr, size_t size);
    +  void (*free_fcn)(void *ptr);
     } XML_Memory_Handling_Suite;
     
     /* Constructs a new parser; encoding is the encoding specified by the
    @@ -284,8 +213,8 @@ XML_ParserCreate(const XML_Char *encoding);
        URI, the namespace separator character, and the local part of the
        name.  If the namespace separator is '\0' then the namespace URI
        and the local part will be concatenated without any separator.
    -   When a namespace is not declared, the name and prefix will be
    -   passed through without expansion.
    +   It is a programming error to use the separator '\0' with namespace
    +   triplets (see XML_SetReturnNSTriplet).
     */
     XMLPARSEAPI(XML_Parser)
     XML_ParserCreateNS(const XML_Char *encoding, XML_Char namespaceSeparator);
    @@ -765,6 +694,9 @@ XML_UseParserAsHandlerArg(XML_Parser parser);
        specified in the document. In such a case the parser will call the
        externalEntityRefHandler with a value of NULL for the systemId
        argument (the publicId and context arguments will be NULL as well).
    +   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.
        Note: If this function is called, then this must be done before
          the first call to XML_Parse or XML_ParseBuffer, since it will
          have no effect after that.  Returns
    @@ -1050,7 +982,8 @@ enum XML_FeatureEnum {
       XML_FEATURE_CONTEXT_BYTES,
       XML_FEATURE_MIN_SIZE,
       XML_FEATURE_SIZEOF_XML_CHAR,
    -  XML_FEATURE_SIZEOF_XML_LCHAR
    +  XML_FEATURE_SIZEOF_XML_LCHAR,
    +  XML_FEATURE_NS
       /* Additional features must be added to the end of this enum. */
     };
     
    @@ -1077,4 +1010,4 @@ XML_GetFeatureList(void);
     }
     #endif
     
    -#endif /* not XmlParse_INCLUDED */
    +#endif /* not Expat_INCLUDED */
    diff --git a/reactos/lib/expat/lib/expat_external.h b/reactos/lib/expat/lib/expat_external.h
    new file mode 100644
    index 00000000000..7202e119a40
    --- /dev/null
    +++ b/reactos/lib/expat/lib/expat_external.h
    @@ -0,0 +1,101 @@
    +/* Copyright (c) 1998, 1999, 2000 Thai Open Source Software Center Ltd
    +   See the file COPYING for copying permission.
    +*/
    +
    +#ifndef Expat_External_INCLUDED
    +#define Expat_External_INCLUDED 1
    +
    +/* External API definitions */
    +
    +#if defined(_MSC_EXTENSIONS) && !defined(__BEOS__) && !defined(__CYGWIN__)
    +#define XML_USE_MSC_EXTENSIONS 1
    +#endif
    +
    +/* Expat tries very hard to make the API boundary very specifically
    +   defined.  There are two macros defined to control this boundary;
    +   each of these can be defined before including this header to
    +   achieve some different behavior, but doing so it not recommended or
    +   tested frequently.
    +
    +   XMLCALL    - The calling convention to use for all calls across the
    +                "library boundary."  This will default to cdecl, and
    +                try really hard to tell the compiler that's what we
    +                want.
    +
    +   XMLIMPORT  - Whatever magic is needed to note that a function is
    +                to be imported from a dynamically loaded library
    +                (.dll, .so, or .sl, depending on your platform).
    +
    +   The XMLCALL macro was added in Expat 1.95.7.  The only one which is
    +   expected to be directly useful in client code is XMLCALL.
    +
    +   Note that on at least some Unix versions, the Expat library must be
    +   compiled with the cdecl calling convention as the default since
    +   system headers may assume the cdecl convention.
    +*/
    +#ifndef XMLCALL
    +#if defined(XML_USE_MSC_EXTENSIONS)
    +#define XMLCALL __cdecl
    +#elif defined(__GNUC__) && defined(__i386)
    +#define XMLCALL __attribute__((cdecl))
    +#else
    +/* For any platform which uses this definition and supports more than
    +   one calling convention, we need to extend this definition to
    +   declare the convention used on that platform, if it's possible to
    +   do so.
    +
    +   If this is the case for your platform, please file a bug report
    +   with information on how to identify your platform via the C
    +   pre-processor and how to specify the same calling convention as the
    +   platform's malloc() implementation.
    +*/
    +#define XMLCALL
    +#endif
    +#endif  /* not defined XMLCALL */
    +
    +
    +#if !defined(XML_STATIC) && !defined(XMLIMPORT)
    +#ifndef XML_BUILDING_EXPAT
    +/* using Expat from an application */
    +
    +#ifdef XML_USE_MSC_EXTENSIONS
    +#define XMLIMPORT __declspec(dllimport)
    +#endif
    +
    +#endif
    +#endif  /* not defined XML_STATIC */
    +
    +/* If we didn't define it above, define it away: */
    +#ifndef XMLIMPORT
    +#define XMLIMPORT
    +#endif
    +
    +
    +#define XMLPARSEAPI(type) XMLIMPORT type XMLCALL
    +
    +#ifdef __cplusplus
    +extern "C" {
    +#endif
    +
    +#ifdef XML_UNICODE_WCHAR_T
    +#define XML_UNICODE
    +#endif
    +
    +#ifdef XML_UNICODE     /* Information is UTF-16 encoded. */
    +#ifdef XML_UNICODE_WCHAR_T
    +typedef wchar_t XML_Char;
    +typedef wchar_t XML_LChar;
    +#else
    +typedef unsigned short XML_Char;
    +typedef char XML_LChar;
    +#endif /* XML_UNICODE_WCHAR_T */
    +#else                  /* Information is UTF-8 encoded. */
    +typedef char XML_Char;
    +typedef char XML_LChar;
    +#endif /* XML_UNICODE */
    +
    +#ifdef __cplusplus
    +}
    +#endif
    +
    +#endif /* not Expat_External_INCLUDED */
    diff --git a/reactos/lib/expat/lib/expat_static.dsp b/reactos/lib/expat/lib/expat_static.dsp
    index 62e5530c221..d803b76eef1 100644
    --- a/reactos/lib/expat/lib/expat_static.dsp
    +++ b/reactos/lib/expat/lib/expat_static.dsp
    @@ -1,146 +1,154 @@
    -# Microsoft Developer Studio Project File - Name="expat_static" - Package Owner=<4>
    -# Microsoft Developer Studio Generated Build File, Format Version 6.00
    -# ** DO NOT EDIT **
    -
    -# TARGTYPE "Win32 (x86) Static Library" 0x0104
    -
    -CFG=expat_static - Win32 Debug
    -!MESSAGE This is not a valid makefile. To build this project using NMAKE,
    -!MESSAGE use the Export Makefile command and run
    -!MESSAGE 
    -!MESSAGE NMAKE /f "expat_static.mak".
    -!MESSAGE 
    -!MESSAGE You can specify a configuration when running NMAKE
    -!MESSAGE by defining the macro CFG on the command line. For example:
    -!MESSAGE 
    -!MESSAGE NMAKE /f "expat_static.mak" CFG="expat_static - Win32 Debug"
    -!MESSAGE 
    -!MESSAGE Possible choices for configuration are:
    -!MESSAGE 
    -!MESSAGE "expat_static - Win32 Release" (based on "Win32 (x86) Static Library")
    -!MESSAGE "expat_static - Win32 Debug" (based on "Win32 (x86) Static Library")
    -!MESSAGE 
    -
    -# Begin Project
    -# PROP AllowPerConfigDependencies 0
    -# PROP Scc_ProjName ""
    -# PROP Scc_LocalPath ""
    -CPP=cl.exe
    -RSC=rc.exe
    -
    -!IF  "$(CFG)" == "expat_static - Win32 Release"
    -
    -# PROP BASE Use_MFC 0
    -# PROP BASE Use_Debug_Libraries 0
    -# PROP BASE Output_Dir "expat_static___Win32_Release"
    -# PROP BASE Intermediate_Dir "expat_static___Win32_Release"
    -# PROP BASE Target_Dir ""
    -# PROP Use_MFC 0
    -# PROP Use_Debug_Libraries 0
    -# PROP Output_Dir "Release_static"
    -# PROP Intermediate_Dir "Release_static"
    -# PROP Target_Dir ""
    -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c
    -# ADD CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "_WINDOWS" /D "NDEBUG" /D "_MBCS" /D "_LIB" /D "COMPILED_FROM_DSP" /FD /c
    -# SUBTRACT CPP /YX
    -# ADD BASE RSC /l 0x1009 /d "NDEBUG"
    -# ADD RSC /l 0x409 /d "NDEBUG"
    -BSC32=bscmake.exe
    -# ADD BASE BSC32 /nologo
    -# ADD BSC32 /nologo
    -LIB32=link.exe -lib
    -# ADD BASE LIB32 /nologo
    -# ADD LIB32 /nologo /out:"Release_static\libexpatMT.lib"
    -
    -!ELSEIF  "$(CFG)" == "expat_static - Win32 Debug"
    -
    -# PROP BASE Use_MFC 0
    -# PROP BASE Use_Debug_Libraries 1
    -# PROP BASE Output_Dir "expat_static___Win32_Debug"
    -# PROP BASE Intermediate_Dir "expat_static___Win32_Debug"
    -# PROP BASE Target_Dir ""
    -# PROP Use_MFC 0
    -# PROP Use_Debug_Libraries 1
    -# PROP Output_Dir "Debug_static"
    -# PROP Intermediate_Dir "Debug_static"
    -# PROP Target_Dir ""
    -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
    -# ADD CPP /nologo /MTd /W3 /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "COMPILED_FROM_DSP" /D "_MBCS" /D "_LIB" /FR /FD /GZ /c
    -# SUBTRACT CPP /YX
    -# ADD BASE RSC /l 0x1009 /d "_DEBUG"
    -# ADD RSC /l 0x409 /d "_DEBUG"
    -BSC32=bscmake.exe
    -# ADD BASE BSC32 /nologo
    -# ADD BSC32 /nologo
    -LIB32=link.exe -lib
    -# ADD BASE LIB32 /nologo
    -# ADD LIB32 /nologo /out:"Debug_static\libexpatMT.lib"
    -
    -!ENDIF 
    -
    -# Begin Target
    -
    -# Name "expat_static - Win32 Release"
    -# Name "expat_static - Win32 Debug"
    -# Begin Group "Source Files"
    -
    -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
    -# Begin Source File
    -
    -SOURCE=.\xmlparse.c
    -# End Source File
    -# Begin Source File
    -
    -SOURCE=.\xmlrole.c
    -# End Source File
    -# Begin Source File
    -
    -SOURCE=.\xmltok.c
    -# End Source File
    -# End Group
    -# Begin Group "Header Files"
    -
    -# PROP Default_Filter "h;hpp;hxx;hm;inl"
    -# Begin Source File
    -
    -SOURCE=.\ascii.h
    -# End Source File
    -# Begin Source File
    -
    -SOURCE=.\asciitab.h
    -# End Source File
    -# Begin Source File
    -
    -SOURCE=.\expat.h
    -# End Source File
    -# Begin Source File
    -
    -SOURCE=.\iasciitab.h
    -# End Source File
    -# Begin Source File
    -
    -SOURCE=.\latin1tab.h
    -# End Source File
    -# Begin Source File
    -
    -SOURCE=.\nametab.h
    -# End Source File
    -# Begin Source File
    -
    -SOURCE=.\utf8tab.h
    -# End Source File
    -# Begin Source File
    -
    -SOURCE=.\xmlrole.h
    -# End Source File
    -# Begin Source File
    -
    -SOURCE=.\xmltok.h
    -# End Source File
    -# Begin Source File
    -
    -SOURCE=.\xmltok_impl.h
    -# End Source File
    -# End Group
    -# End Target
    -# End Project
    +# Microsoft Developer Studio Project File - Name="expat_static" - Package Owner=<4>
    +# Microsoft Developer Studio Generated Build File, Format Version 6.00
    +# ** DO NOT EDIT **
    +
    +# TARGTYPE "Win32 (x86) Static Library" 0x0104
    +
    +CFG=expat_static - Win32 Debug
    +!MESSAGE This is not a valid makefile. To build this project using NMAKE,
    +!MESSAGE use the Export Makefile command and run
    +!MESSAGE 
    +!MESSAGE NMAKE /f "expat_static.mak".
    +!MESSAGE 
    +!MESSAGE You can specify a configuration when running NMAKE
    +!MESSAGE by defining the macro CFG on the command line. For example:
    +!MESSAGE 
    +!MESSAGE NMAKE /f "expat_static.mak" CFG="expat_static - Win32 Debug"
    +!MESSAGE 
    +!MESSAGE Possible choices for configuration are:
    +!MESSAGE 
    +!MESSAGE "expat_static - Win32 Release" (based on "Win32 (x86) Static Library")
    +!MESSAGE "expat_static - Win32 Debug" (based on "Win32 (x86) Static Library")
    +!MESSAGE 
    +
    +# Begin Project
    +# PROP AllowPerConfigDependencies 0
    +# PROP Scc_ProjName ""
    +# PROP Scc_LocalPath ""
    +CPP=cl.exe
    +RSC=rc.exe
    +
    +!IF  "$(CFG)" == "expat_static - Win32 Release"
    +
    +# PROP BASE Use_MFC 0
    +# PROP BASE Use_Debug_Libraries 0
    +# PROP BASE Output_Dir "expat_static___Win32_Release"
    +# PROP BASE Intermediate_Dir "expat_static___Win32_Release"
    +# PROP BASE Target_Dir ""
    +# PROP Use_MFC 0
    +# PROP Use_Debug_Libraries 0
    +# PROP Output_Dir "Release_static"
    +# PROP Intermediate_Dir "Release_static"
    +# PROP Target_Dir ""
    +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c
    +# ADD CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "_WINDOWS" /D "NDEBUG" /D "_MBCS" /D "_LIB" /D "COMPILED_FROM_DSP" /FD /c
    +# SUBTRACT CPP /YX
    +# ADD BASE RSC /l 0x1009 /d "NDEBUG"
    +# ADD RSC /l 0x409 /d "NDEBUG"
    +BSC32=bscmake.exe
    +# ADD BASE BSC32 /nologo
    +# ADD BSC32 /nologo
    +LIB32=link.exe -lib
    +# ADD BASE LIB32 /nologo
    +# ADD LIB32 /nologo /out:"Release_static\libexpatMT.lib"
    +
    +!ELSEIF  "$(CFG)" == "expat_static - Win32 Debug"
    +
    +# PROP BASE Use_MFC 0
    +# PROP BASE Use_Debug_Libraries 1
    +# PROP BASE Output_Dir "expat_static___Win32_Debug"
    +# PROP BASE Intermediate_Dir "expat_static___Win32_Debug"
    +# PROP BASE Target_Dir ""
    +# PROP Use_MFC 0
    +# PROP Use_Debug_Libraries 1
    +# PROP Output_Dir "Debug_static"
    +# PROP Intermediate_Dir "Debug_static"
    +# PROP Target_Dir ""
    +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
    +# ADD CPP /nologo /MTd /W3 /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "COMPILED_FROM_DSP" /D "_MBCS" /D "_LIB" /FR /FD /GZ /c
    +# SUBTRACT CPP /YX
    +# ADD BASE RSC /l 0x1009 /d "_DEBUG"
    +# ADD RSC /l 0x409 /d "_DEBUG"
    +BSC32=bscmake.exe
    +# ADD BASE BSC32 /nologo
    +# ADD BSC32 /nologo
    +LIB32=link.exe -lib
    +# ADD BASE LIB32 /nologo
    +# ADD LIB32 /nologo /out:"Debug_static\libexpatMT.lib"
    +
    +!ENDIF 
    +
    +# Begin Target
    +
    +# Name "expat_static - Win32 Release"
    +# Name "expat_static - Win32 Debug"
    +# Begin Group "Source Files"
    +
    +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
    +# Begin Source File
    +
    +SOURCE=.\xmlparse.c
    +# End Source File
    +# Begin Source File
    +
    +SOURCE=.\xmlrole.c
    +# End Source File
    +# Begin Source File
    +
    +SOURCE=.\xmltok.c
    +# End Source File
    +# End Group
    +# Begin Group "Header Files"
    +
    +# PROP Default_Filter "h;hpp;hxx;hm;inl"
    +# Begin Source File
    +
    +SOURCE=.\ascii.h
    +# End Source File
    +# Begin Source File
    +
    +SOURCE=.\asciitab.h
    +# End Source File
    +# Begin Source File
    +
    +SOURCE=.\expat.h
    +# End Source File
    +# Begin Source File
    +
    +SOURCE=.\expat_external.h
    +# End Source File
    +# Begin Source File
    +
    +SOURCE=.\iasciitab.h
    +# End Source File
    +# Begin Source File
    +
    +SOURCE=.\internal.h
    +# End Source File
    +# Begin Source File
    +
    +SOURCE=.\latin1tab.h
    +# End Source File
    +# Begin Source File
    +
    +SOURCE=.\nametab.h
    +# End Source File
    +# Begin Source File
    +
    +SOURCE=.\utf8tab.h
    +# End Source File
    +# Begin Source File
    +
    +SOURCE=.\xmlrole.h
    +# End Source File
    +# Begin Source File
    +
    +SOURCE=.\xmltok.h
    +# End Source File
    +# Begin Source File
    +
    +SOURCE=.\xmltok_impl.h
    +# End Source File
    +# End Group
    +# End Target
    +# End Project
    diff --git a/reactos/lib/expat/lib/expatw.dsp b/reactos/lib/expat/lib/expatw.dsp
    index a902dfe1a7f..084e06d0cf5 100644
    --- a/reactos/lib/expat/lib/expatw.dsp
    +++ b/reactos/lib/expat/lib/expatw.dsp
    @@ -1,169 +1,177 @@
    -# Microsoft Developer Studio Project File - Name="expatw" - Package Owner=<4>
    -# Microsoft Developer Studio Generated Build File, Format Version 6.00
    -# ** DO NOT EDIT **
    -
    -# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
    -
    -CFG=expatw - Win32 Debug
    -!MESSAGE This is not a valid makefile. To build this project using NMAKE,
    -!MESSAGE use the Export Makefile command and run
    -!MESSAGE 
    -!MESSAGE NMAKE /f "expatw.mak".
    -!MESSAGE 
    -!MESSAGE You can specify a configuration when running NMAKE
    -!MESSAGE by defining the macro CFG on the command line. For example:
    -!MESSAGE 
    -!MESSAGE NMAKE /f "expatw.mak" CFG="expatw - Win32 Debug"
    -!MESSAGE 
    -!MESSAGE Possible choices for configuration are:
    -!MESSAGE 
    -!MESSAGE "expatw - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
    -!MESSAGE "expatw - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
    -!MESSAGE 
    -
    -# Begin Project
    -# PROP AllowPerConfigDependencies 0
    -# PROP Scc_ProjName ""
    -# PROP Scc_LocalPath ""
    -CPP=cl.exe
    -MTL=midl.exe
    -RSC=rc.exe
    -
    -!IF  "$(CFG)" == "expatw - Win32 Release"
    -
    -# PROP BASE Use_MFC 0
    -# PROP BASE Use_Debug_Libraries 0
    -# PROP BASE Output_Dir "Release"
    -# PROP BASE Intermediate_Dir "Release"
    -# PROP BASE Target_Dir ""
    -# PROP Use_MFC 0
    -# PROP Use_Debug_Libraries 0
    -# PROP Output_Dir "Release-w"
    -# PROP Intermediate_Dir "Release-w"
    -# PROP Ignore_Export_Lib 0
    -# PROP Target_Dir ""
    -# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "EXPAT_EXPORTS" /Yu"stdafx.h" /FD /c
    -# ADD CPP /nologo /MT /W3 /GX /O2 /D "NDEBUG" /D "COMPILED_FROM_DSP" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "XML_UNICODE_WCHAR_T" /FD /c
    -# SUBTRACT CPP /YX /Yc /Yu
    -# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
    -# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
    -# ADD BASE RSC /l 0x409 /d "NDEBUG"
    -# ADD RSC /l 0x409 /d "NDEBUG"
    -BSC32=bscmake.exe
    -# ADD BASE BSC32 /nologo
    -# ADD BSC32 /nologo
    -LINK32=link.exe
    -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
    -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /pdb:none /machine:I386 /out:"Release-w\libexpatw.dll"
    -
    -!ELSEIF  "$(CFG)" == "expatw - Win32 Debug"
    -
    -# PROP BASE Use_MFC 0
    -# PROP BASE Use_Debug_Libraries 1
    -# PROP BASE Output_Dir "Debug"
    -# PROP BASE Intermediate_Dir "Debug"
    -# PROP BASE Target_Dir ""
    -# PROP Use_MFC 0
    -# PROP Use_Debug_Libraries 1
    -# PROP Output_Dir "Debug-w"
    -# PROP Intermediate_Dir "Debug-w"
    -# PROP Ignore_Export_Lib 0
    -# PROP Target_Dir ""
    -# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "EXPAT_EXPORTS" /Yu"stdafx.h" /FD /GZ /c
    -# ADD CPP /nologo /MTd /W3 /GX /ZI /Od /D "_DEBUG" /D "COMPILED_FROM_DSP" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "XML_UNICODE_WCHAR_T" /FR /FD /GZ /c
    -# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
    -# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
    -# ADD BASE RSC /l 0x409 /d "_DEBUG"
    -# ADD RSC /l 0x409 /d "_DEBUG"
    -BSC32=bscmake.exe
    -# ADD BASE BSC32 /nologo
    -# ADD BSC32 /nologo
    -LINK32=link.exe
    -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
    -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /pdb:none /debug /machine:I386 /out:"Debug-w\libexpatw.dll"
    -
    -!ENDIF 
    -
    -# Begin Target
    -
    -# Name "expatw - Win32 Release"
    -# Name "expatw - Win32 Debug"
    -# Begin Group "Source Files"
    -
    -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
    -# Begin Source File
    -
    -SOURCE=.\libexpatw.def
    -# End Source File
    -# Begin Source File
    -
    -SOURCE=.\xmlparse.c
    -
    -!IF  "$(CFG)" == "expatw - Win32 Release"
    -
    -!ELSEIF  "$(CFG)" == "expatw - Win32 Debug"
    -
    -# ADD CPP /GX- /Od
    -
    -!ENDIF 
    -
    -# End Source File
    -# Begin Source File
    -
    -SOURCE=.\xmlrole.c
    -# End Source File
    -# Begin Source File
    -
    -SOURCE=.\xmltok.c
    -# End Source File
    -# End Group
    -# Begin Group "Header Files"
    -
    -# PROP Default_Filter "h;hpp;hxx;hm;inl"
    -# Begin Source File
    -
    -SOURCE=.\ascii.h
    -# End Source File
    -# Begin Source File
    -
    -SOURCE=.\asciitab.h
    -# End Source File
    -# Begin Source File
    -
    -SOURCE=.\expat.h
    -# End Source File
    -# Begin Source File
    -
    -SOURCE=.\iasciitab.h
    -# End Source File
    -# Begin Source File
    -
    -SOURCE=.\latin1tab.h
    -# End Source File
    -# Begin Source File
    -
    -SOURCE=.\nametab.h
    -# End Source File
    -# Begin Source File
    -
    -SOURCE=.\utf8tab.h
    -# End Source File
    -# Begin Source File
    -
    -SOURCE=.\xmlrole.h
    -# End Source File
    -# Begin Source File
    -
    -SOURCE=.\xmltok.h
    -# End Source File
    -# Begin Source File
    -
    -SOURCE=.\xmltok_impl.h
    -# End Source File
    -# End Group
    -# Begin Group "Resource Files"
    -
    -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
    -# End Group
    -# End Target
    -# End Project
    +# Microsoft Developer Studio Project File - Name="expatw" - Package Owner=<4>
    +# Microsoft Developer Studio Generated Build File, Format Version 6.00
    +# ** DO NOT EDIT **
    +
    +# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
    +
    +CFG=expatw - Win32 Debug
    +!MESSAGE This is not a valid makefile. To build this project using NMAKE,
    +!MESSAGE use the Export Makefile command and run
    +!MESSAGE 
    +!MESSAGE NMAKE /f "expatw.mak".
    +!MESSAGE 
    +!MESSAGE You can specify a configuration when running NMAKE
    +!MESSAGE by defining the macro CFG on the command line. For example:
    +!MESSAGE 
    +!MESSAGE NMAKE /f "expatw.mak" CFG="expatw - Win32 Debug"
    +!MESSAGE 
    +!MESSAGE Possible choices for configuration are:
    +!MESSAGE 
    +!MESSAGE "expatw - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
    +!MESSAGE "expatw - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
    +!MESSAGE 
    +
    +# Begin Project
    +# PROP AllowPerConfigDependencies 0
    +# PROP Scc_ProjName ""
    +# PROP Scc_LocalPath ""
    +CPP=cl.exe
    +MTL=midl.exe
    +RSC=rc.exe
    +
    +!IF  "$(CFG)" == "expatw - Win32 Release"
    +
    +# PROP BASE Use_MFC 0
    +# PROP BASE Use_Debug_Libraries 0
    +# PROP BASE Output_Dir "Release"
    +# PROP BASE Intermediate_Dir "Release"
    +# PROP BASE Target_Dir ""
    +# PROP Use_MFC 0
    +# PROP Use_Debug_Libraries 0
    +# PROP Output_Dir "Release-w"
    +# PROP Intermediate_Dir "Release-w"
    +# PROP Ignore_Export_Lib 0
    +# PROP Target_Dir ""
    +# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "EXPAT_EXPORTS" /Yu"stdafx.h" /FD /c
    +# ADD CPP /nologo /MT /W3 /GX /O2 /D "NDEBUG" /D "COMPILED_FROM_DSP" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "XML_UNICODE_WCHAR_T" /FD /c
    +# SUBTRACT CPP /YX /Yc /Yu
    +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
    +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
    +# ADD BASE RSC /l 0x409 /d "NDEBUG"
    +# ADD RSC /l 0x409 /d "NDEBUG"
    +BSC32=bscmake.exe
    +# ADD BASE BSC32 /nologo
    +# ADD BSC32 /nologo
    +LINK32=link.exe
    +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
    +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /pdb:none /machine:I386 /out:"Release-w\libexpatw.dll"
    +
    +!ELSEIF  "$(CFG)" == "expatw - Win32 Debug"
    +
    +# PROP BASE Use_MFC 0
    +# PROP BASE Use_Debug_Libraries 1
    +# PROP BASE Output_Dir "Debug"
    +# PROP BASE Intermediate_Dir "Debug"
    +# PROP BASE Target_Dir ""
    +# PROP Use_MFC 0
    +# PROP Use_Debug_Libraries 1
    +# PROP Output_Dir "Debug-w"
    +# PROP Intermediate_Dir "Debug-w"
    +# PROP Ignore_Export_Lib 0
    +# PROP Target_Dir ""
    +# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "EXPAT_EXPORTS" /Yu"stdafx.h" /FD /GZ /c
    +# ADD CPP /nologo /MTd /W3 /GX /ZI /Od /D "_DEBUG" /D "COMPILED_FROM_DSP" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "XML_UNICODE_WCHAR_T" /FR /FD /GZ /c
    +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
    +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
    +# ADD BASE RSC /l 0x409 /d "_DEBUG"
    +# ADD RSC /l 0x409 /d "_DEBUG"
    +BSC32=bscmake.exe
    +# ADD BASE BSC32 /nologo
    +# ADD BSC32 /nologo
    +LINK32=link.exe
    +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
    +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /pdb:none /debug /machine:I386 /out:"Debug-w\libexpatw.dll"
    +
    +!ENDIF 
    +
    +# Begin Target
    +
    +# Name "expatw - Win32 Release"
    +# Name "expatw - Win32 Debug"
    +# Begin Group "Source Files"
    +
    +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
    +# Begin Source File
    +
    +SOURCE=.\libexpatw.def
    +# End Source File
    +# Begin Source File
    +
    +SOURCE=.\xmlparse.c
    +
    +!IF  "$(CFG)" == "expatw - Win32 Release"
    +
    +!ELSEIF  "$(CFG)" == "expatw - Win32 Debug"
    +
    +# ADD CPP /GX- /Od
    +
    +!ENDIF 
    +
    +# End Source File
    +# Begin Source File
    +
    +SOURCE=.\xmlrole.c
    +# End Source File
    +# Begin Source File
    +
    +SOURCE=.\xmltok.c
    +# End Source File
    +# End Group
    +# Begin Group "Header Files"
    +
    +# PROP Default_Filter "h;hpp;hxx;hm;inl"
    +# Begin Source File
    +
    +SOURCE=.\ascii.h
    +# End Source File
    +# Begin Source File
    +
    +SOURCE=.\asciitab.h
    +# End Source File
    +# Begin Source File
    +
    +SOURCE=.\expat.h
    +# End Source File
    +# Begin Source File
    +
    +SOURCE=.\expat_external.h
    +# End Source File
    +# Begin Source File
    +
    +SOURCE=.\iasciitab.h
    +# End Source File
    +# Begin Source File
    +
    +SOURCE=.\internal.h
    +# End Source File
    +# Begin Source File
    +
    +SOURCE=.\latin1tab.h
    +# End Source File
    +# Begin Source File
    +
    +SOURCE=.\nametab.h
    +# End Source File
    +# Begin Source File
    +
    +SOURCE=.\utf8tab.h
    +# End Source File
    +# Begin Source File
    +
    +SOURCE=.\xmlrole.h
    +# End Source File
    +# Begin Source File
    +
    +SOURCE=.\xmltok.h
    +# End Source File
    +# Begin Source File
    +
    +SOURCE=.\xmltok_impl.h
    +# End Source File
    +# End Group
    +# Begin Group "Resource Files"
    +
    +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
    +# End Group
    +# End Target
    +# End Project
    diff --git a/reactos/lib/expat/lib/expatw_static.dsp b/reactos/lib/expat/lib/expatw_static.dsp
    index c36604802ea..9a41e6eee23 100644
    --- a/reactos/lib/expat/lib/expatw_static.dsp
    +++ b/reactos/lib/expat/lib/expatw_static.dsp
    @@ -1,146 +1,154 @@
    -# Microsoft Developer Studio Project File - Name="expatw_static" - Package Owner=<4>
    -# Microsoft Developer Studio Generated Build File, Format Version 6.00
    -# ** DO NOT EDIT **
    -
    -# TARGTYPE "Win32 (x86) Static Library" 0x0104
    -
    -CFG=expatw_static - Win32 Debug
    -!MESSAGE This is not a valid makefile. To build this project using NMAKE,
    -!MESSAGE use the Export Makefile command and run
    -!MESSAGE 
    -!MESSAGE NMAKE /f "expatw_static.mak".
    -!MESSAGE 
    -!MESSAGE You can specify a configuration when running NMAKE
    -!MESSAGE by defining the macro CFG on the command line. For example:
    -!MESSAGE 
    -!MESSAGE NMAKE /f "expatw_static.mak" CFG="expatw_static - Win32 Debug"
    -!MESSAGE 
    -!MESSAGE Possible choices for configuration are:
    -!MESSAGE 
    -!MESSAGE "expatw_static - Win32 Release" (based on "Win32 (x86) Static Library")
    -!MESSAGE "expatw_static - Win32 Debug" (based on "Win32 (x86) Static Library")
    -!MESSAGE 
    -
    -# Begin Project
    -# PROP AllowPerConfigDependencies 0
    -# PROP Scc_ProjName ""
    -# PROP Scc_LocalPath ""
    -CPP=cl.exe
    -RSC=rc.exe
    -
    -!IF  "$(CFG)" == "expatw_static - Win32 Release"
    -
    -# PROP BASE Use_MFC 0
    -# PROP BASE Use_Debug_Libraries 0
    -# PROP BASE Output_Dir "expatw_static___Win32_Release"
    -# PROP BASE Intermediate_Dir "expatw_static___Win32_Release"
    -# PROP BASE Target_Dir ""
    -# PROP Use_MFC 0
    -# PROP Use_Debug_Libraries 0
    -# PROP Output_Dir "Release-w_static"
    -# PROP Intermediate_Dir "Release-w_static"
    -# PROP Target_Dir ""
    -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c
    -# ADD CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "_WINDOWS" /D "NDEBUG" /D "_MBCS" /D "_LIB" /D "COMPILED_FROM_DSP" /D "XML_UNICODE_WCHAR_T" /FD /c
    -# SUBTRACT CPP /YX
    -# ADD BASE RSC /l 0x1009 /d "NDEBUG"
    -# ADD RSC /l 0x409 /d "NDEBUG"
    -BSC32=bscmake.exe
    -# ADD BASE BSC32 /nologo
    -# ADD BSC32 /nologo
    -LIB32=link.exe -lib
    -# ADD BASE LIB32 /nologo
    -# ADD LIB32 /nologo /out:"Release-w_static\libexpatwMT.lib"
    -
    -!ELSEIF  "$(CFG)" == "expatw_static - Win32 Debug"
    -
    -# PROP BASE Use_MFC 0
    -# PROP BASE Use_Debug_Libraries 1
    -# PROP BASE Output_Dir "expatw_static___Win32_Debug"
    -# PROP BASE Intermediate_Dir "expatw_static___Win32_Debug"
    -# PROP BASE Target_Dir ""
    -# PROP Use_MFC 0
    -# PROP Use_Debug_Libraries 1
    -# PROP Output_Dir "Debug-w_static"
    -# PROP Intermediate_Dir "Debug-w_static"
    -# PROP Target_Dir ""
    -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
    -# ADD CPP /nologo /MTd /W3 /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "COMPILED_FROM_DSP" /D "_MBCS" /D "_LIB" /FR /FD /GZ /c
    -# SUBTRACT CPP /YX
    -# ADD BASE RSC /l 0x1009 /d "_DEBUG"
    -# ADD RSC /l 0x409 /d "_DEBUG"
    -BSC32=bscmake.exe
    -# ADD BASE BSC32 /nologo
    -# ADD BSC32 /nologo
    -LIB32=link.exe -lib
    -# ADD BASE LIB32 /nologo
    -# ADD LIB32 /nologo /out:"Debug-w_static\libexpatwMT.lib"
    -
    -!ENDIF 
    -
    -# Begin Target
    -
    -# Name "expatw_static - Win32 Release"
    -# Name "expatw_static - Win32 Debug"
    -# Begin Group "Source Files"
    -
    -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
    -# Begin Source File
    -
    -SOURCE=.\xmlparse.c
    -# End Source File
    -# Begin Source File
    -
    -SOURCE=.\xmlrole.c
    -# End Source File
    -# Begin Source File
    -
    -SOURCE=.\xmltok.c
    -# End Source File
    -# End Group
    -# Begin Group "Header Files"
    -
    -# PROP Default_Filter "h;hpp;hxx;hm;inl"
    -# Begin Source File
    -
    -SOURCE=.\ascii.h
    -# End Source File
    -# Begin Source File
    -
    -SOURCE=.\asciitab.h
    -# End Source File
    -# Begin Source File
    -
    -SOURCE=.\expat.h
    -# End Source File
    -# Begin Source File
    -
    -SOURCE=.\iasciitab.h
    -# End Source File
    -# Begin Source File
    -
    -SOURCE=.\latin1tab.h
    -# End Source File
    -# Begin Source File
    -
    -SOURCE=.\nametab.h
    -# End Source File
    -# Begin Source File
    -
    -SOURCE=.\utf8tab.h
    -# End Source File
    -# Begin Source File
    -
    -SOURCE=.\xmlrole.h
    -# End Source File
    -# Begin Source File
    -
    -SOURCE=.\xmltok.h
    -# End Source File
    -# Begin Source File
    -
    -SOURCE=.\xmltok_impl.h
    -# End Source File
    -# End Group
    -# End Target
    -# End Project
    +# Microsoft Developer Studio Project File - Name="expatw_static" - Package Owner=<4>
    +# Microsoft Developer Studio Generated Build File, Format Version 6.00
    +# ** DO NOT EDIT **
    +
    +# TARGTYPE "Win32 (x86) Static Library" 0x0104
    +
    +CFG=expatw_static - Win32 Debug
    +!MESSAGE This is not a valid makefile. To build this project using NMAKE,
    +!MESSAGE use the Export Makefile command and run
    +!MESSAGE 
    +!MESSAGE NMAKE /f "expatw_static.mak".
    +!MESSAGE 
    +!MESSAGE You can specify a configuration when running NMAKE
    +!MESSAGE by defining the macro CFG on the command line. For example:
    +!MESSAGE 
    +!MESSAGE NMAKE /f "expatw_static.mak" CFG="expatw_static - Win32 Debug"
    +!MESSAGE 
    +!MESSAGE Possible choices for configuration are:
    +!MESSAGE 
    +!MESSAGE "expatw_static - Win32 Release" (based on "Win32 (x86) Static Library")
    +!MESSAGE "expatw_static - Win32 Debug" (based on "Win32 (x86) Static Library")
    +!MESSAGE 
    +
    +# Begin Project
    +# PROP AllowPerConfigDependencies 0
    +# PROP Scc_ProjName ""
    +# PROP Scc_LocalPath ""
    +CPP=cl.exe
    +RSC=rc.exe
    +
    +!IF  "$(CFG)" == "expatw_static - Win32 Release"
    +
    +# PROP BASE Use_MFC 0
    +# PROP BASE Use_Debug_Libraries 0
    +# PROP BASE Output_Dir "expatw_static___Win32_Release"
    +# PROP BASE Intermediate_Dir "expatw_static___Win32_Release"
    +# PROP BASE Target_Dir ""
    +# PROP Use_MFC 0
    +# PROP Use_Debug_Libraries 0
    +# PROP Output_Dir "Release-w_static"
    +# PROP Intermediate_Dir "Release-w_static"
    +# PROP Target_Dir ""
    +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c
    +# ADD CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "_WINDOWS" /D "NDEBUG" /D "_MBCS" /D "_LIB" /D "COMPILED_FROM_DSP" /D "XML_UNICODE_WCHAR_T" /FD /c
    +# SUBTRACT CPP /YX
    +# ADD BASE RSC /l 0x1009 /d "NDEBUG"
    +# ADD RSC /l 0x409 /d "NDEBUG"
    +BSC32=bscmake.exe
    +# ADD BASE BSC32 /nologo
    +# ADD BSC32 /nologo
    +LIB32=link.exe -lib
    +# ADD BASE LIB32 /nologo
    +# ADD LIB32 /nologo /out:"Release-w_static\libexpatwMT.lib"
    +
    +!ELSEIF  "$(CFG)" == "expatw_static - Win32 Debug"
    +
    +# PROP BASE Use_MFC 0
    +# PROP BASE Use_Debug_Libraries 1
    +# PROP BASE Output_Dir "expatw_static___Win32_Debug"
    +# PROP BASE Intermediate_Dir "expatw_static___Win32_Debug"
    +# PROP BASE Target_Dir ""
    +# PROP Use_MFC 0
    +# PROP Use_Debug_Libraries 1
    +# PROP Output_Dir "Debug-w_static"
    +# PROP Intermediate_Dir "Debug-w_static"
    +# PROP Target_Dir ""
    +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
    +# ADD CPP /nologo /MTd /W3 /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "COMPILED_FROM_DSP" /D "_MBCS" /D "_LIB" /FR /FD /GZ /c
    +# SUBTRACT CPP /YX
    +# ADD BASE RSC /l 0x1009 /d "_DEBUG"
    +# ADD RSC /l 0x409 /d "_DEBUG"
    +BSC32=bscmake.exe
    +# ADD BASE BSC32 /nologo
    +# ADD BSC32 /nologo
    +LIB32=link.exe -lib
    +# ADD BASE LIB32 /nologo
    +# ADD LIB32 /nologo /out:"Debug-w_static\libexpatwMT.lib"
    +
    +!ENDIF 
    +
    +# Begin Target
    +
    +# Name "expatw_static - Win32 Release"
    +# Name "expatw_static - Win32 Debug"
    +# Begin Group "Source Files"
    +
    +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
    +# Begin Source File
    +
    +SOURCE=.\xmlparse.c
    +# End Source File
    +# Begin Source File
    +
    +SOURCE=.\xmlrole.c
    +# End Source File
    +# Begin Source File
    +
    +SOURCE=.\xmltok.c
    +# End Source File
    +# End Group
    +# Begin Group "Header Files"
    +
    +# PROP Default_Filter "h;hpp;hxx;hm;inl"
    +# Begin Source File
    +
    +SOURCE=.\ascii.h
    +# End Source File
    +# Begin Source File
    +
    +SOURCE=.\asciitab.h
    +# End Source File
    +# Begin Source File
    +
    +SOURCE=.\expat.h
    +# End Source File
    +# Begin Source File
    +
    +SOURCE=.\expat_external.h
    +# End Source File
    +# Begin Source File
    +
    +SOURCE=.\iasciitab.h
    +# End Source File
    +# Begin Source File
    +
    +SOURCE=.\internal.h
    +# End Source File
    +# Begin Source File
    +
    +SOURCE=.\latin1tab.h
    +# End Source File
    +# Begin Source File
    +
    +SOURCE=.\nametab.h
    +# End Source File
    +# Begin Source File
    +
    +SOURCE=.\utf8tab.h
    +# End Source File
    +# Begin Source File
    +
    +SOURCE=.\xmlrole.h
    +# End Source File
    +# Begin Source File
    +
    +SOURCE=.\xmltok.h
    +# End Source File
    +# Begin Source File
    +
    +SOURCE=.\xmltok_impl.h
    +# End Source File
    +# End Group
    +# End Target
    +# End Project
    diff --git a/reactos/lib/expat/lib/internal.h b/reactos/lib/expat/lib/internal.h
    index 79ffc9e500d..ff056c659cd 100644
    --- a/reactos/lib/expat/lib/internal.h
    +++ b/reactos/lib/expat/lib/internal.h
    @@ -20,7 +20,7 @@
              and therefore subject to change.
     */
     
    -#if defined(__GNUC__) && defined(__i386__) && !defined(__MINGW32__)	//MF
    +#if defined(__GNUC__) && defined(__i386__)
     /* We'll use this version by default only where we know it helps.
     
        regparm() generates warnings on Solaris boxes.   See SF bug #692878.
    diff --git a/reactos/lib/expat/lib/libexpat.def b/reactos/lib/expat/lib/libexpat.def
    index dd0fc6fc956..d8f397b939b 100644
    --- a/reactos/lib/expat/lib/libexpat.def
    +++ b/reactos/lib/expat/lib/libexpat.def
    @@ -1,5 +1,5 @@
     ; DEF file for MS VC++
    -LIBRARY   expat.dll
    +LIBRARY   LIBEXPAT
     DESCRIPTION "Implements an XML parser."
     EXPORTS
       XML_DefaultCurrent @1
    diff --git a/reactos/lib/expat/lib/libexpatw.def b/reactos/lib/expat/lib/libexpatw.def
    index dd0fc6fc956..49d0c29d366 100644
    --- a/reactos/lib/expat/lib/libexpatw.def
    +++ b/reactos/lib/expat/lib/libexpatw.def
    @@ -1,5 +1,5 @@
     ; DEF file for MS VC++
    -LIBRARY   expat.dll
    +LIBRARY   LIBEXPATW
     DESCRIPTION "Implements an XML parser."
     EXPORTS
       XML_DefaultCurrent @1
    diff --git a/reactos/lib/expat/lib/winconfig.h b/reactos/lib/expat/lib/winconfig.h
    index c1b791d62d0..dfff653a5c8 100644
    --- a/reactos/lib/expat/lib/winconfig.h
    +++ b/reactos/lib/expat/lib/winconfig.h
    @@ -17,7 +17,7 @@
     #include 
     #include 
     
    -#define XML_NS 1
    +//MF #define XML_NS 1
     #define XML_DTD 1
     #define XML_CONTEXT_BYTES 1024
     
    diff --git a/reactos/lib/expat/lib/xmlparse.c b/reactos/lib/expat/lib/xmlparse.c
    index 644f2631583..b87acd4dfe5 100644
    --- a/reactos/lib/expat/lib/xmlparse.c
    +++ b/reactos/lib/expat/lib/xmlparse.c
    @@ -4,6 +4,7 @@
     
     #include 
     #include                      /* memset(), memcpy() */
    +#include 
     
     #define XML_BUILDING_EXPAT 1
     
    @@ -12,7 +13,7 @@
     #elif defined(MACOS_CLASSIC)
     #include "macconfig.h"
     #elif defined(HAVE_EXPAT_CONFIG_H)
    -#include "expat_config.h"
    +#include 
     #endif /* ndef COMPILED_FROM_DSP */
     
     #include "expat.h"
    @@ -491,7 +492,7 @@ struct XML_ParserStruct {
       void *m_unknownEncodingMem;
       void *m_unknownEncodingData;
       void *m_unknownEncodingHandlerData;
    -  void (*m_unknownEncodingRelease)(void *);
    +  void (XMLCALL *m_unknownEncodingRelease)(void *);
       PROLOG_STATE m_prologState;
       Processor *m_processor;
       enum XML_Error m_errorCode;
    @@ -639,8 +640,8 @@ struct XML_ParserStruct {
     #define groupSize (parser->m_groupSize)
     #define namespaceSeparator (parser->m_namespaceSeparator)
     #define parentParser (parser->m_parentParser)
    -#define parsing (parser->m_parsingStatus.parsing)
    -#define finalBuffer (parser->m_parsingStatus.finalBuffer)
    +#define ps_parsing (parser->m_parsingStatus.parsing)
    +#define ps_finalBuffer (parser->m_parsingStatus.finalBuffer)
     #ifdef XML_DTD
     #define isParamEntity (parser->m_isParamEntity)
     #define useForeignDTD (parser->m_useForeignDTD)
    @@ -851,7 +852,7 @@ parserInit(XML_Parser parser, const XML_Char *encodingName)
       unknownEncodingRelease = NULL;
       unknownEncodingData = NULL;
       parentParser = NULL;
    -  parsing = XML_INITIALIZED;
    +  ps_parsing = XML_INITIALIZED;
     #ifdef XML_DTD
       isParamEntity = XML_FALSE;
       useForeignDTD = XML_FALSE;
    @@ -914,7 +915,7 @@ XML_SetEncoding(XML_Parser parser, const XML_Char *encodingName)
          XXX There's no way for the caller to determine which of the
          XXX possible error cases caused the XML_STATUS_ERROR return.
       */
    -  if (parsing == XML_PARSING || parsing == XML_SUSPENDED)
    +  if (ps_parsing == XML_PARSING || ps_parsing == XML_SUSPENDED)
         return XML_STATUS_ERROR;
       if (encodingName == NULL)
         protocolEncodingName = NULL;
    @@ -1142,7 +1143,7 @@ XML_UseForeignDTD(XML_Parser parser, XML_Bool useDTD)
     {
     #ifdef XML_DTD
       /* block after XML_Parse()/XML_ParseBuffer() has been called */
    -  if (parsing == XML_PARSING || parsing == XML_SUSPENDED)
    +  if (ps_parsing == XML_PARSING || ps_parsing == XML_SUSPENDED)
         return XML_ERROR_CANT_CHANGE_FEATURE_ONCE_PARSING;
       useForeignDTD = useDTD;
       return XML_ERROR_NONE;
    @@ -1155,7 +1156,7 @@ void XMLCALL
     XML_SetReturnNSTriplet(XML_Parser parser, int do_nst)
     {
       /* block after XML_Parse()/XML_ParseBuffer() has been called */
    -  if (parsing == XML_PARSING || parsing == XML_SUSPENDED)
    +  if (ps_parsing == XML_PARSING || ps_parsing == XML_SUSPENDED)
         return;
       ns_triplets = do_nst ? XML_TRUE : XML_FALSE;
     }
    @@ -1407,7 +1408,7 @@ XML_SetParamEntityParsing(XML_Parser parser,
                               enum XML_ParamEntityParsing peParsing)
     {
       /* block after XML_Parse()/XML_ParseBuffer() has been called */
    -  if (parsing == XML_PARSING || parsing == XML_SUSPENDED)
    +  if (ps_parsing == XML_PARSING || ps_parsing == XML_SUSPENDED)
         return 0;
     #ifdef XML_DTD
       paramEntityParsing = peParsing;
    @@ -1420,7 +1421,7 @@ XML_SetParamEntityParsing(XML_Parser parser,
     enum XML_Status XMLCALL
     XML_Parse(XML_Parser parser, const char *s, int len, int isFinal)
     {
    -  switch (parsing) {
    +  switch (ps_parsing) {
       case XML_SUSPENDED:
         errorCode = XML_ERROR_SUSPENDED;
         return XML_STATUS_ERROR;
    @@ -1428,11 +1429,11 @@ XML_Parse(XML_Parser parser, const char *s, int len, int isFinal)
         errorCode = XML_ERROR_FINISHED;
         return XML_STATUS_ERROR;
       default:
    -    parsing = XML_PARSING;
    +    ps_parsing = XML_PARSING;
       }
     
       if (len == 0) {
    -    finalBuffer = (XML_Bool)isFinal;
    +    ps_finalBuffer = (XML_Bool)isFinal;
         if (!isFinal)
           return XML_STATUS_OK;
         positionPtr = bufferPtr;
    @@ -1440,19 +1441,19 @@ XML_Parse(XML_Parser parser, const char *s, int len, int isFinal)
     
         /* If data are left over from last buffer, and we now know that these
            data are the final chunk of input, then we have to check them again
    -       to detect errors based on this information.
    +       to detect errors based on that fact.
         */
         errorCode = processor(parser, bufferPtr, parseEndPtr, &bufferPtr);
     
         if (errorCode == XML_ERROR_NONE) {
    -      switch (parsing) {
    +      switch (ps_parsing) {
           case XML_SUSPENDED:
             XmlUpdatePosition(encoding, positionPtr, bufferPtr, &position);
             positionPtr = bufferPtr;
             return XML_STATUS_SUSPENDED;
           case XML_INITIALIZED: 
           case XML_PARSING:
    -        parsing = XML_FINISHED;
    +        ps_parsing = XML_FINISHED;
             /* fall through */
           default:
             return XML_STATUS_OK;
    @@ -1466,10 +1467,10 @@ XML_Parse(XML_Parser parser, const char *s, int len, int isFinal)
       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;
    +    ps_finalBuffer = (XML_Bool)isFinal;
     
         errorCode = processor(parser, s, parseEndPtr = s + len, &end);
     
    @@ -1479,21 +1480,21 @@ XML_Parse(XML_Parser parser, const char *s, int len, int isFinal)
           return XML_STATUS_ERROR;
         }
         else {
    -      switch (parsing) {
    +      switch (ps_parsing) {
           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;
    +          ps_parsing = XML_FINISHED;
               return result;
             }
           }
         }
     
         XmlUpdatePosition(encoding, positionPtr, end, &position);
    -    positionPtr = end;
         nLeftOver = s + len - end;
         if (nLeftOver) {
           if (buffer == NULL || nLeftOver > bufferLim - buffer) {
    @@ -1516,9 +1517,13 @@ XML_Parse(XML_Parser parser, const char *s, int len, int isFinal)
             bufferLim = buffer + len * 2;
           }
           memcpy(buffer, end, nLeftOver);
    -      bufferPtr = buffer;
    -      bufferEnd = buffer + nLeftOver;
         }
    +    bufferPtr = buffer;
    +    bufferEnd = buffer + nLeftOver;
    +    positionPtr = bufferPtr;
    +    parseEndPtr = bufferEnd;
    +    eventPtr = bufferPtr;
    +    eventEndPtr = bufferPtr;
         return result;
       }
     #endif  /* not defined XML_CONTEXT_BYTES */
    @@ -1537,9 +1542,9 @@ enum XML_Status XMLCALL
     XML_ParseBuffer(XML_Parser parser, int len, int isFinal)
     {
       const char *start;
    -  enum XML_Error result = XML_STATUS_OK;
    +  enum XML_Status result = XML_STATUS_OK;
     
    -  switch (parsing) {
    +  switch (ps_parsing) {
       case XML_SUSPENDED:
         errorCode = XML_ERROR_SUSPENDED;
         return XML_STATUS_ERROR;
    @@ -1547,7 +1552,7 @@ XML_ParseBuffer(XML_Parser parser, int len, int isFinal)
         errorCode = XML_ERROR_FINISHED;
         return XML_STATUS_ERROR;
       default:
    -    parsing = XML_PARSING;
    +    ps_parsing = XML_PARSING;
       }
     
       start = bufferPtr;
    @@ -1555,7 +1560,7 @@ XML_ParseBuffer(XML_Parser parser, int len, int isFinal)
       bufferEnd += len;
       parseEndPtr = bufferEnd;
       parseEndByteIndex += len;
    -  finalBuffer = (XML_Bool)isFinal;
    +  ps_finalBuffer = (XML_Bool)isFinal;
     
       errorCode = processor(parser, start, parseEndPtr, &bufferPtr);
     
    @@ -1565,14 +1570,14 @@ XML_ParseBuffer(XML_Parser parser, int len, int isFinal)
         return XML_STATUS_ERROR;
       }
       else {
    -    switch (parsing) {
    +    switch (ps_parsing) {
         case XML_SUSPENDED:
           result = XML_STATUS_SUSPENDED;
           break;
         case XML_INITIALIZED: 
         case XML_PARSING:
           if (isFinal) {
    -        parsing = XML_FINISHED;
    +        ps_parsing = XML_FINISHED;
             return result;
           }
         default: ;  /* should not happen */
    @@ -1587,7 +1592,7 @@ XML_ParseBuffer(XML_Parser parser, int len, int isFinal)
     void * XMLCALL
     XML_GetBuffer(XML_Parser parser, int len)
     {
    -  switch (parsing) {
    +  switch (ps_parsing) {
       case XML_SUSPENDED:
         errorCode = XML_ERROR_SUSPENDED;
         return NULL;
    @@ -1666,29 +1671,29 @@ XML_GetBuffer(XML_Parser parser, int len)
     enum XML_Status XMLCALL
     XML_StopParser(XML_Parser parser, XML_Bool resumable)
     {
    -  switch (parsing) {
    +  switch (ps_parsing) {
       case XML_SUSPENDED:
         if (resumable) {
           errorCode = XML_ERROR_SUSPENDED;
           return XML_STATUS_ERROR;
         }
    -    parsing = XML_FINISHED;
    +    ps_parsing = XML_FINISHED;
         break;
       case XML_FINISHED:
         errorCode = XML_ERROR_FINISHED;
         return XML_STATUS_ERROR;
       default:
         if (resumable) {
    -#ifdef XML_DTD	//MF
    +#ifdef XML_DTD
           if (isParamEntity) {
             errorCode = XML_ERROR_SUSPEND_PE;
             return XML_STATUS_ERROR;
           }
     #endif
    -	  parsing = XML_SUSPENDED;
    +      ps_parsing = XML_SUSPENDED;
         }
         else
    -      parsing = XML_FINISHED;
    +      ps_parsing = XML_FINISHED;
       }
       return XML_STATUS_OK;
     }
    @@ -1696,13 +1701,13 @@ XML_StopParser(XML_Parser parser, XML_Bool resumable)
     enum XML_Status XMLCALL
     XML_ResumeParser(XML_Parser parser)
     {
    -  enum XML_Error result = XML_STATUS_OK;
    +  enum XML_Status result = XML_STATUS_OK;
     
    -  if (parsing != XML_SUSPENDED) {
    +  if (ps_parsing != XML_SUSPENDED) {
         errorCode = XML_ERROR_NOT_SUSPENDED;
         return XML_STATUS_ERROR;
       }
    -  parsing = XML_PARSING;
    +  ps_parsing = XML_PARSING;
     
       errorCode = processor(parser, bufferPtr, parseEndPtr, &bufferPtr);
     
    @@ -1712,14 +1717,14 @@ XML_ResumeParser(XML_Parser parser)
         return XML_STATUS_ERROR;
       }
       else {
    -    switch (parsing) {
    +    switch (ps_parsing) {
         case XML_SUSPENDED:
           result = XML_STATUS_SUSPENDED;
           break;
         case XML_INITIALIZED: 
         case XML_PARSING:
    -      if (finalBuffer) {
    -        parsing = XML_FINISHED;
    +      if (ps_finalBuffer) {
    +        ps_parsing = XML_FINISHED;
             return result;
           }
         default: ;
    @@ -1734,6 +1739,7 @@ XML_ResumeParser(XML_Parser parser)
     void XMLCALL
     XML_GetParsingStatus(XML_Parser parser, XML_ParsingStatus *status)
     {
    +  assert(status != NULL);
       *status = parser->m_parsingStatus;
     }
     
    @@ -1833,7 +1839,7 @@ XML_DefaultCurrent(XML_Parser parser)
     const XML_LChar * XMLCALL
     XML_ErrorString(enum XML_Error code)
     {
    -  static const XML_LChar *message[] = {
    +  static const XML_LChar* const message[] = {
         0,
         XML_L("out of memory"),
         XML_L("syntax error"),
    @@ -1851,7 +1857,7 @@ XML_ErrorString(enum XML_Error code)
         XML_L("reference to invalid character number"),
         XML_L("reference to binary entity"),
         XML_L("reference to external entity in attribute"),
    -    XML_L("xml declaration not at start of external entity"),
    +    XML_L("XML or text declaration not at start of entity"),
         XML_L("unknown encoding"),
         XML_L("encoding specified in XML declaration is incorrect"),
         XML_L("unclosed CDATA section"),
    @@ -1862,11 +1868,19 @@ XML_ErrorString(enum XML_Error code)
         XML_L("requested feature requires XML_DTD support in Expat"),
         XML_L("cannot change setting once parsing has begun"),
         XML_L("unbound prefix"),
    +    XML_L("must not undeclare prefix"),
    +    XML_L("incomplete markup in parameter entity"),
    +    XML_L("XML declaration not well-formed"),
    +    XML_L("text declaration not well-formed"),
    +    XML_L("illegal character(s) in public id"),
         XML_L("parser suspended"),
         XML_L("parser not suspended"),
         XML_L("parsing aborted"),
         XML_L("parsing finished"),
    -    XML_L("cannot suspend in external parameter entity")
    +    XML_L("cannot suspend in external parameter entity"),
    +    XML_L("reserved prefix (xml) must not be undeclared or bound to another namespace name"),
    +    XML_L("reserved prefix (xmlns) must not be declared or undeclared"),
    +    XML_L("prefix must not be bound to one of the reserved namespace names")
       };
       if (code > 0 && code < sizeof(message)/sizeof(message[0]))
         return message[code];
    @@ -1908,9 +1922,11 @@ XML_ExpatVersionInfo(void)
     const XML_Feature * XMLCALL
     XML_GetFeatureList(void)
     {
    -  static XML_Feature features[] = {
    -    {XML_FEATURE_SIZEOF_XML_CHAR,  XML_L("sizeof(XML_Char)"), 0},
    -    {XML_FEATURE_SIZEOF_XML_LCHAR, XML_L("sizeof(XML_LChar)"), 0},
    +  static const XML_Feature features[] = {
    +    {XML_FEATURE_SIZEOF_XML_CHAR,  XML_L("sizeof(XML_Char)"),
    +     sizeof(XML_Char)},
    +    {XML_FEATURE_SIZEOF_XML_LCHAR, XML_L("sizeof(XML_LChar)"),
    +     sizeof(XML_LChar)},
     #ifdef XML_UNICODE
         {XML_FEATURE_UNICODE,          XML_L("XML_UNICODE"), 0},
     #endif
    @@ -1926,12 +1942,13 @@ XML_GetFeatureList(void)
     #endif
     #ifdef XML_MIN_SIZE
         {XML_FEATURE_MIN_SIZE,         XML_L("XML_MIN_SIZE"), 0},
    +#endif
    +#ifdef XML_NS
    +    {XML_FEATURE_NS,               XML_L("XML_NS"), 0},
     #endif
         {XML_FEATURE_END,              NULL, 0}
       };
     
    -  features[0].value = sizeof(XML_Char);
    -  features[1].value = sizeof(XML_LChar);
       return features;
     }
     
    @@ -1992,7 +2009,7 @@ contentProcessor(XML_Parser parser,
                      const char **endPtr)
     {
       enum XML_Error result = doContent(parser, 0, encoding, start, end, 
    -                                    endPtr, (XML_Bool)!finalBuffer);
    +                                    endPtr, (XML_Bool)!ps_finalBuffer);
       if (result == XML_ERROR_NONE) {
         if (!storeRawNames(parser))
           return XML_ERROR_NO_MEMORY;
    @@ -2028,21 +2045,21 @@ externalEntityInitProcessor2(XML_Parser parser,
            doContent (by detecting XML_TOK_NONE) without processing any xml text
            declaration - causing the error XML_ERROR_MISPLACED_XML_PI in doContent.
         */
    -    if (next == end && !finalBuffer) {
    +    if (next == end && !ps_finalBuffer) {
           *endPtr = next;
           return XML_ERROR_NONE;
         }
         start = next;
         break;
       case XML_TOK_PARTIAL:
    -    if (!finalBuffer) {
    +    if (!ps_finalBuffer) {
           *endPtr = start;
           return XML_ERROR_NONE;
         }
         eventPtr = start;
         return XML_ERROR_UNCLOSED_TOKEN;
       case XML_TOK_PARTIAL_CHAR:
    -    if (!finalBuffer) {
    +    if (!ps_finalBuffer) {
           *endPtr = start;
           return XML_ERROR_NONE;
         }
    @@ -2072,7 +2089,7 @@ externalEntityInitProcessor3(XML_Parser parser,
           result = processXmlDecl(parser, 1, start, next);
           if (result != XML_ERROR_NONE)
             return result;
    -      switch (parsing) {
    +      switch (ps_parsing) {
           case XML_SUSPENDED: 
             *endPtr = next;
             return XML_ERROR_NONE;
    @@ -2084,13 +2101,13 @@ externalEntityInitProcessor3(XML_Parser parser,
         }
         break;
       case XML_TOK_PARTIAL:
    -    if (!finalBuffer) {
    +    if (!ps_finalBuffer) {
           *endPtr = start;
           return XML_ERROR_NONE;
         }
         return XML_ERROR_UNCLOSED_TOKEN;
       case XML_TOK_PARTIAL_CHAR:
    -    if (!finalBuffer) {
    +    if (!ps_finalBuffer) {
           *endPtr = start;
           return XML_ERROR_NONE;
         }
    @@ -2108,7 +2125,7 @@ externalEntityContentProcessor(XML_Parser parser,
                                    const char **endPtr)
     {
       enum XML_Error result = doContent(parser, 1, encoding, start, end, 
    -                                    endPtr, (XML_Bool)!finalBuffer);
    +                                    endPtr, (XML_Bool)!ps_finalBuffer);
       if (result == XML_ERROR_NONE) {
         if (!storeRawNames(parser))
           return XML_ERROR_NO_MEMORY;
    @@ -2558,7 +2575,7 @@ doContent(XML_Parser parser,
           break;
         }
         *eventPP = s = next;
    -    switch (parsing) {
    +    switch (ps_parsing) {
         case XML_SUSPENDED: 
           *nextPtr = next;
           return XML_ERROR_NONE;
    @@ -2814,7 +2831,7 @@ storeAtts(XML_Parser parser, const ENCODING *enc,
                 }
                 if (!step)
                   step = PROBE_STEP(uriHash, mask, nsAttsPower);
    -            j < step ? ( j += nsAttsSize - step) : (j -= step);
    +            j < step ? (j += nsAttsSize - step) : (j -= step);
               }
             }
     
    @@ -2871,14 +2888,14 @@ storeAtts(XML_Parser parser, const ENCODING *enc,
       prefixLen = 0;
       if (ns_triplets && binding->prefix->name) {
         for (; binding->prefix->name[prefixLen++];)
    -      ;
    +      ;  /* prefixLen includes null terminator */
       }
       tagNamePtr->localPart = localPart;
       tagNamePtr->uriLen = binding->uriLen;
       tagNamePtr->prefix = binding->prefix->name;
       tagNamePtr->prefixLen = prefixLen;
       for (i = 0; localPart[i++];)
    -    ;
    +    ;  /* i includes null terminator */
       n = i + binding->uriLen + prefixLen;
       if (n > binding->uriAlloc) {
         TAG *p;
    @@ -2893,12 +2910,13 @@ storeAtts(XML_Parser parser, const ENCODING *enc,
         FREE(binding->uri);
         binding->uri = uri;
       }
    +  /* if namespaceSeparator != '\0' then uri includes it already */
       uri = binding->uri + binding->uriLen;
       memcpy(uri, localPart, i * sizeof(XML_Char));
    +  /* we always have a namespace separator between localPart and prefix */
       if (prefixLen) {
    -    uri = uri + (i - 1);
    -    if (namespaceSeparator)
    -      *uri = namespaceSeparator;
    +    uri += i - 1;
    +    *uri = namespaceSeparator;  /* replace null terminator */
         memcpy(uri + 1, binding->prefix->name, prefixLen * sizeof(XML_Char));
       }
       tagNamePtr->str = binding->uri;
    @@ -2912,15 +2930,66 @@ static enum XML_Error
     addBinding(XML_Parser parser, PREFIX *prefix, const ATTRIBUTE_ID *attId,
                const XML_Char *uri, BINDING **bindingsPtr)
     {
    +  static const XML_Char xmlNamespace[] = {
    +    'h', 't', 't', 'p', ':', '/', '/',
    +    'w', 'w', 'w', '.', 'w', '3', '.', 'o', 'r', 'g', '/',
    +    'X', 'M', 'L', '/', '1', '9', '9', '8', '/',
    +    'n', 'a', 'm', 'e', 's', 'p', 'a', 'c', 'e', '\0'
    +  };
    +  static const int xmlLen = 
    +    (int)sizeof(xmlNamespace)/sizeof(XML_Char) - 1;
    +  static const XML_Char xmlnsNamespace[] = {
    +    'h', 't', 't', 'p', ':', '/', '/',
    +    'w', 'w', 'w', '.', 'w', '3', '.', 'o', 'r', 'g', '/',
    +    '2', '0', '0', '0', '/', 'x', 'm', 'l', 'n', 's', '/', '\0'
    +  };
    +  static const int xmlnsLen = 
    +    (int)sizeof(xmlnsNamespace)/sizeof(XML_Char) - 1;
    +
    +  XML_Bool mustBeXML = XML_FALSE;
    +  XML_Bool isXML = XML_TRUE;
    +  XML_Bool isXMLNS = XML_TRUE;
    +  
       BINDING *b;
       int len;
     
    -  /* empty string is only valid when there is no prefix per XML NS 1.0 */
    +  /* empty URI is only valid for default namespace per XML NS 1.0 (not 1.1) */
       if (*uri == XML_T('\0') && prefix->name)
    -    return XML_ERROR_SYNTAX;
    +    return XML_ERROR_UNDECLARING_PREFIX;
    +
    +  if (prefix->name
    +      && prefix->name[0] == XML_T('x')
    +      && prefix->name[1] == XML_T('m')
    +      && prefix->name[2] == XML_T('l')) {
    +
    +    /* Not allowed to bind xmlns */
    +    if (prefix->name[3] == XML_T('n')
    +        && prefix->name[4] == XML_T('s')
    +        && prefix->name[5] == XML_T('\0'))
    +      return XML_ERROR_RESERVED_PREFIX_XMLNS;
    +
    +    if (prefix->name[3] == XML_T('\0'))
    +      mustBeXML = XML_TRUE;
    +  }
    +
    +  for (len = 0; uri[len]; len++) {
    +    if (isXML && (len > xmlLen || uri[len] != xmlNamespace[len]))
    +      isXML = XML_FALSE;
    +
    +    if (!mustBeXML && isXMLNS 
    +        && (len > xmlnsLen || uri[len] != xmlnsNamespace[len]))
    +      isXMLNS = XML_FALSE;
    +  }
    +  isXML = isXML && len == xmlLen;
    +  isXMLNS = isXMLNS && len == xmlnsLen;
    +
    +  if (mustBeXML != isXML)
    +    return mustBeXML ? XML_ERROR_RESERVED_PREFIX_XML
    +                     : XML_ERROR_RESERVED_NAMESPACE_URI;
    +
    +  if (isXMLNS)
    +    return XML_ERROR_RESERVED_NAMESPACE_URI;
     
    -  for (len = 0; uri[len]; len++)
    -    ;
       if (namespaceSeparator)
         len++;
       if (freeBindingList) {
    @@ -2960,7 +3029,8 @@ addBinding(XML_Parser parser, PREFIX *prefix, const ATTRIBUTE_ID *attId,
         prefix->binding = b;
       b->nextTagBinding = *bindingsPtr;
       *bindingsPtr = b;
    -  if (startNamespaceDeclHandler)
    +  /* if attId == NULL then we are not starting a namespace scope */
    +  if (attId && startNamespaceDeclHandler)
         startNamespaceDeclHandler(handlerArg, prefix->name,
                                   prefix->binding ? uri : 0);
       return XML_ERROR_NONE;
    @@ -2976,7 +3046,7 @@ cdataSectionProcessor(XML_Parser parser,
                           const char **endPtr)
     {
       enum XML_Error result = doCdataSection(parser, encoding, &start, end,
    -                                         endPtr, (XML_Bool)!finalBuffer);
    +                                         endPtr, (XML_Bool)!ps_finalBuffer);
       if (result != XML_ERROR_NONE)
         return result;
       if (start) {
    @@ -3035,7 +3105,7 @@ doCdataSection(XML_Parser parser,
             reportDefault(parser, enc, s, next);
           *startPtr = next;
           *nextPtr = next;
    -      if (parsing == XML_FINISHED)
    +      if (ps_parsing == XML_FINISHED)
             return XML_ERROR_ABORTED;
           else
             return XML_ERROR_NONE;
    @@ -3091,7 +3161,7 @@ doCdataSection(XML_Parser parser,
         }
     
         *eventPP = s = next;
    -    switch (parsing) {
    +    switch (ps_parsing) {
         case XML_SUSPENDED:
           *nextPtr = next;
           return XML_ERROR_NONE;
    @@ -3115,7 +3185,7 @@ ignoreSectionProcessor(XML_Parser parser,
                            const char **endPtr)
     {
       enum XML_Error result = doIgnoreSection(parser, encoding, &start, end, 
    -                                          endPtr, (XML_Bool)!finalBuffer);
    +                                          endPtr, (XML_Bool)!ps_finalBuffer);
       if (result != XML_ERROR_NONE)
         return result;
       if (start) {
    @@ -3160,7 +3230,7 @@ doIgnoreSection(XML_Parser parser,
           reportDefault(parser, enc, s, next);
         *startPtr = next;
         *nextPtr = next;
    -    if (parsing == XML_FINISHED)
    +    if (ps_parsing == XML_FINISHED)
           return XML_ERROR_ABORTED;
         else
           return XML_ERROR_NONE;
    @@ -3240,8 +3310,12 @@ processXmlDecl(XML_Parser parser, int isGeneralTextEntity,
                                &versionend,
                                &encodingName,
                                &newEncoding,
    -                           &standalone))
    -    return XML_ERROR_SYNTAX;
    +                           &standalone)) {
    +    if (isGeneralTextEntity)
    +      return XML_ERROR_TEXT_DECL;
    +    else
    +      return XML_ERROR_XML_DECL;
    +  }
       if (!isGeneralTextEntity && standalone == 1) {
         _dtd->standalone = XML_TRUE;
     #ifdef XML_DTD
    @@ -3396,7 +3470,7 @@ entityValueInitProcessor(XML_Parser parser,
         tok = XmlPrologTok(encoding, start, end, &next);
         eventEndPtr = next;
         if (tok <= 0) {
    -      if (!finalBuffer && tok != XML_TOK_INVALID) {
    +      if (!ps_finalBuffer && tok != XML_TOK_INVALID) {
             *nextPtr = s;
             return XML_ERROR_NONE;
           }
    @@ -3419,7 +3493,7 @@ entityValueInitProcessor(XML_Parser parser,
           result = processXmlDecl(parser, 0, start, next);
           if (result != XML_ERROR_NONE)
             return result;
    -      switch (parsing) {
    +      switch (ps_parsing) {
           case XML_SUSPENDED: 
             *nextPtr = next;
             return XML_ERROR_NONE;
    @@ -3439,7 +3513,7 @@ entityValueInitProcessor(XML_Parser parser,
            then, when this routine is entered the next time, XmlPrologTok will
            return XML_TOK_INVALID, since the BOM is still in the buffer
         */
    -    else if (tok == XML_TOK_BOM && next == end && !finalBuffer) {
    +    else if (tok == XML_TOK_BOM && next == end && !ps_finalBuffer) {
           *nextPtr = next;
           return XML_ERROR_NONE;
         }
    @@ -3459,7 +3533,7 @@ externalParEntProcessor(XML_Parser parser,
     
       tok = XmlPrologTok(encoding, s, end, &next);
       if (tok <= 0) {
    -    if (!finalBuffer && tok != XML_TOK_INVALID) {
    +    if (!ps_finalBuffer && tok != XML_TOK_INVALID) {
           *nextPtr = s;
           return XML_ERROR_NONE;
         }
    @@ -3486,7 +3560,7 @@ externalParEntProcessor(XML_Parser parser,
     
       processor = prologProcessor;
       return doProlog(parser, encoding, s, end, tok, next, 
    -                  nextPtr, (XML_Bool)!finalBuffer);
    +                  nextPtr, (XML_Bool)!ps_finalBuffer);
     }
     
     static enum XML_Error PTRCALL
    @@ -3503,7 +3577,7 @@ entityValueProcessor(XML_Parser parser,
       for (;;) {
         tok = XmlPrologTok(enc, start, end, &next);
         if (tok <= 0) {
    -      if (!finalBuffer && tok != XML_TOK_INVALID) {
    +      if (!ps_finalBuffer && tok != XML_TOK_INVALID) {
             *nextPtr = s;
             return XML_ERROR_NONE;
           }
    @@ -3536,7 +3610,7 @@ prologProcessor(XML_Parser parser,
       const char *next = s;
       int tok = XmlPrologTok(encoding, s, end, &next);
       return doProlog(parser, encoding, s, end, tok, next, 
    -                  nextPtr, (XML_Bool)!finalBuffer);
    +                  nextPtr, (XML_Bool)!ps_finalBuffer);
     }
     
     static enum XML_Error
    @@ -3616,7 +3690,7 @@ doProlog(XML_Parser parser,
             if (isParamEntity || enc != encoding) {
               if (XmlTokenRole(&prologState, XML_TOK_NONE, end, end, enc)
                   == XML_ROLE_ERROR)
    -            return XML_ERROR_SYNTAX;
    +            return XML_ERROR_INCOMPLETE_PE;
               *nextPtr = s;
               return XML_ERROR_NONE;
             }
    @@ -3673,28 +3747,31 @@ doProlog(XML_Parser parser,
         case XML_ROLE_DOCTYPE_PUBLIC_ID:
     #ifdef XML_DTD
           useForeignDTD = XML_FALSE;
    -#endif /* XML_DTD */
    -      dtd->hasParamEntityRefs = XML_TRUE;
    -      if (startDoctypeDeclHandler) {
    -        doctypePubid = poolStoreString(&tempPool, enc,
    -                                       s + enc->minBytesPerChar,
    -                                       next - enc->minBytesPerChar);
    -        if (!doctypePubid)
    -          return XML_ERROR_NO_MEMORY;
    -        poolFinish(&tempPool);
    -        handleDefault = XML_FALSE;
    -      }
    -#ifdef XML_DTD
           declEntity = (ENTITY *)lookup(&dtd->paramEntities,
                                         externalSubsetName,
                                         sizeof(ENTITY));
           if (!declEntity)
             return XML_ERROR_NO_MEMORY;
     #endif /* XML_DTD */
    +      dtd->hasParamEntityRefs = XML_TRUE;
    +      if (startDoctypeDeclHandler) {
    +        if (!XmlIsPublicId(enc, s, next, eventPP))
    +          return XML_ERROR_PUBLICID;
    +        doctypePubid = poolStoreString(&tempPool, enc,
    +                                       s + enc->minBytesPerChar,
    +                                       next - enc->minBytesPerChar);
    +        if (!doctypePubid)
    +          return XML_ERROR_NO_MEMORY;
    +        normalizePublicId((XML_Char *)doctypePubid);
    +        poolFinish(&tempPool);
    +        handleDefault = XML_FALSE;
    +        goto alreadyChecked;
    +      }
           /* fall through */
         case XML_ROLE_ENTITY_PUBLIC_ID:
           if (!XmlIsPublicId(enc, s, next, eventPP))
    -        return XML_ERROR_SYNTAX;
    +        return XML_ERROR_PUBLICID;
    +    alreadyChecked:
           if (dtd->keepProcessing && declEntity) {
             XML_Char *tem = poolStoreString(&dtd->pool,
                                             enc,
    @@ -4117,7 +4194,7 @@ doProlog(XML_Parser parser,
           break;
         case XML_ROLE_NOTATION_PUBLIC_ID:
           if (!XmlIsPublicId(enc, s, next, eventPP))
    -        return XML_ERROR_SYNTAX;
    +        return XML_ERROR_PUBLICID;
           if (declNotationName) {  /* means notationDeclHandler != NULL */
             XML_Char *tem = poolStoreString(&tempPool,
                                             enc,
    @@ -4480,7 +4557,7 @@ doProlog(XML_Parser parser,
         if (handleDefault && defaultHandler)
           reportDefault(parser, enc, s, next);
     
    -    switch (parsing) {
    +    switch (ps_parsing) {
         case XML_SUSPENDED: 
           *nextPtr = next;
           return XML_ERROR_NONE;
    @@ -4511,7 +4588,7 @@ epilogProcessor(XML_Parser parser,
         case -XML_TOK_PROLOG_S:
           if (defaultHandler) {
             reportDefault(parser, encoding, s, next);
    -        if (parsing == XML_FINISHED)
    +        if (ps_parsing == XML_FINISHED)
               return XML_ERROR_ABORTED;
           }
           *nextPtr = next;
    @@ -4535,13 +4612,13 @@ epilogProcessor(XML_Parser parser,
           eventPtr = next;
           return XML_ERROR_INVALID_TOKEN;
         case XML_TOK_PARTIAL:
    -      if (!finalBuffer) {
    +      if (!ps_finalBuffer) {
             *nextPtr = s;
             return XML_ERROR_NONE;
           }
           return XML_ERROR_UNCLOSED_TOKEN;
         case XML_TOK_PARTIAL_CHAR:
    -      if (!finalBuffer) {
    +      if (!ps_finalBuffer) {
             *nextPtr = s;
             return XML_ERROR_NONE;
           }
    @@ -4550,7 +4627,7 @@ epilogProcessor(XML_Parser parser,
           return XML_ERROR_JUNK_AFTER_DOC_ELEMENT;
         }
         eventPtr = s = next;
    -    switch (parsing) {
    +    switch (ps_parsing) {
         case XML_SUSPENDED: 
           *nextPtr = next;
           return XML_ERROR_NONE;
    @@ -4603,7 +4680,7 @@ processInternalEntity(XML_Parser parser, ENTITY *entity,
                            textEnd, &next, XML_FALSE);
     
       if (result == XML_ERROR_NONE) {
    -    if (textEnd != next && parsing == XML_SUSPENDED) {
    +    if (textEnd != next && ps_parsing == XML_SUSPENDED) {
           entity->processed = next - textStart;
           processor = internalEntityProcessor;
         }
    @@ -4649,7 +4726,7 @@ internalEntityProcessor(XML_Parser parser,
     
       if (result != XML_ERROR_NONE)
         return result;
    -  else if (textEnd != next && parsing == XML_SUSPENDED) {
    +  else if (textEnd != next && ps_parsing == XML_SUSPENDED) {
         entity->processed = next - (char *)entity->textPtr;
         return result;
       }
    @@ -4667,7 +4744,7 @@ internalEntityProcessor(XML_Parser parser,
         processor = prologProcessor;
         tok = XmlPrologTok(encoding, s, end, &next);
         return doProlog(parser, encoding, s, end, tok, next, nextPtr, 
    -                    (XML_Bool)!finalBuffer);
    +                    (XML_Bool)!ps_finalBuffer);
       }
       else
     #endif /* XML_DTD */
    @@ -4675,7 +4752,7 @@ internalEntityProcessor(XML_Parser parser,
         processor = contentProcessor;
         /* see externalEntityContentProcessor vs contentProcessor */
         return doContent(parser, parentParser ? 1 : 0, encoding, s, end,
    -                     nextPtr, (XML_Bool)!finalBuffer); 
    +                     nextPtr, (XML_Bool)!ps_finalBuffer); 
       }  
     }
     
    @@ -5270,7 +5347,7 @@ getContext(XML_Parser parser)
         if (!poolAppendChar(&tempPool, XML_T('=')))
           return NULL;
         len = dtd->defaultPrefix.binding->uriLen;
    -    if (namespaceSeparator != XML_T('\0'))
    +    if (namespaceSeparator)
           len--;
         for (i = 0; i < len; i++)
           if (!poolAppendChar(&tempPool, dtd->defaultPrefix.binding->uri[i]))
    @@ -5296,7 +5373,7 @@ getContext(XML_Parser parser)
         if (!poolAppendChar(&tempPool, XML_T('=')))
           return NULL;
         len = prefix->binding->uriLen;
    -    if (namespaceSeparator != XML_T('\0'))
    +    if (namespaceSeparator)
           len--;
         for (i = 0; i < len; i++)
           if (!poolAppendChar(&tempPool, prefix->binding->uri[i]))
    @@ -5370,7 +5447,7 @@ setContext(XML_Parser parser, const XML_Char *context)
               return XML_FALSE;
           if (!poolAppendChar(&tempPool, XML_T('\0')))
             return XML_FALSE;
    -      if (addBinding(parser, prefix, 0, poolStart(&tempPool),
    +      if (addBinding(parser, prefix, NULL, poolStart(&tempPool),
                          &inheritedBindings) != XML_ERROR_NONE)
             return XML_FALSE;
           poolDiscard(&tempPool);
    @@ -5744,8 +5821,10 @@ lookup(HASH_TABLE *table, KEY name, size_t createSize)
         table->size = (size_t)1 << INIT_POWER;
         tsize = table->size * sizeof(NAMED *);
         table->v = (NAMED **)table->mem->malloc_fcn(tsize);
    -    if (!table->v)
    +    if (!table->v) {
    +      table->size = 0;
           return NULL;
    +    }
         memset(table->v, 0, tsize);
         i = hash(name) & ((unsigned long)table->size - 1);
       }
    diff --git a/reactos/lib/expat/lib/xmlrole.c b/reactos/lib/expat/lib/xmlrole.c
    index a2305c6a17c..b32d8e73bc7 100644
    --- a/reactos/lib/expat/lib/xmlrole.c
    +++ b/reactos/lib/expat/lib/xmlrole.c
    @@ -2,16 +2,19 @@
        See the file COPYING for copying permission.
     */
     
    +#include 
    +
     #ifdef COMPILED_FROM_DSP
     #include "winconfig.h"
     #elif defined(MACOS_CLASSIC)
     #include "macconfig.h"
     #else
     #ifdef HAVE_EXPAT_CONFIG_H
    -#include "expat_config.h"
    +#include 
     #endif
     #endif /* ndef COMPILED_FROM_DSP */
     
    +#include "expat_external.h"
     #include "internal.h"
     #include "xmlrole.h"
     #include "ascii.h"
    @@ -790,7 +793,7 @@ attlist2(PROLOG_STATE *state,
         return XML_ROLE_ATTLIST_NONE;
       case XML_TOK_NAME:
         {
    -      static const char *types[] = {
    +      static const char * const types[] = {
             KW_CDATA,
             KW_ID,
             KW_IDREF,
    diff --git a/reactos/lib/expat/lib/xmltok.c b/reactos/lib/expat/lib/xmltok.c
    index 4198381aa0b..be368949ee2 100644
    --- a/reactos/lib/expat/lib/xmltok.c
    +++ b/reactos/lib/expat/lib/xmltok.c
    @@ -2,16 +2,19 @@
        See the file COPYING for copying permission.
     */
     
    +#include 
    +
     #ifdef COMPILED_FROM_DSP
     #include "winconfig.h"
     #elif defined(MACOS_CLASSIC)
     #include "macconfig.h"
     #else
     #ifdef HAVE_EXPAT_CONFIG_H
    -#include "expat_config.h"
    +#include 
     #endif
     #endif /* ndef COMPILED_FROM_DSP */
     
    +#include "expat_external.h"
     #include "internal.h"
     #include "xmltok.h"
     #include "nametab.h"
    @@ -1233,7 +1236,7 @@ XmlUtf16Encode(int charNum, unsigned short *buf)
     
     struct unknown_encoding {
       struct normal_encoding normal;
    -  int (*convert)(void *userData, const char *p);
    +  CONVERTER convert;
       void *userData;
       unsigned short utf16[256];
       char utf8[256][4];
    @@ -1448,7 +1451,7 @@ static const char KW_UTF_16LE[] = {
     static int FASTCALL
     getEncodingIndex(const char *name)
     {
    -  static const char *encodingNames[] = {
    +  static const char * const encodingNames[] = {
         KW_ISO_8859_1,
         KW_US_ASCII,
         KW_UTF_8,
    @@ -1481,7 +1484,7 @@ getEncodingIndex(const char *name)
     
     
     static int
    -initScan(const ENCODING **encodingTable,
    +initScan(const ENCODING * const *encodingTable,
              const INIT_ENCODING *enc,
              int state,
              const char *ptr,
    diff --git a/reactos/lib/expat/lib/xmltok.h b/reactos/lib/expat/lib/xmltok.h
    index 3d776be71fc..1ecd05f8862 100644
    --- a/reactos/lib/expat/lib/xmltok.h
    +++ b/reactos/lib/expat/lib/xmltok.h
    @@ -281,7 +281,8 @@ int FASTCALL XmlUtf8Encode(int charNumber, char *buf);
     int FASTCALL XmlUtf16Encode(int charNumber, unsigned short *buf);
     int XmlSizeOfUnknownEncoding(void);
     
    -typedef int (*CONVERTER)(void *userData, const char *p);
    +
    +typedef int (XMLCALL *CONVERTER) (void *userData, const char *p);
     
     ENCODING *
     XmlInitUnknownEncoding(void *mem,
    diff --git a/reactos/lib/expat/lib/xmltok_ns.c b/reactos/lib/expat/lib/xmltok_ns.c
    index 5610eb95ba7..d2f893836fb 100644
    --- a/reactos/lib/expat/lib/xmltok_ns.c
    +++ b/reactos/lib/expat/lib/xmltok_ns.c
    @@ -19,7 +19,7 @@ NS(XmlGetUtf16InternalEncoding)(void)
     #endif
     }
     
    -static const ENCODING *NS(encodings)[] = {
    +static const ENCODING * const NS(encodings)[] = {
       &ns(latin1_encoding).enc,
       &ns(ascii_encoding).enc,
       &ns(utf8_encoding).enc,
    diff --git a/reactos/lib/expat/make-release.sh b/reactos/lib/expat/make-release.sh
    index e07af09f6ba..917db681e88 100644
    --- a/reactos/lib/expat/make-release.sh
    +++ b/reactos/lib/expat/make-release.sh
    @@ -22,7 +22,7 @@ if test -e $tmpdir; then
     fi
     
     echo "Checking out into temporary area: $tmpdir"
    -cvs -d "$CVSROOT" export -r "$1" -d $tmpdir expat || exit 1
    +cvs -fq -d "$CVSROOT" export -r "$1" -d $tmpdir expat || exit 1
     
     echo ""
     echo "----------------------------------------------------------------------"
    diff --git a/reactos/lib/expat/tests/benchmark/benchmark.dsp b/reactos/lib/expat/tests/benchmark/benchmark.dsp
    index be3f240bdea..6f310d0a931 100644
    --- a/reactos/lib/expat/tests/benchmark/benchmark.dsp
    +++ b/reactos/lib/expat/tests/benchmark/benchmark.dsp
    @@ -1,88 +1,88 @@
    -# Microsoft Developer Studio Project File - Name="benchmark" - Package Owner=<4>
    -# Microsoft Developer Studio Generated Build File, Format Version 6.00
    -# ** DO NOT EDIT **
    -
    -# TARGTYPE "Win32 (x86) Console Application" 0x0103
    -
    -CFG=benchmark - Win32 Debug
    -!MESSAGE This is not a valid makefile. To build this project using NMAKE,
    -!MESSAGE use the Export Makefile command and run
    -!MESSAGE 
    -!MESSAGE NMAKE /f "benchmark.mak".
    -!MESSAGE 
    -!MESSAGE You can specify a configuration when running NMAKE
    -!MESSAGE by defining the macro CFG on the command line. For example:
    -!MESSAGE 
    -!MESSAGE NMAKE /f "benchmark.mak" CFG="benchmark - Win32 Debug"
    -!MESSAGE 
    -!MESSAGE Possible choices for configuration are:
    -!MESSAGE 
    -!MESSAGE "benchmark - Win32 Release" (based on "Win32 (x86) Console Application")
    -!MESSAGE "benchmark - Win32 Debug" (based on "Win32 (x86) Console Application")
    -!MESSAGE 
    -
    -# Begin Project
    -# PROP AllowPerConfigDependencies 0
    -# PROP Scc_ProjName ""
    -# PROP Scc_LocalPath ""
    -CPP=cl.exe
    -RSC=rc.exe
    -
    -!IF  "$(CFG)" == "benchmark - Win32 Release"
    -
    -# PROP BASE Use_MFC 0
    -# PROP BASE Use_Debug_Libraries 0
    -# PROP BASE Output_Dir "Release"
    -# PROP BASE Intermediate_Dir "Release"
    -# PROP BASE Target_Dir ""
    -# PROP Use_MFC 0
    -# PROP Use_Debug_Libraries 0
    -# PROP Output_Dir "Release"
    -# PROP Intermediate_Dir "Release"
    -# PROP Target_Dir ""
    -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
    -# ADD CPP /nologo /W3 /GX /O2 /I "..\..\lib" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
    -# ADD BASE RSC /l 0x1009 /d "NDEBUG"
    -# ADD RSC /l 0x1009 /d "NDEBUG"
    -BSC32=bscmake.exe
    -# ADD BASE BSC32 /nologo
    -# ADD BSC32 /nologo
    -LINK32=link.exe
    -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
    -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
    -
    -!ELSEIF  "$(CFG)" == "benchmark - Win32 Debug"
    -
    -# PROP BASE Use_MFC 0
    -# PROP BASE Use_Debug_Libraries 1
    -# PROP BASE Output_Dir "Debug"
    -# PROP BASE Intermediate_Dir "Debug"
    -# PROP BASE Target_Dir ""
    -# PROP Use_MFC 0
    -# PROP Use_Debug_Libraries 1
    -# PROP Output_Dir "Debug"
    -# PROP Intermediate_Dir "Debug"
    -# PROP Target_Dir ""
    -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
    -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "..\..\lib" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
    -# ADD BASE RSC /l 0x1009 /d "_DEBUG"
    -# ADD RSC /l 0x1009 /d "_DEBUG"
    -BSC32=bscmake.exe
    -# ADD BASE BSC32 /nologo
    -# ADD BSC32 /nologo
    -LINK32=link.exe
    -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
    -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
    -
    -!ENDIF 
    -
    -# Begin Target
    -
    -# Name "benchmark - Win32 Release"
    -# Name "benchmark - Win32 Debug"
    -# Begin Source File
    -
    -SOURCE=.\benchmark.c
    -# End Source File
    -# End Target
    -# End Project
    +# Microsoft Developer Studio Project File - Name="benchmark" - Package Owner=<4>
    +# Microsoft Developer Studio Generated Build File, Format Version 6.00
    +# ** DO NOT EDIT **
    +
    +# TARGTYPE "Win32 (x86) Console Application" 0x0103
    +
    +CFG=benchmark - Win32 Debug
    +!MESSAGE This is not a valid makefile. To build this project using NMAKE,
    +!MESSAGE use the Export Makefile command and run
    +!MESSAGE 
    +!MESSAGE NMAKE /f "benchmark.mak".
    +!MESSAGE 
    +!MESSAGE You can specify a configuration when running NMAKE
    +!MESSAGE by defining the macro CFG on the command line. For example:
    +!MESSAGE 
    +!MESSAGE NMAKE /f "benchmark.mak" CFG="benchmark - Win32 Debug"
    +!MESSAGE 
    +!MESSAGE Possible choices for configuration are:
    +!MESSAGE 
    +!MESSAGE "benchmark - Win32 Release" (based on "Win32 (x86) Console Application")
    +!MESSAGE "benchmark - Win32 Debug" (based on "Win32 (x86) Console Application")
    +!MESSAGE 
    +
    +# Begin Project
    +# PROP AllowPerConfigDependencies 0
    +# PROP Scc_ProjName ""
    +# PROP Scc_LocalPath ""
    +CPP=cl.exe
    +RSC=rc.exe
    +
    +!IF  "$(CFG)" == "benchmark - Win32 Release"
    +
    +# PROP BASE Use_MFC 0
    +# PROP BASE Use_Debug_Libraries 0
    +# PROP BASE Output_Dir "Release"
    +# PROP BASE Intermediate_Dir "Release"
    +# PROP BASE Target_Dir ""
    +# PROP Use_MFC 0
    +# PROP Use_Debug_Libraries 0
    +# PROP Output_Dir "Release"
    +# PROP Intermediate_Dir "Release"
    +# PROP Target_Dir ""
    +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
    +# ADD CPP /nologo /W3 /GX /O2 /I "..\..\lib" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
    +# ADD BASE RSC /l 0x1009 /d "NDEBUG"
    +# ADD RSC /l 0x1009 /d "NDEBUG"
    +BSC32=bscmake.exe
    +# ADD BASE BSC32 /nologo
    +# ADD BSC32 /nologo
    +LINK32=link.exe
    +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
    +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
    +
    +!ELSEIF  "$(CFG)" == "benchmark - Win32 Debug"
    +
    +# PROP BASE Use_MFC 0
    +# PROP BASE Use_Debug_Libraries 1
    +# PROP BASE Output_Dir "Debug"
    +# PROP BASE Intermediate_Dir "Debug"
    +# PROP BASE Target_Dir ""
    +# PROP Use_MFC 0
    +# PROP Use_Debug_Libraries 1
    +# PROP Output_Dir "Debug"
    +# PROP Intermediate_Dir "Debug"
    +# PROP Target_Dir ""
    +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
    +# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "..\..\lib" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
    +# ADD BASE RSC /l 0x1009 /d "_DEBUG"
    +# ADD RSC /l 0x1009 /d "_DEBUG"
    +BSC32=bscmake.exe
    +# ADD BASE BSC32 /nologo
    +# ADD BSC32 /nologo
    +LINK32=link.exe
    +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
    +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
    +
    +!ENDIF 
    +
    +# Begin Target
    +
    +# Name "benchmark - Win32 Release"
    +# Name "benchmark - Win32 Debug"
    +# Begin Source File
    +
    +SOURCE=.\benchmark.c
    +# End Source File
    +# End Target
    +# End Project
    diff --git a/reactos/lib/expat/tests/benchmark/benchmark.dsw b/reactos/lib/expat/tests/benchmark/benchmark.dsw
    index db8504c0f30..3346a9ad986 100644
    --- a/reactos/lib/expat/tests/benchmark/benchmark.dsw
    +++ b/reactos/lib/expat/tests/benchmark/benchmark.dsw
    @@ -1,44 +1,44 @@
    -Microsoft Developer Studio Workspace File, Format Version 6.00
    -# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
    -
    -###############################################################################
    -
    -Project: "benchmark"=.\benchmark.dsp - Package Owner=<4>
    -
    -Package=<5>
    -{{{
    -}}}
    -
    -Package=<4>
    -{{{
    -    Begin Project Dependency
    -    Project_Dep_Name expat
    -    End Project Dependency
    -}}}
    -
    -###############################################################################
    -
    -Project: "expat"=..\..\lib\expat.dsp - Package Owner=<4>
    -
    -Package=<5>
    -{{{
    -}}}
    -
    -Package=<4>
    -{{{
    -}}}
    -
    -###############################################################################
    -
    -Global:
    -
    -Package=<5>
    -{{{
    -}}}
    -
    -Package=<3>
    -{{{
    -}}}
    -
    -###############################################################################
    -
    +Microsoft Developer Studio Workspace File, Format Version 6.00
    +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
    +
    +###############################################################################
    +
    +Project: "benchmark"=.\benchmark.dsp - Package Owner=<4>
    +
    +Package=<5>
    +{{{
    +}}}
    +
    +Package=<4>
    +{{{
    +    Begin Project Dependency
    +    Project_Dep_Name expat
    +    End Project Dependency
    +}}}
    +
    +###############################################################################
    +
    +Project: "expat"=..\..\lib\expat.dsp - Package Owner=<4>
    +
    +Package=<5>
    +{{{
    +}}}
    +
    +Package=<4>
    +{{{
    +}}}
    +
    +###############################################################################
    +
    +Global:
    +
    +Package=<5>
    +{{{
    +}}}
    +
    +Package=<3>
    +{{{
    +}}}
    +
    +###############################################################################
    +
    diff --git a/reactos/lib/expat/tests/chardata.c b/reactos/lib/expat/tests/chardata.c
    index 5736afc6d3b..5fb0299d88e 100644
    --- a/reactos/lib/expat/tests/chardata.c
    +++ b/reactos/lib/expat/tests/chardata.c
    @@ -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 
     
    diff --git a/reactos/lib/expat/tests/chardata.h b/reactos/lib/expat/tests/chardata.h
    index 0f33c0dac3f..e8dc4ce22c4 100644
    --- a/reactos/lib/expat/tests/chardata.h
    +++ b/reactos/lib/expat/tests/chardata.h
    @@ -4,6 +4,10 @@
        and attribute content.
     */
     
    +#ifdef __cplusplus
    +extern "C" {
    +#endif
    +
     #ifndef XML_CHARDATA_H
     #define XML_CHARDATA_H 1
     
    @@ -30,3 +34,7 @@ int CharData_CheckXMLChars(CharData *storage, const XML_Char *s);
     
     
     #endif  /* XML_CHARDATA_H */
    +
    +#ifdef __cplusplus
    +}
    +#endif
    diff --git a/reactos/lib/expat/tests/minicheck.c b/reactos/lib/expat/tests/minicheck.c
    new file mode 100644
    index 00000000000..25fbf858836
    --- /dev/null
    +++ b/reactos/lib/expat/tests/minicheck.c
    @@ -0,0 +1,182 @@
    +/* 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 
    +
    +#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;
    +
    +static char const *_check_current_function = NULL;
    +static int _check_current_lineno = -1;
    +static char const *_check_current_filename = NULL;
    +
    +void
    +_check_set_test_info(char const *function, char const *filename, int lineno)
    +{
    +    _check_current_function = function;
    +    _check_current_lineno = lineno;
    +    _check_current_filename = filename;
    +}
    +
    +
    +static void
    +add_failure(SRunner *runner, int verbosity)
    +{
    +    runner->nfailures++;
    +    if (verbosity >= CK_VERBOSE) {
    +        printf("%s:%d: %s\n", _check_current_filename,
    +               _check_current_lineno, _check_current_function);
    +    }
    +}
    +
    +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)) {
    +                    add_failure(runner, verbosity);
    +                    continue;
    +                }
    +                tc->setup();
    +            }
    +            /* test */
    +            if (setjmp(env)) {
    +                add_failure(runner, verbosity);
    +                continue;
    +            }
    +            (tc->tests[i])();
    +
    +            /* teardown */
    +            if (tc->teardown != NULL) {
    +                if (setjmp(env)) {
    +                    add_failure(runner, verbosity);
    +                    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, const char *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->suite);
    +    free(runner);
    +}
    diff --git a/reactos/lib/expat/tests/minicheck.h b/reactos/lib/expat/tests/minicheck.h
    new file mode 100644
    index 00000000000..c8a1d5e9c28
    --- /dev/null
    +++ b/reactos/lib/expat/tests/minicheck.h
    @@ -0,0 +1,84 @@
    +/* 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.
    + */
    +
    +#ifdef __cplusplus
    +extern "C" {
    +#endif
    +
    +#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) { \
    +    _check_set_test_info(__func__, __FILE__, __LINE__);   \
    +    {
    +#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;
    +};
    +
    +
    +/* Internal helper. */
    +void _check_set_test_info(char const *function,
    +                          char const *filename, int lineno);
    +
    +
    +/*
    + * Prototypes for the actual implementation.
    + */
    +
    +void _fail_unless(int condition, const char *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);
    +
    +#ifdef __cplusplus
    +}
    +#endif
    diff --git a/reactos/lib/expat/tests/runtests.c b/reactos/lib/expat/tests/runtests.c
    index 7df109a324e..f86b1247b00 100644
    --- a/reactos/lib/expat/tests/runtests.c
    +++ b/reactos/lib/expat/tests/runtests.c
    @@ -8,12 +8,6 @@
     #include 
     #endif
     
    -#ifdef HAVE_CHECK_H
    -#include 
    -#else
    -#error This test suite requires the 'check' unit test framework (http://check.sf.net/)
    -#endif
    -
     #include 
     #include 
     #include 
    @@ -21,6 +15,7 @@
     
     #include "expat.h"
     #include "chardata.h"
    +#include "minicheck.h"
     
     
     static XML_Parser parser;
    @@ -252,7 +247,7 @@ START_TEST(test_danish_latin1)
     {
         char *text =
             "\n"
    -        "Jørgen æøåÆØÅ";
    +        "J\xF8rgen \xE6\xF8\xE5\xC6\xD8\xC5";
         run_character_check(text,
                  "J\xC3\xB8rgen \xC3\xA6\xC3\xB8\xC3\xA5\xC3\x86\xC3\x98\xC3\x85");
     }
    @@ -383,8 +378,8 @@ START_TEST(test_latin1_umlauts)
     {
         char *text =
             "\n"
    -        "ä ö ü ä ö ü ä ö ü >";
    +        "\xE4 \xF6 \xFC ä ö ü ä ö ü >";
         char *utf8 =
             "\xC3\xA4 \xC3\xB6 \xC3\xBC "
             "\xC3\xA4 \xC3\xB6 \xC3\xBC "
    @@ -1216,7 +1211,7 @@ START_TEST(test_ns_prefix_with_empty_uri_1)
             "";
     
         expect_failure(text,
    -                   XML_ERROR_SYNTAX,
    +                   XML_ERROR_UNDECLARING_PREFIX,
                        "Did not report re-setting namespace"
                        " URI with prefix to ''.");
     }
    @@ -1230,7 +1225,7 @@ START_TEST(test_ns_prefix_with_empty_uri_2)
             "";
     
         expect_failure(text,
    -                   XML_ERROR_SYNTAX,
    +                   XML_ERROR_UNDECLARING_PREFIX,
                        "Did not report setting namespace URI with prefix to ''.");
     }
     END_TEST
    @@ -1247,7 +1242,7 @@ START_TEST(test_ns_prefix_with_empty_uri_3)
             "";
     
         expect_failure(text,
    -                   XML_ERROR_SYNTAX,
    +                   XML_ERROR_UNDECLARING_PREFIX,
                        "Didn't report attr default setting NS w/ prefix to ''.");
     }
     END_TEST
    @@ -1428,7 +1423,6 @@ main(int argc, char *argv[])
         srunner_run_all(sr, verbosity);
         nf = srunner_ntests_failed(sr);
         srunner_free(sr);
    -    suite_free(s);
     
         return (nf == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
     }
    diff --git a/reactos/lib/expat/tests/runtestspp.cpp b/reactos/lib/expat/tests/runtestspp.cpp
    new file mode 100644
    index 00000000000..c35dc583d57
    --- /dev/null
    +++ b/reactos/lib/expat/tests/runtestspp.cpp
    @@ -0,0 +1,6 @@
    +// C++ compilation harness for the test suite.
    +//
    +// This is used to ensure the Expat headers can be included from C++
    +// and have everything work as expected.
    +//
    +#include "runtests.c"
    diff --git a/reactos/lib/expat/tests/xmltest.sh b/reactos/lib/expat/tests/xmltest.sh
    index ecb16371510..725441edb69 100644
    --- a/reactos/lib/expat/tests/xmltest.sh
    +++ b/reactos/lib/expat/tests/xmltest.sh
    @@ -31,32 +31,40 @@ OUTPUT="$TS/out/"
     # OUTPUT=/home/tmp/xml-testsuite-out/
     
     
    +# RunXmlwfNotWF file reldir
    +# reldir includes trailing slash
     RunXmlwfNotWF() {
    -  $XMLWF $1 $2 > outfile || return $?
    +  file="$1"
    +  reldir="$2"
    +  $XMLWF -p "$file" > outfile || return $?
       read outdata < outfile
       if test "$outdata" = "" ; then
    -      echo "Well formed: $3$2"
    +      echo "Expected well-formed: $reldir$file"
           return 1
       else
           return 0
       fi 
     }
     
    +# RunXmlwfWF file reldir
    +# reldir includes trailing slash
     RunXmlwfWF() {
    -  $XMLWF $1 -d "$OUTPUT$3" $2 > outfile || return $?
    +  file="$1"
    +  reldir="$2"
    +  $XMLWF -p -d "$OUTPUT$reldir" "$file" > outfile || return $?
       read outdata < outfile 
       if test "$outdata" = "" ; then 
    -      if [ -f out/$2 ] ; then 
    -          diff "$OUTPUT$3$2" out/$2 > outfile 
    +      if [ -f "out/$file" ] ; then 
    +          diff "$OUTPUT$reldir$file" "out/$file" > outfile 
               if [ -s outfile ] ; then 
    -              cp outfile $OUTPUT$3${2}.diff 
    -              echo "Output differs: $3$2"
    +              cp outfile "$OUTPUT$reldir$file.diff"
    +              echo "Output differs: $reldir$file"
                   return 1
               fi 
           fi 
           return 0
       else 
    -      echo "In $3: $outdata"
    +      echo "In $reldir: $outdata"
           return 1
       fi 
     }
    @@ -64,40 +72,42 @@ RunXmlwfWF() {
     SUCCESS=0
     ERROR=0
     
    +UpdateStatus() {
    +  if [ "$1" -eq 0 ] ; then
    +    SUCCESS=`expr $SUCCESS + 1`
    +  else
    +    ERROR=`expr $ERROR + 1`
    +  fi
    +}
    +
     ##########################
     # well-formed test cases #
     ##########################
     
     cd "$TS/xmlconf"
    -for xmldir in ibm/valid/P*/ \
    -              ibm/invalid/P*/ \
    -              xmltest/valid/ext-sa/ \
    -              xmltest/valid/not-sa/ \
    -              xmltest/invalid/ \
    -              xmltest/invalid/not-sa/ \
    -              xmltest/valid/sa/ \
    -              sun/valid/ \
    -              sun/invalid/ ; do
    +for xmldir in ibm/valid/P* \
    +              ibm/invalid/P* \
    +              xmltest/valid/ext-sa \
    +              xmltest/valid/not-sa \
    +              xmltest/invalid \
    +              xmltest/invalid/not-sa \
    +              xmltest/valid/sa \
    +              sun/valid \
    +              sun/invalid ; do
       cd "$TS/xmlconf/$xmldir"
       mkdir -p "$OUTPUT$xmldir"
       for xmlfile in *.xml ; do
    -      if RunXmlwfWF -p "$xmlfile" "$xmldir" ; then
    -          SUCCESS=`expr $SUCCESS + 1`
    -      else
    -          ERROR=`expr $ERROR + 1`
    -      fi
    +      RunXmlwfWF "$xmlfile" "$xmldir/"
    +      UpdateStatus $?
       done
       rm outfile
     done
     
     cd "$TS/xmlconf/oasis"
    -mkdir -p "$OUTPUT"oasis/
    +mkdir -p "$OUTPUT"oasis
     for xmlfile in *pass*.xml ; do
    -    if RunXmlwfWF -p "$xmlfile" "oasis/" ; then
    -        SUCCESS=`expr $SUCCESS + 1`
    -    else
    -        ERROR=`expr $ERROR + 1`
    -    fi
    +    RunXmlwfWF "$xmlfile" "oasis/"
    +    UpdateStatus $?
     done
     rm outfile
     
    @@ -106,30 +116,24 @@ rm outfile
     ##############################
     
     cd "$TS/xmlconf"
    -for xmldir in ibm/not-wf/P*/ \
    -              ibm/not-wf/misc/ \
    -              xmltest/not-wf/ext-sa/ \
    -              xmltest/not-wf/not-sa/ \
    -              xmltest/not-wf/sa/ \
    -              sun/not-wf/ ; do
    +for xmldir in ibm/not-wf/P* \
    +              ibm/not-wf/misc \
    +              xmltest/not-wf/ext-sa \
    +              xmltest/not-wf/not-sa \
    +              xmltest/not-wf/sa \
    +              sun/not-wf ; do
       cd "$TS/xmlconf/$xmldir"
       for xmlfile in *.xml ; do
    -      if RunXmlwfNotWF -p "$xmlfile" "$xmldir" ; then
    -          SUCCESS=`expr $SUCCESS + 1`
    -      else
    -          ERROR=`expr $ERROR + 1`
    -      fi
    +      RunXmlwfNotWF "$xmlfile" "$xmldir/"
    +      UpdateStatus $?
       done
       rm outfile
     done
     
     cd "$TS/xmlconf/oasis"
     for xmlfile in *fail*.xml ; do
    -    if RunXmlwfNotWF -p "$xmlfile" "oasis/" ; then
    -        SUCCESS=`expr $SUCCESS + 1`
    -    else
    -        ERROR=`expr $ERROR + 1`
    -    fi
    +    RunXmlwfNotWF "$xmlfile" "oasis/"
    +    UpdateStatus $?
     done
     rm outfile
     
    diff --git a/reactos/lib/expat/win32/README.txt b/reactos/lib/expat/win32/README.txt
    index bf01dc7fdf0..b54517163a4 100644
    --- a/reactos/lib/expat/win32/README.txt
    +++ b/reactos/lib/expat/win32/README.txt
    @@ -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 @@ Expat can be built on Windows in three ways:
       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:
     
    diff --git a/reactos/lib/expat/win32/expat.iss b/reactos/lib/expat/win32/expat.iss
    index 5bb963990a1..ce764d23915 100644
    --- a/reactos/lib/expat/win32/expat.iss
    +++ b/reactos/lib/expat/win32/expat.iss
    @@ -7,15 +7,15 @@
     [Setup]
     AppName=expat
     AppId=expat
    -AppVersion=1.95.7
    -AppVerName=expat 1.95.7
    +AppVersion=1.95.8
    +AppVerName=expat 1.95.8
     AppCopyright=Copyright © 1998-2003 Thai Open Source Software Center, Clark Cooper, and the Expat maintainers
    -DefaultDirName={sd}\Expat-1.95.7
    +DefaultDirName={sd}\Expat-1.95.8
     AppPublisher=The Expat Developers
     AppPublisherURL=http://www.libexpat.org/
     AppSupportURL=http://www.libexpat.org/
     AppUpdatesURL=http://www.libexpat.org/
    -UninstallDisplayName=Expat XML Parser (version 1.95.7)
    +UninstallDisplayName=Expat XML Parser (version 1.95.8)
     UninstallFilesDir={app}\Uninstall
     
     Compression=bzip/9
    @@ -51,6 +51,7 @@ CopyMode: alwaysoverwrite; Source: lib\*.dsp;                  DestDir: "{app}\S
     CopyMode: alwaysoverwrite; Source: examples\*.c;               DestDir: "{app}\Source\examples"
     CopyMode: alwaysoverwrite; Source: examples\*.dsp;             DestDir: "{app}\Source\examples"
     CopyMode: alwaysoverwrite; Source: tests\*.c;                  DestDir: "{app}\Source\tests"
    +CopyMode: alwaysoverwrite; Source: tests\*.cpp;                DestDir: "{app}\Source\tests"
     CopyMode: alwaysoverwrite; Source: tests\*.h;                  DestDir: "{app}\Source\tests"
     CopyMode: alwaysoverwrite; Source: tests\README.txt;           DestDir: "{app}\Source\tests"
     CopyMode: alwaysoverwrite; Source: xmlwf\*.c*;                 DestDir: "{app}\Source\xmlwf"
    diff --git a/reactos/lib/expat/xmlwf/readfilemap.c b/reactos/lib/expat/xmlwf/readfilemap.c
    index 64c69850c2d..42b5e03824e 100644
    --- a/reactos/lib/expat/xmlwf/readfilemap.c
    +++ b/reactos/lib/expat/xmlwf/readfilemap.c
    @@ -8,6 +8,10 @@
     #include 
     #include 
     
    +#ifdef __BEOS__
    +#include 
    +#endif
    +
     #ifndef S_ISREG
     #ifndef S_IFREG
     #define S_IFREG _S_IFREG
    diff --git a/reactos/lib/expat/xmlwf/xmlfile.c b/reactos/lib/expat/xmlwf/xmlfile.c
    index 6cb071533c0..32c6488d78f 100644
    --- a/reactos/lib/expat/xmlwf/xmlfile.c
    +++ b/reactos/lib/expat/xmlwf/xmlfile.c
    @@ -50,7 +50,7 @@ typedef struct {
     static void
     reportError(XML_Parser parser, const XML_Char *filename)
     {
    -  int code = XML_GetErrorCode(parser);
    +  enum XML_Error code = XML_GetErrorCode(parser);
       const XML_Char *message = XML_ErrorString(code);
       if (message)
         ftprintf(stdout, T("%s:%d:%d: %s\n"),
    @@ -68,7 +68,7 @@ processFile(const void *data, size_t size,
     {
       XML_Parser parser = ((PROCESS_ARGS *)args)->parser;
       int *retPtr = ((PROCESS_ARGS *)args)->retPtr;
    -  if (XML_Parse(parser, data, size, 1) == XML_STATUS_ERROR) {
    +  if (XML_Parse(parser, (const char *)data, size, 1) == XML_STATUS_ERROR) {
         reportError(parser, filename);
         *retPtr = 0;
       }
    @@ -154,7 +154,7 @@ processStream(const XML_Char *filename, XML_Parser parser)
       }
       for (;;) {
         int nread;
    -    char *buf = XML_GetBuffer(parser, READ_SIZE);
    +    char *buf = (char *)XML_GetBuffer(parser, READ_SIZE);
         if (!buf) {
           if (filename != NULL)
             close(fd);
    diff --git a/reactos/lib/expat/xmlwf/xmlwf.c b/reactos/lib/expat/xmlwf/xmlwf.c
    index 94798753b7b..eae180e746e 100644
    --- a/reactos/lib/expat/xmlwf/xmlwf.c
    +++ b/reactos/lib/expat/xmlwf/xmlwf.c
    @@ -23,7 +23,7 @@
     static void XMLCALL
     characterData(void *userData, const XML_Char *s, int len)
     {
    -  FILE *fp = userData;
    +  FILE *fp = (FILE *)userData;
       for (; len > 0; --len, ++s) {
         switch (*s) {
         case T('&'):
    @@ -118,7 +118,7 @@ startElement(void *userData, const XML_Char *name, const XML_Char **atts)
     {
       int nAtts;
       const XML_Char **p;
    -  FILE *fp = userData;
    +  FILE *fp = (FILE *)userData;
       puttc(T('<'), fp);
       fputts(name, fp);
     
    @@ -140,7 +140,7 @@ startElement(void *userData, const XML_Char *name, const XML_Char **atts)
     static void XMLCALL
     endElement(void *userData, const XML_Char *name)
     {
    -  FILE *fp = userData;
    +  FILE *fp = (FILE *)userData;
       puttc(T('<'), fp);
       puttc(T('/'), fp);
       fputts(name, fp);
    @@ -165,7 +165,7 @@ startElementNS(void *userData, const XML_Char *name, const XML_Char **atts)
       int nAtts;
       int nsi;
       const XML_Char **p;
    -  FILE *fp = userData;
    +  FILE *fp = (FILE *)userData;
       const XML_Char *sep;
       puttc(T('<'), fp);
     
    @@ -211,7 +211,7 @@ startElementNS(void *userData, const XML_Char *name, const XML_Char **atts)
     static void XMLCALL
     endElementNS(void *userData, const XML_Char *name)
     {
    -  FILE *fp = userData;
    +  FILE *fp = (FILE *)userData;
       const XML_Char *sep;
       puttc(T('<'), fp);
       puttc(T('/'), fp);
    @@ -231,7 +231,7 @@ static void XMLCALL
     processingInstruction(void *userData, const XML_Char *target,
                           const XML_Char *data)
     {
    -  FILE *fp = userData;
    +  FILE *fp = (FILE *)userData;
       puttc(T('<'), fp);
       puttc(T('?'), fp);
       fputts(target, fp);
    @@ -293,7 +293,7 @@ nopProcessingInstruction(void *userData, const XML_Char *target,
     static void XMLCALL
     markup(void *userData, const XML_Char *s, int len)
     {
    -  FILE *fp = XML_GetUserData((XML_Parser) userData);
    +  FILE *fp = (FILE *)XML_GetUserData((XML_Parser) userData);
       for (; len > 0; --len, ++s)
         puttc(*s, fp);
     }
    @@ -303,8 +303,8 @@ metaLocation(XML_Parser parser)
     {
       const XML_Char *uri = XML_GetBase(parser);
       if (uri)
    -    ftprintf(XML_GetUserData(parser), T(" uri=\"%s\""), uri);
    -  ftprintf(XML_GetUserData(parser),
    +    ftprintf((FILE *)XML_GetUserData(parser), T(" uri=\"%s\""), uri);
    +  ftprintf((FILE *)XML_GetUserData(parser),
                T(" byte=\"%ld\" nbytes=\"%d\" line=\"%d\" col=\"%d\""),
                XML_GetCurrentByteIndex(parser),
                XML_GetCurrentByteCount(parser),
    @@ -315,13 +315,13 @@ metaLocation(XML_Parser parser)
     static void
     metaStartDocument(void *userData)
     {
    -  fputts(T("\n"), XML_GetUserData((XML_Parser) userData));
    +  fputts(T("\n"), (FILE *)XML_GetUserData((XML_Parser) userData));
     }
     
     static void
     metaEndDocument(void *userData)
     {
    -  fputts(T("\n"), XML_GetUserData((XML_Parser) userData));
    +  fputts(T("\n"), (FILE *)XML_GetUserData((XML_Parser) userData));
     }
     
     static void XMLCALL
    @@ -329,7 +329,7 @@ metaStartElement(void *userData, const XML_Char *name,
                      const XML_Char **atts)
     {
       XML_Parser parser = (XML_Parser) userData;
    -  FILE *fp = XML_GetUserData(parser);
    +  FILE *fp = (FILE *)XML_GetUserData(parser);
       const XML_Char **specifiedAttsEnd
         = atts + XML_GetSpecifiedAttributeCount(parser);
       const XML_Char **idAttPtr;
    @@ -363,7 +363,7 @@ static void XMLCALL
     metaEndElement(void *userData, const XML_Char *name)
     {
       XML_Parser parser = (XML_Parser) userData;
    -  FILE *fp = XML_GetUserData(parser);
    +  FILE *fp = (FILE *)XML_GetUserData(parser);
       ftprintf(fp, T("\n"), fp);
    @@ -374,7 +374,7 @@ metaProcessingInstruction(void *userData, const XML_Char *target,
                               const XML_Char *data)
     {
       XML_Parser parser = (XML_Parser) userData;
    -  FILE *fp = XML_GetUserData(parser);
    +  FILE *fp = (FILE *)XML_GetUserData(parser);
       ftprintf(fp, T("\n"), fp);
    @@ -408,7 +408,7 @@ static void XMLCALL
     metaEndCdataSection(void *userData)
     {
       XML_Parser parser = (XML_Parser) userData;
    -  FILE *fp = XML_GetUserData(parser);
    +  FILE *fp = (FILE *)XML_GetUserData(parser);
       fputts(T("\n"), fp);
    @@ -418,7 +418,7 @@ static void XMLCALL
     metaCharacterData(void *userData, const XML_Char *s, int len)
     {
       XML_Parser parser = (XML_Parser) userData;
    -  FILE *fp = XML_GetUserData(parser);
    +  FILE *fp = (FILE *)XML_GetUserData(parser);
       fputts(T("\n"), fp);
    @@ -444,7 +444,7 @@ static void XMLCALL
     metaEndDoctypeDecl(void *userData)
     {
       XML_Parser parser = (XML_Parser) userData;
    -  FILE *fp = XML_GetUserData(parser);
    +  FILE *fp = (FILE *)XML_GetUserData(parser);
       fputts(T("\n"), fp);
    @@ -458,7 +458,7 @@ metaNotationDecl(void *userData,
                      const XML_Char *publicId)
     {
       XML_Parser parser = (XML_Parser) userData;
    -  FILE *fp = XML_GetUserData(parser);
    +  FILE *fp = (FILE *)XML_GetUserData(parser);
       ftprintf(fp, T("\n"), fp);
       else
    @@ -645,7 +645,8 @@ tmain(int argc, XML_Char **argv)
       int outputType = 0;
       int useNamespaces = 0;
       int requireStandalone = 0;
    -  int paramEntityParsing = XML_PARAM_ENTITY_PARSING_NEVER;
    +  enum XML_ParamEntityParsing paramEntityParsing = 
    +    XML_PARAM_ENTITY_PARSING_NEVER;
       int useStdin = 0;
     
     #ifdef _MSC_VER
    @@ -773,7 +774,7 @@ tmain(int argc, XML_Char **argv)
           if (tcsrchr(file, T('\\')))
             file = tcsrchr(file, T('\\')) + 1;
     #endif
    -      outName = malloc((tcslen(outputDir) + tcslen(file) + 2)
    +      outName = (XML_Char *)malloc((tcslen(outputDir) + tcslen(file) + 2)
                            * sizeof(XML_Char));
           tcscpy(outName, outputDir);
           tcscat(outName, T("/"));
    diff --git a/reactos/lib/expat/xmlwf/xmlwf.dsp b/reactos/lib/expat/xmlwf/xmlwf.dsp
    index a639bc61208..f9e7f54249c 100644
    --- a/reactos/lib/expat/xmlwf/xmlwf.dsp
    +++ b/reactos/lib/expat/xmlwf/xmlwf.dsp
    @@ -1,139 +1,139 @@
    -# Microsoft Developer Studio Project File - Name="xmlwf" - Package Owner=<4>
    -# Microsoft Developer Studio Generated Build File, Format Version 6.00
    -# ** DO NOT EDIT **
    -
    -# TARGTYPE "Win32 (x86) Console Application" 0x0103
    -
    -CFG=xmlwf - Win32 Release
    -!MESSAGE This is not a valid makefile. To build this project using NMAKE,
    -!MESSAGE use the Export Makefile command and run
    -!MESSAGE 
    -!MESSAGE NMAKE /f "xmlwf.mak".
    -!MESSAGE 
    -!MESSAGE You can specify a configuration when running NMAKE
    -!MESSAGE by defining the macro CFG on the command line. For example:
    -!MESSAGE 
    -!MESSAGE NMAKE /f "xmlwf.mak" CFG="xmlwf - Win32 Release"
    -!MESSAGE 
    -!MESSAGE Possible choices for configuration are:
    -!MESSAGE 
    -!MESSAGE "xmlwf - Win32 Release" (based on "Win32 (x86) Console Application")
    -!MESSAGE "xmlwf - Win32 Debug" (based on "Win32 (x86) Console Application")
    -!MESSAGE 
    -
    -# Begin Project
    -# PROP AllowPerConfigDependencies 0
    -# PROP Scc_ProjName ""
    -# PROP Scc_LocalPath ""
    -CPP=cl.exe
    -RSC=rc.exe
    -
    -!IF  "$(CFG)" == "xmlwf - Win32 Release"
    -
    -# PROP BASE Use_MFC 0
    -# PROP BASE Use_Debug_Libraries 0
    -# PROP BASE Output_Dir ".\Release"
    -# PROP BASE Intermediate_Dir ".\Release"
    -# PROP BASE Target_Dir "."
    -# PROP Use_MFC 0
    -# PROP Use_Debug_Libraries 0
    -# PROP Output_Dir ".\Release"
    -# PROP Intermediate_Dir ".\Release"
    -# PROP Ignore_Export_Lib 0
    -# PROP Target_Dir "."
    -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /c
    -# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\lib" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "COMPILED_FROM_DSP" /FD /c
    -# SUBTRACT CPP /YX /Yc /Yu
    -# ADD BASE RSC /l 0x809 /d "NDEBUG"
    -# ADD RSC /l 0x409 /d "NDEBUG"
    -BSC32=bscmake.exe
    -# ADD BASE BSC32 /nologo
    -# ADD BSC32 /nologo
    -LINK32=link.exe
    -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
    -# ADD LINK32 setargv.obj kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /pdb:none /machine:I386 /out:"Release\xmlwf.exe"
    -# SUBTRACT LINK32 /nodefaultlib
    -
    -!ELSEIF  "$(CFG)" == "xmlwf - Win32 Debug"
    -
    -# PROP BASE Use_MFC 0
    -# PROP BASE Use_Debug_Libraries 1
    -# PROP BASE Output_Dir ".\Debug"
    -# PROP BASE Intermediate_Dir ".\Debug"
    -# PROP BASE Target_Dir "."
    -# PROP Use_MFC 0
    -# PROP Use_Debug_Libraries 1
    -# PROP Output_Dir ".\Debug"
    -# PROP Intermediate_Dir ".\Debug"
    -# PROP Ignore_Export_Lib 0
    -# PROP Target_Dir "."
    -# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /YX /c
    -# ADD CPP /nologo /MTd /W3 /GX /ZI /Od /I "..\lib" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "COMPILED_FROM_DSP" /FD /c
    -# SUBTRACT CPP /Fr /YX
    -# ADD BASE RSC /l 0x809 /d "_DEBUG"
    -# ADD RSC /l 0x409 /d "_DEBUG"
    -BSC32=bscmake.exe
    -# ADD BASE BSC32 /nologo
    -# ADD BSC32 /nologo
    -LINK32=link.exe
    -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386
    -# ADD LINK32 setargv.obj kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /pdb:none /debug /machine:I386 /out:"Debug\xmlwf.exe"
    -
    -!ENDIF 
    -
    -# Begin Target
    -
    -# Name "xmlwf - Win32 Release"
    -# Name "xmlwf - Win32 Debug"
    -# Begin Group "Source Files"
    -
    -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat;for;f90"
    -# Begin Source File
    -
    -SOURCE=.\codepage.c
    -# End Source File
    -# Begin Source File
    -
    -SOURCE=.\readfilemap.c
    -# PROP Exclude_From_Build 1
    -# End Source File
    -# Begin Source File
    -
    -SOURCE=.\unixfilemap.c
    -# PROP Exclude_From_Build 1
    -# End Source File
    -# Begin Source File
    -
    -SOURCE=.\win32filemap.c
    -# End Source File
    -# Begin Source File
    -
    -SOURCE=.\xmlfile.c
    -# End Source File
    -# Begin Source File
    -
    -SOURCE=.\xmlwf.c
    -# End Source File
    -# End Group
    -# Begin Group "Header Files"
    -
    -# PROP Default_Filter "h;hpp;hxx;hm;inl;fi;fd"
    -# Begin Source File
    -
    -SOURCE=.\codepage.h
    -# End Source File
    -# Begin Source File
    -
    -SOURCE=.\xmlfile.h
    -# End Source File
    -# Begin Source File
    -
    -SOURCE=.\xmltchar.h
    -# End Source File
    -# End Group
    -# Begin Group "Resource Files"
    -
    -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe"
    -# End Group
    -# End Target
    -# End Project
    +# Microsoft Developer Studio Project File - Name="xmlwf" - Package Owner=<4>
    +# Microsoft Developer Studio Generated Build File, Format Version 6.00
    +# ** DO NOT EDIT **
    +
    +# TARGTYPE "Win32 (x86) Console Application" 0x0103
    +
    +CFG=xmlwf - Win32 Release
    +!MESSAGE This is not a valid makefile. To build this project using NMAKE,
    +!MESSAGE use the Export Makefile command and run
    +!MESSAGE 
    +!MESSAGE NMAKE /f "xmlwf.mak".
    +!MESSAGE 
    +!MESSAGE You can specify a configuration when running NMAKE
    +!MESSAGE by defining the macro CFG on the command line. For example:
    +!MESSAGE 
    +!MESSAGE NMAKE /f "xmlwf.mak" CFG="xmlwf - Win32 Release"
    +!MESSAGE 
    +!MESSAGE Possible choices for configuration are:
    +!MESSAGE 
    +!MESSAGE "xmlwf - Win32 Release" (based on "Win32 (x86) Console Application")
    +!MESSAGE "xmlwf - Win32 Debug" (based on "Win32 (x86) Console Application")
    +!MESSAGE 
    +
    +# Begin Project
    +# PROP AllowPerConfigDependencies 0
    +# PROP Scc_ProjName ""
    +# PROP Scc_LocalPath ""
    +CPP=cl.exe
    +RSC=rc.exe
    +
    +!IF  "$(CFG)" == "xmlwf - Win32 Release"
    +
    +# PROP BASE Use_MFC 0
    +# PROP BASE Use_Debug_Libraries 0
    +# PROP BASE Output_Dir ".\Release"
    +# PROP BASE Intermediate_Dir ".\Release"
    +# PROP BASE Target_Dir "."
    +# PROP Use_MFC 0
    +# PROP Use_Debug_Libraries 0
    +# PROP Output_Dir ".\Release"
    +# PROP Intermediate_Dir ".\Release"
    +# PROP Ignore_Export_Lib 0
    +# PROP Target_Dir "."
    +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /c
    +# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\lib" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "COMPILED_FROM_DSP" /FD /c
    +# SUBTRACT CPP /YX /Yc /Yu
    +# ADD BASE RSC /l 0x809 /d "NDEBUG"
    +# ADD RSC /l 0x409 /d "NDEBUG"
    +BSC32=bscmake.exe
    +# ADD BASE BSC32 /nologo
    +# ADD BSC32 /nologo
    +LINK32=link.exe
    +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
    +# ADD LINK32 setargv.obj kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /pdb:none /machine:I386 /out:"Release\xmlwf.exe"
    +# SUBTRACT LINK32 /nodefaultlib
    +
    +!ELSEIF  "$(CFG)" == "xmlwf - Win32 Debug"
    +
    +# PROP BASE Use_MFC 0
    +# PROP BASE Use_Debug_Libraries 1
    +# PROP BASE Output_Dir ".\Debug"
    +# PROP BASE Intermediate_Dir ".\Debug"
    +# PROP BASE Target_Dir "."
    +# PROP Use_MFC 0
    +# PROP Use_Debug_Libraries 1
    +# PROP Output_Dir ".\Debug"
    +# PROP Intermediate_Dir ".\Debug"
    +# PROP Ignore_Export_Lib 0
    +# PROP Target_Dir "."
    +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /YX /c
    +# ADD CPP /nologo /MTd /W3 /GX /ZI /Od /I "..\lib" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "COMPILED_FROM_DSP" /FD /c
    +# SUBTRACT CPP /Fr /YX
    +# ADD BASE RSC /l 0x809 /d "_DEBUG"
    +# ADD RSC /l 0x409 /d "_DEBUG"
    +BSC32=bscmake.exe
    +# ADD BASE BSC32 /nologo
    +# ADD BSC32 /nologo
    +LINK32=link.exe
    +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386
    +# ADD LINK32 setargv.obj kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /pdb:none /debug /machine:I386 /out:"Debug\xmlwf.exe"
    +
    +!ENDIF 
    +
    +# Begin Target
    +
    +# Name "xmlwf - Win32 Release"
    +# Name "xmlwf - Win32 Debug"
    +# Begin Group "Source Files"
    +
    +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat;for;f90"
    +# Begin Source File
    +
    +SOURCE=.\codepage.c
    +# End Source File
    +# Begin Source File
    +
    +SOURCE=.\readfilemap.c
    +# PROP Exclude_From_Build 1
    +# End Source File
    +# Begin Source File
    +
    +SOURCE=.\unixfilemap.c
    +# PROP Exclude_From_Build 1
    +# End Source File
    +# Begin Source File
    +
    +SOURCE=.\win32filemap.c
    +# End Source File
    +# Begin Source File
    +
    +SOURCE=.\xmlfile.c
    +# End Source File
    +# Begin Source File
    +
    +SOURCE=.\xmlwf.c
    +# End Source File
    +# End Group
    +# Begin Group "Header Files"
    +
    +# PROP Default_Filter "h;hpp;hxx;hm;inl;fi;fd"
    +# Begin Source File
    +
    +SOURCE=.\codepage.h
    +# End Source File
    +# Begin Source File
    +
    +SOURCE=.\xmlfile.h
    +# End Source File
    +# Begin Source File
    +
    +SOURCE=.\xmltchar.h
    +# End Source File
    +# End Group
    +# Begin Group "Resource Files"
    +
    +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe"
    +# End Group
    +# End Target
    +# End Project
    diff --git a/reactos/lib/expat/xmlwf/xmlwf.vcproj b/reactos/lib/expat/xmlwf/xmlwf.vcproj
    new file mode 100644
    index 00000000000..98a5cf29371
    --- /dev/null
    +++ b/reactos/lib/expat/xmlwf/xmlwf.vcproj
    @@ -0,0 +1,274 @@
    +
    +
    +	
    +		
    +	
    +	
    +		
    +			
    +			
    +			
    +			
    +			
    +			
    +			
    +			
    +			
    +			
    +			
    +			
    +			
    +		
    +		
    +			
    +			
    +			
    +			
    +			
    +			
    +			
    +			
    +			
    +			
    +			
    +			
    +			
    +		
    +	
    +	
    +	
    +	
    +		
    +			
    +				
    +					
    +				
    +				
    +					
    +				
    +			
    +			
    +				
    +					
    +				
    +				
    +					
    +				
    +			
    +			
    +				
    +					
    +				
    +				
    +					
    +				
    +			
    +			
    +				
    +					
    +				
    +				
    +					
    +				
    +			
    +			
    +				
    +					
    +				
    +				
    +					
    +				
    +			
    +			
    +				
    +					
    +				
    +				
    +					
    +				
    +			
    +		
    +		
    +			
    +			
    +			
    +			
    +			
    +			
    +		
    +		
    +		
    +	
    +	
    +	
    +