diff --git a/SAX/ArabicaConfig.S b/SAX/ArabicaConfig.S new file mode 100644 index 00000000..cba22972 --- /dev/null +++ b/SAX/ArabicaConfig.S @@ -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 + + diff --git a/SAX/AttributeList.h b/SAX/AttributeList.h index 662c8123..e8b20859 100644 --- a/SAX/AttributeList.h +++ b/SAX/AttributeList.h @@ -6,6 +6,8 @@ #include +#include + namespace SAX { diff --git a/SAX/Attributes.h b/SAX/Attributes.h index 9d1b3d14..53e85c4e 100644 --- a/SAX/Attributes.h +++ b/SAX/Attributes.h @@ -6,6 +6,8 @@ #include +#include + namespace SAX { diff --git a/SAX/ContentHandler.h b/SAX/ContentHandler.h index 98659e4a..30bb63b3 100644 --- a/SAX/ContentHandler.h +++ b/SAX/ContentHandler.h @@ -6,6 +6,8 @@ #include +#include + namespace SAX { diff --git a/SAX/DTDHandler.h b/SAX/DTDHandler.h index 4a1033af..5966bfc0 100644 --- a/SAX/DTDHandler.h +++ b/SAX/DTDHandler.h @@ -6,6 +6,8 @@ #include +#include + namespace SAX { diff --git a/SAX/DocumentHandler.h b/SAX/DocumentHandler.h index 54ba8099..15adf25a 100644 --- a/SAX/DocumentHandler.h +++ b/SAX/DocumentHandler.h @@ -3,6 +3,8 @@ // SAX document handler. // $Id$ +#include + namespace SAX { diff --git a/SAX/EntityResolver.h b/SAX/EntityResolver.h index 45fab00f..8112c800 100644 --- a/SAX/EntityResolver.h +++ b/SAX/EntityResolver.h @@ -5,6 +5,9 @@ // $Id$ #include + +#include + #include namespace SAX diff --git a/SAX/ErrorHandler.h b/SAX/ErrorHandler.h index f2e4f653..f4c16be1 100644 --- a/SAX/ErrorHandler.h +++ b/SAX/ErrorHandler.h @@ -5,6 +5,9 @@ // $Id$ #include + +#include + #include namespace SAX diff --git a/SAX/HandlerBase.h b/SAX/HandlerBase.h index f9f7fcdb..2500bc20 100644 --- a/SAX/HandlerBase.h +++ b/SAX/HandlerBase.h @@ -4,13 +4,16 @@ // $Id$ #include -#include "EntityResolver.h" -#include "DTDHandler.h" -#include "DocumentHandler.h" -#include "ErrorHandler.h" -#include "Locator.h" -#include "AttributeList.h" -#include "SAXException.h" + +#include + +#include +#include +#include +#include +#include +#include +#include namespace SAX { diff --git a/SAX/InputSource.h b/SAX/InputSource.h index 21be2b6b..d7a9ece9 100644 --- a/SAX/InputSource.h +++ b/SAX/InputSource.h @@ -7,6 +7,8 @@ #include #include +#include + namespace SAX { diff --git a/SAX/Locator.h b/SAX/Locator.h index 392be44b..f178986d 100644 --- a/SAX/Locator.h +++ b/SAX/Locator.h @@ -6,6 +6,8 @@ #include +#include + namespace SAX { diff --git a/SAX/Makefile b/SAX/Makefile index 7dd6b94a..e86f8142 100644 --- a/SAX/Makefile +++ b/SAX/Makefile @@ -43,13 +43,12 @@ CXXFLAGS += -O2 LDFLAGS += -O2 # 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 # Includes and library directories INCS_DIRS = -I.. #INCS_DIRS = -I.. - LIBS_DIRS = STATIC_LIBS = @@ -103,7 +102,8 @@ libArabica.a : $(OBJS) #////////////////////////////////////////////// # 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 saxlib.cpp saxlib.S @@ -130,7 +130,7 @@ depend : .depend # Cleaning up 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 diff --git a/SAX/Parser.h b/SAX/Parser.h index e34960e3..59784ca2 100644 --- a/SAX/Parser.h +++ b/SAX/Parser.h @@ -7,6 +7,9 @@ #pragma message("Parser is a SAX1 class. Consider using XMLReader instead.") #include + +#include + #include namespace SAX diff --git a/SAX/SAXException.h b/SAX/SAXException.h index 9b114b82..eae9fb08 100644 --- a/SAX/SAXException.h +++ b/SAX/SAXException.h @@ -6,6 +6,8 @@ #include +#include + namespace SAX { diff --git a/SAX/SAXNotSupportedException.h b/SAX/SAXNotSupportedException.h index 7f63db00..dc9fb271 100644 --- a/SAX/SAXNotSupportedException.h +++ b/SAX/SAXNotSupportedException.h @@ -5,7 +5,7 @@ // $Id$ -#include "SAXException.h" +#include namespace SAX { diff --git a/SAX/XMLFilter.h b/SAX/XMLFilter.h index 91007fe6..8acbec30 100644 --- a/SAX/XMLFilter.h +++ b/SAX/XMLFilter.h @@ -5,7 +5,9 @@ // $Id$ #include -#include "XMLReader.h" +#include + +#include namespace SAX { diff --git a/SAX/XMLReader.h b/SAX/XMLReader.h index e7b5568e..11047d4f 100644 --- a/SAX/XMLReader.h +++ b/SAX/XMLReader.h @@ -7,6 +7,8 @@ #include #include +#include + #include #include #include diff --git a/SAX/ext/Attributes2.h b/SAX/ext/Attributes2.h index 8e87b2f2..299bca42 100644 --- a/SAX/ext/Attributes2.h +++ b/SAX/ext/Attributes2.h @@ -4,6 +4,7 @@ // Attributes2.h // $Id$ +#include #include namespace SAX diff --git a/SAX/ext/DeclHandler.h b/SAX/ext/DeclHandler.h index 5d48663f..de5f1282 100644 --- a/SAX/ext/DeclHandler.h +++ b/SAX/ext/DeclHandler.h @@ -5,6 +5,7 @@ // $Id$ #include +#include namespace SAX { diff --git a/SAX/ext/DefaultHandler2.h b/SAX/ext/DefaultHandler2.h index 1a08fc11..2df9fbb6 100644 --- a/SAX/ext/DefaultHandler2.h +++ b/SAX/ext/DefaultHandler2.h @@ -4,6 +4,7 @@ // DefaultHandler.h // $Id$ +#include #include #include #include diff --git a/SAX/ext/LexicalHandler.h b/SAX/ext/LexicalHandler.h index 4424c591..122e339a 100644 --- a/SAX/ext/LexicalHandler.h +++ b/SAX/ext/LexicalHandler.h @@ -5,6 +5,7 @@ // $Id$ #include +#include namespace SAX { diff --git a/SAX/ext/Locator2.h b/SAX/ext/Locator2.h index 636b5825..3aacf188 100644 --- a/SAX/ext/Locator2.h +++ b/SAX/ext/Locator2.h @@ -4,6 +4,7 @@ // Locator2.h // $Id$ +#include #include namespace SAX diff --git a/SAX/filter/Writer.h b/SAX/filter/Writer.h index 4638e6df..7bd17cc0 100644 --- a/SAX/filter/Writer.h +++ b/SAX/filter/Writer.h @@ -1,6 +1,7 @@ #ifndef SAXWriter_H #define SAXWriter_H +#include #include #include #include diff --git a/SAX/helpers/AttributeDefaults.h b/SAX/helpers/AttributeDefaults.h index 7c85a9ac..1b428c91 100644 --- a/SAX/helpers/AttributeDefaults.h +++ b/SAX/helpers/AttributeDefaults.h @@ -4,6 +4,7 @@ * $Id$ */ +#include #include namespace SAX diff --git a/SAX/helpers/AttributeListImpl.h b/SAX/helpers/AttributeListImpl.h index f2d7109e..f7180131 100644 --- a/SAX/helpers/AttributeListImpl.h +++ b/SAX/helpers/AttributeListImpl.h @@ -3,6 +3,7 @@ // SAX default implementation for AttributeList. // $Id$ +#include #include #include #include diff --git a/SAX/helpers/AttributeTypes.h b/SAX/helpers/AttributeTypes.h index 79e373db..1495b883 100644 --- a/SAX/helpers/AttributeTypes.h +++ b/SAX/helpers/AttributeTypes.h @@ -4,6 +4,7 @@ * $Id$ */ +#include #include namespace SAX diff --git a/SAX/helpers/AttributesImpl.h b/SAX/helpers/AttributesImpl.h index 79fe098c..35eb4873 100644 --- a/SAX/helpers/AttributesImpl.h +++ b/SAX/helpers/AttributesImpl.h @@ -4,6 +4,7 @@ // AttributesImpl.h - default implementation of Attributes. // $Id$ +#include #include #include diff --git a/SAX/helpers/DefaultHandler.h b/SAX/helpers/DefaultHandler.h index 3780ed43..54b9a016 100644 --- a/SAX/helpers/DefaultHandler.h +++ b/SAX/helpers/DefaultHandler.h @@ -4,6 +4,7 @@ // DefaultHandler.h // $Id$ +#include #include #include #include diff --git a/SAX/helpers/FeatureNames.h b/SAX/helpers/FeatureNames.h index 13f5b974..1642efc4 100644 --- a/SAX/helpers/FeatureNames.h +++ b/SAX/helpers/FeatureNames.h @@ -4,6 +4,7 @@ * $Id$ */ +#include #include namespace SAX diff --git a/SAX/helpers/InputSourceResolver.h b/SAX/helpers/InputSourceResolver.h index db94c1ae..c74da58f 100644 --- a/SAX/helpers/InputSourceResolver.h +++ b/SAX/helpers/InputSourceResolver.h @@ -1,6 +1,7 @@ #ifndef InputSourceResolverH #define InputSourceResolverH +#include #include #include #include diff --git a/SAX/helpers/LocatorImpl.h b/SAX/helpers/LocatorImpl.h index e99c7ea0..daeac2cf 100644 --- a/SAX/helpers/LocatorImpl.h +++ b/SAX/helpers/LocatorImpl.h @@ -4,6 +4,7 @@ // LocatorImpl.h // $Id$ +#include #include #include diff --git a/SAX/helpers/NamespaceSupport.h b/SAX/helpers/NamespaceSupport.h index 7db4caf2..4deb9cb7 100644 --- a/SAX/helpers/NamespaceSupport.h +++ b/SAX/helpers/NamespaceSupport.h @@ -5,6 +5,7 @@ * $Id$ */ +#include #include #include #include diff --git a/SAX/helpers/ParserAdaptor.h b/SAX/helpers/ParserAdaptor.h index ea5c9241..4cfabc46 100644 --- a/SAX/helpers/ParserAdaptor.h +++ b/SAX/helpers/ParserAdaptor.h @@ -5,15 +5,16 @@ // Adapts a SAX1 Parser to a SAX2 XMLReader. // $Id$ -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include namespace SAX diff --git a/SAX/helpers/PropertyNames.h b/SAX/helpers/PropertyNames.h index 775c9dc2..734a40db 100644 --- a/SAX/helpers/PropertyNames.h +++ b/SAX/helpers/PropertyNames.h @@ -4,6 +4,8 @@ * $Id$ */ +#include +#include #include namespace SAX diff --git a/SAX/helpers/StringAdaptor.h b/SAX/helpers/StringAdaptor.h index 50134e17..a4bd9369 100644 --- a/SAX/helpers/StringAdaptor.h +++ b/SAX/helpers/StringAdaptor.h @@ -4,6 +4,8 @@ * $Id$ */ +#include +#include #include #include #include diff --git a/SAX/helpers/XMLFilterImpl.h b/SAX/helpers/XMLFilterImpl.h index 3e61bf1c..f0f4f1be 100644 --- a/SAX/helpers/XMLFilterImpl.h +++ b/SAX/helpers/XMLFilterImpl.h @@ -4,6 +4,7 @@ // XMLFilter.h // $Id$ +#include #include #include #include diff --git a/SAX/parsers/saxgarden.h b/SAX/parsers/saxgarden.h index 18086546..9281ccad 100644 --- a/SAX/parsers/saxgarden.h +++ b/SAX/parsers/saxgarden.h @@ -1,6 +1,7 @@ #ifndef saxgarden_h #define saxgarden_h +#include #include #include #include diff --git a/SAX/saxfwd.h b/SAX/saxfwd.h index 4c852e3c..333eac00 100644 --- a/SAX/saxfwd.h +++ b/SAX/saxfwd.h @@ -59,6 +59,8 @@ */ +#include +#include /** * @@ -76,8 +78,7 @@ template class basic_InputSource; template class basic_Locator; template class basic_Parser; template class basic_SAXParseException; - -class ErrorHandler; +template class basic_ErrorHandler; typedef basic_AttributeList AttributeList; typedef basic_DocumentHandler DocumentHandler; @@ -87,6 +88,7 @@ typedef basic_InputSource InputSource; typedef basic_Locator Locator; typedef basic_Parser Parser; typedef basic_SAXParseException SAXParseException; +typedef basic_ErrorHandler ErrorHandler; #ifndef ARABICA_NO_WCHAR_T typedef basic_AttributeList wAttributeList; @@ -97,6 +99,7 @@ typedef basic_InputSource wInputSource; typedef basic_Locator wLocator; typedef basic_Parser wParser; typedef basic_SAXParseException wSAXParseException; +typedef basic_ErrorHandler wErrorHandler; #endif }; // namespace SAX diff --git a/SAX/wrappers/XercesFeatureNames.h b/SAX/wrappers/XercesFeatureNames.h index 309c0815..9cb51e25 100644 --- a/SAX/wrappers/XercesFeatureNames.h +++ b/SAX/wrappers/XercesFeatureNames.h @@ -4,6 +4,7 @@ * $Id$ */ +#include #include namespace SAX diff --git a/SAX/wrappers/saxexpat.h b/SAX/wrappers/saxexpat.h index e0d5df34..524f1166 100644 --- a/SAX/wrappers/saxexpat.h +++ b/SAX/wrappers/saxexpat.h @@ -4,6 +4,7 @@ // A SAX2 wrapper class for expat. //--------------------------------------------------------------------------- +#include #include #include diff --git a/SAX/wrappers/saxlibxml2.h b/SAX/wrappers/saxlibxml2.h index 6752aaeb..1cc34555 100644 --- a/SAX/wrappers/saxlibxml2.h +++ b/SAX/wrappers/saxlibxml2.h @@ -6,6 +6,7 @@ // $Id$ //////////////////////////////////////////////////////////////// +#include #include #include #include diff --git a/SAX/wrappers/saxmsxml2.h b/SAX/wrappers/saxmsxml2.h index dd09cbac..b4c025d7 100644 --- a/SAX/wrappers/saxmsxml2.h +++ b/SAX/wrappers/saxmsxml2.h @@ -31,6 +31,7 @@ // //--------------------------------------------------------------------------- +#include #include #include #include diff --git a/SAX/wrappers/saxxerces.h b/SAX/wrappers/saxxerces.h index 4aa8c73f..24a23f66 100644 --- a/SAX/wrappers/saxxerces.h +++ b/SAX/wrappers/saxxerces.h @@ -6,6 +6,7 @@ // $Id$ //--------------------------------------------------------------------------- +#include #include #include #include diff --git a/examples/SAX/Makefile b/examples/SAX/Makefile index 9f506d5c..601a9b6a 100644 --- a/examples/SAX/Makefile +++ b/examples/SAX/Makefile @@ -53,7 +53,7 @@ INCS_DIRS = -I../.. LIBS_DIRS = -L../../bin STATIC_LIBS = -DYNAMIC_LIBS = -lArabica -lexpat +DYNAMIC_LIBS = -lArabica -lexpat CXXFLAGS += ${INCS_DIRS} LDFLAGS += ${LIBS_DIRS} diff --git a/examples/SAX2DOM/Makefile b/examples/SAX2DOM/Makefile index 46788b8e..cda6765b 100644 --- a/examples/SAX2DOM/Makefile +++ b/examples/SAX2DOM/Makefile @@ -40,7 +40,7 @@ CCDEPFLAGS = -E -M # Uncomment for optimisations CXXFLAGS += -O2 -LDFLAGS += -O2 -L../../bin +LDFLAGS += -O2 # Uncomment for debug version CXXFLAGS += -g @@ -50,12 +50,13 @@ CXXFLAGS += -g INCS_DIRS = -I../.. #INCS_DIRS = -I.. -LIBS_DIRS = +LIBS_DIRS = -L../../bin STATIC_LIBS = -DYNAMIC_LIBS = -L../../bin -lArabica -lexpat +DYNAMIC_LIBS = -lArabica -lexpat CXXFLAGS += ${INCS_DIRS} +LDFLAGS += ${LIBS_DIRS} LDFLAGS += ${DYNAMIC_LIBS} #///////////////////////////////////////////////////////////////////////// @@ -121,7 +122,7 @@ depend : .depend # Cleaning up 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 #///////////////////////////////////////////////////////////////////////// diff --git a/examples/Utils/Makefile b/examples/Utils/Makefile index 2ca3076e..08fd0acf 100644 --- a/examples/Utils/Makefile +++ b/examples/Utils/Makefile @@ -43,7 +43,7 @@ CXXFLAGS += -O2 LDFLAGS += -O2 # Uncomment for debug version -# CXXFLAGS += -g -D__DEBUG__ +# CXXFLAGS += -g # Includes and library directories @@ -53,7 +53,7 @@ INCS_DIRS = -I../.. LIBS_DIRS = -L../../bin STATIC_LIBS = -DYNAMIC_LIBS = -lArabica -lexpat +DYNAMIC_LIBS = -lArabica CXXFLAGS += ${INCS_DIRS} LDFLAGS += ${LIBS_DIRS}