dbertoni 02/04/10 22:54:50
Modified: c/src/XSLT ElemNumber.cpp ElemNumber.hpp
FunctionSystemProperty.cpp
StylesheetExecutionContextDefault.cpp
StylesheetExecutionContextDefault.hpp
VariablesStack.hpp XResultTreeFrag.cpp
XSLTEngineImpl.cpp XSLTEngineImpl.hpp
Log:
Cleanup for picky compilers.
Revision Changes Path
1.55 +5 -0 xml-xalan/c/src/XSLT/ElemNumber.cpp
Index: ElemNumber.cpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/XSLT/ElemNumber.cpp,v
retrieving revision 1.54
retrieving revision 1.55
diff -u -r1.54 -r1.55
--- ElemNumber.cpp 8 Mar 2002 04:47:29 -0000 1.54
+++ ElemNumber.cpp 11 Apr 2002 05:54:50 -0000 1.55
@@ -1460,7 +1460,12 @@
const int buflen = 100;
XalanDOMChar buf[buflen + 1];
+
+#if defined(XALAN_STRICT_ANSI_HEADERS)
+ std::memset(buf, 0, (buflen + 1) * sizeof(XalanDOMChar));
+#else
memset(buf, 0, (buflen + 1) * sizeof(XalanDOMChar));
+#endif
// next character to set in the buffer
int charPos = buflen - 1 ; // work backward through buf[]
1.34 +4 -0 xml-xalan/c/src/XSLT/ElemNumber.hpp
Index: ElemNumber.hpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/XSLT/ElemNumber.hpp,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -r1.33 -r1.34
--- ElemNumber.hpp 2 Mar 2002 07:18:07 -0000 1.33
+++ ElemNumber.hpp 11 Apr 2002 05:54:50 -0000 1.34
@@ -452,6 +452,8 @@
static const NumberingResourceBundleMapType& s_resourceBundles;
+public:
+
/**
* This class returns tokens using non-alphanumberic characters as
* delimiters.
@@ -530,6 +532,8 @@
const XalanDOMString* m_string;
};
+
+private:
};
1.23 +4 -0 xml-xalan/c/src/XSLT/FunctionSystemProperty.cpp
Index: FunctionSystemProperty.cpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/XSLT/FunctionSystemProperty.cpp,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -r1.22 -r1.23
--- FunctionSystemProperty.cpp 20 Dec 2001 20:45:32 -0000 1.22
+++ FunctionSystemProperty.cpp 11 Apr 2002 05:54:50 -0000 1.23
@@ -151,7 +151,11 @@
else
{
const char* const theEnvString =
+#if defined(XALAN_STRICT_ANSI_HEADERS)
+ std::getenv(c_str(TranscodeToLocalCodePage(fullName)));
+#else
getenv(c_str(TranscodeToLocalCodePage(fullName)));
+#endif
if (theEnvString == 0)
{
1.86 +11 -3
xml-xalan/c/src/XSLT/StylesheetExecutionContextDefault.cpp
Index: StylesheetExecutionContextDefault.cpp
===================================================================
RCS file:
/home/cvs/xml-xalan/c/src/XSLT/StylesheetExecutionContextDefault.cpp,v
retrieving revision 1.85
retrieving revision 1.86
diff -u -r1.85 -r1.86
--- StylesheetExecutionContextDefault.cpp 6 Apr 2002 19:38:39 -0000
1.85
+++ StylesheetExecutionContextDefault.cpp 11 Apr 2002 05:54:50 -0000
1.86
@@ -533,7 +533,11 @@
if (i != m_matchPatternCache.end())
{
// Update hit time...
+#if defined(XALAN_STRICT_ANSI_HEADERS)
+ (*i).second.second = std::clock();
+#else
(*i).second.second = clock();
+#endif
theResult = (*i).second.first;
}
@@ -2286,7 +2290,11 @@
{
assert(m_xsltProcessor != 0);
- clock_t addClock = clock();
+#if defined(XALAN_STRICT_ANSI_HEADERS)
+ ClockType addClock = std::clock();
+#else
+ ClockType addClock = clock();
+#endif
if (m_matchPatternCache.size() == eXPathCacheMax)
{
@@ -2294,7 +2302,7 @@
// Initialize the lowest clock time found so far
// with the current clock...
- clock_t lowest = addClock;
+ ClockType lowest = addClock;
// Get some iterators ready to search the cache...
XPathCacheMapType::iterator i =
@@ -2307,7 +2315,7 @@
while(i != theEnd)
{
- const clock_t current = (*i).second.second;
+ const ClockType current = (*i).second.second;
if (current < lowest)
{
1.75 +9 -3
xml-xalan/c/src/XSLT/StylesheetExecutionContextDefault.hpp
Index: StylesheetExecutionContextDefault.hpp
===================================================================
RCS file:
/home/cvs/xml-xalan/c/src/XSLT/StylesheetExecutionContextDefault.hpp,v
retrieving revision 1.74
retrieving revision 1.75
diff -u -r1.74 -r1.75
--- StylesheetExecutionContextDefault.hpp 3 Apr 2002 05:13:38 -0000
1.74
+++ StylesheetExecutionContextDefault.hpp 11 Apr 2002 05:54:50 -0000
1.75
@@ -118,6 +118,12 @@
{
public:
+#if defined(XALAN_STRICT_ANSI_HEADERS)
+ typedef std::clock_t ClockType;
+#else
+ typedef clock_t ClockType;
+#endif
+
#if defined(XALAN_NO_NAMESPACES)
typedef deque<const ElemTemplateElement*>
ElementRecursionStackType;
typedef vector<FormatterListener*>
FormatterListenerVectorType;
@@ -125,7 +131,7 @@
typedef vector<XalanOutputStream*>
OutputStreamVectorType;
typedef set<const KeyDeclaration*,
less<const KeyDeclaration*> >
KeyDeclarationSetType;
- typedef pair<const XPath*, clock_t>
XPathCacheEntry;
+ typedef pair<const XPath*, ClockType>
XPathCacheEntry;
typedef map<XalanDOMString,
XPathCacheEntry,
less<XalanDOMString> >
XPathCacheMapType;
@@ -135,7 +141,7 @@
typedef std::vector<PrintWriter*>
PrintWriterVectorType;
typedef std::vector<XalanOutputStream*>
OutputStreamVectorType;
typedef std::set<const KeyDeclaration*>
KeyDeclarationSetType;
- typedef std::pair<const XPath*, clock_t>
XPathCacheEntry;
+ typedef std::pair<const XPath*, ClockType>
XPathCacheEntry;
typedef std::map<XalanDOMString, XPathCacheEntry>
XPathCacheMapType;
#endif
@@ -1088,7 +1094,7 @@
static XalanNumberFormatFactory* s_xalanNumberFormatFactory;
- const static DefaultCollationCompareFunctor
s_defaultCollationFunctor;
+ static const DefaultCollationCompareFunctor
s_defaultCollationFunctor;
};
1.17 +43 -46 xml-xalan/c/src/XSLT/VariablesStack.hpp
Index: VariablesStack.hpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/XSLT/VariablesStack.hpp,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- VariablesStack.hpp 18 Feb 2002 22:30:28 -0000 1.16
+++ VariablesStack.hpp 11 Apr 2002 05:54:50 -0000 1.17
@@ -356,52 +356,6 @@
VariablesStack& m_variablesStack;
};
-private:
-
- class StackEntry;
-
- /**
- * Check to see if an element frame for the particular element has
already
- * been pushed.
- *
- * @param elem element in question
- * @return true if it has been pushed already
- */
- bool
- elementFrameAlreadyPushed(const ElemTemplateElement* elem) const;
-
- /**
- * Push an entry onto the stack.
- *
- * @param stack entry to push
- */
- void
- push(const StackEntry& theEntry);
-
- /**
- * Pop an entry from the top of the stack.
- */
- void
- pop();
-
- /**
- * Get a reference to the entry at the back (top) of the stack.
- *
- * @return a reference to the back of the stack.
- */
- const StackEntry&
- back() const
- {
- assert(m_stack.empty() == false);
-
- return m_stack.back();
- }
-
- friend class CommitPushElementFrame;
- friend class EnsurePop;
- friend class PushParamFunctor;
- friend class SetAndRestoreForceGlobalSearch;
-
class XALAN_XSLT_EXPORT StackEntry
{
public:
@@ -555,6 +509,49 @@
enum { eDefaultStackSize = 100 };
+private:
+
+ /**
+ * Check to see if an element frame for the particular element has
already
+ * been pushed.
+ *
+ * @param elem element in question
+ * @return true if it has been pushed already
+ */
+ bool
+ elementFrameAlreadyPushed(const ElemTemplateElement* elem) const;
+
+ /**
+ * Push an entry onto the stack.
+ *
+ * @param stack entry to push
+ */
+ void
+ push(const StackEntry& theEntry);
+
+ /**
+ * Pop an entry from the top of the stack.
+ */
+ void
+ pop();
+
+ /**
+ * Get a reference to the entry at the back (top) of the stack.
+ *
+ * @return a reference to the back of the stack.
+ */
+ const StackEntry&
+ back() const
+ {
+ assert(m_stack.empty() == false);
+
+ return m_stack.back();
+ }
+
+ friend class CommitPushElementFrame;
+ friend class EnsurePop;
+ friend class PushParamFunctor;
+ friend class SetAndRestoreForceGlobalSearch;
const XObjectPtr
findXObject(
1.3 +1 -1 xml-xalan/c/src/XSLT/XResultTreeFrag.cpp
Index: XResultTreeFrag.cpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/XSLT/XResultTreeFrag.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- XResultTreeFrag.cpp 4 Jan 2002 20:33:15 -0000 1.2
+++ XResultTreeFrag.cpp 11 Apr 2002 05:54:50 -0000 1.3
@@ -122,7 +122,7 @@
XResultTreeFrag::clone(void* theAddress) const
{
return theAddress == 0 ? new XResultTreeFrag(*this) : new (theAddress)
XResultTreeFrag(*this);
-};
+}
1.139 +11 -3 xml-xalan/c/src/XSLT/XSLTEngineImpl.cpp
Index: XSLTEngineImpl.cpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/XSLT/XSLTEngineImpl.cpp,v
retrieving revision 1.138
retrieving revision 1.139
diff -u -r1.138 -r1.139
--- XSLTEngineImpl.cpp 6 Apr 2002 19:35:58 -0000 1.138
+++ XSLTEngineImpl.cpp 11 Apr 2002 05:54:50 -0000 1.139
@@ -1499,16 +1499,20 @@
{
if(0 != key)
{
+#if defined(XALAN_STRICT_ANSI_HEADERS)
+ m_durationsTable[key] = std::clock();
+#else
m_durationsTable[key] = clock();
+#endif
}
}
-clock_t
+XSLTEngineImpl::ClockType
XSLTEngineImpl::popDuration(const void* key)
{
- clock_t clockTicksDuration = 0;
+ ClockType clockTicksDuration = 0;
if(0 != key)
{
@@ -1517,7 +1521,11 @@
if (i != m_durationsTable.end())
{
+#if defined(XALAN_STRICT_ANSI_HEADERS)
+ clockTicksDuration = std::clock() - (*i).second;
+#else
clockTicksDuration = clock() - (*i).second;
+#endif
m_durationsTable.erase(i);
}
@@ -1535,7 +1543,7 @@
{
if(0 != key)
{
- const clock_t theDuration = popDuration(key);
+ const ClockType theDuration = popDuration(key);
if(0 != m_diagnosticsPrintWriter)
{
1.83 +9 -3 xml-xalan/c/src/XSLT/XSLTEngineImpl.hpp
Index: XSLTEngineImpl.hpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/XSLT/XSLTEngineImpl.hpp,v
retrieving revision 1.82
retrieving revision 1.83
diff -u -r1.82 -r1.83
--- XSLTEngineImpl.hpp 6 Apr 2002 19:35:58 -0000 1.82
+++ XSLTEngineImpl.hpp 11 Apr 2002 05:54:50 -0000 1.83
@@ -152,6 +152,12 @@
{
public:
+#if defined(XALAN_STRICT_ANSI_HEADERS)
+ typedef std::clock_t ClockType;
+#else
+ typedef clock_t ClockType;
+#endif
+
#if defined(XALAN_NO_NAMESPACES)
typedef map<XalanDOMString,
int,
@@ -160,7 +166,7 @@
int,
less<XalanDOMString> >
ElementKeysMapType;
typedef map<const void*,
- clock_t,
+ ClockType,
less<const void*> >
DurationsTableMapType;
typedef vector<const Locator*> LocatorStack;
typedef vector<TraceListener*> TraceListenerVectorType;
@@ -168,7 +174,7 @@
#else
typedef std::map<XalanDOMString, int> AttributeKeysMapType;
typedef std::map<XalanDOMString, int> ElementKeysMapType;
- typedef std::map<const void*, clock_t> DurationsTableMapType;
+ typedef std::map<const void*, ClockType> DurationsTableMapType;
typedef std::vector<const Locator*> LocatorStack;
typedef std::vector<TraceListener*>
TraceListenerVectorType;
typedef std::vector<bool>
BoolVectorType;
@@ -826,7 +832,7 @@
*
* @param key pointer to element involved
*/
- clock_t
+ ClockType
popDuration(const void* key);
/**
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]