1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
|
$NetBSD: patch-ab,v 1.4 2004/02/15 04:14:04 minskim Exp $
--- util/Transcoders/IconvGNU/IconvGNUTransService.cpp.orig 2003-05-27 10:04:57.000000000 -0500
+++ util/Transcoders/IconvGNU/IconvGNUTransService.cpp
@@ -94,7 +94,11 @@
#include <locale.h>
#include <iconv.h>
#include <errno.h>
+#ifdef __NetBSD__
+#include <machine/endian.h>
+#else
#include <endian.h>
+#endif
#include <xercesc/util/XMLString.hpp>
#include <xercesc/util/XMLUniDefs.hpp>
@@ -309,7 +313,7 @@ XMLCh IconvGNUWrapper::toUpper (const
xmlChToMbc (ch, wcbuf);
char tmpArr[4];
- char* ptr = wcbuf;
+ const char* ptr = wcbuf;
size_t len = fUChSize;
char *pTmpArr = tmpArr;
size_t bLen = 2;
@@ -341,7 +345,7 @@ XMLCh IconvGNUWrapper::toLower (const
xmlChToMbc (ch, wcbuf);
char tmpArr[4];
- char* ptr = wcbuf;
+ const char* ptr = wcbuf;
size_t len = fUChSize;
char *pTmpArr = tmpArr;
size_t bLen = 2;
@@ -373,7 +377,7 @@ bool IconvGNUWrapper::isSpace(const X
char tmpArr[4];
xmlChToMbc (toCheck, wcbuf);
- char* ptr = wcbuf;
+ const char* ptr = wcbuf;
size_t len = fUChSize;
char *pTmpArr = tmpArr;
size_t bLen = 2;
@@ -474,7 +478,7 @@ size_t IconvGNUWrapper::iconvFrom ( c
size_t toLen ) const
{
ICONV_LOCK;
- char ** tmpPtr = (char**)&fromPtr;
+ const char ** tmpPtr = &fromPtr;
return ::iconv (fCDFrom, tmpPtr, fromLen, toPtr, &toLen);
}
@@ -484,7 +488,7 @@ size_t IconvGNUWrapper::iconvTo ( con
size_t toLen ) const
{
ICONV_LOCK;
- char ** tmpPtr = (char**)&fromPtr;
+ const char ** tmpPtr = &fromPtr;
return ::iconv (fCDTo, tmpPtr, fromLen, toPtr, &toLen);
}
@@ -1051,7 +1055,7 @@ XMLCh* IconvGNULCPTranscoder::transcode(
if (*toTranscode) {
const unsigned int wLent = calcRequiredSize(toTranscode);
if (wLent == 0) {
- retVal = (XMLCh*) manager->allocate(sizeof(XMLCh));/new XMLCh[1];
+ retVal = (XMLCh*) manager->allocate(sizeof(XMLCh));//new XMLCh[1];
retVal[0] = 0;
return retVal;
}
@@ -1186,7 +1190,7 @@ IconvGNUTranscoder::IconvGNUTranscoder (
, iconv_t cd_to
, size_t uchsize
, unsigned int ubo
- , MemoryManger* const manager
+ , MemoryManager* const manager
)
: XMLTranscoder(encodingName, blockSize, manager)
, IconvGNUWrapper (cd_from, cd_to, uchsize, ubo)
|