dmitryh 2004/12/02 14:01:40
Modified: c/samples/SimpleTransform SimpleTransform.cpp
Log:
Added status value error checking
Revision Changes Path
1.27 +12 -2 xml-xalan/c/samples/SimpleTransform/SimpleTransform.cpp
Index: SimpleTransform.cpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/samples/SimpleTransform/SimpleTransform.cpp,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -r1.26 -r1.27
--- SimpleTransform.cpp 23 Nov 2004 23:32:44 -0000 1.26
+++ SimpleTransform.cpp 2 Dec 2004 22:01:40 -0000 1.27
@@ -97,8 +97,18 @@
XalanMemoryManagerImpl memoryManager;
#ifdef XALAN_USE_ICU
- UErrorCode status;
- u_setMemoryFunctions(0, icu_malloc, icu_realloc,
icu_free, &status);
+ UErrorCode status = U_ZERO_ERROR;
+
+ u_setMemoryFunctions(0, icu_malloc, icu_realloc, icu_free,
&status);
+
+ if(U_FAILURE(status))
+ {
+ cerr << "Initialization of ICU failed! "
+ << endl
+ << endl;
+
+ return -1;
+ }
#endif
// Call the static initializer for Xerces.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]