*** empty log message ***

This commit is contained in:
jez_higgins 2003-09-14 20:47:43 +00:00
parent 0de640587e
commit 193f570096
2 changed files with 41 additions and 10 deletions

View file

@ -41,7 +41,8 @@ RSC=rc.exe
# PROP Intermediate_Dir "Release"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c
# ADD CPP /nologo /W3 /GR /GX /O2 /I "..\\" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c
# ADD CPP /nologo /W3 /GR /GX /O2 /I "..\\" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /FD /c
# SUBTRACT CPP /YX
# ADD BASE RSC /l 0x809 /d "NDEBUG"
# ADD RSC /l 0x809 /d "NDEBUG"
BSC32=bscmake.exe
@ -64,7 +65,8 @@ 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 "..\\" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /FR /YX /FD /GZ /c
# ADD CPP /nologo /W3 /Gm /GR /GX /ZI /Od /I "..\\" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /FR /FD /GZ /c
# SUBTRACT CPP /YX
# ADD BASE RSC /l 0x809 /d "_DEBUG"
# ADD RSC /l 0x809 /d "_DEBUG"
BSC32=bscmake.exe
@ -464,8 +466,8 @@ SOURCE=.\ParserConfig.S
InputPath=.\ParserConfig.S
BuildCmds= \
cl /TC /D USE_MSXML /EP ParserConfig.S > ParserConfig.h \
cl /TC /D USE_MSXML /EP saxlib.S > saxlib.cpp \
cl /TC /D USE_XERCES /EP ParserConfig.S > ParserConfig.h \
cl /TC /D USE_XERCES /EP saxlib.S > saxlib.cpp \
"ParserConfig.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"

View file

@ -202,9 +202,10 @@ class xerces_wrapper : public SAX::basic_ProgressiveParser<string_type>
typedef std::vector<wchar_t> wVector;
#ifndef ARABICA_NO_WCHAR_T
string_type makeStringT(const XMLCh* str) const
{
if (str)
if(str)
{
wVector buffer;
std::insert_iterator<wVector> inserter(buffer, buffer.begin());
@ -243,12 +244,40 @@ class xerces_wrapper : public SAX::basic_ProgressiveParser<string_type>
return base::makeStringT("");
}
} // makeStringT
#else
// alternative version for the wchar_t impaired
string_type makeStringT(const XMLCh* str) const
{
if(str)
{
char* cstr = XERCES_CPP_NAMESPACE::XMLString::transcode(str);
string_type st(base::makeStringT(cstr));
XERCES_CPP_NAMESPACE::XMLString::release(&cstr);
return st;
}
return base::makeStringT("");
} // makeStringT
string_type makeStringT(const XMLCh* str, int length) const
{
// this isn't pretty, but Xerces doesn't provide a transcode with takes
// a length
if(str && length)
{
std::vector<XMLCh> wv(length + 1);
std::copy(str, str+length, std::insert_iterator<std::vector<XMLCh> >(wv, wv.begin()));
wv.push_back(0);
return makeStringT(&wv[0]);
}
return base::makeStringT("");
} // makeStringT
#endif
XMLCh* asXMLChString(const string_type& s) const
{
std::string str = base::asStdString(s);
return XERCES_CPP_NAMESPACE::XMLString::transcode(str.c_str());
} // asXMLChString
{
std::string str = base::asStdString(s);
return XERCES_CPP_NAMESPACE::XMLString::transcode(str.c_str());
} // asXMLChString
}; // class xerces_string_adaptor
///////////////////////////////