Author: borisk
Date: Fri Jul 4 01:04:44 2008
New Revision: 673949
URL: http://svn.apache.org/viewvc?rev=673949&view=rev
Log:
Use XMLSize_t instead of int/long. Use bool instead of int.
Modified:
xerces/c/trunk/src/xercesc/xinclude/XIncludeUtils.cpp
xerces/c/trunk/src/xercesc/xinclude/XIncludeUtils.hpp
Modified: xerces/c/trunk/src/xercesc/xinclude/XIncludeUtils.cpp
URL:
http://svn.apache.org/viewvc/xerces/c/trunk/src/xercesc/xinclude/XIncludeUtils.cpp?rev=673949&r1=673948&r2=673949&view=diff
==============================================================================
--- xerces/c/trunk/src/xercesc/xinclude/XIncludeUtils.cpp (original)
+++ xerces/c/trunk/src/xercesc/xinclude/XIncludeUtils.cpp Fri Jul 4 01:04:44
2008
@@ -52,7 +52,7 @@
// ---------------------------------------------------------------------------
bool
XIncludeUtils::parseDOMNodeDoingXInclude(DOMNode *sourceNode, DOMDocument
*parsedDocument, XMLEntityHandler* entityResolver){
- int included = 0;
+ bool included = false;
if (sourceNode) {
/* create the list of child elements here, since it gets changed
during the parse */
RefVectorOf<DOMNode> children(10, false);
@@ -82,11 +82,11 @@
/* to have got here, we must not have found an xinclude element in the
current element, so
need to walk the entire child list parsing for each. An xinclude in
a
node does not affect a peer, so we can simply parse each child in
turn */
- for (unsigned int i = 0; i < children.size(); i++){
+ for (XMLSize_t i = 0; i < children.size(); i++){
parseDOMNodeDoingXInclude(children.elementAt(i), parsedDocument,
entityResolver);
}
}
- return (included)?true:false;
+ return included;
}
// ---------------------------------------------------------------------------
@@ -539,7 +539,7 @@
return NULL;
}
Janitor<BinInputStream> janStream(stream);
- const int maxToRead=16*1024;
+ const XMLSize_t maxToRead=16*1024;
XMLByte*
buffer=(XMLByte*)XMLPlatformUtils::fgMemoryManager->allocate(maxToRead *
sizeof(XMLByte));
if(buffer==NULL)
throw OutOfMemoryException();
Modified: xerces/c/trunk/src/xercesc/xinclude/XIncludeUtils.hpp
URL:
http://svn.apache.org/viewvc/xerces/c/trunk/src/xercesc/xinclude/XIncludeUtils.hpp?rev=673949&r1=673948&r2=673949&view=diff
==============================================================================
--- xerces/c/trunk/src/xercesc/xinclude/XIncludeUtils.hpp (original)
+++ xerces/c/trunk/src/xercesc/xinclude/XIncludeUtils.hpp Fri Jul 4 01:04:44
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.
@@ -43,7 +43,7 @@
/**
* Class implementing all the utility functions required by an XInclude
parser.
*
- * This class is designed primarily for internal use. This class implements
+ * This class is designed primarily for internal use. This class implements
* utility methods to be called by an XInclude parser. It is intended to
encapsulate
* the actual processing and recognition of XInclude components.
*/
@@ -80,10 +80,10 @@
* @return a newly created DOMDocument containing the parsed and actioned
* href, or NULL if the document could not be loaded.
*/
- DOMDocument *doXIncludeXMLFileDOM(const XMLCh *href,
+ DOMDocument *doXIncludeXMLFileDOM(const XMLCh *href,
const XMLCh *relativeHref,
DOMNode *xincludeNode,
- DOMDocument *parsedDocument,
+ DOMDocument *parsedDocument,
XMLEntityHandler* entityResolver);
/** Parse an XInclude text file into a DOMText node.
@@ -96,11 +96,11 @@
* @return a newly created DOMText containing the parsed and actioned
* href, or NULL if the document could not be loaded.
*/
- DOMText *doXIncludeTEXTFileDOM(const XMLCh *href,
+ DOMText *doXIncludeTEXTFileDOM(const XMLCh *href,
const XMLCh *relativeHref,
- const XMLCh *encoding,
+ const XMLCh *encoding,
DOMNode *xincludeNode,
- DOMDocument *parsedDocument,
+ DOMDocument *parsedDocument,
XMLEntityHandler* entityResolver);
/** Detect whether the supplied details are correct for an xi:include
element
@@ -156,15 +156,15 @@
*
* @param hrefAttrValue the href to parse and escape.
* @param needsDeallocating set to true if the return value needs
deallocating
- * by the caller after use, false if the value returned is the same as
the
+ * by the caller after use, false if the value returned is the same as the
* hrefAttrValue passed in.
*
- * @return an escaped version of hrefAttrValue or hrefAttrValue itself if
+ * @return an escaped version of hrefAttrValue or hrefAttrValue itself if
* hrefAttrValue contains only valid characters.
*/
/* 4.1.1 */
const XMLCh *getEscapedHRefAttrValue(const XMLCh *hrefAttrValue, bool
&needsDeallocating);
-
+
/** Set the accept and accept-lang parameters on HTTP requests generated
while
* XIncluding.
*
@@ -196,7 +196,7 @@
*/
bool addDocumentURIToCurrentInclusionHistoryStack(const XMLCh *URItoAdd);
- /** Check the XInclude InclusionHistoryStack to see if the supplied URI
+ /** Check the XInclude InclusionHistoryStack to see if the supplied URI
* has already been included. This is used to ensure that circular
inclusion
* chains are detected and that the inclusion mechanism does not get
stuck in
* a loop.
@@ -231,7 +231,7 @@
* @param href The URI of the document being parsed.
*
* @return true if the errorHandler requests continuation of parsing
despite error
- * false if the errorHandler requests parsing end on encountering error,
or it
+ * false if the errorHandler requests parsing end on encountering error,
or it
* there is no error handler.
*/
bool reportError(const DOMNode* const errorNode
@@ -244,9 +244,9 @@
static const XMLCh fgXIBaseAttrName[];
private:
XIncludeHistoryNode *fIncludeHistoryHead;
- long fErrorCount;
+ XMLSize_t fErrorCount;
XMLErrorReporter *fErrorReporter;
- static const XMLCh fgXIIncludeQName[];
+ static const XMLCh fgXIIncludeQName[];
static const XMLCh fgXIFallbackQName[];
static const XMLCh fgXIIncludeHREFAttrName[];
static const XMLCh fgXIIncludeParseAttrName[];
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]