Replace XALAN_[U]INT64 and overloaded functions with Xerces numeric types
diff --git a/src/xalanc/ICUBridge/ICUXalanNumberFormatProxy.cpp b/src/xalanc/ICUBridge/ICUXalanNumberFormatProxy.cpp
index 0e3617a..0ba4b51 100644
--- a/src/xalanc/ICUBridge/ICUXalanNumberFormatProxy.cpp
+++ b/src/xalanc/ICUBridge/ICUXalanNumberFormatProxy.cpp
@@ -126,7 +126,7 @@
XalanDOMString&
ICUXalanNumberFormatProxy::format(
- XALAN_UINT64 theValue,
+ XMLUInt64 theValue,
XalanDOMString& theResult)
{
@@ -138,7 +138,7 @@
XalanDOMString&
ICUXalanNumberFormatProxy::format(
- XALAN_INT64 theValue,
+ XMLInt64 theValue,
XalanDOMString& theResult)
{
diff --git a/src/xalanc/ICUBridge/ICUXalanNumberFormatProxy.hpp b/src/xalanc/ICUBridge/ICUXalanNumberFormatProxy.hpp
index df11d92..2ffa57a 100644
--- a/src/xalanc/ICUBridge/ICUXalanNumberFormatProxy.hpp
+++ b/src/xalanc/ICUBridge/ICUXalanNumberFormatProxy.hpp
@@ -86,7 +86,7 @@
*/
virtual XalanDOMString&
format(
- XALAN_INT64 theValue,
+ XMLInt64 theValue,
XalanDOMString& theResult);
/**
@@ -97,7 +97,7 @@
*/
virtual XalanDOMString&
format(
- XALAN_UINT64 theValue,
+ XMLUInt64 theValue,
XalanDOMString& theResult);
virtual bool
diff --git a/src/xalanc/Include/PlatformDefinitions.hpp b/src/xalanc/Include/PlatformDefinitions.hpp
index 6da4988..3dc693a 100644
--- a/src/xalanc/Include/PlatformDefinitions.hpp
+++ b/src/xalanc/Include/PlatformDefinitions.hpp
@@ -91,11 +91,6 @@
}
-#if !defined(XALAN_NO_LONG_LONG)
-typedef unsigned long long XALAN_UINT64;
-typedef long long XALAN_INT64;
-#endif
-
#define XALAN_STATIC_ASSERT(expr) xalanc::XalanCompileErrorBoolean<bool(expr)>()
diff --git a/src/xalanc/Include/VCPPDefinitions.hpp b/src/xalanc/Include/VCPPDefinitions.hpp
index 9da4fad..98f4de1 100644
--- a/src/xalanc/Include/VCPPDefinitions.hpp
+++ b/src/xalanc/Include/VCPPDefinitions.hpp
@@ -55,12 +55,6 @@
#define XALAN_NEWLINE_IS_CRLF
#define XALAN_NO_REENTRANT_TIME_FUNCTIONS
-// long long is not supported on all MS compilers.
-#define XALAN_NO_LONG_LONG
-
-typedef UINT64 XALAN_UINT64;
-typedef INT64 XALAN_INT64;
-
#define XALAN_WINDOWS
#define XALAN_WINDOWS_DIR_FUNCTIONS
#define WINDOWS_THREAD_FUNCTIONS
diff --git a/src/xalanc/PlatformSupport/DOMStringHelper.cpp b/src/xalanc/PlatformSupport/DOMStringHelper.cpp
index 3d978a1..111bcbd 100644
--- a/src/xalanc/PlatformSupport/DOMStringHelper.cpp
+++ b/src/xalanc/PlatformSupport/DOMStringHelper.cpp
@@ -328,7 +328,7 @@
if (theString.empty() == false)
{
assert(
- static_cast<XALAN_UINT64>(static_cast<std::streamsize>(theString.size())) == theString.size());
+ static_cast<XMLUInt64>(static_cast<std::streamsize>(theString.size())) == theString.size());
theStream.write(
&*theString.begin(),
@@ -1433,9 +1433,9 @@
theZeroString,
sizeof(theZeroString) / sizeof(theZeroString[0]) - 1);
}
- else if (static_cast<XALAN_INT64>(theValue) == theValue)
+ else if (static_cast<XMLInt64>(theValue) == theValue)
{
- NumberToCharacters(static_cast<XALAN_INT64>(theValue), formatterListener, function);
+ NumberToCharacters(static_cast<XMLInt64>(theValue), formatterListener, function);
}
else
{
@@ -1649,7 +1649,7 @@
void
DOMStringHelper::NumberToCharacters(
- long theValue,
+ XMLInt32 theValue,
FormatterListener& formatterListener,
MemberFunctionPtr function)
{
@@ -1667,7 +1667,7 @@
void
DOMStringHelper::NumberToCharacters(
- XALAN_INT64 theValue,
+ XMLInt64 theValue,
FormatterListener& formatterListener,
MemberFunctionPtr function)
{
@@ -1685,7 +1685,7 @@
XALAN_PLATFORMSUPPORT_EXPORT_FUNCTION(XalanDOMString&)
NumberToDOMString(
- XALAN_INT64 theValue,
+ XMLInt64 theValue,
XalanDOMString& theResult)
{
return ScalarToDecimalString(theValue, theResult);
@@ -1695,7 +1695,7 @@
XALAN_PLATFORMSUPPORT_EXPORT_FUNCTION(XalanDOMString&)
NumberToDOMString(
- XALAN_UINT64 theValue,
+ XMLUInt64 theValue,
XalanDOMString& theResult)
{
return ScalarToDecimalString(theValue, theResult);
@@ -1733,9 +1733,9 @@
theZeroString,
sizeof(theZeroString) / sizeof(theZeroString[0]) - 1);
}
- else if (static_cast<XALAN_INT64>(theValue) == theValue)
+ else if (static_cast<XMLInt64>(theValue) == theValue)
{
- NumberToDOMString(static_cast<XALAN_INT64>(theValue), theResult);
+ NumberToDOMString(static_cast<XMLInt64>(theValue), theResult);
}
else
{
@@ -1819,7 +1819,7 @@
XALAN_PLATFORMSUPPORT_EXPORT_FUNCTION(XalanDOMString&)
NumberToHexDOMString(
- XALAN_UINT64 theValue,
+ XMLUInt64 theValue,
XalanDOMString& theResult)
{
return UnsignedScalarToHexadecimalString(theValue, theResult);
@@ -1829,7 +1829,7 @@
XALAN_PLATFORMSUPPORT_EXPORT_FUNCTION(XalanDOMString&)
NumberToHexDOMString(
- XALAN_INT64 theValue,
+ XMLInt64 theValue,
XalanDOMString& theResult)
{
return UnsignedScalarToHexadecimalString(theValue, theResult);
diff --git a/src/xalanc/PlatformSupport/DOMStringHelper.hpp b/src/xalanc/PlatformSupport/DOMStringHelper.hpp
index d92cb24..c52b431 100644
--- a/src/xalanc/PlatformSupport/DOMStringHelper.hpp
+++ b/src/xalanc/PlatformSupport/DOMStringHelper.hpp
@@ -690,13 +690,13 @@
static void
NumberToCharacters(
- long theValue,
+ XMLInt32 theValue,
FormatterListener& formatterListener,
MemberFunctionPtr function);
static void
NumberToCharacters(
- XALAN_INT64 theValue,
+ XMLInt64 theValue,
FormatterListener& formatterListener,
MemberFunctionPtr function);
};
@@ -718,7 +718,7 @@
/**
- * Converts an 64-bit unsigned value into a XalanDOMString
+ * Converts an 64-bit unsigned int value into a XalanDOMString
*
* @param theValue number to be converted
* @param theResult the string to append with the result
@@ -726,13 +726,13 @@
*/
XALAN_PLATFORMSUPPORT_EXPORT_FUNCTION(XalanDOMString&)
NumberToDOMString(
- XALAN_UINT64 theValue,
+ XMLUInt64 theValue,
XalanDOMString& theResult);
/**
- * Converts an 64-bit signed value into a XalanDOMString
+ * Converts an 64-bit signed int value into a XalanDOMString
*
* @param theValue number to be converted
* @param theResult the string to append with the result
@@ -740,13 +740,13 @@
*/
XALAN_PLATFORMSUPPORT_EXPORT_FUNCTION(XalanDOMString&)
NumberToDOMString(
- XALAN_INT64 theValue,
+ XMLInt64 theValue,
XalanDOMString& theResult);
/**
- * Converts an unsigned long value into a XalanDOMString
+ * Converts a 32-bit unsigned int value into a XalanDOMString
*
* @param theValue number to be converted
* @param theResult the string to append with the result
@@ -754,18 +754,18 @@
*/
inline XalanDOMString&
NumberToDOMString(
- unsigned long theValue,
+ XMLUInt32 theValue,
XalanDOMString& theResult)
{
return NumberToDOMString(
- static_cast<XALAN_UINT64>(theValue),
+ static_cast<XMLUInt64>(theValue),
theResult);
}
/**
- * Converts a XalanSSize_t value into a XalanDOMString
+ * Converts a 32-bit int value into a XalanDOMString
*
* @param theValue number to be converted
* @param theResult the string to append with the result
@@ -773,18 +773,18 @@
*/
inline XalanDOMString&
NumberToDOMString(
- long theValue,
+ XMLInt32 theValue,
XalanDOMString& theResult)
{
return NumberToDOMString(
- static_cast<XALAN_INT64>(theValue),
+ static_cast<XMLInt64>(theValue),
theResult);
}
/**
- * Converts an unsigned int value into a XalanDOMString
+ * Converts a 16-bit unsigned int value into a XalanDOMString
*
* @param theValue number to be converted
* @param theResult the string to append with the result
@@ -792,18 +792,18 @@
*/
inline XalanDOMString&
NumberToDOMString(
- unsigned int theValue,
+ XMLUInt16 theValue,
XalanDOMString& theResult)
{
return NumberToDOMString(
- static_cast<XALAN_UINT64>(theValue),
+ static_cast<XMLUInt64>(theValue),
theResult);
}
/**
- * Converts an int value into a XalanDOMString
+ * Converts a 16-bit int value into a XalanDOMString
*
* @param theValue number to be converted
* @param theResult the string to append with the result
@@ -811,56 +811,18 @@
*/
inline XalanDOMString&
NumberToDOMString(
- int theValue,
+ XMLInt16 theValue,
XalanDOMString& theResult)
{
return NumberToDOMString(
- static_cast<XALAN_INT64>(theValue),
+ static_cast<XMLInt64>(theValue),
theResult);
}
/**
- * Converts an unsigned short value into a XalanDOMString
- *
- * @param theValue number to be converted
- * @param theResult the string to append with the result
- * @return a reference to the passed string result.
- */
-inline XalanDOMString&
-NumberToDOMString(
- unsigned short theValue,
- XalanDOMString& theResult)
-{
- return NumberToDOMString(
- static_cast<XALAN_UINT64>(theValue),
- theResult);
-}
-
-
-
-/**
- * Converts a short value into a XalanDOMString
- *
- * @param theValue number to be converted
- * @param theResult the string to append with the result
- * @return a reference to the passed string result.
- */
-inline XalanDOMString&
-NumberToDOMString(
- short theValue,
- XalanDOMString& theResult)
-{
- return NumberToDOMString(
- static_cast<XALAN_INT64>(theValue),
- theResult);
-}
-
-
-
-/**
- * Converts an 64-bit unsigned value into a XalanDOMString
+ * Converts an 64-bit unsigned int value into a XalanDOMString
*
* @param theValue number to be converted
* @param theResult the string to append with the result
@@ -868,13 +830,13 @@
*/
XALAN_PLATFORMSUPPORT_EXPORT_FUNCTION(XalanDOMString&)
NumberToHexDOMString(
- XALAN_UINT64 theValue,
+ XMLUInt64 theValue,
XalanDOMString& theResult);
/**
- * Converts an 64-bit signed value into a XalanDOMString
+ * Converts an 64-bit signed int value into a XalanDOMString
*
* @param theValue number to be converted
* @param theResult the string to append with the result
@@ -882,13 +844,13 @@
*/
XALAN_PLATFORMSUPPORT_EXPORT_FUNCTION(XalanDOMString&)
NumberToHexDOMString(
- XALAN_INT64 theValue,
+ XMLInt64 theValue,
XalanDOMString& theResult);
/**
- * Converts a XalanSSize_t value into a XalanDOMString
+ * Converts a 32-bit unsigned int value into a XalanDOMString
*
* @param theValue number to be converted
* @param theResult the string to append with the result
@@ -896,18 +858,18 @@
*/
inline XalanDOMString&
NumberToHexDOMString(
- unsigned long theValue,
+ XMLUInt32 theValue,
XalanDOMString& theResult)
{
return NumberToHexDOMString(
- static_cast<XALAN_UINT64>(theValue),
+ static_cast<XMLUInt64>(theValue),
theResult);
}
/**
- * Converts a XalanSSize_t value into a XalanDOMString
+ * Converts a 32-bit signed int value into a XalanDOMString
*
* @param theValue number to be converted
* @param theResult the string to append with the result
@@ -915,18 +877,18 @@
*/
inline XalanDOMString&
NumberToHexDOMString(
- long theValue,
+ XMLInt32 theValue,
XalanDOMString& theResult)
{
return NumberToHexDOMString(
- static_cast<XALAN_INT64>(theValue),
+ static_cast<XMLInt64>(theValue),
theResult);
}
/**
- * Converts an unsigned int value into a XalanDOMString
+ * Converts a 16-bit unsigned int value into a XalanDOMString
*
* @param theValue number to be converted
* @param theResult the string to append with the result
@@ -934,18 +896,18 @@
*/
inline XalanDOMString&
NumberToHexDOMString(
- unsigned int theValue,
+ XMLUInt16 theValue,
XalanDOMString& theResult)
{
return NumberToHexDOMString(
- static_cast<XALAN_UINT64>(theValue),
+ static_cast<XMLUInt64>(theValue),
theResult);
}
/**
- * Converts an int value into a XalanDOMString
+ * Converts a 16-bit signed int value into a XalanDOMString
*
* @param theValue number to be converted
* @param theResult the string to append with the result
@@ -953,49 +915,11 @@
*/
inline XalanDOMString&
NumberToHexDOMString(
- int theValue,
+ XMLInt16 theValue,
XalanDOMString& theResult)
{
return NumberToHexDOMString(
- static_cast<XALAN_INT64>(theValue),
- theResult);
-}
-
-
-
-/**
- * Converts an unsigned short value into a XalanDOMString
- *
- * @param theValue number to be converted
- * @param theResult the string to append with the result
- * @return a reference to the passed string result.
- */
-inline XalanDOMString&
-NumberToHexDOMString(
- unsigned short theValue,
- XalanDOMString& theResult)
-{
- return NumberToHexDOMString(
- static_cast<XALAN_UINT64>(theValue),
- theResult);
-}
-
-
-
-/**
- * Converts a short value into a XalanDOMString
- *
- * @param theValue number to be converted
- * @param theResult the string to append with the result
- * @return a reference to the passed string result.
- */
-inline XalanDOMString&
-NumberToHexDOMString(
- short theValue,
- XalanDOMString& theResult)
-{
- return NumberToHexDOMString(
- static_cast<XALAN_INT64>(theValue),
+ static_cast<XMLInt64>(theValue),
theResult);
}
diff --git a/src/xalanc/PlatformSupport/StdBinInputStream.cpp b/src/xalanc/PlatformSupport/StdBinInputStream.cpp
index 32503f5..15193fb 100644
--- a/src/xalanc/PlatformSupport/StdBinInputStream.cpp
+++ b/src/xalanc/PlatformSupport/StdBinInputStream.cpp
@@ -66,7 +66,7 @@
{
using std::streamsize;
- assert(static_cast<XALAN_UINT64>(static_cast<streamsize>(maxToRead)) == maxToRead);
+ assert(static_cast<XMLUInt64>(static_cast<streamsize>(maxToRead)) == maxToRead);
m_stream.read(
reinterpret_cast<char*>(toFill),
diff --git a/src/xalanc/PlatformSupport/XalanNumberFormat.cpp b/src/xalanc/PlatformSupport/XalanNumberFormat.cpp
index c0242b3..f39fd1b 100644
--- a/src/xalanc/PlatformSupport/XalanNumberFormat.cpp
+++ b/src/xalanc/PlatformSupport/XalanNumberFormat.cpp
@@ -72,7 +72,7 @@
XalanDOMString&
XalanNumberFormat::format(
- int theValue,
+ XMLInt16 theValue,
XalanDOMString& theResult)
{
NumberToDOMString(theValue, theResult);
@@ -87,7 +87,7 @@
XalanDOMString&
XalanNumberFormat::format(
- unsigned int theValue,
+ XMLUInt16 theValue,
XalanDOMString& theResult)
{
NumberToDOMString(theValue, theResult);
@@ -103,7 +103,7 @@
XalanDOMString&
XalanNumberFormat::format(
- long theValue,
+ XMLInt32 theValue,
XalanDOMString& theResult)
{
NumberToDOMString(theValue, theResult);
@@ -119,7 +119,7 @@
XalanDOMString&
XalanNumberFormat::format(
- unsigned long theValue,
+ XMLUInt32 theValue,
XalanDOMString& theResult)
{
NumberToDOMString(theValue, theResult);
@@ -133,7 +133,7 @@
XalanDOMString&
XalanNumberFormat::format(
- XALAN_INT64 theValue,
+ XMLInt64 theValue,
XalanDOMString& theResult)
{
NumberToDOMString(theValue, theResult);
@@ -147,7 +147,7 @@
XalanDOMString&
XalanNumberFormat::format(
- XALAN_UINT64 theValue,
+ XMLUInt64 theValue,
XalanDOMString& theResult)
{
NumberToDOMString(theValue, theResult);
diff --git a/src/xalanc/PlatformSupport/XalanNumberFormat.hpp b/src/xalanc/PlatformSupport/XalanNumberFormat.hpp
index 6b7bc14..1e93ecd 100644
--- a/src/xalanc/PlatformSupport/XalanNumberFormat.hpp
+++ b/src/xalanc/PlatformSupport/XalanNumberFormat.hpp
@@ -79,7 +79,7 @@
* @return string representation of number
*/
virtual XalanDOMString&
- format(int theValue,
+ format( XMLInt16 theValue,
XalanDOMString& theResult);
@@ -92,7 +92,7 @@
*/
virtual XalanDOMString&
format(
- unsigned int theValue,
+ XMLUInt16 theValue,
XalanDOMString& theResult);
/**
@@ -102,7 +102,7 @@
* @return string representation of number
*/
virtual XalanDOMString&
- format(long theValue,
+ format( XMLInt32 theValue,
XalanDOMString& theResult);
@@ -114,7 +114,7 @@
*/
virtual XalanDOMString&
format(
- unsigned long theValue,
+ XMLUInt32 theValue,
XalanDOMString& theResult);
/**
@@ -125,7 +125,7 @@
*/
virtual XalanDOMString&
format(
- XALAN_INT64 theValue,
+ XMLInt64 theValue,
XalanDOMString& theResult);
/**
@@ -136,7 +136,7 @@
*/
virtual XalanDOMString&
format(
- XALAN_UINT64 theValue,
+ XMLUInt64 theValue,
XalanDOMString& theResult);
/**
diff --git a/src/xalanc/PlatformSupport/XalanStdOutputStream.cpp b/src/xalanc/PlatformSupport/XalanStdOutputStream.cpp
index f51b518..ab59949 100644
--- a/src/xalanc/PlatformSupport/XalanStdOutputStream.cpp
+++ b/src/xalanc/PlatformSupport/XalanStdOutputStream.cpp
@@ -148,7 +148,7 @@
const char* theBuffer,
size_type theBufferLength)
{
- assert(static_cast<XALAN_UINT64>(static_cast<StreamSizeType>(theBufferLength)) == theBufferLength);
+ assert(static_cast<XMLUInt64>(static_cast<StreamSizeType>(theBufferLength)) == theBufferLength);
m_outputStream.write(theBuffer, StreamSizeType(theBufferLength));