You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xalan.apache.org by db...@apache.org on 2004/02/06 10:25:57 UTC
cvs commit: xml-xalan/c/src/xalanc/PlatformSupport XalanToXercesTranscoderWrapper.cpp XalanToXercesTranscoderWrapper.hpp XalanUTF16Transcoder.cpp XalanUTF16Transcoder.hpp
dbertoni 2004/02/06 01:25:57
Modified: c/src/xalanc/PlatformSupport
XalanToXercesTranscoderWrapper.cpp
XalanToXercesTranscoderWrapper.hpp
XalanUTF16Transcoder.cpp XalanUTF16Transcoder.hpp
Log:
Fixed compilation problems on 64-bit platforms.
Revision Changes Path
1.4 +16 -31 xml-xalan/c/src/xalanc/PlatformSupport/XalanToXercesTranscoderWrapper.cpp
Index: XalanToXercesTranscoderWrapper.cpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/xalanc/PlatformSupport/XalanToXercesTranscoderWrapper.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- XalanToXercesTranscoderWrapper.cpp 6 Jan 2004 02:41:28 -0000 1.3
+++ XalanToXercesTranscoderWrapper.cpp 6 Feb 2004 09:25:57 -0000 1.4
@@ -93,34 +93,27 @@
XalanToXercesTranscoderWrapper::eCode
XalanToXercesTranscoderWrapper::transcode(
const XalanDOMChar* theSourceData,
- size_t theSourceCount,
+ size_type theSourceCount,
XalanXMLByte* theTarget,
- size_t theTargetSize,
- size_t& theSourceCharsTranscoded,
- size_t& theTargetBytesUsed)
+ size_type theTargetSize,
+ size_type& theSourceCharsTranscoded,
+ size_type& theTargetBytesUsed)
{
eCode theCode = XalanTranscodingServices::OK;
try
{
- XercesSizeType theXercesSourceCharsTranscoded = 0;
-
- assert(XercesSizeType(theSourceCount) == theSourceCount);
- assert(XercesSizeType(theTargetSize) == theTargetSize);
-
theTargetBytesUsed = m_transcoder->transcodeTo(
theSourceData,
- XercesSizeType(theSourceCount),
+ theSourceCount,
theTarget,
- XercesSizeType(theTargetSize),
- theXercesSourceCharsTranscoded,
+ theTargetSize,
+ theSourceCharsTranscoded,
// $$$ ToDo: Eventually, we're going to want to
// replace this with UnRep_Throw, and let the
// caller try to recover.
// XMLTranscoderType::UnRep_Throw);
XMLTranscoderType::UnRep_RepChar);
-
- theSourceCharsTranscoded = theXercesSourceCharsTranscoded;
}
catch(const XMLExceptionType&)
{
@@ -137,33 +130,25 @@
XalanToXercesTranscoderWrapper::eCode
XalanToXercesTranscoderWrapper::transcode(
const XalanXMLByte* theSourceData,
- size_t theSourceCount,
+ size_type theSourceCount,
XalanDOMChar* theTarget,
- size_t theTargetSize,
- size_t& theSourceCharsTranscoded,
- size_t& theTargetBytesUsed,
+ size_type theTargetSize,
+ size_type& theSourceCharsTranscoded,
+ size_type& theTargetBytesUsed,
unsigned char* theCharSizes)
{
eCode theCode = XalanTranscodingServices::OK;
try
{
- XercesSizeType theXercesSourceCharsTranscoded = 0;
-
- assert(XercesSizeType(theSourceCount) == theSourceCount);
- assert(XercesSizeType(theTargetSize) == theTargetSize);
-
- const XercesSizeType theXercesTargetBytesUsed =
+ theTargetBytesUsed =
m_transcoder->transcodeFrom(
theSourceData,
- XercesSizeType(theSourceCount),
+ theSourceCount,
theTarget,
- XercesSizeType(theTargetSize),
- theXercesSourceCharsTranscoded,
+ theTargetSize,
+ theSourceCharsTranscoded,
theCharSizes);
-
- theSourceCharsTranscoded = theXercesSourceCharsTranscoded;
- theTargetBytesUsed = theXercesTargetBytesUsed;
}
catch(const XMLExceptionType&)
{
@@ -178,7 +163,7 @@
bool
-XalanToXercesTranscoderWrapper::canTranscodeTo(unsigned int theChar) const
+XalanToXercesTranscoderWrapper::canTranscodeTo(UnicodeCharType theChar) const
{
return m_transcoder->canTranscodeTo(theChar);
}
1.4 +9 -11 xml-xalan/c/src/xalanc/PlatformSupport/XalanToXercesTranscoderWrapper.hpp
Index: XalanToXercesTranscoderWrapper.hpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/xalanc/PlatformSupport/XalanToXercesTranscoderWrapper.hpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- XalanToXercesTranscoderWrapper.hpp 6 Jan 2004 02:41:28 -0000 1.3
+++ XalanToXercesTranscoderWrapper.hpp 6 Feb 2004 09:25:57 -0000 1.4
@@ -92,24 +92,24 @@
virtual eCode
transcode(
const XalanDOMChar* theSourceData,
- size_t theSourceCount,
+ size_type theSourceCount,
XalanXMLByte* theTarget,
- size_t theTargetSize,
- size_t& theSourceCharsTranscoded,
- size_t& theTargetBytesUsed);
+ size_type theTargetSize,
+ size_type& theSourceCharsTranscoded,
+ size_type& theTargetBytesUsed);
virtual eCode
transcode(
const XalanXMLByte* theSourceData,
- size_t theSourceCount,
+ size_type theSourceCount,
XalanDOMChar* theTarget,
- size_t theTargetSize,
- size_t& theSourceCharsTranscoded,
- size_t& theTargetBytesUsed,
+ size_type theTargetSize,
+ size_type& theSourceCharsTranscoded,
+ size_type& theTargetBytesUsed,
unsigned char* theCharSizes);
virtual bool
- canTranscodeTo(unsigned int theChar) const;
+ canTranscodeTo(UnicodeCharType theChar) const;
private:
@@ -119,8 +119,6 @@
XalanToXercesTranscoderWrapper&
operator=(const XalanToXercesTranscoderWrapper&);
- // A handy typedef...
- typedef unsigned int XercesSizeType;
// Data members...
XMLTranscoderType* const m_transcoder;
1.4 +13 -13 xml-xalan/c/src/xalanc/PlatformSupport/XalanUTF16Transcoder.cpp
Index: XalanUTF16Transcoder.cpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/xalanc/PlatformSupport/XalanUTF16Transcoder.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- XalanUTF16Transcoder.cpp 6 Jan 2004 02:41:28 -0000 1.3
+++ XalanUTF16Transcoder.cpp 6 Feb 2004 09:25:57 -0000 1.4
@@ -82,14 +82,14 @@
XalanUTF16Transcoder::eCode
XalanUTF16Transcoder::transcode(
const XalanDOMChar* theSourceData,
- size_t theSourceCount,
+ size_type theSourceCount,
XalanXMLByte* theTarget,
- size_t theTargetSize,
- size_t& theSourceCharsTranscoded,
- size_t& theTargetBytesUsed)
+ size_type theTargetSize,
+ size_type& theSourceCharsTranscoded,
+ size_type& theTargetBytesUsed)
{
- unsigned int theSourceEaten = 0;
- unsigned int theTargetPosition = 0;
+ size_type theSourceEaten = 0;
+ size_type theTargetPosition = 0;
while(theSourceEaten < theSourceCount)
{
@@ -122,15 +122,15 @@
XalanUTF16Transcoder::eCode
XalanUTF16Transcoder::transcode(
const XalanXMLByte* theSourceData,
- size_t theSourceCount,
+ size_type theSourceCount,
XalanDOMChar* theTarget,
- size_t theTargetSize,
- size_t& theSourceCharsTranscoded,
- size_t& theTargetBytesUsed,
+ size_type theTargetSize,
+ size_type& theSourceCharsTranscoded,
+ size_type& theTargetBytesUsed,
unsigned char* theCharSizes)
{
- unsigned int theSourceEaten = 0;
- unsigned int theTargetPosition = 0;
+ size_type theSourceEaten = 0;
+ size_type theTargetPosition = 0;
while(theSourceEaten + 1 < theSourceCount)
{
@@ -161,7 +161,7 @@
bool
-XalanUTF16Transcoder::canTranscodeTo(unsigned int /* theChar */) const
+XalanUTF16Transcoder::canTranscodeTo(UnicodeCharType /* theChar */) const
{
return true;
}
1.4 +9 -9 xml-xalan/c/src/xalanc/PlatformSupport/XalanUTF16Transcoder.hpp
Index: XalanUTF16Transcoder.hpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/xalanc/PlatformSupport/XalanUTF16Transcoder.hpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- XalanUTF16Transcoder.hpp 6 Jan 2004 02:41:28 -0000 1.3
+++ XalanUTF16Transcoder.hpp 6 Feb 2004 09:25:57 -0000 1.4
@@ -98,11 +98,11 @@
virtual eCode
transcode(
const XalanDOMChar* theSourceData,
- size_t theSourceCount,
+ size_type theSourceCount,
XalanXMLByte* theTarget,
- size_t theTargetSize,
- size_t& theSourceCharsTranscoded,
- size_t& theTargetBytesUsed);
+ size_type theTargetSize,
+ size_type& theSourceCharsTranscoded,
+ size_type& theTargetBytesUsed);
/**
* Transcode data from UTF-16 to UTF-16.
@@ -119,15 +119,15 @@
virtual eCode
transcode(
const XalanXMLByte* theSourceData,
- size_t theSourceCount,
+ size_type theSourceCount,
XalanDOMChar* theTarget,
- size_t theTargetSize,
- size_t& theSourceCharsTranscoded,
- size_t& theTargetBytesUsed,
+ size_type theTargetSize,
+ size_type& theSourceCharsTranscoded,
+ size_type& theTargetBytesUsed,
unsigned char* theCharSizes);
virtual bool
- canTranscodeTo(unsigned int theChar) const;
+ canTranscodeTo(UnicodeCharType theChar) const;
private:
---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-cvs-help@xml.apache.org