dbertoni 01/09/26 07:10:32
Modified: c/src/PlatformSupport StringTokenizer.cpp
StringTokenizer.hpp XalanFileOutputStream.cpp
XalanFileOutputStream.hpp XalanNullOutputStream.cpp
XalanNullOutputStream.hpp XalanOutputStream.hpp
XalanStdOutputStream.cpp XalanStdOutputStream.hpp
Log:
32/64-bit fixes.
Revision Changes Path
1.7 +1 -1 xml-xalan/c/src/PlatformSupport/StringTokenizer.cpp
Index: StringTokenizer.cpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/PlatformSupport/StringTokenizer.cpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- StringTokenizer.cpp 2001/09/25 21:12:51 1.6
+++ StringTokenizer.cpp 2001/09/26 14:10:31 1.7
@@ -250,7 +250,7 @@
-size_t
+StringTokenizer::size_type
StringTokenizer::countTokens() const
{
size_t theCount = 0;
1.10 +6 -5 xml-xalan/c/src/PlatformSupport/StringTokenizer.hpp
Index: StringTokenizer.hpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/PlatformSupport/StringTokenizer.hpp,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- StringTokenizer.hpp 2001/09/25 21:12:51 1.9
+++ StringTokenizer.hpp 2001/09/26 14:10:31 1.10
@@ -78,6 +78,8 @@
static const XalanDOMChar s_defaultTokens[];
+ typedef size_t size_type;
+
/**
* Constructs a tokenizer for the target string
*
@@ -130,7 +132,6 @@
const XalanDOMString& theTokens,
bool
fReturnTokens = false);
- virtual
~StringTokenizer();
/**
@@ -138,7 +139,7 @@
*
* @return true if there are more tokens
*/
- virtual bool
+ bool
hasMoreTokens() const;
/**
@@ -147,7 +148,7 @@
*
* @return next token string
*/
- virtual XalanDOMString
+ XalanDOMString
nextToken();
/**
@@ -156,7 +157,7 @@
*
* @param theToken next token string
*/
- virtual void
+ void
nextToken(XalanDOMString& theToken);
/**
@@ -164,7 +165,7 @@
*
* @return number of remaining tokens
*/
- virtual size_t
+ size_type
countTokens() const;
protected:
1.5 +4 -2 xml-xalan/c/src/PlatformSupport/XalanFileOutputStream.cpp
Index: XalanFileOutputStream.cpp
===================================================================
RCS file:
/home/cvs/xml-xalan/c/src/PlatformSupport/XalanFileOutputStream.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- XalanFileOutputStream.cpp 2001/06/06 21:58:22 1.4
+++ XalanFileOutputStream.cpp 2001/09/26 14:10:31 1.5
@@ -152,12 +152,14 @@
void
XalanFileOutputStream::writeData(
const char* theBuffer,
- unsigned long theBufferLength)
+ size_type theBufferLength)
{
#if defined(WIN32)
DWORD theBytesWritten;
- if (WriteFile(m_handle, theBuffer, theBufferLength, &theBytesWritten,
0) == false ||
+ assert(size_t(DWORD(theBufferLength)) == theBufferLength);
+
+ if (WriteFile(m_handle, theBuffer, DWORD(theBufferLength),
&theBytesWritten, 0) == false ||
theBytesWritten != theBufferLength)
{
throw XalanFileOutputStreamWriteException(
1.4 +1 -1 xml-xalan/c/src/PlatformSupport/XalanFileOutputStream.hpp
Index: XalanFileOutputStream.hpp
===================================================================
RCS file:
/home/cvs/xml-xalan/c/src/PlatformSupport/XalanFileOutputStream.hpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- XalanFileOutputStream.hpp 2001/07/27 05:28:34 1.3
+++ XalanFileOutputStream.hpp 2001/09/26 14:10:31 1.4
@@ -142,7 +142,7 @@
virtual void
writeData(
const char* theBuffer,
- unsigned long theBufferLength);
+ size_type theBufferLength);
virtual void
doFlush();
1.3 +1 -1 xml-xalan/c/src/PlatformSupport/XalanNullOutputStream.cpp
Index: XalanNullOutputStream.cpp
===================================================================
RCS file:
/home/cvs/xml-xalan/c/src/PlatformSupport/XalanNullOutputStream.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- XalanNullOutputStream.cpp 2001/06/15 20:13:42 1.2
+++ XalanNullOutputStream.cpp 2001/09/26 14:10:31 1.3
@@ -75,7 +75,7 @@
void
XalanNullOutputStream::writeData(
const char* /* theBuffer */,
- unsigned long /* theBufferLength */)
+ size_type /* theBufferLength */)
{
}
1.3 +1 -1 xml-xalan/c/src/PlatformSupport/XalanNullOutputStream.hpp
Index: XalanNullOutputStream.hpp
===================================================================
RCS file:
/home/cvs/xml-xalan/c/src/PlatformSupport/XalanNullOutputStream.hpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- XalanNullOutputStream.hpp 2001/06/15 20:13:43 1.2
+++ XalanNullOutputStream.hpp 2001/09/26 14:10:31 1.3
@@ -85,7 +85,7 @@
virtual void
writeData(
const char* theBuffer,
- unsigned long theBufferLength);
+ size_type theBufferLength);
virtual void
doFlush();
1.8 +8 -5 xml-xalan/c/src/PlatformSupport/XalanOutputStream.hpp
Index: XalanOutputStream.hpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/PlatformSupport/XalanOutputStream.hpp,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- XalanOutputStream.hpp 2001/09/25 21:12:51 1.7
+++ XalanOutputStream.hpp 2001/09/26 14:10:31 1.8
@@ -97,6 +97,8 @@
typedef std::vector<char> TranscodeVectorType;
#endif
+ typedef BufferType::size_type size_type;
+
/**
* Constructor.
*
@@ -191,7 +193,7 @@
void
write(
const char* theBuffer,
- size_t theBufferLength)
+ size_type theBufferLength)
{
assert(theBuffer != 0);
@@ -211,7 +213,7 @@
void
write(
const XalanDOMChar* theBuffer,
- size_t
theBufferLength);
+ size_type
theBufferLength);
/**
* Get the output encoding for the stream.
@@ -357,12 +359,13 @@
void
transcode(
const XalanDOMChar* theBuffer,
- size_t theBufferLength,
+ size_type theBufferLength,
TranscodeVectorType& theDestination);
virtual void
- writeData(const char* theBuffer,
- size_t theBufferLength) = 0;
+ writeData(
+ const char* theBuffer,
+ size_type theBufferLength) = 0;
virtual void
doFlush() = 0;
1.5 +4 -2 xml-xalan/c/src/PlatformSupport/XalanStdOutputStream.cpp
Index: XalanStdOutputStream.cpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/PlatformSupport/XalanStdOutputStream.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- XalanStdOutputStream.cpp 2001/07/18 04:17:11 1.4
+++ XalanStdOutputStream.cpp 2001/09/26 14:10:31 1.5
@@ -116,9 +116,11 @@
void
XalanStdOutputStream::writeData(
const char* theBuffer,
- unsigned long theBufferLength)
+ size_type theBufferLength)
{
- m_outputStream.write(theBuffer, theBufferLength);
+ assert(StreamSizeType(theBufferLength) == theBufferLength);
+
+ m_outputStream.write(theBuffer, StreamSizeType(theBufferLength));
if(!m_outputStream)
{
1.3 +13 -13 xml-xalan/c/src/PlatformSupport/XalanStdOutputStream.hpp
Index: XalanStdOutputStream.hpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/PlatformSupport/XalanStdOutputStream.hpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- XalanStdOutputStream.hpp 2000/11/30 15:01:31 1.2
+++ XalanStdOutputStream.hpp 2001/09/26 14:10:31 1.3
@@ -87,18 +87,21 @@
{
public:
+#if defined (XALAN_NO_NAMESPACES)
+ typedef ostream StreamType;
+ typedef int StreamSizeType;
+#else
+ typedef std::ostream StreamType;
+ typedef std::streamsize StreamSizeType;
+#endif
+
/**
* Construct a XalanStdOutputStream instance for output to the
* standard output device.
*
* @param theOutputStream output stream to use
*/
- XalanStdOutputStream(
-#if defined (XALAN_NO_NAMESPACES)
- ostream& theOutputStream);
-#else
- std::ostream& theOutputStream);
-#endif
+ XalanStdOutputStream(StreamType& theOutputStream);
virtual
~XalanStdOutputStream();
@@ -118,8 +121,9 @@
protected:
virtual void
- writeData(const char* theBuffer,
- unsigned long theBufferLength);
+ writeData(
+ const char* theBuffer,
+ size_type theBufferLength);
virtual void
doFlush();
@@ -133,11 +137,7 @@
operator=(const XalanStdOutputStream&);
// Data members...
-#if defined (XALAN_NO_NAMESPACES)
- ostream& m_outputStream;
-#else
- std::ostream& m_outputStream;
-#endif
+ StreamType& m_outputStream;
};
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]