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 2002/11/14 02:56:28 UTC
cvs commit: xml-xalan/c/src/PlatformSupport DOMStringHelper.cpp DoubleSupport.cpp
dbertoni 2002/11/13 17:56:28
Modified: c/src/PlatformSupport DOMStringHelper.cpp DoubleSupport.cpp
Log:
Fixes for various platforms wrt to std namespace.
Revision Changes Path
1.78 +26 -12 xml-xalan/c/src/PlatformSupport/DOMStringHelper.cpp
Index: DOMStringHelper.cpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/PlatformSupport/DOMStringHelper.cpp,v
retrieving revision 1.77
retrieving revision 1.78
diff -u -r1.77 -r1.78
--- DOMStringHelper.cpp 14 Nov 2002 00:09:26 -0000 1.77
+++ DOMStringHelper.cpp 14 Nov 2002 01:56:28 -0000 1.78
@@ -60,6 +60,7 @@
#include <cassert>
+#include <cctype>
#include <cmath>
#include <cstdio>
#include <cstdlib>
@@ -79,18 +80,6 @@
-#if !defined(XALAN_NO_NAMESPACES)
-using std::back_inserter;
-using std::copy;
-using std::hex;
-using std::ios;
-using std::ostream;
-using std::transform;
-using std::vector;
-#endif
-
-
-
// Xerces header files
#include <xercesc/util/XMLString.hpp>
@@ -581,7 +570,11 @@
theOutputIterator,
theFunction);
#else
+#if defined(XALAN_NO_NAMESPACES)
return transform(
+#else
+ return std::transform(
+#endif
theInputBegin,
theInputEnd,
theOutputIterator,
@@ -602,6 +595,10 @@
XalanDOMString theConvertedString;
+#if !defined(XALAN_NO_NAMESPACES)
+ using std::back_inserter;
+#endif
+
TransformString(
theInputString,
theInputString + theInputStringLength,
@@ -995,13 +992,21 @@
theResult.reserve(theLength);
+#if !defined(XALAN_NO_NAMESPACES)
+ using std::back_inserter;
+#endif
+
#if defined(XALAN_NO_ALGORITHMS_WITH_BUILTINS)
XalanCopy(
data,
data + theLength,
back_inserter(theResult));
#else
+#if defined(XALAN_NO_NAMESPACES)
copy(
+#else
+ std::copy(
+#endif
data,
data + theLength,
back_inserter(theResult));
@@ -1400,6 +1405,10 @@
reserve(theResult, length(theResult) + theCharsWritten);
+#if !defined(XALAN_NO_NAMESPACES)
+ using std::back_inserter;
+#endif
+
TranscodeNumber(
theBuffer,
theBuffer + theCharsWritten,
@@ -1461,6 +1470,7 @@
#if defined(XALAN_STRICT_ANSI_HEADERS)
using std::sprintf;
using std::atof;
+ using std::isdigit;
#endif
const char* const * thePrintfString = thePrintfStrings;
@@ -1522,6 +1532,10 @@
}
reserve(theResult, length(theResult) + theCharsWritten);
+
+#if !defined(XALAN_NO_NAMESPACES)
+ using std::back_inserter;
+#endif
TranscodeNumber(
theBuffer,
1.36 +4 -0 xml-xalan/c/src/PlatformSupport/DoubleSupport.cpp
Index: DoubleSupport.cpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/PlatformSupport/DoubleSupport.cpp,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -r1.35 -r1.36
--- DoubleSupport.cpp 14 Nov 2002 00:09:14 -0000 1.35
+++ DoubleSupport.cpp 14 Nov 2002 01:56:28 -0000 1.36
@@ -655,7 +655,11 @@
}
else
{
+#if defined(XALAN_STRICT_ANSI_HEADERS)
+ const char theDecimalPointChar = std::localeconv()->decimal_point[0];
+#else
const char theDecimalPointChar = localeconv()->decimal_point[0];
+#endif
// trim any whitespace
consumeWhitespace(theString, theLength);
---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-cvs-help@xml.apache.org