You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by bo...@apache.org on 2008/09/16 17:57:46 UTC

svn commit: r695949 - in /xerces/c/trunk/src/xercesc: framework/ internal/ util/ util/regx/ validators/datatype/

Author: borisk
Date: Tue Sep 16 08:57:44 2008
New Revision: 695949

URL: http://svn.apache.org/viewvc?rev=695949&view=rev
Log:
Fix the remaining VC++ warnings (loss of data and sign change).

Modified:
    xerces/c/trunk/src/xercesc/framework/XMLFormatter.cpp
    xerces/c/trunk/src/xercesc/internal/DGXMLScanner.cpp
    xerces/c/trunk/src/xercesc/internal/IGXMLScanner2.cpp
    xerces/c/trunk/src/xercesc/internal/SGXMLScanner.cpp
    xerces/c/trunk/src/xercesc/internal/WFXMLScanner.cpp
    xerces/c/trunk/src/xercesc/internal/XSerializeEngine.cpp
    xerces/c/trunk/src/xercesc/util/XMLString.cpp
    xerces/c/trunk/src/xercesc/util/XMLString.hpp
    xerces/c/trunk/src/xercesc/util/regx/RegularExpression.cpp
    xerces/c/trunk/src/xercesc/validators/datatype/AbstractStringValidator.cpp
    xerces/c/trunk/src/xercesc/validators/datatype/AbstractStringValidator.hpp
    xerces/c/trunk/src/xercesc/validators/datatype/Base64BinaryDatatypeValidator.cpp
    xerces/c/trunk/src/xercesc/validators/datatype/Base64BinaryDatatypeValidator.hpp
    xerces/c/trunk/src/xercesc/validators/datatype/HexBinaryDatatypeValidator.cpp
    xerces/c/trunk/src/xercesc/validators/datatype/HexBinaryDatatypeValidator.hpp
    xerces/c/trunk/src/xercesc/validators/datatype/ListDatatypeValidator.cpp
    xerces/c/trunk/src/xercesc/validators/datatype/ListDatatypeValidator.hpp

Modified: xerces/c/trunk/src/xercesc/framework/XMLFormatter.cpp
URL: http://svn.apache.org/viewvc/xerces/c/trunk/src/xercesc/framework/XMLFormatter.cpp?rev=695949&r1=695948&r2=695949&view=diff
==============================================================================
--- xerces/c/trunk/src/xercesc/framework/XMLFormatter.cpp (original)
+++ xerces/c/trunk/src/xercesc/framework/XMLFormatter.cpp Tue Sep 16 08:57:44 2008
@@ -582,13 +582,13 @@
 
 void XMLFormatter::writeCharRef(XMLSize_t toWrite)
 {
-    XMLCh tmpBuf[32];
+    XMLCh tmpBuf[64];
     tmpBuf[0] = chAmpersand;
     tmpBuf[1] = chPound;
     tmpBuf[2] = chLatin_x;
 
     // Build a char ref for the current char
-    XMLString::binToText(toWrite, &tmpBuf[3], 8, 16, fMemoryManager);
+    XMLString::sizeToText(toWrite, &tmpBuf[3], 32, 16, fMemoryManager);
     const XMLSize_t bufLen = XMLString::stringLen(tmpBuf);
     tmpBuf[bufLen] = chSemiColon;
     tmpBuf[bufLen+1] = chNull;

Modified: xerces/c/trunk/src/xercesc/internal/DGXMLScanner.cpp
URL: http://svn.apache.org/viewvc/xerces/c/trunk/src/xercesc/internal/DGXMLScanner.cpp?rev=695949&r1=695948&r2=695949&view=diff
==============================================================================
--- xerces/c/trunk/src/xercesc/internal/DGXMLScanner.cpp (original)
+++ xerces/c/trunk/src/xercesc/internal/DGXMLScanner.cpp Tue Sep 16 08:57:44 2008
@@ -3572,8 +3572,8 @@
         // here's where we need to check if there's a SecurityManager,
         // how many entity references we've had
         if(fSecurityManager != 0 && ++fEntityExpansionCount > fEntityExpansionLimit) {
-            XMLCh expLimStr[16];
-            XMLString::binToText(fEntityExpansionLimit, expLimStr, 15, 10, fMemoryManager);
+            XMLCh expLimStr[32];
+            XMLString::sizeToText(fEntityExpansionLimit, expLimStr, 31, 10, fMemoryManager);
             emitError
             (
                 XMLErrs::EntityExpansionLimitExceeded
@@ -3630,8 +3630,8 @@
         // here's where we need to check if there's a SecurityManager,
         // how many entity references we've had
         if(fSecurityManager != 0 && ++fEntityExpansionCount > fEntityExpansionLimit) {
-            XMLCh expLimStr[16];
-            XMLString::binToText(fEntityExpansionLimit, expLimStr, 15, 10, fMemoryManager);
+            XMLCh expLimStr[32];
+            XMLString::sizeToText(fEntityExpansionLimit, expLimStr, 31, 10, fMemoryManager);
             emitError
             (
                 XMLErrs::EntityExpansionLimitExceeded

Modified: xerces/c/trunk/src/xercesc/internal/IGXMLScanner2.cpp
URL: http://svn.apache.org/viewvc/xerces/c/trunk/src/xercesc/internal/IGXMLScanner2.cpp?rev=695949&r1=695948&r2=695949&view=diff
==============================================================================
--- xerces/c/trunk/src/xercesc/internal/IGXMLScanner2.cpp (original)
+++ xerces/c/trunk/src/xercesc/internal/IGXMLScanner2.cpp Tue Sep 16 08:57:44 2008
@@ -3080,8 +3080,8 @@
         // here's where we need to check if there's a SecurityManager,
         // how many entity references we've had
         if(fSecurityManager != 0 && ++fEntityExpansionCount > fEntityExpansionLimit) {
-            XMLCh expLimStr[16];
-            XMLString::binToText(fEntityExpansionLimit, expLimStr, 15, 10, fMemoryManager);
+            XMLCh expLimStr[32];
+            XMLString::sizeToText(fEntityExpansionLimit, expLimStr, 31, 10, fMemoryManager);
             emitError
             (
                 XMLErrs::EntityExpansionLimitExceeded
@@ -3138,8 +3138,8 @@
         // here's where we need to check if there's a SecurityManager,
         // how many entity references we've had
         if(fSecurityManager != 0 && ++fEntityExpansionCount > fEntityExpansionLimit) {
-            XMLCh expLimStr[16];
-            XMLString::binToText(fEntityExpansionLimit, expLimStr, 15, 10, fMemoryManager);
+            XMLCh expLimStr[32];
+            XMLString::sizeToText(fEntityExpansionLimit, expLimStr, 31, 10, fMemoryManager);
             emitError
             (
                 XMLErrs::EntityExpansionLimitExceeded

Modified: xerces/c/trunk/src/xercesc/internal/SGXMLScanner.cpp
URL: http://svn.apache.org/viewvc/xerces/c/trunk/src/xercesc/internal/SGXMLScanner.cpp?rev=695949&r1=695948&r2=695949&view=diff
==============================================================================
--- xerces/c/trunk/src/xercesc/internal/SGXMLScanner.cpp (original)
+++ xerces/c/trunk/src/xercesc/internal/SGXMLScanner.cpp Tue Sep 16 08:57:44 2008
@@ -4626,8 +4626,8 @@
     // here's where we need to check if there's a SecurityManager,
     // how many entity references we've had
     if(fSecurityManager != 0 && ++fEntityExpansionCount > fEntityExpansionLimit) {
-        XMLCh expLimStr[16];
-        XMLString::binToText(fEntityExpansionLimit, expLimStr, 15, 10, fMemoryManager);
+        XMLCh expLimStr[32];
+        XMLString::sizeToText(fEntityExpansionLimit, expLimStr, 31, 10, fMemoryManager);
         emitError
         (
             XMLErrs::EntityExpansionLimitExceeded

Modified: xerces/c/trunk/src/xercesc/internal/WFXMLScanner.cpp
URL: http://svn.apache.org/viewvc/xerces/c/trunk/src/xercesc/internal/WFXMLScanner.cpp?rev=695949&r1=695948&r2=695949&view=diff
==============================================================================
--- xerces/c/trunk/src/xercesc/internal/WFXMLScanner.cpp (original)
+++ xerces/c/trunk/src/xercesc/internal/WFXMLScanner.cpp Tue Sep 16 08:57:44 2008
@@ -2116,8 +2116,8 @@
     // here's where we need to check if there's a SecurityManager,
     // how many entity references we've had
     if(fSecurityManager != 0 && ++fEntityExpansionCount > fEntityExpansionLimit) {
-        XMLCh expLimStr[16];
-        XMLString::binToText(fEntityExpansionLimit, expLimStr, 15, 10, fMemoryManager);
+        XMLCh expLimStr[32];
+        XMLString::sizeToText(fEntityExpansionLimit, expLimStr, 31, 10, fMemoryManager);
         emitError
         ( 
             XMLErrs::EntityExpansionLimitExceeded

Modified: xerces/c/trunk/src/xercesc/internal/XSerializeEngine.cpp
URL: http://svn.apache.org/viewvc/xerces/c/trunk/src/xercesc/internal/XSerializeEngine.cpp?rev=695949&r1=695948&r2=695949&view=diff
==============================================================================
--- xerces/c/trunk/src/xercesc/internal/XSerializeEngine.cpp (original)
+++ xerces/c/trunk/src/xercesc/internal/XSerializeEngine.cpp Tue Sep 16 08:57:44 2008
@@ -835,7 +835,7 @@
       ***/
     TEST_THROW_ARG2( (objectTag > fLoadPool->size())
               , objectTag
-              , fLoadPool->size()
+              , (unsigned long)fLoadPool->size() // @@ Need to use sizeToText directly.
               , XMLExcepts::XSer_LoadPool_UppBnd_Exceed
               )
 
@@ -853,7 +853,7 @@
 
     TEST_THROW_ARG2( (fLoadPool->size() != fObjectCount)
                , fObjectCount
-               , fLoadPool->size()
+               , (unsigned long)fLoadPool->size() // @@ Need to use sizeToText directly.
                , XMLExcepts::XSer_LoadPool_NoTally_ObjCnt
                )
 
@@ -899,16 +899,16 @@
     /***
      * InputStream MUST fill in the exact amount of bytes as requested
      * to do: combine the checking and create a new exception code later
-     ***/
+    ***/
     TEST_THROW_ARG2( (bytesRead < fBufSize)
-               , (unsigned long)bytesRead
-               , (unsigned long)fBufSize
+               , (unsigned long)bytesRead // @@ Need to use sizeToText directly.
+               , (unsigned long)fBufSize  // @@ Need to use sizeToText directly.
                , XMLExcepts::XSer_InStream_Read_LT_Req
                )
 
     TEST_THROW_ARG2( (bytesRead > fBufSize)
-               , (unsigned long)bytesRead
-               , (unsigned long)fBufSize
+               , (unsigned long)bytesRead // @@ Need to use sizeToText directly.
+               , (unsigned long)fBufSize  // @@ Need to use sizeToText directly.
                , XMLExcepts::XSer_InStream_Read_OverFlow
                )
 
@@ -943,7 +943,7 @@
 inline void XSerializeEngine::checkAndFlushBuffer(XMLSize_t bytesNeedToWrite)
 {
     TEST_THROW_ARG1( (bytesNeedToWrite <= 0)
-                   , (unsigned long)bytesNeedToWrite
+                   , (unsigned long)bytesNeedToWrite // @@ Need to use sizeToText directly.
                    , XMLExcepts::XSer_Inv_checkFlushBuffer_Size
                    )
 
@@ -956,7 +956,7 @@
 {
 
     TEST_THROW_ARG1( (bytesNeedToRead <= 0)
-                   , (unsigned long)bytesNeedToRead
+                   , (unsigned long)bytesNeedToRead // @@ Need to use sizeToText directly.
                    , XMLExcepts::XSer_Inv_checkFillBuffer_Size
                    )
 
@@ -972,8 +972,8 @@
 {
 
     TEST_THROW_ARG2 ( !((fBufStart <= fBufCur) && (fBufCur <= fBufEnd))
-                    , (unsigned long)(fBufCur - fBufStart)
-                    , (unsigned long)(fBufEnd - fBufCur)
+                    , (unsigned long)(fBufCur - fBufStart) // @@ Need to use sizeToText directly.
+                    , (unsigned long)(fBufEnd - fBufCur)   // @@ Need to use sizeToText directly.
                     , XMLExcepts::XSer_StoreBuffer_Violation
                     )
 

Modified: xerces/c/trunk/src/xercesc/util/XMLString.cpp
URL: http://svn.apache.org/viewvc/xerces/c/trunk/src/xercesc/util/XMLString.cpp?rev=695949&r1=695948&r2=695949&view=diff
==============================================================================
--- xerces/c/trunk/src/xercesc/util/XMLString.cpp (original)
+++ xerces/c/trunk/src/xercesc/util/XMLString.cpp Tue Sep 16 08:57:44 2008
@@ -80,6 +80,22 @@
 // ---------------------------------------------------------------------------
 //  XMLString: Public static methods
 // ---------------------------------------------------------------------------
+
+void XMLString::sizeToText(  const   XMLSize_t           toFormat
+                            ,       char* const          toFill
+                            , const XMLSize_t            maxChars
+                            , const unsigned int         radix
+                            , MemoryManager* const       manager)
+{
+#if XERCES_SIZEOF_INT != 8 && XERCES_SIZEOF_LONG != 8 && XERCES_SIZEOF_INT64 != 4
+    // Call the int 64-bit version.
+    binToText((XMLUInt64)toFormat, toFill, maxChars, radix, manager);
+#else
+    // Call the unsigned long version.
+    binToText((unsigned long)toFormat, toFill, maxChars, radix, manager);
+#endif
+}
+
 #if XERCES_SIZEOF_INT != 8 && XERCES_SIZEOF_LONG != 8 && XERCES_SIZEOF_INT64 != 4
 void XMLString::binToText(  const   XMLUInt64            toFormat
                             ,       char* const          toFill
@@ -837,6 +853,22 @@
 // ---------------------------------------------------------------------------
 //  Wide char versions of most of the string methods
 // ---------------------------------------------------------------------------
+
+void XMLString::sizeToText(  const  XMLSize_t            toFormat
+                            ,       XMLCh* const         toFill
+                            , const XMLSize_t            maxChars
+                            , const unsigned int         radix
+                            , MemoryManager* const       manager)
+{
+#if XERCES_SIZEOF_INT != 8 && XERCES_SIZEOF_LONG != 8 && XERCES_SIZEOF_INT64 != 4
+    // Call the int 64-bit version.
+    binToText((XMLUInt64)toFormat, toFill, maxChars, radix, manager);
+#else
+    // Call the unsigned long version.
+    binToText((unsigned long)toFormat, toFill, maxChars, radix, manager);
+#endif
+}
+
 #if XERCES_SIZEOF_INT != 8 && XERCES_SIZEOF_LONG != 8 && XERCES_SIZEOF_INT64 != 4
 void XMLString::binToText(  const   XMLUInt64            toFormat
                             ,       XMLCh* const         toFill

Modified: xerces/c/trunk/src/xercesc/util/XMLString.hpp
URL: http://svn.apache.org/viewvc/xerces/c/trunk/src/xercesc/util/XMLString.hpp?rev=695949&r1=695948&r2=695949&view=diff
==============================================================================
--- xerces/c/trunk/src/xercesc/util/XMLString.hpp (original)
+++ xerces/c/trunk/src/xercesc/util/XMLString.hpp Tue Sep 16 08:57:44 2008
@@ -901,6 +901,46 @@
     /** @name Conversion functions */
     //@{
 
+      /** Converts size to a text string based a given radix
+      *
+      * @param toFormat The size to convert
+      * @param toFill The buffer that will hold the output on return. The
+      *        size of this buffer should at least be 'maxChars + 1'.
+      * @param maxChars The maximum number of output characters that can be
+      *         accepted. If the result will not fit, it is an error.
+      * @param radix The radix of the input data, based on which the conversion
+      * @param manager The MemoryManager to use to allocate objects
+      * will be done
+      */
+    static void sizeToText
+    (
+        const   XMLSize_t           toFormat
+        ,       char* const         toFill
+        , const XMLSize_t           maxChars
+        , const unsigned int        radix
+        , MemoryManager* const      manager = XMLPlatformUtils::fgMemoryManager
+    );
+
+    /** Converts size to a text string based a given radix
+      *
+      * @param toFormat The size to convert
+      * @param toFill The buffer that will hold the output on return. The
+      *        size of this buffer should at least be 'maxChars + 1'.
+      * @param maxChars The maximum number of output characters that can be
+      *         accepted. If the result will not fit, it is an error.
+      * @param radix The radix of the input data, based on which the conversion
+      * @param manager The MemoryManager to use to allocate objects
+      * will be done
+      */
+    static void sizeToText
+    (
+        const   XMLSize_t           toFormat
+        ,       XMLCh* const        toFill
+        , const XMLSize_t           maxChars
+        , const unsigned int        radix
+        , MemoryManager* const      manager = XMLPlatformUtils::fgMemoryManager
+    );
+
     /** Converts binary data to a text string based a given radix
       *
       * @param toFormat The number to convert

Modified: xerces/c/trunk/src/xercesc/util/regx/RegularExpression.cpp
URL: http://svn.apache.org/viewvc/xerces/c/trunk/src/xercesc/util/regx/RegularExpression.cpp?rev=695949&r1=695948&r2=695949&view=diff
==============================================================================
--- xerces/c/trunk/src/xercesc/util/regx/RegularExpression.cpp (original)
+++ xerces/c/trunk/src/xercesc/util/regx/RegularExpression.cpp Tue Sep 16 08:57:44 2008
@@ -835,7 +835,7 @@
         tokStart = match->getEndPos(0);
     }
 
-    if(end > tokStart)
+    if(end > (XMLSize_t)tokStart)
         result.append(matchString + tokStart, end - tokStart);
 
     return XMLString::replicate(result.getRawBuffer(), manager);

Modified: xerces/c/trunk/src/xercesc/validators/datatype/AbstractStringValidator.cpp
URL: http://svn.apache.org/viewvc/xerces/c/trunk/src/xercesc/validators/datatype/AbstractStringValidator.cpp?rev=695949&r1=695948&r2=695949&view=diff
==============================================================================
--- xerces/c/trunk/src/xercesc/validators/datatype/AbstractStringValidator.cpp (original)
+++ xerces/c/trunk/src/xercesc/validators/datatype/AbstractStringValidator.cpp Tue Sep 16 08:57:44 2008
@@ -585,7 +585,7 @@
         return;
 
     checkValueSpace(content, manager);
-    int length = getLength(content, manager);
+    XMLSize_t length = getLength(content, manager);
 
     if (((thisFacetsDefined & DatatypeValidator::FACET_MAXLENGTH) != 0) &&
         (length > getMaxLength()))
@@ -713,10 +713,10 @@
             , manager);
 }
 
-int AbstractStringValidator::getLength(const XMLCh* const content
-                                   , MemoryManager* const) const
+XMLSize_t AbstractStringValidator::getLength(const XMLCh* const content
+                                           , MemoryManager* const) const
 {
-    return (int)XMLString::stringLen(content);
+    return XMLString::stringLen(content);
 }
 
 /***

Modified: xerces/c/trunk/src/xercesc/validators/datatype/AbstractStringValidator.hpp
URL: http://svn.apache.org/viewvc/xerces/c/trunk/src/xercesc/validators/datatype/AbstractStringValidator.hpp?rev=695949&r1=695948&r2=695949&view=diff
==============================================================================
--- xerces/c/trunk/src/xercesc/validators/datatype/AbstractStringValidator.hpp (original)
+++ xerces/c/trunk/src/xercesc/validators/datatype/AbstractStringValidator.hpp Tue Sep 16 08:57:44 2008
@@ -110,7 +110,7 @@
     virtual void checkAdditionalFacet(const XMLCh* const content
                                     , MemoryManager* const manager) const;
 
-    virtual int getLength(const XMLCh* const content
+    virtual XMLSize_t getLength(const XMLCh* const content
         , MemoryManager* const manager) const;
     
     virtual void checkValueSpace(const XMLCh* const content

Modified: xerces/c/trunk/src/xercesc/validators/datatype/Base64BinaryDatatypeValidator.cpp
URL: http://svn.apache.org/viewvc/xerces/c/trunk/src/xercesc/validators/datatype/Base64BinaryDatatypeValidator.cpp?rev=695949&r1=695948&r2=695949&view=diff
==============================================================================
--- xerces/c/trunk/src/xercesc/validators/datatype/Base64BinaryDatatypeValidator.cpp (original)
+++ xerces/c/trunk/src/xercesc/validators/datatype/Base64BinaryDatatypeValidator.cpp Tue Sep 16 08:57: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.
@@ -70,8 +70,9 @@
 {
     if (!content || !*content)
         return;
-    if (getLength(content, manager) < 0)
-    { 
+
+    if (Base64::getDataLength(content, manager, Base64::Conf_Schema) < 0)
+    {
         ThrowXMLwithMemMgr1(InvalidDatatypeValueException
                 , XMLExcepts::VALUE_Not_Base64
                 , content
@@ -79,12 +80,13 @@
     }
 }
 
-int Base64BinaryDatatypeValidator::getLength(const XMLCh* const content
+XMLSize_t Base64BinaryDatatypeValidator::getLength(const XMLCh* const content
                                          , MemoryManager* const manager) const
 {
     if (!content || !*content)
         return 0;
-    return Base64::getDataLength(content, manager, Base64::Conf_Schema);
+
+    return (XMLSize_t)Base64::getDataLength(content, manager, Base64::Conf_Schema);
 }
 
 void Base64BinaryDatatypeValidator::normalizeEnumeration(MemoryManager* const manager)
@@ -101,7 +103,7 @@
 void Base64BinaryDatatypeValidator::normalizeContent(XMLCh* const content
                                                      , MemoryManager* const manager) const
 {
-    XMLString::removeWS(content, manager);     
+    XMLString::removeWS(content, manager);
 }
 
 /***

Modified: xerces/c/trunk/src/xercesc/validators/datatype/Base64BinaryDatatypeValidator.hpp
URL: http://svn.apache.org/viewvc/xerces/c/trunk/src/xercesc/validators/datatype/Base64BinaryDatatypeValidator.hpp?rev=695949&r1=695948&r2=695949&view=diff
==============================================================================
--- xerces/c/trunk/src/xercesc/validators/datatype/Base64BinaryDatatypeValidator.hpp (original)
+++ xerces/c/trunk/src/xercesc/validators/datatype/Base64BinaryDatatypeValidator.hpp Tue Sep 16 08:57:44 2008
@@ -74,7 +74,7 @@
     virtual void checkValueSpace(const XMLCh* const content
                             , MemoryManager* const manager);
 
-    virtual int  getLength(const XMLCh* const content
+    virtual XMLSize_t getLength(const XMLCh* const content
                        , MemoryManager* const manager) const;
 
     virtual void normalizeEnumeration(MemoryManager* const manager);

Modified: xerces/c/trunk/src/xercesc/validators/datatype/HexBinaryDatatypeValidator.cpp
URL: http://svn.apache.org/viewvc/xerces/c/trunk/src/xercesc/validators/datatype/HexBinaryDatatypeValidator.cpp?rev=695949&r1=695948&r2=695949&view=diff
==============================================================================
--- xerces/c/trunk/src/xercesc/validators/datatype/HexBinaryDatatypeValidator.cpp (original)
+++ xerces/c/trunk/src/xercesc/validators/datatype/HexBinaryDatatypeValidator.cpp Tue Sep 16 08:57: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.
@@ -65,10 +65,10 @@
 //  Utilities
 // ---------------------------------------------------------------------------
 
-void HexBinaryDatatypeValidator::checkValueSpace(const XMLCh* const content
-                                                 , MemoryManager* const manager)
+void HexBinaryDatatypeValidator::checkValueSpace(const XMLCh* const content,
+                                                 MemoryManager* const manager)
 {
-    if (getLength(content, manager) < 0)
+    if (HexBin::getDataLength(content) < 0)
     {
         ThrowXMLwithMemMgr1(InvalidDatatypeValueException
                 , XMLExcepts::VALUE_Not_HexBin
@@ -77,10 +77,10 @@
     }
 }
 
-int HexBinaryDatatypeValidator::getLength(const XMLCh* const content
+XMLSize_t HexBinaryDatatypeValidator::getLength(const XMLCh* const content
                                       , MemoryManager* const) const
 {
-    return HexBin::getDataLength(content);
+    return (XMLSize_t)HexBin::getDataLength(content);
 }
 
 /***

Modified: xerces/c/trunk/src/xercesc/validators/datatype/HexBinaryDatatypeValidator.hpp
URL: http://svn.apache.org/viewvc/xerces/c/trunk/src/xercesc/validators/datatype/HexBinaryDatatypeValidator.hpp?rev=695949&r1=695948&r2=695949&view=diff
==============================================================================
--- xerces/c/trunk/src/xercesc/validators/datatype/HexBinaryDatatypeValidator.hpp (original)
+++ xerces/c/trunk/src/xercesc/validators/datatype/HexBinaryDatatypeValidator.hpp Tue Sep 16 08:57:44 2008
@@ -75,7 +75,7 @@
     virtual void checkValueSpace(const XMLCh* const content
                                 , MemoryManager* const manager);
 
-    virtual int  getLength(const XMLCh* const content
+    virtual XMLSize_t  getLength(const XMLCh* const content
                        , MemoryManager* const manager) const;
 
 private:

Modified: xerces/c/trunk/src/xercesc/validators/datatype/ListDatatypeValidator.cpp
URL: http://svn.apache.org/viewvc/xerces/c/trunk/src/xercesc/validators/datatype/ListDatatypeValidator.cpp?rev=695949&r1=695948&r2=695949&view=diff
==============================================================================
--- xerces/c/trunk/src/xercesc/validators/datatype/ListDatatypeValidator.cpp (original)
+++ xerces/c/trunk/src/xercesc/validators/datatype/ListDatatypeValidator.cpp Tue Sep 16 08:57:44 2008
@@ -175,8 +175,8 @@
     {
         XMLCh value1[BUF_LEN+1];
         XMLCh value2[BUF_LEN+1];
-        XMLString::binToText(tokenNumber, value1, BUF_LEN, 10, manager);
-        XMLString::binToText(getMaxLength(), value2, BUF_LEN, 10, manager);
+        XMLString::sizeToText(tokenNumber, value1, BUF_LEN, 10, manager);
+        XMLString::sizeToText(getMaxLength(), value2, BUF_LEN, 10, manager);
 
         ThrowXMLwithMemMgr3(InvalidDatatypeValueException
                 , XMLExcepts::VALUE_GT_maxLen
@@ -191,8 +191,8 @@
     {
         XMLCh value1[BUF_LEN+1];
         XMLCh value2[BUF_LEN+1];
-        XMLString::binToText(tokenNumber, value1, BUF_LEN, 10, manager);
-        XMLString::binToText(getMinLength(), value2, BUF_LEN, 10, manager);
+        XMLString::sizeToText(tokenNumber, value1, BUF_LEN, 10, manager);
+        XMLString::sizeToText(getMinLength(), value2, BUF_LEN, 10, manager);
 
         ThrowXMLwithMemMgr3(InvalidDatatypeValueException
                 , XMLExcepts::VALUE_LT_minLen
@@ -207,8 +207,8 @@
     {
         XMLCh value1[BUF_LEN+1];
         XMLCh value2[BUF_LEN+1];
-        XMLString::binToText(tokenNumber, value1, BUF_LEN, 10, manager);
-        XMLString::binToText(AbstractStringValidator::getLength(), value2, BUF_LEN, 10, manager);
+        XMLString::sizeToText(tokenNumber, value1, BUF_LEN, 10, manager);
+        XMLString::sizeToText(AbstractStringValidator::getLength(), value2, BUF_LEN, 10, manager);
 
         ThrowXMLwithMemMgr3(InvalidDatatypeValueException
                 , XMLExcepts::VALUE_NE_Len
@@ -286,13 +286,13 @@
                                             , MemoryManager* const)
 {}
 
-int ListDatatypeValidator::getLength(const XMLCh* const content
+XMLSize_t ListDatatypeValidator::getLength(const XMLCh* const content
                                      , MemoryManager* const manager) const
 {
     BaseRefVectorOf<XMLCh>* tokenVector = XMLString::tokenizeString(content, manager);
     Janitor<BaseRefVectorOf<XMLCh> > janName(tokenVector);
 
-    return (int)tokenVector->size();
+    return tokenVector->size();
 }
 
 void ListDatatypeValidator::inspectFacetBase(MemoryManager* const manager)

Modified: xerces/c/trunk/src/xercesc/validators/datatype/ListDatatypeValidator.hpp
URL: http://svn.apache.org/viewvc/xerces/c/trunk/src/xercesc/validators/datatype/ListDatatypeValidator.hpp?rev=695949&r1=695948&r2=695949&view=diff
==============================================================================
--- xerces/c/trunk/src/xercesc/validators/datatype/ListDatatypeValidator.hpp (original)
+++ xerces/c/trunk/src/xercesc/validators/datatype/ListDatatypeValidator.hpp Tue Sep 16 08:57:44 2008
@@ -139,7 +139,7 @@
     virtual void checkValueSpace(const XMLCh* const content
                                 , MemoryManager* const manager);
 
-    virtual int getLength(const XMLCh* const content
+    virtual XMLSize_t getLength(const XMLCh* const content
             , MemoryManager* const manager) const;
 
     //



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@xerces.apache.org
For additional commands, e-mail: commits-help@xerces.apache.org