Author: borisk
Date: Fri Jul 4 02:23:56 2008
New Revision: 673975
URL: http://svn.apache.org/viewvc?rev=673975&view=rev
Log:
Use XMLSize_t instead of size_t except where interfacing with other code that
uses size_t (e.g., operator new in the C++ runtime).
Modified:
xerces/c/trunk/src/xercesc/dom/impl/DOMCasts.hpp
xerces/c/trunk/src/xercesc/dom/impl/DOMDocumentImpl.cpp
xerces/c/trunk/src/xercesc/dom/impl/DOMStringPool.cpp
xerces/c/trunk/src/xercesc/framework/MemoryManager.hpp
xerces/c/trunk/src/xercesc/framework/StdOutFormatTarget.cpp
xerces/c/trunk/src/xercesc/internal/MemoryManagerImpl.cpp
xerces/c/trunk/src/xercesc/internal/MemoryManagerImpl.hpp
xerces/c/trunk/src/xercesc/internal/XMLScanner.hpp
xerces/c/trunk/src/xercesc/internal/XSerializeEngine.cpp
xerces/c/trunk/src/xercesc/internal/XSerializeEngine.hpp
xerces/c/trunk/src/xercesc/parsers/SAX2XMLFilterImpl.cpp
xerces/c/trunk/src/xercesc/parsers/SAX2XMLFilterImpl.hpp
xerces/c/trunk/src/xercesc/parsers/SAX2XMLReaderImpl.cpp
xerces/c/trunk/src/xercesc/parsers/SAX2XMLReaderImpl.hpp
xerces/c/trunk/src/xercesc/parsers/SAXParser.cpp
xerces/c/trunk/src/xercesc/parsers/SAXParser.hpp
xerces/c/trunk/src/xercesc/sax2/SAX2XMLReader.hpp
xerces/c/trunk/src/xercesc/util/FileManagers/PosixFileMgr.cpp
xerces/c/trunk/src/xercesc/util/PlatformUtils.hpp
xerces/c/trunk/src/xercesc/xinclude/XIncludeLocation.cpp
Modified: xerces/c/trunk/src/xercesc/dom/impl/DOMCasts.hpp
URL:
http://svn.apache.org/viewvc/xerces/c/trunk/src/xercesc/dom/impl/DOMCasts.hpp?rev=673975&r1=673974&r2=673975&view=diff
==============================================================================
--- xerces/c/trunk/src/xercesc/dom/impl/DOMCasts.hpp (original)
+++ xerces/c/trunk/src/xercesc/dom/impl/DOMCasts.hpp Fri Jul 4 02:23:56 2008
@@ -119,14 +119,14 @@
static inline DOMNode *castToNode(const DOMParentNode *p ) {
DOMElementImpl* dummy = 0;
- size_t parentOffset = (char *)&(dummy->fParent) - (char *)dummy;
+ XMLSize_t parentOffset = (char *)&(dummy->fParent) - (char *)dummy;
char *retPtr = (char *)p - parentOffset;
return (DOMNode *)retPtr;
}
static inline DOMNode *castToNode(const DOMNodeImpl *p) {
DOMElementImpl* dummy = 0;
- size_t nodeImplOffset = (char *)&(dummy->fNode) - (char *)dummy;
+ XMLSize_t nodeImplOffset = (char *)&(dummy->fNode) - (char *)dummy;
char *retPtr = (char *)p - nodeImplOffset;
return (DOMNode *)retPtr;
}
@@ -135,8 +135,8 @@
static inline DOMNodeImpl *castToNodeImpl(const DOMParentNode *p)
{
DOMElementImpl* dummy = 0;
- size_t nodeImplOffset = (char *)&(dummy->fNode) - (char *)dummy;
- size_t parentOffset = (char *)&(dummy->fParent) - (char *)dummy;
+ XMLSize_t nodeImplOffset = (char *)&(dummy->fNode) - (char *)dummy;
+ XMLSize_t parentOffset = (char *)&(dummy->fParent) - (char *)dummy;
char *retPtr = (char *)p - parentOffset + nodeImplOffset;
return (DOMNodeImpl *)retPtr;
}
Modified: xerces/c/trunk/src/xercesc/dom/impl/DOMDocumentImpl.cpp
URL:
http://svn.apache.org/viewvc/xerces/c/trunk/src/xercesc/dom/impl/DOMDocumentImpl.cpp?rev=673975&r1=673974&r2=673975&view=diff
==============================================================================
--- xerces/c/trunk/src/xercesc/dom/impl/DOMDocumentImpl.cpp (original)
+++ xerces/c/trunk/src/xercesc/dom/impl/DOMDocumentImpl.cpp Fri Jul 4 02:23:56
2008
@@ -807,7 +807,7 @@
XMLCh * DOMDocumentImpl::cloneString(const XMLCh *src)
{
if (!src) return 0;
- size_t len = XMLString::stringLen(src);
+ XMLSize_t len = XMLString::stringLen(src);
len = (len + 1) * sizeof(XMLCh);
len = (len % 4) + len;
XMLCh *newStr = (XMLCh *)this->allocate(len);
@@ -846,7 +846,7 @@
if (amount > kMaxSubAllocationSize)
{
// The size of the header we add to our raw blocks
- size_t sizeOfHeader =
XMLPlatformUtils::alignPointerForNewBlockAllocation(sizeof(void *));
+ XMLSize_t sizeOfHeader =
XMLPlatformUtils::alignPointerForNewBlockAllocation(sizeof(void *));
// Try to allocate the block
void* newBlock;
@@ -878,7 +878,7 @@
// Request doesn't fit in the current block.
// The size of the header we add to our raw blocks
- size_t sizeOfHeader =
XMLPlatformUtils::alignPointerForNewBlockAllocation(sizeof(void *));
+ XMLSize_t sizeOfHeader =
XMLPlatformUtils::alignPointerForNewBlockAllocation(sizeof(void *));
// Get a new block from the system allocator.
void* newBlock;
Modified: xerces/c/trunk/src/xercesc/dom/impl/DOMStringPool.cpp
URL:
http://svn.apache.org/viewvc/xerces/c/trunk/src/xercesc/dom/impl/DOMStringPool.cpp?rev=673975&r1=673974&r2=673975&view=diff
==============================================================================
--- xerces/c/trunk/src/xercesc/dom/impl/DOMStringPool.cpp (original)
+++ xerces/c/trunk/src/xercesc/dom/impl/DOMStringPool.cpp Fri Jul 4 02:23:56
2008
@@ -54,7 +54,7 @@
// Compute size to allocate. Note that there's 1 char of string declared
in the
// struct, so we don't need to add one again to account for the
trailing null.
//
- size_t sizeToAllocate = sizeof(DOMStringPoolEntry) +
XMLString::stringLen(str)*sizeof(XMLCh);
+ XMLSize_t sizeToAllocate = sizeof(DOMStringPoolEntry) +
XMLString::stringLen(str)*sizeof(XMLCh);
DOMStringPoolEntry *newSPE = (DOMStringPoolEntry
*)doc->allocate(sizeToAllocate);
newSPE->fNext = 0;
XMLCh * nonConstStr = (XMLCh *)newSPE->fString;
Modified: xerces/c/trunk/src/xercesc/framework/MemoryManager.hpp
URL:
http://svn.apache.org/viewvc/xerces/c/trunk/src/xercesc/framework/MemoryManager.hpp?rev=673975&r1=673974&r2=673975&view=diff
==============================================================================
--- xerces/c/trunk/src/xercesc/framework/MemoryManager.hpp (original)
+++ xerces/c/trunk/src/xercesc/framework/MemoryManager.hpp Fri Jul 4 02:23:56
2008
@@ -83,7 +83,7 @@
*
* @return A pointer to the allocated memory
*/
- virtual void* allocate(size_t size) = 0;
+ virtual void* allocate(XMLSize_t size) = 0;
/**
* This method deallocates memory
Modified: xerces/c/trunk/src/xercesc/framework/StdOutFormatTarget.cpp
URL:
http://svn.apache.org/viewvc/xerces/c/trunk/src/xercesc/framework/StdOutFormatTarget.cpp?rev=673975&r1=673974&r2=673975&view=diff
==============================================================================
--- xerces/c/trunk/src/xercesc/framework/StdOutFormatTarget.cpp (original)
+++ xerces/c/trunk/src/xercesc/framework/StdOutFormatTarget.cpp Fri Jul 4
02:23:56 2008
@@ -39,12 +39,7 @@
, const XMLSize_t count
, XMLFormatter* const)
{
- // Surprisingly, Solaris was the only platform on which
- // required the char* cast to print out the string correctly.
- // Without the cast, it was printing the pointer value in hex.
- // Quite annoying, considering every other platform printed
- // the string with the explicit cast to char* below.
- fwrite(toWrite, sizeof(XMLByte), (size_t)count, stdout);
+ fwrite(toWrite, sizeof(XMLByte), count, stdout);
fflush(stdout);
}
Modified: xerces/c/trunk/src/xercesc/internal/MemoryManagerImpl.cpp
URL:
http://svn.apache.org/viewvc/xerces/c/trunk/src/xercesc/internal/MemoryManagerImpl.cpp?rev=673975&r1=673974&r2=673975&view=diff
==============================================================================
--- xerces/c/trunk/src/xercesc/internal/MemoryManagerImpl.cpp (original)
+++ xerces/c/trunk/src/xercesc/internal/MemoryManagerImpl.cpp Fri Jul 4
02:23:56 2008
@@ -33,7 +33,7 @@
return this;
}
-void* MemoryManagerImpl::allocate(size_t size)
+void* MemoryManagerImpl::allocate(XMLSize_t size)
{
void* memptr;
try {
Modified: xerces/c/trunk/src/xercesc/internal/MemoryManagerImpl.hpp
URL:
http://svn.apache.org/viewvc/xerces/c/trunk/src/xercesc/internal/MemoryManagerImpl.hpp?rev=673975&r1=673974&r2=673975&view=diff
==============================================================================
--- xerces/c/trunk/src/xercesc/internal/MemoryManagerImpl.hpp (original)
+++ xerces/c/trunk/src/xercesc/internal/MemoryManagerImpl.hpp Fri Jul 4
02:23:56 2008
@@ -81,7 +81,7 @@
*
* @return A pointer to the allocated memory
*/
- virtual void* allocate(size_t size);
+ virtual void* allocate(XMLSize_t size);
/**
* This method deallocates memory
Modified: xerces/c/trunk/src/xercesc/internal/XMLScanner.hpp
URL:
http://svn.apache.org/viewvc/xerces/c/trunk/src/xercesc/internal/XMLScanner.hpp?rev=673975&r1=673974&r2=673975&view=diff
==============================================================================
--- xerces/c/trunk/src/xercesc/internal/XMLScanner.hpp (original)
+++ xerces/c/trunk/src/xercesc/internal/XMLScanner.hpp Fri Jul 4 02:23:56 2008
@@ -380,7 +380,7 @@
void setCalculateSrcOfs(const bool newValue);
void setParseSettings(XMLScanner* const refScanner);
void setStandardUriConformant(const bool newValue);
- void setInputBufferSize(const size_t bufferSize);
+ void setInputBufferSize(const XMLSize_t bufferSize);
void setGenerateSyntheticAnnotations(const bool newValue);
void setValidateAnnotations(const bool newValue);
@@ -727,7 +727,7 @@
// Pluggable memory manager for dynamic allocation/deallocation.
//
// -----------------------------------------------------------------------
- size_t fBufferSize;
+ XMLSize_t fBufferSize;
bool fStandardUriConformant;
bool fCalculateSrcOfs;
bool fDoNamespaces;
@@ -1309,7 +1309,7 @@
fValidateAnnotations = newValue;
}
-inline void XMLScanner::setInputBufferSize(const size_t bufferSize)
+inline void XMLScanner::setInputBufferSize(const XMLSize_t bufferSize)
{
fBufferSize = bufferSize;
fCDataBuf.setFullHandler(this, fBufferSize);
@@ -1386,4 +1386,3 @@
XERCES_CPP_NAMESPACE_END
#endif
-
Modified: xerces/c/trunk/src/xercesc/internal/XSerializeEngine.cpp
URL:
http://svn.apache.org/viewvc/xerces/c/trunk/src/xercesc/internal/XSerializeEngine.cpp?rev=673975&r1=673974&r2=673975&view=diff
==============================================================================
--- xerces/c/trunk/src/xercesc/internal/XSerializeEngine.cpp (original)
+++ xerces/c/trunk/src/xercesc/internal/XSerializeEngine.cpp Fri Jul 4
02:23:56 2008
@@ -1092,20 +1092,20 @@
// Based on the current position (fBufCur), calculated the needed size
// to read/write
//
-inline size_t XSerializeEngine::alignAdjust(size_t size) const
+inline XMLSize_t XSerializeEngine::alignAdjust(XMLSize_t size) const
{
- size_t remainder = (size_t) fBufCur % size;
+ XMLSize_t remainder = (XMLSize_t) fBufCur % size;
return (remainder == 0) ? 0 : (size - remainder);
}
// Adjust the fBufCur
-inline void XSerializeEngine::alignBufCur(size_t size)
+inline void XSerializeEngine::alignBufCur(XMLSize_t size)
{
fBufCur+=alignAdjust(size);
- assert(((size_t) fBufCur % size)==0);
+ assert(((XMLSize_t) fBufCur % size)==0);
}
-inline size_t XSerializeEngine::calBytesNeeded(size_t size) const
+inline XMLSize_t XSerializeEngine::calBytesNeeded(XMLSize_t size) const
{
return (alignAdjust(size) + size);
}
Modified: xerces/c/trunk/src/xercesc/internal/XSerializeEngine.hpp
URL:
http://svn.apache.org/viewvc/xerces/c/trunk/src/xercesc/internal/XSerializeEngine.hpp?rev=673975&r1=673974&r2=673975&view=diff
==============================================================================
--- xerces/c/trunk/src/xercesc/internal/XSerializeEngine.hpp (original)
+++ xerces/c/trunk/src/xercesc/internal/XSerializeEngine.hpp Fri Jul 4
02:23:56 2008
@@ -598,11 +598,11 @@
, const XMLExcepts::Codes toThrow) const;
- inline size_t calBytesNeeded(size_t) const;
+ inline XMLSize_t calBytesNeeded(XMLSize_t) const;
- inline size_t alignAdjust(size_t) const;
+ inline XMLSize_t alignAdjust(XMLSize_t) const;
- inline void alignBufCur(size_t);
+ inline void alignBufCur(XMLSize_t);
// Make XTemplateSerializer friend of XSerializeEngine so that
// we can call lookupStorePool and lookupLoadPool in the case of
Modified: xerces/c/trunk/src/xercesc/parsers/SAX2XMLFilterImpl.cpp
URL:
http://svn.apache.org/viewvc/xerces/c/trunk/src/xercesc/parsers/SAX2XMLFilterImpl.cpp?rev=673975&r1=673974&r2=673975&view=diff
==============================================================================
--- xerces/c/trunk/src/xercesc/parsers/SAX2XMLFilterImpl.cpp (original)
+++ xerces/c/trunk/src/xercesc/parsers/SAX2XMLFilterImpl.cpp Fri Jul 4
02:23:56 2008
@@ -256,7 +256,7 @@
fParentReader->resetCachedGrammarPool();
}
-void SAX2XMLFilterImpl::setInputBufferSize(const size_t bufferSize)
+void SAX2XMLFilterImpl::setInputBufferSize(const XMLSize_t bufferSize)
{
if(fParentReader)
fParentReader->setInputBufferSize(bufferSize);
Modified: xerces/c/trunk/src/xercesc/parsers/SAX2XMLFilterImpl.hpp
URL:
http://svn.apache.org/viewvc/xerces/c/trunk/src/xercesc/parsers/SAX2XMLFilterImpl.hpp?rev=673975&r1=673974&r2=673975&view=diff
==============================================================================
--- xerces/c/trunk/src/xercesc/parsers/SAX2XMLFilterImpl.hpp (original)
+++ xerces/c/trunk/src/xercesc/parsers/SAX2XMLFilterImpl.hpp Fri Jul 4
02:23:56 2008
@@ -810,7 +810,7 @@
*
* @param bufferSize The maximum input buffer size
*/
- void setInputBufferSize(const size_t bufferSize);
+ void setInputBufferSize(const XMLSize_t bufferSize);
//@}
Modified: xerces/c/trunk/src/xercesc/parsers/SAX2XMLReaderImpl.cpp
URL:
http://svn.apache.org/viewvc/xerces/c/trunk/src/xercesc/parsers/SAX2XMLReaderImpl.cpp?rev=673975&r1=673974&r2=673975&view=diff
==============================================================================
--- xerces/c/trunk/src/xercesc/parsers/SAX2XMLReaderImpl.cpp (original)
+++ xerces/c/trunk/src/xercesc/parsers/SAX2XMLReaderImpl.cpp Fri Jul 4
02:23:56 2008
@@ -1602,7 +1602,7 @@
fGrammarResolver->resetCachedGrammar();
}
-void SAX2XMLReaderImpl::setInputBufferSize(const size_t bufferSize)
+void SAX2XMLReaderImpl::setInputBufferSize(const XMLSize_t bufferSize)
{
fScanner->setInputBufferSize(bufferSize);
}
Modified: xerces/c/trunk/src/xercesc/parsers/SAX2XMLReaderImpl.hpp
URL:
http://svn.apache.org/viewvc/xerces/c/trunk/src/xercesc/parsers/SAX2XMLReaderImpl.hpp?rev=673975&r1=673974&r2=673975&view=diff
==============================================================================
--- xerces/c/trunk/src/xercesc/parsers/SAX2XMLReaderImpl.hpp (original)
+++ xerces/c/trunk/src/xercesc/parsers/SAX2XMLReaderImpl.hpp Fri Jul 4
02:23:56 2008
@@ -875,7 +875,7 @@
*
* @param bufferSize The maximum input buffer size
*/
- virtual void setInputBufferSize(const size_t bufferSize);
+ virtual void setInputBufferSize(const XMLSize_t bufferSize);
//@}
Modified: xerces/c/trunk/src/xercesc/parsers/SAXParser.cpp
URL:
http://svn.apache.org/viewvc/xerces/c/trunk/src/xercesc/parsers/SAXParser.cpp?rev=673975&r1=673974&r2=673975&view=diff
==============================================================================
--- xerces/c/trunk/src/xercesc/parsers/SAXParser.cpp (original)
+++ xerces/c/trunk/src/xercesc/parsers/SAXParser.cpp Fri Jul 4 02:23:56 2008
@@ -518,7 +518,7 @@
}
}
-void SAXParser::setInputBufferSize(const size_t bufferSize)
+void SAXParser::setInputBufferSize(const XMLSize_t bufferSize)
{
fScanner->setInputBufferSize(bufferSize);
}
Modified: xerces/c/trunk/src/xercesc/parsers/SAXParser.hpp
URL:
http://svn.apache.org/viewvc/xerces/c/trunk/src/xercesc/parsers/SAXParser.hpp?rev=673975&r1=673974&r2=673975&view=diff
==============================================================================
--- xerces/c/trunk/src/xercesc/parsers/SAXParser.hpp (original)
+++ xerces/c/trunk/src/xercesc/parsers/SAXParser.hpp Fri Jul 4 02:23:56 2008
@@ -880,7 +880,7 @@
*
* @param bufferSize The maximum input buffer size
*/
- void setInputBufferSize(const size_t bufferSize);
+ void setInputBufferSize(const XMLSize_t bufferSize);
/** Set the 'ignore cached DTD grammar' flag
*
Modified: xerces/c/trunk/src/xercesc/sax2/SAX2XMLReader.hpp
URL:
http://svn.apache.org/viewvc/xerces/c/trunk/src/xercesc/sax2/SAX2XMLReader.hpp?rev=673975&r1=673974&r2=673975&view=diff
==============================================================================
--- xerces/c/trunk/src/xercesc/sax2/SAX2XMLReader.hpp (original)
+++ xerces/c/trunk/src/xercesc/sax2/SAX2XMLReader.hpp Fri Jul 4 02:23:56 2008
@@ -841,7 +841,7 @@
*
* @param bufferSize The maximum input buffer size
*/
- virtual void setInputBufferSize(const size_t bufferSize);
+ virtual void setInputBufferSize(const XMLSize_t bufferSize);
//@}
@@ -888,7 +888,7 @@
};
-inline void SAX2XMLReader::setInputBufferSize(const size_t /*bufferSize*/)
+inline void SAX2XMLReader::setInputBufferSize(const XMLSize_t /*bufferSize*/)
{
}
Modified: xerces/c/trunk/src/xercesc/util/FileManagers/PosixFileMgr.cpp
URL:
http://svn.apache.org/viewvc/xerces/c/trunk/src/xercesc/util/FileManagers/PosixFileMgr.cpp?rev=673975&r1=673974&r2=673975&view=diff
==============================================================================
--- xerces/c/trunk/src/xercesc/util/FileManagers/PosixFileMgr.cpp (original)
+++ xerces/c/trunk/src/xercesc/util/FileManagers/PosixFileMgr.cpp Fri Jul 4
02:23:56 2008
@@ -164,7 +164,7 @@
while (byteCount > 0)
{
- size_t bytesWritten = fwrite(buffer, sizeof(XMLByte), byteCount,
(FILE*)f);
+ XMLSize_t bytesWritten = fwrite(buffer, sizeof(XMLByte), byteCount,
(FILE*)f);
if (ferror((FILE*)f))
ThrowXMLwithMemMgr(XMLPlatformUtilsException,
XMLExcepts::File_CouldNotWriteToFile, manager);
Modified: xerces/c/trunk/src/xercesc/util/PlatformUtils.hpp
URL:
http://svn.apache.org/viewvc/xerces/c/trunk/src/xercesc/util/PlatformUtils.hpp?rev=673975&r1=673974&r2=673975&view=diff
==============================================================================
--- xerces/c/trunk/src/xercesc/util/PlatformUtils.hpp (original)
+++ xerces/c/trunk/src/xercesc/util/PlatformUtils.hpp Fri Jul 4 02:23:56 2008
@@ -646,7 +646,7 @@
* The results of this function may be altered by defining
* XML_PLATFORM_NEW_BLOCK_ALIGNMENT.
*/
- static inline size_t alignPointerForNewBlockAllocation(size_t ptrSize);
+ static inline XMLSize_t alignPointerForNewBlockAllocation(XMLSize_t
ptrSize);
private :
// -----------------------------------------------------------------------
@@ -724,7 +724,7 @@
// to ensure that returned blocks are properly aligned.
// Note that, although this will take a pointer and return the position
// at which it should be placed for correct alignment, in our code
-// we normally use size_t parameters to discover what the alignment
+// we normally use XMLSize_t parameters to discover what the alignment
// of header blocks should be. Thus, if this is to be
// used for the former purpose, to make compilers happy
// some casting will be necessary - neilg.
@@ -738,21 +738,21 @@
// If a platform requires absolutely no alignment, a value
// of 1 should be specified ("align pointers on 1 byte boundaries").
//
-inline size_t
-XMLPlatformUtils::alignPointerForNewBlockAllocation(size_t ptrSize)
+inline XMLSize_t
+XMLPlatformUtils::alignPointerForNewBlockAllocation(XMLSize_t ptrSize)
{
// Macro XML_PLATFORM_NEW_BLOCK_ALIGNMENT may be defined
// as needed to dictate alignment requirements on a
// per-architecture basis. In the absense of that we
// take an educated guess.
#ifdef XML_PLATFORM_NEW_BLOCK_ALIGNMENT
- static const size_t alignment = XML_PLATFORM_NEW_BLOCK_ALIGNMENT;
+ static const XMLSize_t alignment = XML_PLATFORM_NEW_BLOCK_ALIGNMENT;
#else
- static const size_t alignment = (sizeof(void*) >= sizeof(double)) ?
sizeof(void*) : sizeof(double);
+ static const XMLSize_t alignment = (sizeof(void*) >= sizeof(double)) ?
sizeof(void*) : sizeof(double);
#endif
// Calculate current alignment of pointer
- size_t current = ptrSize % alignment;
+ XMLSize_t current = ptrSize % alignment;
// Adjust pointer alignment as needed
return (current == 0)
Modified: xerces/c/trunk/src/xercesc/xinclude/XIncludeLocation.cpp
URL:
http://svn.apache.org/viewvc/xerces/c/trunk/src/xercesc/xinclude/XIncludeLocation.cpp?rev=673975&r1=673974&r2=673975&view=diff
==============================================================================
--- xerces/c/trunk/src/xercesc/xinclude/XIncludeLocation.cpp (original)
+++ xerces/c/trunk/src/xercesc/xinclude/XIncludeLocation.cpp Fri Jul 4
02:23:56 2008
@@ -5,9 +5,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -31,7 +31,7 @@
const XMLCh *allocate(const XMLCh *href){
const XMLCh *allocated;
- size_t length = XMLString::stringLen(href);
+ XMLSize_t length = XMLString::stringLen(href);
allocated = (const XMLCh
*)XMLPlatformUtils::fgMemoryManager->allocate((length+1) * sizeof(XMLCh));
XMLString::copyString((XMLCh *)allocated, href);
XMLPlatformUtils::removeDotDotSlash((XMLCh *const)allocated);
@@ -86,7 +86,7 @@
/* free the old reference */
deallocate((void *)fHref);
-
+
fHref = relativeHref;
return fHref;
}
@@ -94,35 +94,35 @@
const XMLCh *
XIncludeLocation::findEndOfProtocol(const XMLCh *URI){
if ( URI[0] == chLatin_f &&
- URI[1] == chLatin_i &&
- URI[2] == chLatin_l &&
- URI[3] == chLatin_e &&
- URI[4] == chColon &&
- URI[5] == chForwardSlash &&
- URI[6] == chForwardSlash &&
+ URI[1] == chLatin_i &&
+ URI[2] == chLatin_l &&
+ URI[3] == chLatin_e &&
+ URI[4] == chColon &&
+ URI[5] == chForwardSlash &&
+ URI[6] == chForwardSlash &&
URI[7] == chForwardSlash )
{
return URI + 8;
}
if ( URI[0] == chLatin_f &&
- URI[1] == chLatin_t &&
- URI[2] == chLatin_p &&
- URI[3] == chColon &&
- URI[4] == chForwardSlash &&
- URI[5] == chForwardSlash &&
+ URI[1] == chLatin_t &&
+ URI[2] == chLatin_p &&
+ URI[3] == chColon &&
+ URI[4] == chForwardSlash &&
+ URI[5] == chForwardSlash &&
URI[6] == chForwardSlash )
{
return URI + 7;
}
if ( URI[0] == chLatin_h &&
- URI[1] == chLatin_t &&
- URI[2] == chLatin_t &&
- URI[3] == chLatin_p &&
- URI[4] == chColon &&
- URI[5] == chForwardSlash &&
- URI[6] == chForwardSlash &&
+ URI[1] == chLatin_t &&
+ URI[2] == chLatin_t &&
+ URI[3] == chLatin_p &&
+ URI[4] == chColon &&
+ URI[5] == chForwardSlash &&
+ URI[6] == chForwardSlash &&
URI[7] == chForwardSlash )
{
return URI + 8;
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]