You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by ab...@locus.apache.org on 2000/02/09 02:31:22 UTC
cvs commit: xml-xerces/c/src/util/Transcoders/Iconv390 Iconv390TransService.cpp
abagchi 00/02/08 17:31:22
Modified: c/src/util/Transcoders/Iconv390 Iconv390TransService.cpp
Log:
Fixed calcRequiredSize() for OS390BATCH
Revision Changes Path
1.2 +9 -3 xml-xerces/c/src/util/Transcoders/Iconv390/Iconv390TransService.cpp
Index: Iconv390TransService.cpp
===================================================================
RCS file: /home/cvs/xml-xerces/c/src/util/Transcoders/Iconv390/Iconv390TransService.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- Iconv390TransService.cpp 2000/02/08 02:14:11 1.1
+++ Iconv390TransService.cpp 2000/02/09 01:31:22 1.2
@@ -56,6 +56,9 @@
/**
* $Log: Iconv390TransService.cpp,v $
+ * Revision 1.2 2000/02/09 01:31:22 abagchi
+ * Fixed calcRequiredSize() for OS390BATCH
+ *
* Revision 1.1 2000/02/08 02:14:11 abagchi
* Initial checkin
*
@@ -79,7 +82,7 @@
#endif
//
// Cannot use the OS/390 c/c++ towupper and towlower functions in the
-// Unicode encironment. We will use mytoupper and mytolower here.
+// Unicode environment. We will use mytoupper and mytolower here.
//
#undef towupper
#undef towlower
@@ -282,13 +285,15 @@
// ---------------------------------------------------------------------------
unsigned int Iconv390LCPTranscoder::calcRequiredSize(const char* const srcText)
{
+ unsigned int retVal;
+
if (!srcText)
return 0;
+#ifdef OS390BATCH
//
// Cannot use mbstowcs in a non-POSIX environment(???).
//
- unsigned int retVal;
if (!__isPosixOn()) {
const unsigned charLen = mblen(srcText, MB_CUR_MAX);
if (charLen == -1)
@@ -301,6 +306,7 @@
}
}
else
+#endif
retVal = ::mbstowcs(NULL, srcText, 0);
if (retVal == -1)