dbertoni 2002/07/31 09:04:06
Modified: c/src/XPath XPathExpression.cpp
Log:
Removed strstream.
Revision Changes Path
1.37 +26 -52 xml-xalan/c/src/XPath/XPathExpression.cpp
Index: XPathExpression.cpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/XPath/XPathExpression.cpp,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -r1.36 -r1.37
--- XPathExpression.cpp 27 Jun 2002 21:48:32 -0000 1.36
+++ XPathExpression.cpp 31 Jul 2002 16:04:06 -0000 1.37
@@ -66,10 +66,8 @@
#if defined(XALAN_OLD_STREAM_HEADERS)
#include <iostream.h>
-#include <strstream.h>
#else
#include <ostream>
-#include <strstream>
#endif
@@ -224,20 +222,13 @@
XalanDOMString
XPathExpression::InvalidOpCodeException::FormatErrorMessage(int
theOpCode)
{
-#if !defined(XALAN_NO_NAMESPACES)
- using std::ostrstream;
-#endif
-
- char theBuffer[50];
+ XalanDOMString theResult("An invalid op code ");
- ostrstream theFormatter(theBuffer, sizeof(theBuffer));
+ LongToDOMString(theOpCode, theResult);
- theFormatter << "Invalid op code "
- << theOpCode
- << " was detected."
- << '\0';
+ append(theResult, " was detected.");
- return TranscodeFromLocalCodePage(theFormatter.str());
+ return theResult;
}
@@ -264,25 +255,21 @@
int theExpectedCount,
int theSuppliedCount)
{
-#if !defined(XALAN_NO_NAMESPACES)
- using std::ostrstream;
-#endif
+ XalanDOMString theResult("An invalid number of arguments for op code ");
+
+ LongToDOMString(theOpCode, theResult);
+
+ append(theResult, " was detected. The required number of arguments is ");
- char theBuffer[200];
+ LongToDOMString(theExpectedCount, theResult);
- ostrstream theFormatter(theBuffer, sizeof(theBuffer));
+ append(theResult, ", but ");
- theFormatter << "An invalid number of arguments for op code "
- << theOpCode
- << " was detected. "
- << "The required number of arguments is "
- << theExpectedCount
- << ", but "
- << theSuppliedCount
- << " arguments(s) were supplied."
- << '\0';
+ LongToDOMString(theSuppliedCount, theResult);
- return TranscodeFromLocalCodePage(theFormatter.str());
+ append(theResult, " arguments(s) were supplied.");
+
+ return theResult;
}
@@ -307,22 +294,17 @@
int theOpCode,
int theValue)
{
-#if !defined(XALAN_NO_NAMESPACES)
- using std::ostrstream;
-#endif
+ XalanDOMString theResult("An invalid argument of ");
+
+ LongToDOMString(theValue, theResult);
- char theBuffer[100];
+ append(theResult, " was supplied for op code ");
- ostrstream theFormatter(theBuffer, sizeof(theBuffer));
+ LongToDOMString(theOpCode, theResult);
- theFormatter << "An invalid argument of "
- << theValue
- << " was supplied for op code "
- << theOpCode
- << "."
- << '\0';
+ append(theResult, ".");
- return TranscodeFromLocalCodePage(theFormatter.str());
+ return theResult;
}
@@ -343,21 +325,13 @@
XalanDOMString
XPathExpression::InvalidRelativeTokenPosition::FormatErrorMessage(int
theOffset)
{
-#if !defined(XALAN_NO_NAMESPACES)
- using std::ostrstream;
-#endif
-
- char theBuffer[100];
+ XalanDOMString theResult("An invalid offset of ");
- ostrstream theFormatter(theBuffer, sizeof(theBuffer));
+ LongToDOMString(theOffset, theResult);
- theFormatter << "An invalid offset of "
- << theOffset
- << " was supplied as a relative token position."
- << "."
- << '\0';
+ append(theResult, " was supplied as a relative token position.");
- return TranscodeFromLocalCodePage(theFormatter.str());
+ return theResult;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]