Added ArabicaConfig.h

This commit is contained in:
jez_higgins 2003-09-09 11:14:48 +00:00
parent 961078a18a
commit 56408bdce2
46 changed files with 118 additions and 31 deletions

24
SAX/ArabicaConfig.S Normal file
View file

@ -0,0 +1,24 @@
#define pasty(m, n) m##n
#define include pasty(#, include)
#define ifdef pasty(#, ifdef)
#define ifndef pasty(#, ifndef)
#define endif pasty(#, endif)
#define define pasty(#, define)
#define message pasty(#, pragma message)
#define undef pasty(#, undef)
#define error pasty(#, error)
#define else pasty(#, else)
#define comment pasty(#, pragma comment)
ifndef ARABICA_CONFIG_H
define ARABICA_CONFIG_H
#ifdef ARABICA_NO_WCHAR_T
#undef ARABICA_NO_WCHAR_T
define pasty(ARABICA, _NO_WCHAR_T) 1
#endif
endif // ARABICA_CONFIG_H

View file

@ -6,6 +6,8 @@
#include <string> #include <string>
#include <SAX/ArabicaConfig.h>
namespace SAX namespace SAX
{ {

View file

@ -6,6 +6,8 @@
#include <string> #include <string>
#include <SAX/ArabicaConfig.h>
namespace SAX namespace SAX
{ {

View file

@ -6,6 +6,8 @@
#include <string> #include <string>
#include <SAX/ArabicaConfig.h>
namespace SAX namespace SAX
{ {

View file

@ -6,6 +6,8 @@
#include <string> #include <string>
#include <SAX/ArabicaConfig.h>
namespace SAX namespace SAX
{ {

View file

@ -3,6 +3,8 @@
// SAX document handler. // SAX document handler.
// $Id$ // $Id$
#include <SAX/ArabicaConfig.h>
namespace SAX namespace SAX
{ {

View file

@ -5,6 +5,9 @@
// $Id$ // $Id$
#include <string> #include <string>
#include <SAX/ArabicaConfig.h>
#include <SAX/InputSource.h> #include <SAX/InputSource.h>
namespace SAX namespace SAX

View file

@ -5,6 +5,9 @@
// $Id$ // $Id$
#include <string> #include <string>
#include <SAX/ArabicaConfig.h>
#include <SAX/SAXParseException.h> #include <SAX/SAXParseException.h>
namespace SAX namespace SAX

View file

@ -4,13 +4,16 @@
// $Id$ // $Id$
#include <string> #include <string>
#include "EntityResolver.h"
#include "DTDHandler.h" #include <SAX/ArabicaConfig.h>
#include "DocumentHandler.h"
#include "ErrorHandler.h" #include <SAX/EntityResolver.h>
#include "Locator.h" #include <SAX/DTDHandler.h>
#include "AttributeList.h" #include <SAX/DocumentHandler.h>
#include "SAXException.h" #include <SAX/ErrorHandler.h>
#include <SAX/Locator.h>
#include <SAX/AttributeList.h>
#include <SAX/SAXException.h>
namespace SAX namespace SAX
{ {

View file

@ -7,6 +7,8 @@
#include <iosfwd> #include <iosfwd>
#include <string> #include <string>
#include <SAX/ArabicaConfig.h>
namespace SAX namespace SAX
{ {

View file

@ -6,6 +6,8 @@
#include <string> #include <string>
#include <SAX/ArabicaConfig.h>
namespace SAX namespace SAX
{ {

View file

@ -43,13 +43,12 @@ CXXFLAGS += -O2
LDFLAGS += -O2 LDFLAGS += -O2
# edit for your parser choice - may include more than one # edit for your parser choice - may include more than one
PARSER_CONFIG = -DUSE_EXPAT PARSER_CONFIG = -DUSE_EXPAT -DARABICA_NO_WCHAR_T
#PARSER_CONFIG = -DUSE_EXPAT -DUSE_LIBXML2 -DUSE_XERCES -DUSE_GARDEN #PARSER_CONFIG = -DUSE_EXPAT -DUSE_LIBXML2 -DUSE_XERCES -DUSE_GARDEN
# Includes and library directories # Includes and library directories
INCS_DIRS = -I.. INCS_DIRS = -I..
#INCS_DIRS = -I.. #INCS_DIRS = -I..
LIBS_DIRS = LIBS_DIRS =
STATIC_LIBS = STATIC_LIBS =
@ -103,7 +102,8 @@ libArabica.a : $(OBJS)
#////////////////////////////////////////////// #//////////////////////////////////////////////
# Compile rules # Compile rules
saxlib.cpp : ParserConfig.S saxlib.S saxlib.cpp : ParserConfig.S saxlib.S ArabicaConfig.S
$(PREPROCESS.S) $(PARSER_CONFIG) -o ArabicaConfig.h ArabicaConfig.S
$(PREPROCESS.S) $(PARSER_CONFIG) -o ParserConfig.h ParserConfig.S $(PREPROCESS.S) $(PARSER_CONFIG) -o ParserConfig.h ParserConfig.S
$(PREPROCESS.S) $(PARSER_CONFIG) -o saxlib.cpp saxlib.S $(PREPROCESS.S) $(PARSER_CONFIG) -o saxlib.cpp saxlib.S
@ -130,7 +130,7 @@ depend : .depend
# Cleaning up # Cleaning up
clean : clean :
$(REMOVE) .depend *.o helpers/*.o wrappers/*.o ../Utils/*.o ../Utils/impl/*.o ../XML/*.o libArabica* *~ helpers/*~ core ../bin/libArabica* saxlib.cpp ParserConfig.h $(REMOVE) .depend *.o helpers/*.o wrappers/*.o ../Utils/*.o ../Utils/impl/*.o ../XML/*.o libArabica* *~ helpers/*~ core ../bin/libArabica* saxlib.cpp ParserConfig.h ArabicaConfig.h

View file

@ -7,6 +7,9 @@
#pragma message("Parser is a SAX1 class. Consider using XMLReader instead.") #pragma message("Parser is a SAX1 class. Consider using XMLReader instead.")
#include <string> #include <string>
#include <SAX/ArabicaConfig.h>
#include <saxfwd.h> #include <saxfwd.h>
namespace SAX namespace SAX

View file

@ -6,6 +6,8 @@
#include <stdexcept> #include <stdexcept>
#include <SAX/ArabicaConfig.h>
namespace SAX namespace SAX
{ {

View file

@ -5,7 +5,7 @@
// $Id$ // $Id$
#include "SAXException.h" #include <SAX/SAXException.h>
namespace SAX namespace SAX
{ {

View file

@ -5,7 +5,9 @@
// $Id$ // $Id$
#include <string> #include <string>
#include "XMLReader.h" #include <SAX/ArabicaConfig.h>
#include <SAX/XMLReader.h>
namespace SAX namespace SAX
{ {

View file

@ -7,6 +7,8 @@
#include <string> #include <string>
#include <memory> #include <memory>
#include <SAX/ArabicaConfig.h>
#include <SAX/ContentHandler.h> #include <SAX/ContentHandler.h>
#include <SAX/EntityResolver.h> #include <SAX/EntityResolver.h>
#include <SAX/DTDHandler.h> #include <SAX/DTDHandler.h>

View file

@ -4,6 +4,7 @@
// Attributes2.h // Attributes2.h
// $Id$ // $Id$
#include <SAX/ArabicaConfig.h>
#include <SAX/Attributes.h> #include <SAX/Attributes.h>
namespace SAX namespace SAX

View file

@ -5,6 +5,7 @@
// $Id$ // $Id$
#include <string> #include <string>
#include <SAX/ArabicaConfig.h>
namespace SAX namespace SAX
{ {

View file

@ -4,6 +4,7 @@
// DefaultHandler.h // DefaultHandler.h
// $Id$ // $Id$
#include <SAX/ArabicaConfig.h>
#include <SAX/helpers/DefaultHandler.h> #include <SAX/helpers/DefaultHandler.h>
#include <SAX/ext/DeclHandler.h> #include <SAX/ext/DeclHandler.h>
#include <SAX/ext/LexicalHandler.h> #include <SAX/ext/LexicalHandler.h>

View file

@ -5,6 +5,7 @@
// $Id$ // $Id$
#include <string> #include <string>
#include <SAX/ArabicaConfig.h>
namespace SAX namespace SAX
{ {

View file

@ -4,6 +4,7 @@
// Locator2.h // Locator2.h
// $Id$ // $Id$
#include <SAX/ArabicaConfig.h>
#include <SAX/Locator.h> #include <SAX/Locator.h>
namespace SAX namespace SAX

View file

@ -1,6 +1,7 @@
#ifndef SAXWriter_H #ifndef SAXWriter_H
#define SAXWriter_H #define SAXWriter_H
#include <SAX/ArabicaConfig.h>
#include <SAX/helpers/XMLFilterImpl.h> #include <SAX/helpers/XMLFilterImpl.h>
#include <SAX/ext/LexicalHandler.h> #include <SAX/ext/LexicalHandler.h>
#include <XML/UnicodeCharacters.h> #include <XML/UnicodeCharacters.h>

View file

@ -4,6 +4,7 @@
* $Id$ * $Id$
*/ */
#include <SAX/ArabicaConfig.h>
#include <SAX/helpers/StringAdaptor.h> #include <SAX/helpers/StringAdaptor.h>
namespace SAX namespace SAX

View file

@ -3,6 +3,7 @@
// SAX default implementation for AttributeList. // SAX default implementation for AttributeList.
// $Id$ // $Id$
#include <SAX/ArabicaConfig.h>
#include <AttributeList.h> #include <AttributeList.h>
#include <vector> #include <vector>
#include <algorithm> #include <algorithm>

View file

@ -4,6 +4,7 @@
* $Id$ * $Id$
*/ */
#include <SAX/ArabicaConfig.h>
#include <SAX/helpers/StringAdaptor.h> #include <SAX/helpers/StringAdaptor.h>
namespace SAX namespace SAX

View file

@ -4,6 +4,7 @@
// AttributesImpl.h - default implementation of Attributes. // AttributesImpl.h - default implementation of Attributes.
// $Id$ // $Id$
#include <SAX/ArabicaConfig.h>
#include <SAX/Attributes.h> #include <SAX/Attributes.h>
#include <deque> #include <deque>

View file

@ -4,6 +4,7 @@
// DefaultHandler.h // DefaultHandler.h
// $Id$ // $Id$
#include <SAX/ArabicaConfig.h>
#include <string> #include <string>
#include <SAX/EntityResolver.h> #include <SAX/EntityResolver.h>
#include <SAX/DTDHandler.h> #include <SAX/DTDHandler.h>

View file

@ -4,6 +4,7 @@
* $Id$ * $Id$
*/ */
#include <SAX/ArabicaConfig.h>
#include <SAX/helpers/StringAdaptor.h> #include <SAX/helpers/StringAdaptor.h>
namespace SAX namespace SAX

View file

@ -1,6 +1,7 @@
#ifndef InputSourceResolverH #ifndef InputSourceResolverH
#define InputSourceResolverH #define InputSourceResolverH
#include <SAX/ArabicaConfig.h>
#include <iosfwd> #include <iosfwd>
#include <map> #include <map>
#include <SAX/InputSource.h> #include <SAX/InputSource.h>

View file

@ -4,6 +4,7 @@
// LocatorImpl.h // LocatorImpl.h
// $Id$ // $Id$
#include <SAX/ArabicaConfig.h>
#include <string> #include <string>
#include <Locator.h> #include <Locator.h>

View file

@ -5,6 +5,7 @@
* $Id$ * $Id$
*/ */
#include <SAX/ArabicaConfig.h>
#include <string> #include <string>
#include <map> #include <map>
#include <vector> #include <vector>

View file

@ -5,15 +5,16 @@
// Adapts a SAX1 Parser to a SAX2 XMLReader. // Adapts a SAX1 Parser to a SAX2 XMLReader.
// $Id$ // $Id$
#include <XMLReader.h> #include <SAX/ArabicaConfig.h>
#include <Parser.h> #include <SAX/XMLReader.h>
#include <DocumentHandler.h> #include <SAX/Parser.h>
#include <helpers/NamespaceSupport.h> #include <SAX/DocumentHandler.h>
#include <AttributeList.h> #include <SAX/helpers/NamespaceSupport.h>
#include <helpers/AttributesImpl.h> #include <SAX/AttributeList.h>
#include <SAXParseException.h> #include <SAX/helpers/AttributesImpl.h>
#include <SAXNotSupportedException.h> #include <SAX/SAXParseException.h>
#include <SAXNotRecognizedException.h> #include <SAX/SAXNotSupportedException.h>
#include <SAX/SAXNotRecognizedException.h>
#include <sstream> #include <sstream>
namespace SAX namespace SAX

View file

@ -4,6 +4,8 @@
* $Id$ * $Id$
*/ */
#include <SAX/ArabicaConfig.h>
#include <SAX/XMLReader.h>
#include <SAX/helpers/StringAdaptor.h> #include <SAX/helpers/StringAdaptor.h>
namespace SAX namespace SAX

View file

@ -4,6 +4,8 @@
* $Id$ * $Id$
*/ */
#include <SAX/ArabicaConfig.h>
#include <SAX/XMLReader.h>
#include <string> #include <string>
#include <Utils/convertstream.h> #include <Utils/convertstream.h>
#include <Utils/utf8ucs2codecvt.h> #include <Utils/utf8ucs2codecvt.h>

View file

@ -4,6 +4,7 @@
// XMLFilter.h // XMLFilter.h
// $Id$ // $Id$
#include <SAX/ArabicaConfig.h>
#include <string> #include <string>
#include <SAX/XMLFilter.h> #include <SAX/XMLFilter.h>
#include <SAX/helpers/DefaultHandler.h> #include <SAX/helpers/DefaultHandler.h>

View file

@ -1,6 +1,7 @@
#ifndef saxgarden_h #ifndef saxgarden_h
#define saxgarden_h #define saxgarden_h
#include <SAX/ArabicaConfig.h>
#include <boost/spirit.hpp> #include <boost/spirit.hpp>
#include <boost/bind.hpp> #include <boost/bind.hpp>
#include <vector> #include <vector>

View file

@ -59,6 +59,8 @@
*/ */
#include <SAX/ParserConfig.h>
#include <SAX/ArabicaConfig.h>
/** /**
* *
@ -76,8 +78,7 @@ template<class string_type> class basic_InputSource;
template<class string_type> class basic_Locator; template<class string_type> class basic_Locator;
template<class string_type> class basic_Parser; template<class string_type> class basic_Parser;
template<class string_type> class basic_SAXParseException; template<class string_type> class basic_SAXParseException;
template<class string_type> class basic_ErrorHandler;
class ErrorHandler;
typedef basic_AttributeList<std::string> AttributeList; typedef basic_AttributeList<std::string> AttributeList;
typedef basic_DocumentHandler<std::string> DocumentHandler; typedef basic_DocumentHandler<std::string> DocumentHandler;
@ -87,6 +88,7 @@ typedef basic_InputSource<std::string> InputSource;
typedef basic_Locator<std::string> Locator; typedef basic_Locator<std::string> Locator;
typedef basic_Parser<std::string> Parser; typedef basic_Parser<std::string> Parser;
typedef basic_SAXParseException<std::string> SAXParseException; typedef basic_SAXParseException<std::string> SAXParseException;
typedef basic_ErrorHandler<std::string> ErrorHandler;
#ifndef ARABICA_NO_WCHAR_T #ifndef ARABICA_NO_WCHAR_T
typedef basic_AttributeList<std::wstring> wAttributeList; typedef basic_AttributeList<std::wstring> wAttributeList;
@ -97,6 +99,7 @@ typedef basic_InputSource<std::wstring> wInputSource;
typedef basic_Locator<std::wstring> wLocator; typedef basic_Locator<std::wstring> wLocator;
typedef basic_Parser<std::wstring> wParser; typedef basic_Parser<std::wstring> wParser;
typedef basic_SAXParseException<std::wstring> wSAXParseException; typedef basic_SAXParseException<std::wstring> wSAXParseException;
typedef basic_ErrorHandler<std::wstring> wErrorHandler;
#endif #endif
}; // namespace SAX }; // namespace SAX

View file

@ -4,6 +4,7 @@
* $Id$ * $Id$
*/ */
#include <SAX/ArabicaConfig.h>
#include <SAX/helpers/StringAdaptor.h> #include <SAX/helpers/StringAdaptor.h>
namespace SAX namespace SAX

View file

@ -4,6 +4,7 @@
// A SAX2 wrapper class for expat. // A SAX2 wrapper class for expat.
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
#include <SAX/ArabicaConfig.h>
#include <SAX/XMLReader.h> #include <SAX/XMLReader.h>
#include <expat.h> #include <expat.h>

View file

@ -6,6 +6,7 @@
// $Id$ // $Id$
//////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////
#include <SAX/ArabicaConfig.h>
#include <SAX/XMLReader.h> #include <SAX/XMLReader.h>
#include <SAX/SAXParseException.h> #include <SAX/SAXParseException.h>
#include <SAX/InputSource.h> #include <SAX/InputSource.h>

View file

@ -31,6 +31,7 @@
// //
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
#include <SAX/ArabicaConfig.h>
#include <SAX/XMLReader.h> #include <SAX/XMLReader.h>
#include <SAX/InputSource.h> #include <SAX/InputSource.h>
#include <SAX/SAXParseException.h> #include <SAX/SAXParseException.h>

View file

@ -6,6 +6,7 @@
// $Id$ // $Id$
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
#include <SAX/ArabicaConfig.h>
#include <iterator> #include <iterator>
#include <memory> #include <memory>
#include <string> #include <string>

View file

@ -53,7 +53,7 @@ INCS_DIRS = -I../..
LIBS_DIRS = -L../../bin LIBS_DIRS = -L../../bin
STATIC_LIBS = STATIC_LIBS =
DYNAMIC_LIBS = -lArabica -lexpat DYNAMIC_LIBS = -lArabica -lexpat
CXXFLAGS += ${INCS_DIRS} CXXFLAGS += ${INCS_DIRS}
LDFLAGS += ${LIBS_DIRS} LDFLAGS += ${LIBS_DIRS}

View file

@ -40,7 +40,7 @@ CCDEPFLAGS = -E -M
# Uncomment for optimisations # Uncomment for optimisations
CXXFLAGS += -O2 CXXFLAGS += -O2
LDFLAGS += -O2 -L../../bin LDFLAGS += -O2
# Uncomment for debug version # Uncomment for debug version
CXXFLAGS += -g CXXFLAGS += -g
@ -50,12 +50,13 @@ CXXFLAGS += -g
INCS_DIRS = -I../.. INCS_DIRS = -I../..
#INCS_DIRS = -I.. #INCS_DIRS = -I..
LIBS_DIRS = LIBS_DIRS = -L../../bin
STATIC_LIBS = STATIC_LIBS =
DYNAMIC_LIBS = -L../../bin -lArabica -lexpat DYNAMIC_LIBS = -lArabica -lexpat
CXXFLAGS += ${INCS_DIRS} CXXFLAGS += ${INCS_DIRS}
LDFLAGS += ${LIBS_DIRS}
LDFLAGS += ${DYNAMIC_LIBS} LDFLAGS += ${DYNAMIC_LIBS}
#///////////////////////////////////////////////////////////////////////// #/////////////////////////////////////////////////////////////////////////
@ -121,7 +122,7 @@ depend : .depend
# Cleaning up # Cleaning up
clean : clean :
$(REMOVE) .depend $(CPPUNITUI_OBJS) $(CPPUNITFW_OBJS) $(SAXDOM_OBJS) core sax2dom_test domwriter ../../bin/sax2dom_test ../../bin/domwriter $(REMOVE) .depend $(CPPUNITUI_OBJS) $(CPPUNITFW_OBJS) $(SAXDOM_OBJS) $(DOMWRITER_OBJS) core sax2dom_test domwriter ../../bin/sax2dom_test ../../bin/domwriter
#///////////////////////////////////////////////////////////////////////// #/////////////////////////////////////////////////////////////////////////

View file

@ -43,7 +43,7 @@ CXXFLAGS += -O2
LDFLAGS += -O2 LDFLAGS += -O2
# Uncomment for debug version # Uncomment for debug version
# CXXFLAGS += -g -D__DEBUG__ # CXXFLAGS += -g
# Includes and library directories # Includes and library directories
@ -53,7 +53,7 @@ INCS_DIRS = -I../..
LIBS_DIRS = -L../../bin LIBS_DIRS = -L../../bin
STATIC_LIBS = STATIC_LIBS =
DYNAMIC_LIBS = -lArabica -lexpat DYNAMIC_LIBS = -lArabica
CXXFLAGS += ${INCS_DIRS} CXXFLAGS += ${INCS_DIRS}
LDFLAGS += ${LIBS_DIRS} LDFLAGS += ${LIBS_DIRS}