mirror of
https://github.com/jezhiggins/arabica
synced 2024-12-26 21:58:39 +01:00
Committed Scott Andrew's patches
This commit is contained in:
parent
e3a4a93044
commit
7eb1b4f295
8 changed files with 36 additions and 46 deletions
|
@ -59,6 +59,9 @@ Package=<4>
|
|||
Begin Project Dependency
|
||||
Project_Dep_Name SAXlib
|
||||
End Project Dependency
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name Utilities
|
||||
End Project Dependency
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
|
|
@ -64,7 +64,7 @@ LIB32=link.exe -lib
|
|||
# PROP Intermediate_Dir "Debug"
|
||||
# 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 /W3 /Gm /GR /GX /ZI /Od /I "..\\" /I "\work\include" /I "\work\lib" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /D "USE_EXPAT" /YX /FD /GZ /c
|
||||
# ADD CPP /nologo /W3 /Gm /GR /GX /ZI /Od /I "..\\" /I "\work\include" /I "\work\lib" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /D "USE_XERCES" /YX /FD /GZ /c
|
||||
# ADD BASE RSC /l 0x809 /d "_DEBUG"
|
||||
# ADD RSC /l 0x809 /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
|
|
|
@ -445,7 +445,7 @@ namespace SAX
|
|||
class XMLReader : public DEF_SAX_P<string_type> { };
|
||||
} // namespace SAX
|
||||
#else
|
||||
#error No default parser defined.
|
||||
#error "No default parser defined."
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
|
|
@ -1,6 +1,10 @@
|
|||
/*
|
||||
* SAXlib.cpp - Pulls in the appropriate bits of the library, depending
|
||||
* on the configured options.
|
||||
* on the configured options. The required libraries built within this
|
||||
* package are:
|
||||
* SAXlib
|
||||
* Utility
|
||||
* - the selected parser(s)
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
@ -8,7 +12,6 @@
|
|||
#ifdef _MSC_VER
|
||||
// turn off the useless "template name is too long" warning
|
||||
#pragma warning(disable: 4786)
|
||||
#pragma comment(lib, "Utilities.lib")
|
||||
#endif
|
||||
|
||||
#define NO_DEFAULT_PARSER
|
||||
|
@ -17,20 +20,29 @@
|
|||
#ifdef USE_LIBXML2
|
||||
#pragma message("Pulling in libxml2")
|
||||
#include <SAX/wrappers/saxlibxml2.cpp>
|
||||
#ifdef _MSC_VER
|
||||
// automagically link libxml2 if using VC++
|
||||
#ifdef _MSC_VER
|
||||
#pragma comment(lib, "libxml2.lib")
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef USE_MSXML
|
||||
#ifndef _MSC_VER
|
||||
#error "USE_MSXML is only valid for VisualC++ builds"
|
||||
#else
|
||||
#pragma message("Nothing to pull in for MSXML")
|
||||
#endif
|
||||
// nothing extra to pull in for MSXML
|
||||
#endif
|
||||
|
||||
#ifdef USE_XERCES
|
||||
// automagically link Xerces if using VC++
|
||||
#ifndef _MSC_VER
|
||||
#pragma message("Nothing to pull in for Xerces")
|
||||
// nothing extra to pull in for Xerces
|
||||
#else
|
||||
#pragma message("Pulling in Xerces")
|
||||
#pragma comment(lib, "xerces-c_1.lib")
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef USE_GARDEN
|
||||
|
|
|
@ -9,8 +9,11 @@
|
|||
#include <SAX/InputSource.h>
|
||||
#include <SAX/XMLReader.h>
|
||||
#include <SAX/SAXParseException.h>
|
||||
#include <SAX/SAXNotRecognizedException.h>
|
||||
#include <SAX/SAXNotSupportedException.h>
|
||||
#include <SAX/ext/LexicalHandler.h>
|
||||
#include <SAX/ext/DeclHandler.h>
|
||||
#include <SAX/helpers/FeatureNames.h>
|
||||
#include <SAX/helpers/PropertyNames.h>
|
||||
|
||||
// Xerces Includes
|
||||
|
@ -557,6 +560,7 @@ class xerces_wrapper : public SAX::basic_XMLReader<string_type>
|
|||
LexicalHandlerAdaptor lexicalHandlerAdaptor_;
|
||||
DeclHandlerAdaptor declHandlerAdaptor_;
|
||||
string_adaptorT SA_;
|
||||
SAX::FeatureNames<stringT, string_adaptorT> features_;
|
||||
SAX::PropertyNames<stringT, string_adaptorT> properties_;
|
||||
}; // class xerces_wrapper
|
||||
|
||||
|
|
|
@ -65,7 +65,7 @@ LINK32=link.exe
|
|||
# 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 /W3 /Gm /GR /GX /ZI /Od /I "..\..\\" /I "\work\include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR /YX /FD /GZ /c
|
||||
# ADD CPP /nologo /W3 /Gm /GR /GX /ZI /Od /I "..\..\\" /I "\work\include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "USE_XERCES" /FR /YX /FD /GZ /c
|
||||
# ADD BASE RSC /l 0x809 /d "_DEBUG"
|
||||
# ADD RSC /l 0x809 /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
|
@ -73,7 +73,8 @@ BSC32=bscmake.exe
|
|||
# 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 wsock32.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 wsock32.lib xerces-c_1.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
|
||||
# SUBTRACT LINK32 /pdb:none
|
||||
|
||||
!ENDIF
|
||||
|
||||
|
@ -101,29 +102,5 @@ SOURCE=.\wrapper.cpp
|
|||
SOURCE=.\SimpleHandler.h
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Libs"
|
||||
|
||||
# PROP Default_Filter "lib"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=\work\lib\vc6\expat.lib
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\lib\Utilities.lib
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\lib\SAX.lib
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE="..\..\..\..\lib\vc6\xerces-c_1.lib"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\..\lib\vc6\libxml2.lib
|
||||
# End Source File
|
||||
# End Group
|
||||
# End Target
|
||||
# End Project
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
#define SimpleHandlerH
|
||||
|
||||
#include <string>
|
||||
#include <SAX/XMLReader.h>
|
||||
#include <SAX/EntityResolver.h>
|
||||
#include <SAX/DTDHandler.h>
|
||||
#include <SAX/ContentHandler.h>
|
||||
|
|
|
@ -5,17 +5,6 @@
|
|||
|
||||
#pragma warning(disable:4786)
|
||||
|
||||
#include <SAX/parsers/saxgarden.h>
|
||||
#include <SAX/wrappers/saxexpat.h>
|
||||
#ifdef LIBXML2
|
||||
#include <SAX/wrappers/saxlibxml2.h>
|
||||
#endif
|
||||
#ifdef WIN32
|
||||
#include <SAX/wrappers/saxmsxml2.h>
|
||||
#endif
|
||||
#ifdef XERCES
|
||||
#include <SAX/wrappers/saxxerces.h>
|
||||
#endif
|
||||
|
||||
#include "SimpleHandler.h"
|
||||
#include <SAX/InputSource.h>
|
||||
|
@ -24,19 +13,23 @@
|
|||
|
||||
SAX::basic_XMLReader<std::string>* parserFactory(std::string name)
|
||||
{
|
||||
#ifdef USE_EXPAT
|
||||
if(name == "expat")
|
||||
return new SAX::expat_wrapper<std::string>;
|
||||
#endif
|
||||
#ifdef USE_GARDEN
|
||||
if(name == "garden")
|
||||
return new SAX::Garden;
|
||||
#ifdef WIN32
|
||||
#endif
|
||||
#ifdef USE_MSXML
|
||||
if(name == "msxml")
|
||||
return new SAX::msxml2_wrapper<std::string>;
|
||||
#endif
|
||||
#ifdef LIBXML2
|
||||
#ifdef USE_LIBXML2
|
||||
if(name == "libxml")
|
||||
return new SAX::libxml2_wrapper<std::string>;
|
||||
#endif
|
||||
#ifdef XERCES
|
||||
#ifdef USE_XERCES
|
||||
if(name == "xerces")
|
||||
return new SAX::xerces_wrapper<std::string>;
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue