You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by rt...@locus.apache.org on 2000/04/17 04:23:16 UTC
cvs commit: xml-xerces/perl DOMString2.cpp
rtwatson 00/04/16 19:23:16
Modified: perl DOMString2.cpp
Log:
Updated to build with Xerces-C 1.1.0
rtwatson@apache.org
Revision Changes Path
1.2 +9 -11 xml-xerces/perl/DOMString2.cpp
Index: DOMString2.cpp
===================================================================
RCS file: /home/cvs/xml-xerces/perl/DOMString2.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- DOMString2.cpp 1999/11/09 01:14:27 1.1
+++ DOMString2.cpp 2000/04/17 02:23:15 1.2
@@ -57,9 +57,9 @@
#include "DOMString2.hpp"
-#include <unicode.h>
-#include <convert.h>
-#include <ustring.h>
+#include <unicode/unicode.h>
+#include <unicode/convert.h>
+#include <unicode/ustring.h>
#include <string.h>
@@ -95,7 +95,7 @@
if (utf8 == 0) return;
// Create converter
- UErrorCode err = ZERO_ERROR;
+ UErrorCode err = U_ZERO_ERROR;
UConverter* converter = ucnv_open ("utf8", &err);
UChar* dstString = 0;
@@ -105,18 +105,17 @@
if (srcLen == 0) return;
// Compute dstLen
- err = ZERO_ERROR;
+ err = U_ZERO_ERROR;
dstLen = ucnv_toUChars (converter, dstString, dstLen, utf8, srcLen, &err);
// Allocate dstString
dstString = new UChar [dstLen+1];
// Convert
- err = ZERO_ERROR;
+ err = U_ZERO_ERROR;
ucnv_toUChars (converter, dstString, dstLen+1, utf8, srcLen, &err);
// Close converter
- err = ZERO_ERROR;
ucnv_close (converter);
appendData (DOMString(dstString));
@@ -148,25 +147,24 @@
// Create converter
- UErrorCode err = ZERO_ERROR;
+ UErrorCode err = U_ZERO_ERROR;
UConverter* converter = ucnv_open ("utf8", &err);
int32_t dstLen = 0;
// Compute dstLen
- err = ZERO_ERROR;
+ err = U_ZERO_ERROR;
dstLen = ucnv_fromUChars (converter, fCharBuffer, dstLen, srcString, &err);
// Allocate dstString
fCharBuffer = new char [dstLen+1];
// Convert
- err = ZERO_ERROR;
+ err = U_ZERO_ERROR;
ucnv_fromUChars (converter, fCharBuffer, dstLen+1, srcString, &err);
fCharBuffer[dstLen] = 0;
// Close converter
- err = ZERO_ERROR;
ucnv_close (converter);
return fCharBuffer;