dbertoni    01/09/25 14:12:52

  Modified:    c/src/PlatformSupport ArenaBlock.hpp AttributeListImpl.cpp
                        AttributesImpl.cpp DOMStringHelper.cpp
                        DOMStringHelper.hpp DOMStringPrintWriter.cpp
                        DOMStringPrintWriter.hpp DoubleSupport.cpp
                        FormatterListener.hpp NullPrintWriter.cpp
                        NullPrintWriter.hpp PrintWriter.hpp
                        ReusableArenaBlock.hpp StringTokenizer.cpp
                        StringTokenizer.hpp URISupport.cpp Writer.hpp
                        XalanBitmap.cpp XalanBitmap.hpp
                        XalanDOMStringHashTable.cpp
                        XalanDOMStringHashTable.hpp XalanDOMStringPool.cpp
                        XalanDOMStringPool.hpp XalanDecimalFormat.cpp
                        XalanNumberFormat.cpp XalanOutputStream.cpp
                        XalanOutputStream.hpp
                        XalanOutputStreamPrintWriter.cpp
                        XalanOutputStreamPrintWriter.hpp
                        XalanToXercesTranscoderWrapper.cpp
                        XalanToXercesTranscoderWrapper.hpp
                        XalanTranscodingServices.hpp
                        XalanUTF16Transcoder.cpp XalanUTF16Transcoder.hpp
  Log:
  32/64-bit fixes.
  
  Revision  Changes    Path
  1.11      +1 -1      xml-xalan/c/src/PlatformSupport/ArenaBlock.hpp
  
  Index: ArenaBlock.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/PlatformSupport/ArenaBlock.hpp,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- ArenaBlock.hpp    2001/01/16 02:43:35     1.10
  +++ ArenaBlock.hpp    2001/09/25 21:12:51     1.11
  @@ -195,7 +195,7 @@
                        // If no memory has yet been allocated, then allocate 
it...
                        if (m_objectBlock == 0)
                        {
  -                             m_objectBlock = 
m_allocator.allocate(m_blockSize, 0);
  +                             m_objectBlock = 
m_allocator.allocate(m_blockSize);
                        }
                        assert(m_objectBlock != 0);
   
  
  
  
  1.20      +4 -1      xml-xalan/c/src/PlatformSupport/AttributeListImpl.cpp
  
  Index: AttributeListImpl.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/PlatformSupport/AttributeListImpl.cpp,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- AttributeListImpl.cpp     2001/04/30 18:07:01     1.19
  +++ AttributeListImpl.cpp     2001/09/25 21:12:51     1.20
  @@ -227,7 +227,10 @@
   unsigned int
   AttributeListImpl::getLength() const
   {
  -     return m_AttributeVector.size();
  +     // Make sure the mismatch between Xerces and vector<> doesn't cause a 
problem...
  +     assert(m_AttributeVector.size() == unsigned(m_AttributeVector.size()));
  +
  +     return unsigned(m_AttributeVector.size());
   }
   
   
  
  
  
  1.4       +5 -5      xml-xalan/c/src/PlatformSupport/AttributesImpl.cpp
  
  Index: AttributesImpl.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/PlatformSupport/AttributesImpl.cpp,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- AttributesImpl.cpp        2001/04/30 18:07:02     1.3
  +++ AttributesImpl.cpp        2001/09/25 21:12:51     1.4
  @@ -231,7 +231,7 @@
   unsigned int
   AttributesImpl::getLength() const
   {
  -     return m_attributesVector.size();
  +     return unsigned(m_attributesVector.size());
   }
   
   
  @@ -341,7 +341,7 @@
        }
        else
        {
  -             return getType(AttributesVectorType::size_type(theIndex));
  +             return getType(theIndex);
        }
   }
   
  @@ -358,7 +358,7 @@
        }
        else
        {
  -             return getValue(AttributesVectorType::size_type(theIndex));
  +             return getValue(theIndex);
        }
   }
   
  @@ -377,7 +377,7 @@
        }
        else
        {
  -             return getType(AttributesVectorType::size_type(theIndex));
  +             return getType(theIndex);
        }
   }
   
  @@ -396,7 +396,7 @@
        }
        else
        {
  -             return getValue(AttributesVectorType::size_type(theIndex));
  +             return getValue(theIndex);
        }
   }
   
  
  
  
  1.62      +58 -55    xml-xalan/c/src/PlatformSupport/DOMStringHelper.cpp
  
  Index: DOMStringHelper.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/PlatformSupport/DOMStringHelper.cpp,v
  retrieving revision 1.61
  retrieving revision 1.62
  diff -u -r1.61 -r1.62
  --- DOMStringHelper.cpp       2001/09/04 16:48:47     1.61
  +++ DOMStringHelper.cpp       2001/09/25 21:12:51     1.62
  @@ -179,8 +179,8 @@
        assert(theString != 0);
        assert(theSubstring != 0);
   
  -     const unsigned int      theStringLength = length(theString);
  -     const unsigned int      theSubstringLength = length(theSubstring);
  +     const XalanDOMString::size_type         theStringLength = 
length(theString);
  +     const XalanDOMString::size_type         theSubstringLength = 
length(theSubstring);
   
        // If the substring is longer than the string, then
        // it's not a substring.
  @@ -203,13 +203,13 @@
                          theStringLength - theStringIndex >= 
theSubstringLength)
                {
                        // We always start over from the beginning of the 
second string.
  -                     unsigned int    theSubstringIndex = 0;
  +                     XalanDOMString::size_type       theSubstringIndex = 0;
   
                        // This variable will be incremented to index into the 
first
                        // string.  That way, we preserve the first string 
index for
                        // when we have to restart the following loop with the 
next
                        // position in the first string.
  -                     unsigned int    theOffset = 0;
  +                     XalanDOMString::size_type       theOffset = 0;
   
                        // Compare the characters in the two strings, at the
                        // current indices, until the characters don't match.
  @@ -266,7 +266,7 @@
                        const XalanDOMChar*             theString,
                        XalanDOMChar                    theChar)
   {
  -     const unsigned int      theLength = length(theString);
  +     const XalanDOMString::size_type         theLength = length(theString);
   
        if (theLength == 0)
        {
  @@ -274,15 +274,14 @@
        }
        else
        {
  -             unsigned int    theIndex = theLength - 1;
  +             XalanDOMString::size_type       theIndex = theLength;
   
  -             // Rely on wrap-around...
  -             while(theIndex < theLength && theString[theIndex] != theChar)
  +             while(theIndex > 0 && theString[theIndex - 1] != theChar)
                {
                        theIndex--;
                }
   
  -             return theIndex > theLength ? theLength : theIndex;
  +             return theIndex == 0 ? theLength : theIndex - 1;
        }
   }
   
  @@ -295,9 +294,9 @@
   {
        bool            fResult = false;
   
  -     const unsigned int      theStringLength = length(theString);
  +     const XalanDOMString::size_type         theStringLength = 
length(theString);
   
  -     const unsigned int      theSubstringLength = length(theSubstring);
  +     const XalanDOMString::size_type         theSubstringLength = 
length(theSubstring);
   
        if (theSubstringLength == 0)
        {
  @@ -306,7 +305,7 @@
        }
        else if (theStringLength >= theSubstringLength)
        {
  -             unsigned int    i = 0;
  +             XalanDOMString::size_type       i = 0;
   
                // Compare each character...
                for (;
  @@ -383,22 +382,25 @@
                        const XalanDOMChar*             theString,
                        const XalanDOMChar*             theSubstring)
   {
  +     assert(theString != 0);
  +     assert(theSubstring != 0);
  +
        bool                            fResult = false;
   
  -     const unsigned int      theStringLength = length(theString);
  +     const XalanDOMString::size_type         theStringLength = 
length(theString);
   
  -     const unsigned int      theSubStringLength = length(theSubstring);
  +     const XalanDOMString::size_type         theSubstringLength = 
length(theSubstring);
   
        // If the substring is longer, there's no point in continuing.
  -     if (theStringLength >= theSubStringLength)
  +     if (theSubstringLength >  0 && theStringLength >= theSubstringLength)
        {
  -             int             i = theStringLength - 1;
  -             int             j = theSubStringLength - 1;
  +             XalanDOMString::size_type       i = theStringLength;
  +             XalanDOMString::size_type       j = theSubstringLength;
   
                // Compare each character...
                for (;
  -                             j >= 0 &&
  -                                             theString[i] == theSubstring[j];
  +                             j > 0 &&
  +                                             theString[i - 1] == 
theSubstring[j - 1];
                                        --j, --i)
                {
                        ;
  @@ -406,7 +408,7 @@
   
                // If we've gotten to the beginning of the substring, then
                // return true.
  -             if (j == -1)
  +             if (j == 0)
                {
                        fResult = true;
                }
  @@ -474,13 +476,13 @@
   
   XALAN_PLATFORMSUPPORT_EXPORT_FUNCTION(XalanDOMString)
   substring(
  -                     const XalanDOMChar*             theString,
  -                     unsigned int                    theStartIndex,
  -                     unsigned int                    theEndIndex)
  +                     const XalanDOMChar*                     theString,
  +                     XalanDOMString::size_type       theStartIndex,
  +                     XalanDOMString::size_type       theEndIndex)
   {
        assert(theString != 0);
   
  -     const unsigned int      theStringLength = length(theString);
  +     const XalanDOMString::size_type         theStringLength = 
length(theString);
   
        // $$$ ToDo: In Java-land, any failing of this
        // assertion would result in an exception being thrown.
  @@ -493,7 +495,7 @@
        }
        else
        {
  -             const unsigned int      theLength = theEndIndex == UINT_MAX ? 
theStringLength - theStartIndex :
  +             const XalanDOMString::size_type         theLength = theEndIndex 
== XalanDOMString::npos ? theStringLength - theStartIndex :
                                                                                
                        theEndIndex - theStartIndex;
                assert(theStartIndex + theLength <= theStringLength);
   
  @@ -505,14 +507,14 @@
   
   XALAN_PLATFORMSUPPORT_EXPORT_FUNCTION(XalanDOMString)&
   substring(
  -                     const XalanDOMChar*             theString,
  -                     XalanDOMString&                 theSubstring,
  -                     unsigned int                    theStartIndex,
  -                     unsigned int                    theEndIndex)
  +                     const XalanDOMChar*                     theString,
  +                     XalanDOMString&                         theSubstring,
  +                     XalanDOMString::size_type       theStartIndex,
  +                     XalanDOMString::size_type       theEndIndex)
   {
        assert(theString != 0);
   
  -     const unsigned int      theStringLength = length(theString);
  +     const XalanDOMString::size_type         theStringLength = 
length(theString);
   
        // $$$ ToDo: In Java-land, any failing of this
        // assertion would result in an exception being thrown.
  @@ -525,7 +527,7 @@
        }
        else
        {
  -             const unsigned int      theLength = theEndIndex == UINT_MAX ? 
theStringLength - theStartIndex :
  +             const XalanDOMString::size_type         theLength = theEndIndex 
== XalanDOMString::npos ? theStringLength - theStartIndex :
                                                                                
                        theEndIndex - theStartIndex;
                assert(theStartIndex + theLength <= theStringLength);
   
  @@ -539,12 +541,12 @@
   
   XALAN_PLATFORMSUPPORT_EXPORT_FUNCTION(void)
   substring(
  -                     const XalanDOMString&   theString,
  -                     XalanDOMString&                 theSubstring,
  -                     unsigned int                    theStartIndex,
  -                     unsigned int                    theEndIndex)
  +                     const XalanDOMString&           theString,
  +                     XalanDOMString&                         theSubstring,
  +                     XalanDOMString::size_type       theStartIndex,
  +                     XalanDOMString::size_type       theEndIndex)
   {
  -     const unsigned int      theStringLength = length(theString);
  +     const XalanDOMString::size_type         theStringLength = 
length(theString);
   
        // $$$ ToDo: In Java-land, any failing of this
        // assertion would result in an exception being thrown.
  @@ -557,7 +559,7 @@
        }
        else
        {
  -             const unsigned int      theLength = theEndIndex == UINT_MAX ? 
theStringLength - theStartIndex :
  +             const XalanDOMString::size_type         theLength = theEndIndex 
== XalanDOMString::npos ? theStringLength - theStartIndex :
                                                                                
                        theEndIndex - theStartIndex;
   
                if (theLength == 0)
  @@ -577,11 +579,11 @@
   
   XALAN_PLATFORMSUPPORT_EXPORT_FUNCTION(XalanDOMString)
   substring(
  -                     const XalanDOMString&   theString,
  -                     unsigned int                    theStartIndex,
  -                     unsigned int                    theEndIndex)
  +                     const XalanDOMString&           theString,
  +                     XalanDOMString::size_type       theStartIndex,
  +                     XalanDOMString::size_type       theEndIndex)
   {
  -     const unsigned int      theStringLength = length(theString);
  +     const XalanDOMString::size_type         theStringLength = 
length(theString);
   
        // $$$ ToDo: In Java-land, any failing of this
        // assertion would result in an exception being thrown.
  @@ -594,7 +596,7 @@
        }
        else
        {
  -             const unsigned int      theLength = theEndIndex == UINT_MAX ? 
theStringLength - theStartIndex :
  +             const XalanDOMString::size_type         theLength = theEndIndex 
== XalanDOMString::npos ? theStringLength - theStartIndex :
                                                                                
                        theEndIndex - theStartIndex;
   
                if (theLength == 0)
  @@ -704,7 +706,7 @@
                        const XalanDOMString&   theInputString,
                        FunctionType                    theFunction)
   {
  -     const unsigned int      theStringLength = length(theInputString);
  +     const XalanDOMString::size_type         theStringLength = 
length(theInputString);
   
        if (theStringLength == 0)
        {
  @@ -1091,7 +1093,7 @@
        else
        {
                // Include the terminating null byte...
  -             const unsigned int      theLength = strlen(data) + 1;
  +             const size_t    theLength = strlen(data) + 1;
   
                theResult.reserve(theLength);
   
  @@ -1118,7 +1120,7 @@
   {
        assert(data != 0);
   
  -     unsigned int    theLength = length(data);
  +     const XalanDOMString::size_type         theLength = length(data);
   
        // Create a vector which includes the terminating 0.
        return XalanDOMCharVectorType(data, data + theLength + 1);
  @@ -1131,13 +1133,13 @@
                        const XalanDOMChar*             theString,
                        CharVectorType&                 theVector)
   {
  -     const unsigned int      theLength = length(theString);
  +     const XalanDOMString::size_type         theLength = length(theString);
   
        if (theLength != 0)
        {
                theVector.reserve(theVector.size() + theLength + 1);
   
  -             for(unsigned int i = 0; i < theLength; i++)
  +             for(XalanDOMString::size_type i = 0; i < theLength; i++)
                {
                        // Assert that the truncation will not affect the 
resulting character.
                        assert(theString[i] == char(theString[i]));
  @@ -1258,24 +1260,25 @@
   {
        if (isEmpty(theString))
                return theString;
  +
  +     const XalanDOMString::size_type         strLen = length(theString);
  +     assert(strLen > 0);
   
  -     const int       strLen = length(theString);
  -     
        // index of first non-whitespace character
  -     int                     leadingSpace = 0;
  +     XalanDOMString::size_type       leadingSpace = 0;
   
        for (; leadingSpace < strLen; ++leadingSpace)
                if (!isXMLWhitespace(charAt(theString, leadingSpace)))
                        break;
   
        // index of last non-whitespace character
  -     int trailingSpace = strLen - 1;
  +     XalanDOMString::size_type       trailingSpace = strLen - 1;
   
  -     for (; trailingSpace>=0; --trailingSpace)
  -             if (!isXMLWhitespace(charAt(theString, trailingSpace)))
  +     for (; trailingSpace > 0; --trailingSpace)
  +             if (!isXMLWhitespace(charAt(theString, trailingSpace - 1)))
                        break;
   
  -     return substring(theString, leadingSpace, trailingSpace + 1);
  +     return substring(theString, leadingSpace, trailingSpace);
   }
   
   
  @@ -1692,7 +1695,7 @@
   XALAN_PLATFORMSUPPORT_EXPORT_FUNCTION(bool)
   isXMLWhitespace(const XalanDOMString&        string)
   {
  -     const unsigned int      theLength = length(string);
  +     const XalanDOMString::size_type         theLength = length(string);
   
        if (theLength == 0)
        {
  
  
  
  1.51      +83 -83    xml-xalan/c/src/PlatformSupport/DOMStringHelper.hpp
  
  Index: DOMStringHelper.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/PlatformSupport/DOMStringHelper.hpp,v
  retrieving revision 1.50
  retrieving revision 1.51
  diff -u -r1.50 -r1.51
  --- DOMStringHelper.hpp       2001/08/15 14:37:51     1.50
  +++ DOMStringHelper.hpp       2001/09/25 21:12:51     1.51
  @@ -272,8 +272,8 @@
    */
   inline void
   reserve(
  -                     XalanDOMString&         theString,
  -                     unsigned int            theCount)
  +                     XalanDOMString&                         theString,
  +                     XalanDOMString::size_type       theCount)
   {
        theString.reserve(theCount);
   }
  @@ -286,7 +286,7 @@
    * @param theString target string
    * @return the length of the target string
    */
  -inline unsigned int
  +inline XalanDOMString::size_type
   length(const XalanDOMString& theString)
   {
        return theString.length();
  @@ -301,7 +301,7 @@
    * @param theString target string
    * @return the length of the target string
    */
  -inline unsigned int
  +inline XalanDOMString::size_type
   length(const XalanDOMChar*   theString)
   {
        assert(theString != 0);
  @@ -313,7 +313,7 @@
                theBufferPointer++;
        }
   
  -     return unsigned(theBufferPointer - theString);
  +     return XalanDOMString::size_type(theBufferPointer - theString);
   }
   
   
  @@ -324,12 +324,12 @@
    * @param theString target string
    * @return the length of the target string
    */
  -inline unsigned int
  +inline XalanDOMString::size_type
   length(const char*   theString)
   {
        assert(theString != 0);
   
  -     return unsigned(strlen(theString));
  +     return XalanDOMString::size_type(strlen(theString));
   }
   
   
  @@ -357,7 +357,7 @@
    * or length(theString) if the character is not
    * found.    
    */
  -inline unsigned int
  +inline XalanDOMString::size_type
   indexOf(
                        const XalanDOMChar*             theString,
                        XalanDOMChar                    theChar)
  @@ -371,7 +371,7 @@
                ++thePointer;
        }
   
  -     return unsigned(thePointer - theString);
  +     return XalanDOMString::size_type(thePointer - theString);
   }
   
   
  @@ -386,11 +386,11 @@
    * or length(theString) if the character is not
    * found.    
    */
  -inline unsigned int
  +inline XalanDOMString::size_type
   indexOf(
  -                     const XalanDOMChar*             theString,
  -                     unsigned int                    theStringLength,
  -                     XalanDOMChar                    theChar)
  +                     const XalanDOMChar*                     theString,
  +                     XalanDOMString::size_type       theStringLength,
  +                     XalanDOMChar                            theChar)
   {
        assert(theString != 0);
   
  @@ -402,7 +402,7 @@
                ++thePointer;
        }
   
  -     return unsigned(thePointer - theString);
  +     return XalanDOMString::size_type(thePointer - theString);
   }
   
   
  @@ -416,7 +416,7 @@
    * or length(theString) if the character is not
    * found.    
    */
  -inline unsigned int
  +inline XalanDOMString::size_type
   indexOf(
                        const XalanDOMString&   theString,
                        XalanDOMChar                    theChar)
  @@ -435,7 +435,7 @@
    * or length(theString) if the string is not
    * found.
    */
  -XALAN_PLATFORMSUPPORT_EXPORT_FUNCTION(unsigned int)
  +XALAN_PLATFORMSUPPORT_EXPORT_FUNCTION(XalanDOMString::size_type)
   indexOf(
                        const XalanDOMChar*             theString,
                        const XalanDOMChar*             theSubstring);
  @@ -450,7 +450,7 @@
    * or length(theString) if the string is not
    * found.
    */
  -XALAN_PLATFORMSUPPORT_EXPORT_FUNCTION(unsigned int)
  +XALAN_PLATFORMSUPPORT_EXPORT_FUNCTION(XalanDOMString::size_type)
   indexOf(
                        const XalanDOMString&   theString,
                        const XalanDOMString&   theSubstring);
  @@ -467,7 +467,7 @@
    * found.
    */
   
  -XALAN_PLATFORMSUPPORT_EXPORT_FUNCTION(unsigned int)
  +XALAN_PLATFORMSUPPORT_EXPORT_FUNCTION(XalanDOMString::size_type)
   lastIndexOf(
                        const XalanDOMChar*             theString,
                        XalanDOMChar                    theChar);
  @@ -483,7 +483,7 @@
    * or length(theString) if the character is not
    * found.
    */
  -inline unsigned int
  +inline XalanDOMString::size_type
   lastIndexOf(
                        const XalanDOMString&   theString,
                        XalanDOMChar                    theChar)
  @@ -1114,8 +1114,8 @@
    */
   inline XalanDOMChar
   charAt(
  -                     const XalanDOMString&   theString,
  -                     unsigned int                    theIndex)
  +                     const XalanDOMString&           theString,
  +                     XalanDOMString::size_type       theIndex)
   {
        return theString[theIndex];
   }
  @@ -1178,9 +1178,9 @@
    */
   XALAN_PLATFORMSUPPORT_EXPORT_FUNCTION(XalanDOMString)
   substring(
  -                     const XalanDOMChar*             theString,
  -                     unsigned int                    theStartIndex,
  -                     unsigned int                    theEndIndex = 
unsigned(-1));
  +                     const XalanDOMChar*                     theString,
  +                     XalanDOMString::size_type       theStartIndex,
  +                     XalanDOMString::size_type       theEndIndex = 
XalanDOMString::npos);
   
   
   
  @@ -1198,10 +1198,10 @@
    */
   XALAN_PLATFORMSUPPORT_EXPORT_FUNCTION(XalanDOMString)&
   substring(
  -                     const XalanDOMChar*             theString,
  -                     XalanDOMString&                 theSubstring,
  -                     unsigned int                    theStartIndex,
  -                     unsigned int                    theEndIndex = 
unsigned(-1));
  +                     const XalanDOMChar*                     theString,
  +                     XalanDOMString&                         theSubstring,
  +                     XalanDOMString::size_type       theStartIndex,
  +                     XalanDOMString::size_type       theEndIndex = 
XalanDOMString::npos);
   
   
   
  @@ -1218,10 +1218,10 @@
    */
   XALAN_PLATFORMSUPPORT_EXPORT_FUNCTION(void)
   substring(
  -                     const XalanDOMString&   theString,
  -                     XalanDOMString&                 theSubstring,
  -                     unsigned int                    theStartIndex,
  -                     unsigned int                    theEndIndex = 
unsigned(-1));
  +                     const XalanDOMString&           theString,
  +                     XalanDOMString&                         theSubstring,
  +                     XalanDOMString::size_type       theStartIndex,
  +                     XalanDOMString::size_type       theEndIndex = 
XalanDOMString::npos);
   
   
   
  @@ -1238,9 +1238,9 @@
    */
   XALAN_PLATFORMSUPPORT_EXPORT_FUNCTION(XalanDOMString)
   substring(
  -                     const XalanDOMString&   theString,
  -                     unsigned int                    theStartIndex,
  -                     unsigned int                    theEndIndex = 
unsigned(-1));
  +                     const XalanDOMString&           theString,
  +                     XalanDOMString::size_type       theStartIndex,
  +                     XalanDOMString::size_type       theEndIndex = 
XalanDOMString::npos);
   
   
   
  @@ -1376,10 +1376,10 @@
    */
   XALAN_PLATFORMSUPPORT_EXPORT_FUNCTION(int)
   compare(
  -                     const XalanDOMChar*             theLHS,
  -                     unsigned int                    theLHSLength,
  -                     const XalanDOMChar*             theRHS,
  -                     unsigned int                    theRHSLength);
  +                     const XalanDOMChar*                     theLHS,
  +                     XalanDOMString::size_type       theLHSLength,
  +                     const XalanDOMChar*                     theRHS,
  +                     XalanDOMString::size_type       theRHSLength);
   
   
   
  @@ -1480,10 +1480,10 @@
    */
   XALAN_PLATFORMSUPPORT_EXPORT_FUNCTION(int)
   compareIgnoreCaseASCII(
  -                     const XalanDOMChar*             theLHS,
  -                     unsigned int                    theLHSLength,
  -                     const XalanDOMChar*             theRHS,
  -                     unsigned int                    theRHSLength);
  +                     const XalanDOMChar*                     theLHS,
  +                     XalanDOMString::size_type       theLHSLength,
  +                     const XalanDOMChar*                     theRHS,
  +                     XalanDOMString::size_type       theRHSLength);
   
   
   
  @@ -1587,10 +1587,10 @@
    */
   XALAN_PLATFORMSUPPORT_EXPORT_FUNCTION(int)
   collationCompare(
  -                     const XalanDOMChar*             theLHS,
  -                     unsigned int                    theLHSLength,
  -                     const XalanDOMChar*             theRHS,
  -                     unsigned int                    theRHSLength);
  +                     const XalanDOMChar*                     theLHS,
  +                     XalanDOMString::size_type       theLHSLength,
  +                     const XalanDOMChar*                     theRHS,
  +                     XalanDOMString::size_type       theRHSLength);
   
    
    
  @@ -1680,9 +1680,9 @@
    */
   XALAN_PLATFORMSUPPORT_EXPORT_FUNCTION(bool)
   equals(
  -                     const XalanDOMChar*             theLHS,
  -                     const XalanDOMChar*             theRHS,
  -                     unsigned int                    theLength);
  +                     const XalanDOMChar*                     theLHS,
  +                     const XalanDOMChar*                     theRHS,
  +                     XalanDOMString::size_type       theLength);
   
   
   
  @@ -1698,7 +1698,7 @@
                        const XalanDOMChar*             theLHS,
                        const XalanDOMChar*             theRHS)
   {
  -     const unsigned int      theLHSLength = length(theLHS);
  +     const XalanDOMString::size_type         theLHSLength = length(theLHS);
   
        return theLHSLength != length(theRHS) ? false : equals(theLHS, theRHS, 
theLHSLength);
   }
  @@ -1771,7 +1771,7 @@
   {
        assert(theRHS != 0);
   
  -     const unsigned int      theRHSLength = length(theRHS);
  +     const XalanDOMString::size_type         theRHSLength = length(theRHS);
   
        if (theRHSLength != length(theLHS))
        {
  @@ -1815,7 +1815,7 @@
        assert(theLHS != 0);
        assert(theRHS != 0);
   
  -     const unsigned int      theRHSLength = length(theRHS);
  +     const XalanDOMString::size_type         theRHSLength = length(theRHS);
   
        if (theRHSLength != length(theLHS))
        {
  @@ -1855,9 +1855,9 @@
    */
   XALAN_PLATFORMSUPPORT_EXPORT_FUNCTION(bool)
   equalsIgnoreCaseASCII(
  -                     const XalanDOMChar*             theLHS,
  -                     const XalanDOMChar*             theRHS,
  -                     unsigned int                    theLength);
  +                     const XalanDOMChar*                     theLHS,
  +                     const XalanDOMChar*                     theRHS,
  +                     XalanDOMString::size_type       theLength);
   
   
   
  @@ -1874,7 +1874,7 @@
                        const XalanDOMChar*             theLHS,
                        const XalanDOMChar*             theRHS)
   {
  -     const unsigned int      theLength = length(theLHS);
  +     const XalanDOMString::size_type         theLength = length(theLHS);
   
        return theLength != length(theRHS) ? false :
                equalsIgnoreCaseASCII(theLHS, theRHS, theLength);
  @@ -1895,7 +1895,7 @@
                        const XalanDOMString&   theLHS,
                        const XalanDOMString&   theRHS)
   {
  -     const unsigned int      theLength = length(theLHS);
  +     const XalanDOMString::size_type         theLength = length(theLHS);
   
        return theLength != length(theRHS) ? false :
                equalsIgnoreCaseASCII(toCharArray(theLHS), toCharArray(theRHS), 
theLength);
  @@ -1916,7 +1916,7 @@
                        const XalanDOMChar*             theLHS,
                        const XalanDOMString&   theRHS)
   {
  -     const unsigned int      theRHSLength = length(theRHS);
  +     const XalanDOMString::size_type         theRHSLength = length(theRHS);
   
        return theRHSLength != length(theLHS) ? false :
                equalsIgnoreCaseASCII(theLHS, toCharArray(theRHS), 
theRHSLength);
  @@ -1985,7 +1985,7 @@
    * 
    * @param theString         target string
    * @param theStringToAppend string to assign
  - * @param theStringToAppendLength length of the string (-1 implies the 
string is null-terminated)
  + * @param theStringToAppendLength length of the string (XalanDOMString::npos 
implies the string is null-terminated)
    * @return a reference to the target string
    */
   inline XalanDOMString&
  @@ -2005,16 +2005,16 @@
    * 
    * @param theString         target string
    * @param theStringToAppend string to assign
  - * @param theStringToAppendLength length of the string (-1 implies the 
string is null-terminated)
  + * @param theStringToAppendLength length of the string (XalanDOMString::npos 
implies the string is null-terminated)
    * @return a reference to the target string
    */
   inline XalanDOMString&
   assign(
  -                     XalanDOMString&                 theString,
  -                     const XalanDOMChar*             theStringToAssign,
  -                     unsigned int                    theStringToAssignLength 
= unsigned(-1))
  +                     XalanDOMString&                         theString,
  +                     const XalanDOMChar*                     
theStringToAssign,
  +                     XalanDOMString::size_type       theStringToAssignLength 
= XalanDOMString::npos)
   {
  -     if (theStringToAssignLength == unsigned(-1))
  +     if (theStringToAssignLength == XalanDOMString::npos)
        {
                theString.assign(theStringToAssign);
        }
  @@ -2052,18 +2052,18 @@
    * 
    * @param theString         target string
    * @param theStringToAppend string to add to target
  - * @param theStringToAppendLength length of the string (-1 implies the 
string is null-terminated)
  + * @param theStringToAppendLength length of the string (XalanDOMString::npos 
implies the string is null-terminated)
    * @return a reference to the target string
    */
   inline XalanDOMString&
   append(
  -                     XalanDOMString&                 theString,
  -                     const XalanDOMChar*             theStringToAppend,
  -                     unsigned int                    theStringToAppendLength 
= unsigned(-1))
  +                     XalanDOMString&                         theString,
  +                     const XalanDOMChar*                     
theStringToAppend,
  +                     XalanDOMString::size_type       theStringToAppendLength 
= XalanDOMString::npos)
   {
        assert(theStringToAppend != 0);
   
  -     if (theStringToAppendLength == unsigned(-1))
  +     if (theStringToAppendLength == XalanDOMString::npos)
        {
                theString.append(theStringToAppend);
        }
  @@ -2082,14 +2082,14 @@
    * 
    * @param theString         target string
    * @param theStringToAppend string to add to target
  - * @param theStringToAppendLength length of the string (-1 implies the 
string is null-terminated)
  + * @param theStringToAppendLength length of the string (XalanDOMString::npos 
implies the string is null-terminated)
    * @return string with contents of 'theStringToAppend' added to target string
    */
   inline XalanDOMString&
   append(
  -                     XalanDOMString&         theString,
  -                     const char*                     theStringToAppend,
  -                     unsigned int            theStringToAppendLength = 
unsigned(-1))
  +                     XalanDOMString&                         theString,
  +                     const char*                                     
theStringToAppend,
  +                     XalanDOMString::size_type       theStringToAppendLength 
= XalanDOMString::npos)
   {
        theString.append(TranscodeFromLocalCodePage(theStringToAppend, 
theStringToAppendLength));
   
  @@ -2147,9 +2147,9 @@
    */
   inline XalanDOMString&
   insert(
  -                     XalanDOMString&                 theString,
  -                     unsigned int                    thePosition,
  -                     const XalanDOMString&   theStringToInsert)
  +                     XalanDOMString&                         theString,
  +                     XalanDOMString::size_type       thePosition,
  +                     const XalanDOMString&           theStringToInsert)
   {
        theString.insert(thePosition, theStringToInsert);
   
  @@ -2168,9 +2168,9 @@
    */
   inline XalanDOMString&
   insert(
  -                     XalanDOMString&                 theString,
  -                     unsigned int                    thePosition,
  -                     const XalanDOMChar*             theStringToInsert)
  +                     XalanDOMString&                         theString,
  +                     XalanDOMString::size_type       thePosition,
  +                     const XalanDOMChar*                     
theStringToInsert)
   {
        theString.insert(thePosition, theStringToInsert);
   
  @@ -2548,9 +2548,9 @@
    */
   XALAN_PLATFORMSUPPORT_EXPORT_FUNCTION(bool)
   isXMLWhitespace(
  -                     const XalanDOMChar      ch[],
  -                     unsigned int            start,
  -                     unsigned int            length);
  +                     const XalanDOMChar                      ch[],
  +                     XalanDOMString::size_type       start,
  +                     XalanDOMString::size_type       length);
   
   
   
  
  
  
  1.12      +14 -14    xml-xalan/c/src/PlatformSupport/DOMStringPrintWriter.cpp
  
  Index: DOMStringPrintWriter.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/PlatformSupport/DOMStringPrintWriter.cpp,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- DOMStringPrintWriter.cpp  2001/02/07 04:05:05     1.11
  +++ DOMStringPrintWriter.cpp  2001/09/25 21:12:51     1.12
  @@ -105,8 +105,8 @@
   void
   DOMStringPrintWriter::write(
                        const char*             s,
  -                     unsigned int    theOffset,
  -                     unsigned int    theLength)
  +                     size_t                  theOffset,
  +                     size_t                  theLength)
   {
        write(TranscodeFromLocalCodePage(s), theOffset, theLength);
   }
  @@ -115,9 +115,9 @@
   
   void
   DOMStringPrintWriter::write(
  -                     const XalanDOMChar*             s,
  -                     unsigned int                    theOffset,
  -                     unsigned int                    theLength)
  +                     const XalanDOMChar*                     s,
  +                     XalanDOMString::size_type       theOffset,
  +                     XalanDOMString::size_type       theLength)
   {
   #if !defined(XALAN_NO_NAMESPACES)
        using std::vector;
  @@ -141,9 +141,9 @@
   
   void
   DOMStringPrintWriter::write(
  -                     const XalanDOMString&   s,
  -                     unsigned int                    theOffset,
  -                     unsigned int                    theLength)
  +                     const XalanDOMString&           s,
  +                     XalanDOMString::size_type       theOffset,
  +                     XalanDOMString::size_type       theLength)
   {
        assert(c_wstr(s) != 0);
        assert(theLength == UINT_MAX || length(s) >= theOffset + theLength);
  @@ -188,7 +188,7 @@
   void
   DOMStringPrintWriter::print(
                        const char*             s,
  -                     unsigned int    theLength)
  +                     size_t                  theLength)
   {
        write(s,
                  0,
  @@ -199,8 +199,8 @@
   
   void
   DOMStringPrintWriter::print(
  -                     const XalanDOMChar*             s,
  -                     unsigned int                    theLength)
  +                     const XalanDOMChar*                     s,
  +                     XalanDOMString::size_type       theLength)
   {
        write(s,
                  0,
  @@ -274,7 +274,7 @@
   void
   DOMStringPrintWriter::println(
                        const char*             s,
  -                     unsigned int    theLength)
  +                     size_t                  theLength)
   {
        print(s, theLength);
   
  @@ -285,8 +285,8 @@
   
   void
   DOMStringPrintWriter::println(
  -                     const XalanDOMChar*             s,
  -                     unsigned int                    theLength)
  +                     const XalanDOMChar*                     s,
  +                     XalanDOMString::size_type       theLength)
   {
        print(s, theLength);
   
  
  
  
  1.9       +30 -30    xml-xalan/c/src/PlatformSupport/DOMStringPrintWriter.hpp
  
  Index: DOMStringPrintWriter.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/PlatformSupport/DOMStringPrintWriter.hpp,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- DOMStringPrintWriter.hpp  2000/11/02 01:45:35     1.8
  +++ DOMStringPrintWriter.hpp  2001/09/25 21:12:51     1.9
  @@ -93,7 +93,6 @@
   
        // Output functions inherited from PrintWriter...
   
  -     // Flush the stream, then check the error status.
        virtual bool
       checkError() const;
   
  @@ -103,29 +102,26 @@
        virtual void
        flush();
   
  -
  -     // Output functions
  -
  -     // If the length is UINT_MAX, then the array is assumed to be 
null-terminated.
        virtual void
  -     write(const char*       s,
  -               unsigned int  theOffset = 0,
  -               unsigned int  theLength = UINT_MAX);
  +     write(
  +                     const char*             s,
  +                     size_t                  theOffset = 0,
  +                     size_t                  theLength = size_t(-1));
   
  -     // If the length is UINT_MAX, then the array is assumed to be 
null-terminated.
        virtual void
  -     write(const XalanDOMChar*       s,
  -               unsigned int                  theOffset = 0,
  -               unsigned int                  theLength = UINT_MAX);
  +     write(
  +                     const XalanDOMChar*                     s,
  +                     XalanDOMString::size_type       theOffset = 0,
  +                     XalanDOMString::size_type       theLength = 
XalanDOMString::npos);
   
        virtual void
  -     write(XalanDOMChar      c);
  +     write(XalanDOMChar              c);
   
  -     // If the length is UINT_MAX, then the entire string is printed.
        virtual void
  -     write(const XalanDOMString&             s,
  -               unsigned int                          theOffset = 0,
  -               unsigned int                          theLength = UINT_MAX);
  +     write(
  +                     const XalanDOMString&           s,
  +                     XalanDOMString::size_type       theOffset = 0,
  +                     XalanDOMString::size_type       theLength = 
XalanDOMString::npos);
   
   #if !defined(XALAN_BOOL_AS_INT)
        virtual void
  @@ -136,12 +132,14 @@
        print(char      c);
   
        virtual void
  -     print(const char*       s,
  -               unsigned int  theLength = UINT_MAX);
  +     print(
  +                     const char*             s,
  +                     size_t                  theLength = size_t(-1));
   
        virtual void
  -     print(const XalanDOMChar*       s,
  -               unsigned int                  theLength = UINT_MAX);
  +     print(
  +                     const XalanDOMChar*                     s,
  +                     XalanDOMString::size_type       theLength = 
XalanDOMString::npos);
   
        virtual void
        print(double    d);
  @@ -160,28 +158,30 @@
   
   #if !defined(XALAN_BOOL_AS_INT)
        virtual void
  -     println(bool    b);
  +     println(bool    x);
   #endif
   
        virtual void
  -     println(char    c);
  +     println(char    x);
   
        virtual void
  -     println(const char*             s,
  -                 unsigned int        theLength = UINT_MAX);
  +     println(
  +                     const char*             s,
  +                 size_t                      theLength = size_t(-1));
   
        virtual void
  -     println(const XalanDOMChar*             s,
  -                     unsigned int                    theLength = UINT_MAX);
  +     println(
  +                     const XalanDOMChar*                     s,
  +                     XalanDOMString::size_type       theLength = 
XalanDOMString::npos);
   
        virtual void
  -     println(double  d);
  +     println(double  x);
   
        virtual void
  -     println(int             i);
  +     println(int             x);
   
        virtual void
  -     println(long    l);
  +     println(long    x);
   
        virtual void
        println(const XalanDOMString&   s);
  
  
  
  1.28      +3 -3      xml-xalan/c/src/PlatformSupport/DoubleSupport.cpp
  
  Index: DoubleSupport.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/PlatformSupport/DoubleSupport.cpp,v
  retrieving revision 1.27
  retrieving revision 1.28
  diff -u -r1.27 -r1.28
  --- DoubleSupport.cpp 2001/08/10 17:50:08     1.27
  +++ DoubleSupport.cpp 2001/09/25 21:12:51     1.28
  @@ -605,9 +605,9 @@
        // string is less than n characters, we'll convert
        // it as a long and coerce that to a double.  This
        // is _much_ cheaper...
  -     const unsigned int      theLongHackThreshold = 10;
  +     const XalanDOMString::size_type         theLongHackThreshold = 10;
   
  -     unsigned int    theLength = length(theString);
  +     XalanDOMString::size_type       theLength = length(theString);
   
        if (fGotDecimalPoint == false && theLength < theLongHackThreshold)
        {
  @@ -619,7 +619,7 @@
                consumeWhitespace(theString, theLength);
   
                // Use a stack-based buffer, when possible...
  -             const unsigned int      theBufferSize = 200u;
  +             const XalanDOMString::size_type         theBufferSize = 200u;
   
                if (theLength < theBufferSize)
                {
  
  
  
  1.3       +8 -5      xml-xalan/c/src/PlatformSupport/FormatterListener.hpp
  
  Index: FormatterListener.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/PlatformSupport/FormatterListener.hpp,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- FormatterListener.hpp     2001/06/29 18:41:45     1.2
  +++ FormatterListener.hpp     2001/09/25 21:12:51     1.3
  @@ -58,7 +58,7 @@
   #define FORMATTERLISTENER_HEADER_GUARD_1357924680
   
   /**
  - * $Id: FormatterListener.hpp,v 1.2 2001/06/29 18:41:45 dbertoni Exp $
  + * $Id: FormatterListener.hpp,v 1.3 2001/09/25 21:12:51 dbertoni Exp $
    * 
    * $State: Exp $
    * 
  @@ -92,6 +92,9 @@
   {
   public:
   
  +     // A handy typedef...  Must match DocumentHandler's type for 
characters(), etc...
  +     typedef unsigned int    size_type;
  +
        /**
         * Perform static initialization.  See class XMLSupportInit.
         */
  @@ -161,7 +164,7 @@
        virtual void
        charactersRaw(
                        const XMLCh* const      chars,
  -                     const unsigned int      length) = 0;
  +                     const size_type         length) = 0;
   
        /**
         * Called when a Comment is to be constructed.
  @@ -196,7 +199,7 @@
        virtual void
        cdata(
                        const XMLCh* const      ch,
  -                     const unsigned int      length) = 0;
  +                     const size_type         length) = 0;
   
        /**
         * Receive notification of a entityReference.
  @@ -213,7 +216,7 @@
       virtual void
        characters(
                        const XMLCh* const      chars,
  -                     const unsigned int      length) = 0;
  +                     const size_type         length) = 0;
   
       virtual void
        endDocument() = 0;
  @@ -224,7 +227,7 @@
        virtual void
        ignorableWhitespace(
                        const XMLCh* const      chars,
  -                     const unsigned int      length) = 0;
  +                     const size_type         length) = 0;
   
        virtual void
        processingInstruction(
  
  
  
  1.5       +14 -14    xml-xalan/c/src/PlatformSupport/NullPrintWriter.cpp
  
  Index: NullPrintWriter.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/PlatformSupport/NullPrintWriter.cpp,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- NullPrintWriter.cpp       2000/08/15 19:41:10     1.4
  +++ NullPrintWriter.cpp       2001/09/25 21:12:51     1.5
  @@ -97,8 +97,8 @@
   void
   NullPrintWriter::write(
                        const char*             /* s */,
  -                     unsigned int    /* theOffset */,
  -                     unsigned int    /* theLength */)
  +                     size_t                  /* theOffset */,
  +                     size_t                  /* theLength */)
   {
   }
   
  @@ -106,9 +106,9 @@
   
   void
   NullPrintWriter::write(
  -                     const XalanDOMChar*     /* s */,
  -                     unsigned int            /* theOffset */,
  -                     unsigned int            /* theLength */)
  +                     const XalanDOMChar*                     /* s */,
  +                     XalanDOMString::size_type       /* theOffset */,
  +                     XalanDOMString::size_type       /* theLength */)
   {
   }
   
  @@ -123,9 +123,9 @@
   
   void
   NullPrintWriter::write(
  -                     const XalanDOMString&   /* s */,
  -                     unsigned int                    /* theOffset */,
  -                     unsigned int                    /* theLength */)
  +                     const XalanDOMString&           /* s */,
  +                     XalanDOMString::size_type       /* theOffset */,
  +                     XalanDOMString::size_type       /* theLength */)
   {
   }
   
  @@ -150,7 +150,7 @@
   void
   NullPrintWriter::print(
                        const char*             /* s */,
  -                     unsigned int    /* theLength */)
  +                     size_t                  /* theLength */)
   {
   }
   
  @@ -158,8 +158,8 @@
   
   void
   NullPrintWriter::print(
  -                     const XalanDOMChar*     /* s */,
  -                     unsigned int            /* theLength */)
  +                     const XalanDOMChar*                     /* s */,
  +                     XalanDOMString::size_type       /* theLength */)
   {
   }
   
  @@ -219,7 +219,7 @@
   void
   NullPrintWriter::println(
                        const char*             /* s */,
  -                     unsigned int    /* theLength */)
  +                     size_t                  /* theLength */)
   {
   }
   
  @@ -227,8 +227,8 @@
   
   void
   NullPrintWriter::println(
  -                     const XalanDOMChar*             /* s */,
  -                     unsigned int                    /* theLength */)
  +                     const XalanDOMChar*                     /* s */,
  +                     XalanDOMString::size_type       /* theLength */)
   {
   }
   
  
  
  
  1.5       +24 -20    xml-xalan/c/src/PlatformSupport/NullPrintWriter.hpp
  
  Index: NullPrintWriter.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/PlatformSupport/NullPrintWriter.hpp,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- NullPrintWriter.hpp       2000/08/15 19:41:10     1.4
  +++ NullPrintWriter.hpp       2001/09/25 21:12:51     1.5
  @@ -90,26 +90,26 @@
        virtual void
        flush();
   
  -     // If the length is UINT_MAX, then the array is assumed to be 
null-terminated.
        virtual void
  -     write(const char*       s,
  -               unsigned int  theOffset = 0,
  -               unsigned int  theLength = UINT_MAX);
  +     write(
  +                     const char*             s,
  +                     size_t                  theOffset = 0,
  +                     size_t                  theLength = size_t(-1));
   
  -     // If the length is UINT_MAX, then the array is assumed to be 
null-terminated.
        virtual void
  -     write(const XalanDOMChar*       s,
  -               unsigned int  theOffset = 0,
  -               unsigned int  theLength = UINT_MAX);
  +     write(
  +                     const XalanDOMChar*                     s,
  +                     XalanDOMString::size_type       theOffset = 0,
  +                     XalanDOMString::size_type       theLength = 
XalanDOMString::npos);
   
        virtual void
        write(XalanDOMChar              c);
   
  -     // If the length is UINT_MAX, then the entire string is printed.
        virtual void
  -     write(const XalanDOMString&             s,
  -               unsigned int                          theOffset = 0,
  -               unsigned int                          theLength = UINT_MAX);
  +     write(
  +                     const XalanDOMString&           s,
  +                     XalanDOMString::size_type       theOffset = 0,
  +                     XalanDOMString::size_type       theLength = 
XalanDOMString::npos);
   
   #if !defined(XALAN_BOOL_AS_INT)
        virtual void
  @@ -120,12 +120,14 @@
        print(char      c);
   
        virtual void
  -     print(const char*       s,
  -               unsigned int  theLength = UINT_MAX);
  +     print(
  +                     const char*             s,
  +                     size_t                  theLength = size_t(-1));
   
        virtual void
  -     print(const XalanDOMChar*       s,
  -               unsigned int                  theLength = UINT_MAX);
  +     print(
  +                     const XalanDOMChar*                     s,
  +                     XalanDOMString::size_type       theLength = 
XalanDOMString::npos);
   
        virtual void
        print(double    d);
  @@ -151,12 +153,14 @@
        println(char    x);
   
        virtual void
  -     println(const char*             s,
  -                     unsigned int    theLength = UINT_MAX);
  +     println(
  +                     const char*             s,
  +                 size_t                      theLength = size_t(-1));
   
        virtual void
  -     println(const XalanDOMChar*             s,
  -                     unsigned int                    theLength = UINT_MAX);
  +     println(
  +                     const XalanDOMChar*                     s,
  +                     XalanDOMString::size_type       theLength = 
XalanDOMString::npos);
   
        virtual void
        println(double  x);
  
  
  
  1.11      +24 -20    xml-xalan/c/src/PlatformSupport/PrintWriter.hpp
  
  Index: PrintWriter.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/PlatformSupport/PrintWriter.hpp,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- PrintWriter.hpp   2001/02/08 21:39:04     1.10
  +++ PrintWriter.hpp   2001/09/25 21:12:51     1.11
  @@ -102,26 +102,26 @@
   
        // Output functions inherited from Writer...
   
  -     // If the length is UINT_MAX, then the array is assumed to be 
null-terminated.
        virtual void
  -     write(const char*       s,
  -               unsigned int  theOffset = 0,
  -               unsigned int  theLength = UINT_MAX) = 0;
  +     write(
  +                     const char*             s,
  +                     size_t                  theOffset = 0,
  +                     size_t                  theLength = size_t(-1)) = 0;
   
  -     // If the length is UINT_MAX, then the array is assumed to be 
null-terminated.
        virtual void
  -     write(const XalanDOMChar*       s,
  -               unsigned int                  theOffset = 0,
  -               unsigned int                  theLength = UINT_MAX) = 0;
  +     write(
  +                     const XalanDOMChar*                     s,
  +                     XalanDOMString::size_type       theOffset = 0,
  +                     XalanDOMString::size_type       theLength = 
XalanDOMString::npos) = 0;
   
        virtual void
        write(XalanDOMChar      c) = 0;
   
  -     // If the length is UINT_MAX, then the entire string is printed.
        virtual void
  -     write(const XalanDOMString&             s,
  -               unsigned int                          theOffset = 0,
  -               unsigned int                          theLength = UINT_MAX) = 
0;
  +     write(
  +                     const XalanDOMString&           s,
  +                     XalanDOMString::size_type       theOffset = 0,
  +                     XalanDOMString::size_type       theLength = 
XalanDOMString::npos) = 0;
   
        // Output functions which are new...
   
  @@ -134,12 +134,14 @@
        print(char      c) = 0;
   
        virtual void
  -     print(const char*       s,
  -               unsigned int  theLength = UINT_MAX) = 0;
  +     print(
  +                     const char*             s,
  +                     size_t                  theLength = size_t(-1)) = 0;
   
        virtual void
  -     print(const XalanDOMChar*       s,
  -               unsigned int                  theLength = UINT_MAX) = 0;
  +     print(
  +                     const XalanDOMChar*                     s,
  +                     XalanDOMString::size_type       theLength = 
XalanDOMString::npos) = 0;
   
        virtual void
        print(double    d) = 0;
  @@ -165,12 +167,14 @@
        println(char    x) = 0;
   
        virtual void
  -     println(const char*             s,
  -                 unsigned int        theLength = UINT_MAX) = 0;
  +     println(
  +                     const char*             s,
  +                 size_t                      theLength = size_t(-1)) = 0;
   
        virtual void
  -     println(const XalanDOMChar*             s,
  -                     unsigned int                    theLength = UINT_MAX) = 
0;
  +     println(
  +                     const XalanDOMChar*                     s,
  +                     XalanDOMString::size_type       theLength = 
XalanDOMString::npos) = 0;
   
        virtual void
        println(double  x) = 0;
  
  
  
  1.8       +3 -3      xml-xalan/c/src/PlatformSupport/ReusableArenaBlock.hpp
  
  Index: ReusableArenaBlock.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/PlatformSupport/ReusableArenaBlock.hpp,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- ReusableArenaBlock.hpp    2000/11/30 19:26:22     1.7
  +++ ReusableArenaBlock.hpp    2001/09/25 21:12:51     1.8
  @@ -292,9 +292,9 @@
   
                if (m_freeBlockCount > 0)
                {
  -                     const unsigned long     theFreeListSize = 
m_freeList.getSize();
  +                     const size_type         theFreeListSize = 
m_freeList.getSize();
   
  -                     for(unsigned long i = 0; i < theFreeListSize; ++i)
  +                     for(size_type i = 0; i < theFreeListSize; ++i)
                        {
                                if (m_freeList.isSet(i) == true)
                                {
  @@ -314,7 +314,7 @@
        XalanBitmap             m_freeList;
   
        // The number of blocks on the free list.)
  -     unsigned long   m_freeBlockCount;
  +     size_type               m_freeBlockCount;
   };
   
   
  
  
  
  1.6       +11 -8     xml-xalan/c/src/PlatformSupport/StringTokenizer.cpp
  
  Index: StringTokenizer.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/PlatformSupport/StringTokenizer.cpp,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- StringTokenizer.cpp       2001/06/14 18:27:30     1.5
  +++ StringTokenizer.cpp       2001/09/25 21:12:51     1.6
  @@ -162,7 +162,7 @@
        XalanDOMString  theToken;
   
        // Find the index of the next delimiter.
  -     unsigned int    theIndex = FindNextDelimiterIndex(m_CurrentIndex);
  +     XalanDOMString::size_type       theIndex = 
FindNextDelimiterIndex(m_CurrentIndex);
   
        if (theIndex == m_CurrentIndex)
        {
  @@ -208,7 +208,7 @@
        assert(m_CurrentIndex < m_StringLength);
   
        // Find the index of the next delimiter.
  -     unsigned int    theIndex = FindNextDelimiterIndex(m_CurrentIndex);
  +     XalanDOMString::size_type       theIndex = 
FindNextDelimiterIndex(m_CurrentIndex);
   
        if (theIndex == m_CurrentIndex)
        {
  @@ -250,17 +250,19 @@
   
   
   
  -unsigned int
  +size_t
   StringTokenizer::countTokens() const
   {
  -     unsigned int    theCount = 0;
  -     unsigned int    theCurrentIndex = m_CurrentIndex;
  +     size_t                                          theCount = 0;
  +
  +     XalanDOMString::size_type       theCurrentIndex = m_CurrentIndex;
   
        if (theCurrentIndex < m_StringLength)
        {
                while(theCurrentIndex < m_StringLength)
                {
  -                     const unsigned int      theNextIndex = 
FindNextDelimiterIndex(theCurrentIndex);
  +                     const XalanDOMString::size_type         theNextIndex =
  +                             FindNextDelimiterIndex(theCurrentIndex);
   
                        if (theNextIndex == theCurrentIndex)
                        {
  @@ -288,8 +290,9 @@
   unsigned int
   StringTokenizer::FindNextDelimiterIndex(unsigned int theStartIndex) const
   {
  -     bool                    fTokenFound = false;
  -     unsigned int    theIndex = theStartIndex;
  +     bool                                            fTokenFound = false;
  +
  +     XalanDOMString::size_type       theIndex = theStartIndex;
   
        while(theIndex < m_StringLength &&
                  fTokenFound == false)
  
  
  
  1.9       +9 -9      xml-xalan/c/src/PlatformSupport/StringTokenizer.hpp
  
  Index: StringTokenizer.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/PlatformSupport/StringTokenizer.hpp,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- StringTokenizer.hpp       2001/06/14 18:27:35     1.8
  +++ StringTokenizer.hpp       2001/09/25 21:12:51     1.9
  @@ -164,27 +164,27 @@
         * 
         * @return number of remaining tokens
         */
  -     virtual unsigned int
  +     virtual size_t
        countTokens() const;
   
   protected:
   
  -     unsigned int
  -     FindNextDelimiterIndex(unsigned int     theStartIndex) const;
  +     XalanDOMString::size_type
  +     FindNextDelimiterIndex(XalanDOMString::size_type        theStartIndex) 
const;
   
   private:
   
  -     const XalanDOMString    m_String;
  +     const XalanDOMString                            m_String;
   
  -     const XalanDOMString    m_Tokens;
  +     const XalanDOMString                            m_Tokens;
   
  -     const bool                              m_fReturnTokens;
  +     const bool                                                      
m_fReturnTokens;
   
  -     unsigned int                    m_CurrentIndex;
  +     XalanDOMString::size_type                       m_CurrentIndex;
   
  -     const unsigned int              m_StringLength;
  +     const XalanDOMString::size_type         m_StringLength;
   
  -     const unsigned int              m_tokensLength;
  +     const XalanDOMString::size_type         m_tokensLength;
   };
   
   
  
  
  
  1.14      +8 -8      xml-xalan/c/src/PlatformSupport/URISupport.cpp
  
  Index: URISupport.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/PlatformSupport/URISupport.cpp,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- URISupport.cpp    2001/04/30 18:07:04     1.13
  +++ URISupport.cpp    2001/09/25 21:12:51     1.14
  @@ -140,11 +140,11 @@
        XalanDOMString  theNormalizedURI(urlString);
   
        // Let's see what sort of URI we have...
  -     const unsigned int      len = length(theNormalizedURI);
  +     const XalanDOMString::size_type         len = length(theNormalizedURI);
   
        if (len != 0)
        {
  -             const unsigned int      index = indexOf(theNormalizedURI, 
XalanUnicode::charColon);
  +             const XalanDOMString::size_type         index = 
indexOf(theNormalizedURI, XalanUnicode::charColon);
   
                bool                            protocolPresent = false;
   
  @@ -220,9 +220,9 @@
   
        NormalizeURIText(context);
   
  -     const unsigned int      theContextLength = length(context);
  +     const XalanDOMString::size_type         theContextLength = 
length(context);
   
  -     const unsigned int      indexOfSlash = theContextLength == 0 ?
  +     const XalanDOMString::size_type         indexOfSlash = theContextLength 
== 0 ?
                                                        0 :
                                                        lastIndexOf(context, 
XalanUnicode::charSolidus);
   
  @@ -240,8 +240,8 @@
        // OK, now let's look at the urlString...
   
        // Is there a colon, indicating some sort of drive spec, or protocol?
  -     const unsigned int      theURLStringLength = length(urlString);
  -     const unsigned int      theColonIndex = indexOf(urlString, 
XalanUnicode::charColon);
  +     const XalanDOMString::size_type         theURLStringLength = 
length(urlString);
  +     const XalanDOMString::size_type         theColonIndex = 
indexOf(urlString, XalanUnicode::charColon);
   
        if (theColonIndex == theURLStringLength)
        {
  @@ -313,8 +313,8 @@
   #endif
   
        // OK, look for a quick, cheap exit...
  -     const unsigned int      len = length(uriString);
  -     const unsigned int      index = indexOf(uriString, 
XalanUnicode::charReverseSolidus);
  +     const XalanDOMString::size_type         len = length(uriString);
  +     const XalanDOMString::size_type         index = indexOf(uriString, 
XalanUnicode::charReverseSolidus);
   
        if (index != len)
        {
  
  
  
  1.11      +15 -24    xml-xalan/c/src/PlatformSupport/Writer.hpp
  
  Index: Writer.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/PlatformSupport/Writer.hpp,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- Writer.hpp        2000/09/27 16:24:09     1.10
  +++ Writer.hpp        2001/09/25 21:12:51     1.11
  @@ -64,11 +64,6 @@
   
   
   
  -#include <climits>
  -
  -
  -
  -// $$$ ToDo: Necessary will XalanDOMString is still a typedef.
   #include <XalanDOM/XalanDOMString.hpp>
   
   
  @@ -98,7 +93,6 @@
        virtual void
        flush() = 0;
   
  -
        /**
         * Get the stream associated with the writer...
         */
  @@ -119,28 +113,26 @@
         * 
         * @param       s         string to write
         * @param       theOffset starting offset in string to begin writing, 
default 0
  -      * @param       theLength number of characters to write. If the length 
is
  -      *                    UINT_MAX, then the array is assumed to be
  -      *                    null-terminated.  Default is UINT_MAX.
  +      * @param       theLength number of characters to write. If the length 
is -1, then the array is assumed to be null-terminated.
         */
        virtual void
  -     write(const char*       s,
  -               unsigned int  theOffset = 0,
  -               unsigned int  theLength = UINT_MAX) = 0;
  +     write(
  +                     const char*             s,
  +                     size_t                  theOffset = 0,
  +                     size_t                  theLength = size_t(-1)) = 0;
   
        /**
         * Writes a string
         * 
         * @param       s         string to write
         * @param       theOffset starting offset in string to begin writing, 
default 0
  -      * @param       theLength number of characters to write. If the length 
is
  -      *                    UINT_MAX, then the array is assumed to be
  -      *                    null-terminated.  Default is UINT_MAX.
  +      * @param       theLength number of characters to write. If the length 
is XalanDOMString::npos, then the array is assumed to be null-terminated.
         */
        virtual void
  -     write(const XalanDOMChar*       s,
  -               unsigned int                  theOffset = 0,
  -               unsigned int                  theLength = UINT_MAX) = 0;
  +     write(
  +                     const XalanDOMChar*                     s,
  +                     XalanDOMString::size_type       theOffset = 0,
  +                     XalanDOMString::size_type       theLength = 
XalanDOMString::npos) = 0;
   
        /**
         * Writes a character
  @@ -155,14 +147,13 @@
         * 
         * @param       s         string to write
         * @param       theOffset starting offset in string to begin writing, 
default 0
  -      * @param       theLength number of characters to write. If the length 
is
  -      *                    UINT_MAX,  then the entire string is printed. 
Default
  -      *                    is UINT_MAX.
  +      * @param       theLength number of characters to write. If the length 
is XalanDOMString::npos,  then the entire string is printed.
         */
        virtual void
  -     write(const XalanDOMString&             s,
  -               unsigned int                          theOffset = 0,
  -               unsigned int                          theLength = UINT_MAX) = 
0;
  +     write(
  +                     const XalanDOMString&           s,
  +                     XalanDOMString::size_type       theOffset = 0,
  +                     XalanDOMString::size_type       theLength = 
XalanDOMString::npos) = 0;
   
   private:
   
  
  
  
  1.5       +6 -6      xml-xalan/c/src/PlatformSupport/XalanBitmap.cpp
  
  Index: XalanBitmap.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/PlatformSupport/XalanBitmap.cpp,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- XalanBitmap.cpp   2000/11/02 01:45:37     1.4
  +++ XalanBitmap.cpp   2001/09/25 21:12:51     1.5
  @@ -69,9 +69,9 @@
   
   
   
  -XalanBitmap::XalanBitmap(unsigned long       theSize) :
  +XalanBitmap::XalanBitmap(size_type   theSize) :
        m_size(theSize),
  -     m_bitmap(unsigned((theSize + eBitsPerUnit) / eBitsPerUnit), 
BitmapVectorType::value_type(0))
  +     m_bitmap(size_type((theSize + eBitsPerUnit) / eBitsPerUnit), 
BitmapVectorType::value_type(0))
   {
   }
   
  @@ -84,7 +84,7 @@
   
   
   bool
  -XalanBitmap::isSet(unsigned long     theBit) const
  +XalanBitmap::isSet(size_type theBit) const
   {
        if (theBit >= m_size)
        {
  @@ -99,7 +99,7 @@
   
   
   void
  -XalanBitmap::set(unsigned long       theBit)
  +XalanBitmap::set(size_type   theBit)
   {
        if (theBit < m_size)
        {
  @@ -110,7 +110,7 @@
   
   
   void
  -XalanBitmap::clear(unsigned long     theBit)
  +XalanBitmap::clear(size_type theBit)
   {
        if (theBit < m_size)
        {
  @@ -121,7 +121,7 @@
   
   
   void
  -XalanBitmap::toggle(unsigned long    theBit)
  +XalanBitmap::toggle(size_type        theBit)
   {
        if (theBit < m_size)
        {
  
  
  
  1.3       +12 -9     xml-xalan/c/src/PlatformSupport/XalanBitmap.hpp
  
  Index: XalanBitmap.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/PlatformSupport/XalanBitmap.hpp,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- XalanBitmap.hpp   2000/07/10 22:45:46     1.2
  +++ XalanBitmap.hpp   2001/09/25 21:12:51     1.3
  @@ -73,8 +73,11 @@
   public:
   
        // The basic storage unit for the bitmaps.
  -     typedef char    UnitType;
  +     typedef char            UnitType;
   
  +     // A handy typedef...
  +     typedef size_t          size_type;
  +
        // Really all we're assuming is that a char is at least
        // 8 bits.  If it's more, then we'll just waste some
        // space.  This may need to be adjusted for various
  @@ -89,7 +92,7 @@
         *
         * @param  theSize   The number of bits in the map.
         */
  -     XalanBitmap(unsigned long       theSize);
  +     XalanBitmap(size_type   theSize);
   
        ~XalanBitmap();
   
  @@ -101,7 +104,7 @@
         * @return true if the bit is set, false if not.
         */
        bool
  -     isSet(unsigned long     theBit) const;
  +     isSet(size_type         theBit) const;
   
        /**
         * Set a bit.
  @@ -109,7 +112,7 @@
         * @param theBit The number of the bit to set.
         */
        void
  -     set(unsigned long       theBit);
  +     set(size_type   theBit);
   
        /**
         * Clear a bit.
  @@ -117,7 +120,7 @@
         * @param theBit The number of the bit to clear.
         */
        void
  -     clear(unsigned long     theBit);
  +     clear(size_type         theBit);
   
        /**
         * Toggle a bit.
  @@ -125,7 +128,7 @@
         * @param theBit The number of the bit to toggle.
         */
        void
  -     toggle(unsigned long    theBit);
  +     toggle(size_type        theBit);
   
        /**
         * Clear all of the bits.
  @@ -138,7 +141,7 @@
         *
         * @return The number of bits in the map.
         */
  -     unsigned long
  +     size_type
        getSize() const
        {
                return m_size;
  @@ -152,9 +155,9 @@
        typedef std::vector<UnitType>   BitmapVectorType;
   #endif
   
  -     const unsigned long             m_size;
  +     const size_type         m_size;
   
  -     BitmapVectorType                m_bitmap;
  +     BitmapVectorType        m_bitmap;
   };
   
   
  
  
  
  1.3       +28 -26    
xml-xalan/c/src/PlatformSupport/XalanDOMStringHashTable.cpp
  
  Index: XalanDOMStringHashTable.cpp
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/c/src/PlatformSupport/XalanDOMStringHashTable.cpp,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- XalanDOMStringHashTable.cpp       2001/05/10 19:15:37     1.2
  +++ XalanDOMStringHashTable.cpp       2001/09/25 21:12:51     1.3
  @@ -69,8 +69,8 @@
   
   
   XalanDOMStringHashTable::XalanDOMStringHashTable(
  -                     unsigned int    theBucketCount,
  -                     unsigned int    theBucketSize) :
  +                     size_t          theBucketCount,
  +                     size_t          theBucketSize) :
   
        m_bucketCount(theBucketCount),
        m_bucketSize(theBucketSize),
  @@ -85,7 +85,7 @@
   void
   XalanDOMStringHashTable::clear()
   {
  -     for(unsigned int i = 0; i < m_bucketCount; ++i)
  +     for(size_t i = 0; i < m_bucketCount; ++i)
        {
                m_buckets[i].clear();
        }
  @@ -101,9 +101,11 @@
   void
   XalanDOMStringHashTable::getBucketCounts(BucketCountsType&   theVector) const
   {
  -     for(unsigned int i = 0; i < m_bucketCount; ++i)
  +     for(size_t i = 0; i < m_bucketCount; ++i)
        {
  -             theVector.push_back(m_buckets[i].size());
  +             const bucket_size_type  size = m_buckets[i].size();
  +
  +             theVector.push_back(size);
        }
   }
   
  @@ -113,8 +115,8 @@
   equalsXalanDOMString
   {
        equalsXalanDOMString(
  -                     const XalanDOMChar*             theString,
  -                     unsigned int                    theLength) :
  +                     const XalanDOMChar*                     theString,
  +                     XalanDOMString::size_type       theLength) :
                m_string(theString),
                m_length(theLength)
        {
  @@ -135,9 +137,9 @@
   
   private:
   
  -     const XalanDOMChar* const       m_string;
  +     const XalanDOMChar* const                       m_string;
   
  -     const unsigned int                      m_length;
  +     const XalanDOMString::size_type         m_length;
   };
   
   
  @@ -145,27 +147,27 @@
   const XalanDOMString*
   XalanDOMStringHashTable::find(
                        const XalanDOMString&   theString,
  -                     unsigned int*                   theBucketIndex) const
  +                     size_t*                                 theBucketIndex) 
const
   {
        return find(c_wstr(theString), length(theString), theBucketIndex);
   }
   
   
   
  -inline unsigned int
  +inline size_t
   hashString(
  -                     const XalanDOMChar*             theString,
  -                     unsigned int                    theLength)
  +                     const XalanDOMChar*                     theString,
  +                     XalanDOMString::size_type       theLength)
   {
        assert(theString != 0);
   
  -    unsigned int                             theResult = 0;
  +    size_t                           theResult = 0;
   
        const XalanDOMChar* const       theEnd = theString + theLength;
   
        while (theString != theEnd)
       {
  -        theResult += (theResult * 37) + (theResult >> 24) + 
unsigned(*theString);
  +        theResult += (theResult * 37) + (theResult >> 24) + 
size_t(*theString);
   
           ++theString;
       }
  @@ -177,18 +179,18 @@
   
   const XalanDOMString*
   XalanDOMStringHashTable::find(
  -                     const XalanDOMChar*             theString,
  -                     unsigned int                    theLength,
  -                     unsigned int*                   theBucketIndex) const
  +                     const XalanDOMChar*                     theString,
  +                     XalanDOMString::size_type       theLength,
  +                     size_t*                                         
theBucketIndex) const
   {
        assert(theString != 0);
   
  -     const unsigned int      theActualLength =
  -             theLength == unsigned(-1) ? length(theString) : theLength;
  +     const XalanDOMString::size_type         theActualLength =
  +             theLength == XalanDOMString::npos ? length(theString) : 
theLength;
   
  -     const unsigned int      theHash = hashString(theString, 
theActualLength);
  +     const size_t    theHash = hashString(theString, theActualLength);
   
  -     const unsigned int      theLocalBucketIndex = theHash % m_bucketCount;
  +     const size_t    theLocalBucketIndex = theHash % m_bucketCount;
   
        assert(theLocalBucketIndex < m_bucketCount);
   
  @@ -224,9 +226,9 @@
   void
   XalanDOMStringHashTable::insert(const XalanDOMString&        theString)
   {
  -     const unsigned int      theHash = hashString(c_wstr(theString), 
length(theString));
  +     const size_t    theHash = hashString(c_wstr(theString), 
length(theString));
   
  -     const unsigned int      theBucketIndex = theHash % m_bucketCount;
  +     const size_t    theBucketIndex = theHash % m_bucketCount;
   
        assert(theBucketIndex < m_bucketCount);
   
  @@ -251,12 +253,12 @@
   void
   XalanDOMStringHashTable::insert(
                        const XalanDOMString&   theString,
  -                     unsigned int                    theBucketIndex)
  +                     size_t                                  theBucketIndex)
   {
        assert(theBucketIndex == hashString(c_wstr(theString), 
length(theString)) % m_bucketCount);
        assert(theBucketIndex < m_bucketCount);
   
  -     BucketType&     theBucket = m_buckets[theBucketIndex];
  +     BucketType&             theBucket = m_buckets[theBucketIndex];
   
   #if !defined(NDEBUG)
        if (theBucket.size() > 0)
  
  
  
  1.2       +18 -15    
xml-xalan/c/src/PlatformSupport/XalanDOMStringHashTable.hpp
  
  Index: XalanDOMStringHashTable.hpp
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/c/src/PlatformSupport/XalanDOMStringHashTable.hpp,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- XalanDOMStringHashTable.hpp       2001/05/10 17:47:06     1.1
  +++ XalanDOMStringHashTable.hpp       2001/09/25 21:12:51     1.2
  @@ -82,12 +82,15 @@
   
   #if defined(XALAN_NO_NAMESPACES)
        typedef vector<const XalanDOMString*>   BucketType;
  -     typedef vector<unsigned int>                    BucketCountsType;
  +     typedef BucketType::size_type                   bucket_size_type;
  +     typedef vector<bucket_size_type>                BucketCountsType;
   #else
        typedef std::vector<const XalanDOMString*>      BucketType;
  -     typedef std::vector<unsigned int>                       
BucketCountsType;
  +     typedef BucketType::size_type                           
bucket_size_type;
  +     typedef std::vector<bucket_size_type>           BucketCountsType;
   #endif
   
  +
        enum { eDefaultBucketCount = 101, eDefaultBucketSize = 15 };
   
   
  @@ -99,8 +102,8 @@
         */
        explicit
        XalanDOMStringHashTable(
  -                     unsigned int    theBucketCount = eDefaultBucketCount,
  -                     unsigned int    theBucketSize = eDefaultBucketSize);
  +                     size_t                          theBucketCount = 
eDefaultBucketCount,
  +                     bucket_size_type        theBucketSize = 
eDefaultBucketSize);
   
        ~XalanDOMStringHashTable() { }
   
  @@ -115,7 +118,7 @@
         *
         * @return The number of strings in the table
         */
  -     unsigned int
  +     size_t
        size() const
        {
                return m_count;
  @@ -126,7 +129,7 @@
         *
         * @return The number of buckets in the table
         */
  -     unsigned int
  +     size_t
        bucketCount() const
        {
                return m_bucketCount;
  @@ -146,7 +149,7 @@
         *
         * @return The number of collisions.  Valid only for non-release builds.
         */
  -     unsigned int
  +     size_t
        collisions() const
        {
                return m_collisions;
  @@ -162,7 +165,7 @@
        const XalanDOMString*
        find(
                        const XalanDOMString&   theString,
  -                     unsigned int*                   theBucketIndex = 0) 
const;
  +                     size_t*                                 theBucketIndex 
= 0) const;
   
        /**
         * Find a string.  If the string is not found, return null.
  @@ -178,9 +181,9 @@
         */
        const XalanDOMString*
        find(
  -                     const XalanDOMChar*             theString,
  -                     unsigned int                    theLength = 
unsigned(-1),
  -                     unsigned int*                   theBucketIndex = 0) 
const;
  +                     const XalanDOMChar*                     theString,
  +                     XalanDOMString::size_type       theLength = 
XalanDOMString::npos,
  +                     size_t*                                         
theBucketIndex = 0) const;
   
        /**
         * Insert a pointer to a string into the table.  If the string
  @@ -215,7 +218,7 @@
        void
        insert(
                        const XalanDOMString&   theString,
  -                     unsigned int                    theBucketIndex);
  +                     size_t                                  theBucketIndex);
   
   private:
   
  @@ -230,13 +233,13 @@
   
   
        // Data members...
  -     const unsigned int                              m_bucketCount;
  +     const size_t                                    m_bucketCount;
   
  -     const unsigned int                              m_bucketSize;
  +     const bucket_size_type                  m_bucketSize;
   
        XalanArrayAutoPtr<BucketType>   m_buckets;
   
  -     unsigned int                                    m_count;
  +     size_t                                                  m_count;
   
        unsigned int                                    m_collisions;           
   };
  
  
  
  1.11      +7 -7      xml-xalan/c/src/PlatformSupport/XalanDOMStringPool.cpp
  
  Index: XalanDOMStringPool.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/PlatformSupport/XalanDOMStringPool.cpp,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- XalanDOMStringPool.cpp    2001/05/10 17:47:48     1.10
  +++ XalanDOMStringPool.cpp    2001/09/25 21:12:51     1.11
  @@ -65,9 +65,9 @@
   
   
   XalanDOMStringPool::XalanDOMStringPool(
  -                     unsigned int    theBlockSize,
  -                     unsigned int    theBucketCount,
  -                     unsigned int    theBucketSize) :
  +                     block_size_type         theBlockSize,
  +                     bucket_count_type       theBucketCount,
  +                     bucket_size_type        theBucketSize) :
        m_stringAllocator(theBlockSize),
        m_stringCount(0),
        m_hashTable(theBucketCount, theBucketSize)
  @@ -114,8 +114,8 @@
   
   const XalanDOMString&
   XalanDOMStringPool::get(
  -                     const XalanDOMChar*             theString,
  -                     unsigned int                    theLength)
  +                     const XalanDOMChar*                     theString,
  +                     XalanDOMString::size_type       theLength)
   {
        assert(m_stringCount == m_hashTable.size());
   
  @@ -125,9 +125,9 @@
        }
        else
        {
  -             const unsigned int      theActualLength = theLength == 
unsigned(-1) ? length(theString) : theLength;
  +             const XalanDOMString::size_type         theActualLength = 
theLength == XalanDOMString::npos ? length(theString) : theLength;
   
  -             unsigned int    theBucketIndex;
  +             size_t  theBucketIndex;
   
                const XalanDOMString*   theTableString = 
m_hashTable.find(theString, theActualLength, &theBucketIndex);
   
  
  
  
  1.9       +21 -17    xml-xalan/c/src/PlatformSupport/XalanDOMStringPool.hpp
  
  Index: XalanDOMStringPool.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/PlatformSupport/XalanDOMStringPool.hpp,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- XalanDOMStringPool.hpp    2001/05/10 17:47:49     1.8
  +++ XalanDOMStringPool.hpp    2001/09/25 21:12:51     1.9
  @@ -83,6 +83,19 @@
                   eDefaultBucketCount = 
XalanDOMStringHashTable::eDefaultBucketCount,
                   eDefaultBucketSize = 
XalanDOMStringHashTable::eDefaultBucketSize };
   
  +#if defined(XALAN_NO_DEFAULT_TEMPLATE_ARGUMENTS)
  +     typedef ArenaBlock<XalanDOMString>              ArenaBlockType;
  +
  +     typedef ArenaAllocator<XalanDOMString,
  +                                                ArenaBlockType>      
ArenaAllocatorType;
  +#else
  +     typedef ArenaAllocator<XalanDOMString>  ArenaAllocatorType;
  +#endif
  +
  +     typedef ArenaAllocatorType::size_type                           
block_size_type;
  +     typedef size_t                                                          
                bucket_count_type;
  +     typedef XalanDOMStringHashTable::bucket_size_type       
bucket_size_type;
  +
        /**
         * Create a string pool.
         *
  @@ -92,9 +105,9 @@
         */
        explicit
        XalanDOMStringPool(
  -                     unsigned int    theBlockSize = eDefaultBlockSize,
  -                     unsigned int    theBucketCount = eDefaultBucketCount,
  -                     unsigned int    theBucketSize = eDefaultBucketSize);
  +                     block_size_type         theBlockSize = 
eDefaultBlockSize,
  +                     bucket_count_type       theBucketCount = 
eDefaultBucketCount,
  +                     bucket_size_type        theBucketSize = 
eDefaultBucketSize);
   
        virtual
        ~XalanDOMStringPool();
  @@ -111,7 +124,7 @@
         *
         * @return the size of the pool.
         */
  -     virtual unsigned int
  +     virtual size_t
        size() const;
   
        /**
  @@ -127,13 +140,13 @@
         * Get a pooled string.  If the string is not pooled, it is added.
         *
         * @param theString The string to pool.
  -      * @param theLength The length of the string.  If -1, the string is 
assumed to be null-terminated.
  +      * @param theLength The length of the string.  If XalanDOMString::npos, 
the string is assumed to be null-terminated.
         * @return a const reference to the pooled string.
         */
        virtual const XalanDOMString&
        get(
  -                     const XalanDOMChar*             theString,
  -                     unsigned int                    theLength = 
unsigned(-1));
  +                     const XalanDOMChar*                     theString,
  +                     XalanDOMString::size_type       theLength = 
XalanDOMString::npos);
   
        /**
         * Get a reference to the pool's hash table.  Useful for diagnostic
  @@ -158,19 +171,10 @@
        bool
        operator==(const XalanDOMStringPool&) const;
   
  -#if defined(XALAN_NO_DEFAULT_TEMPLATE_ARGUMENTS)
  -     typedef ArenaBlock<XalanDOMString>              ArenaBlockType;
  -
  -     typedef ArenaAllocator<XalanDOMString,
  -                                                ArenaBlockType>      
ArenaAllocatorType;
  -#else
  -     typedef ArenaAllocator<XalanDOMString>  ArenaAllocatorType;
  -#endif
  -
        // Data members...
        ArenaAllocatorType                              m_stringAllocator;
   
  -     unsigned int                                    m_stringCount;
  +     size_t                                                  m_stringCount;
   
        XalanDOMStringHashTable                 m_hashTable;
   
  
  
  
  1.3       +1 -1      xml-xalan/c/src/PlatformSupport/XalanDecimalFormat.cpp
  
  Index: XalanDecimalFormat.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/PlatformSupport/XalanDecimalFormat.cpp,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- XalanDecimalFormat.cpp    2001/06/14 19:04:02     1.2
  +++ XalanDecimalFormat.cpp    2001/09/25 21:12:51     1.3
  @@ -208,7 +208,7 @@
                m_decimalFormatSymbols->getPatternSeparator();
   
        // Is the a separator?
  -     const unsigned int      theSeparatorIndex =
  +     const XalanDOMString::size_type         theSeparatorIndex =
                indexOf(thePattern, thePatternSeparatorChar);
   
        if (theSeparatorIndex < length(thePattern))
  
  
  
  1.10      +4 -4      xml-xalan/c/src/PlatformSupport/XalanNumberFormat.cpp
  
  Index: XalanNumberFormat.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/PlatformSupport/XalanNumberFormat.cpp,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- XalanNumberFormat.cpp     2001/06/14 19:04:04     1.9
  +++ XalanNumberFormat.cpp     2001/09/25 21:12:51     1.10
  @@ -237,7 +237,7 @@
        }
        else
        {
  -             const unsigned int len = length(value);
  +             const XalanDOMString::size_type         len = length(value);
   
                if (len == 0)
                {
  @@ -245,7 +245,7 @@
                }
                else
                {
  -                     const unsigned int      bufsize = len + 
len/m_groupingSize + 1;
  +                     const XalanDOMString::size_type         bufsize = len + 
len/m_groupingSize + 1;
   
                        XalanDOMChar* const             buffer = new 
XalanDOMChar[bufsize];
   
  @@ -255,14 +255,14 @@
   
                        *p-- = 0;       // null terminate
   
  -                     for (unsigned int i = 0, ix = len - 1; i < len; i++, 
ix--)
  +                     for (XalanDOMString::size_type i = 0, ix = len - 1; i < 
len; i++, ix--)
                        {
                                const XalanDOMChar              c = 
charAt(value, ix);
   
                                if (i && !(i% m_groupingSize))
                                {
                                        // Could be a multiple character 
separator??
  -                                     for (int j= 
m_groupingSeparator.length()-1; j>=0; j--)
  +                                     for (long j = 
long(m_groupingSeparator.length() - 1); j>=0; j--)
                                                *p-- = 
charAt(m_groupingSeparator, j);
                                }
   
  
  
  
  1.13      +7 -7      xml-xalan/c/src/PlatformSupport/XalanOutputStream.cpp
  
  Index: XalanOutputStream.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/PlatformSupport/XalanOutputStream.cpp,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- XalanOutputStream.cpp     2001/08/09 20:30:26     1.12
  +++ XalanOutputStream.cpp     2001/09/25 21:12:51     1.13
  @@ -101,7 +101,7 @@
   void
   XalanOutputStream::write(
                        const XalanDOMChar*             theBuffer,
  -                     unsigned long                   theBufferLength)
  +                     size_t                                  theBufferLength)
   {
        assert(theBuffer != 0);
   
  @@ -127,7 +127,7 @@
   void
   XalanOutputStream::transcode(
                        const XalanDOMChar*             theBuffer,
  -                     unsigned long                   theBufferLength,
  +                     size_t                                  theBufferLength,
                        TranscodeVectorType&    theDestination)
   {
        if (m_transcoder == 0)
  @@ -160,7 +160,7 @@
                // and amount remaining in the buffer, since we may not be
                // able to transcode it all at once.
                const XalanDOMChar*             theBufferPosition = theBuffer;
  -             unsigned int                    theRemainingBufferLength = 
theBufferLength;
  +             size_t                                  
theRemainingBufferLength = theBufferLength;
   
                // Keep track of the destination size, and the target size, 
which is
                // the size of the destination that has not yet been filled with
  @@ -168,8 +168,8 @@
                // transcoding to a 16-bit encoding.
                // $$$ ToDo: We need to know the size of an encoding, so we can
                // do the right thing with the destination size.
  -             unsigned int                    theDestinationSize = 
theBufferLength * 2;
  -             unsigned int                    theTargetSize = 
theDestinationSize;
  +             size_t  theDestinationSize = theBufferLength * 2;
  +             size_t  theTargetSize = theDestinationSize;
   
                do
                {
  @@ -285,7 +285,7 @@
                XalanTranscodingServices::getStreamProlog(theEncoding);
        assert(theProlog != 0);
   
  -     const unsigned int      theLength = 
XalanTranscodingServices::length(theProlog);
  +     const size_t    theLength = XalanTranscodingServices::length(theProlog);
   
        if (theLength > 0)
        {
  @@ -315,7 +315,7 @@
   void
   XalanOutputStream::doWrite(
                        const XalanDOMChar*             theBuffer,
  -                     unsigned long                   theBufferLength)
  +                     size_t                                  theBufferLength)
   {
        assert(theBuffer != 0);
   
  
  
  
  1.7       +6 -6      xml-xalan/c/src/PlatformSupport/XalanOutputStream.hpp
  
  Index: XalanOutputStream.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/PlatformSupport/XalanOutputStream.hpp,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- XalanOutputStream.hpp     2001/08/09 20:30:26     1.6
  +++ XalanOutputStream.hpp     2001/09/25 21:12:51     1.7
  @@ -191,7 +191,7 @@
       void
        write(
                        const char*             theBuffer,
  -                     unsigned long   theBufferLength)
  +                     size_t                  theBufferLength)
        {
                assert(theBuffer != 0);
   
  @@ -211,7 +211,7 @@
       void
        write(
                        const XalanDOMChar*             theBuffer,
  -                     unsigned long                   theBufferLength);
  +                     size_t                                  
theBufferLength);
   
        /**
         * Get the output encoding for the stream.
  @@ -357,12 +357,12 @@
        void
        transcode(
                        const XalanDOMChar*             theBuffer,
  -                     unsigned long                   theBufferLength,
  +                     size_t                                  theBufferLength,
                        TranscodeVectorType&    theDestination);
   
        virtual void
  -     writeData(const char*           theBuffer,
  -                       unsigned long         theBufferLength) = 0;
  +     writeData(const char*   theBuffer,
  +                       size_t                theBufferLength) = 0;
   
        virtual void
        doFlush() = 0;
  @@ -385,7 +385,7 @@
        void
        doWrite(
                        const XalanDOMChar*             theBuffer,
  -                     unsigned long                   theBufferLength);
  +                     size_t                                  
theBufferLength);
   
   
        const TranscodeVectorType::size_type    m_transcoderBlockSize;
  
  
  
  1.6       +14 -14    
xml-xalan/c/src/PlatformSupport/XalanOutputStreamPrintWriter.cpp
  
  Index: XalanOutputStreamPrintWriter.cpp
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/c/src/PlatformSupport/XalanOutputStreamPrintWriter.cpp,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- XalanOutputStreamPrintWriter.cpp  2001/08/09 20:30:05     1.5
  +++ XalanOutputStreamPrintWriter.cpp  2001/09/25 21:12:51     1.6
  @@ -131,8 +131,8 @@
   void
   XalanOutputStreamPrintWriter::write(
                        const char*             s,
  -                     unsigned int    theOffset,
  -                     unsigned int    theLength)
  +                     size_t                  theOffset,
  +                     size_t                  theLength)
   {
        assert(s != 0);
   
  @@ -157,9 +157,9 @@
   
   void
   XalanOutputStreamPrintWriter::write(
  -                     const XalanDOMChar*             s,
  -                     unsigned int                    theOffset,
  -                     unsigned int                    theLength)
  +                     const XalanDOMChar*                     s,
  +                     XalanDOMString::size_type       theOffset,
  +                     XalanDOMString::size_type       theLength)
   {
        assert(s != 0);
   
  @@ -192,9 +192,9 @@
   
   void
   XalanOutputStreamPrintWriter::write(
  -                     const XalanDOMString&   s,
  -                     unsigned int                    theOffset,
  -                     unsigned int                    theLength)
  +                     const XalanDOMString&           s,
  +                     XalanDOMString::size_type       theOffset,
  +                     XalanDOMString::size_type       theLength)
   {
        write(c_wstr(s), theOffset, theLength);
   }
  @@ -229,7 +229,7 @@
   void
   XalanOutputStreamPrintWriter::print(
                        const char*             s,
  -                     unsigned int    theLength)
  +                     size_t                  theLength)
   {
        write(s,
                  0,
  @@ -240,8 +240,8 @@
   
   void
   XalanOutputStreamPrintWriter::print(
  -                     const XalanDOMChar*             s,
  -                     unsigned int                    theLength)
  +                     const XalanDOMChar*                     s,
  +                     XalanDOMString::size_type       theLength)
   {
        assert(s != 0);
        assert(theLength >= 0 || theLength == UINT_MAX);
  @@ -320,7 +320,7 @@
   void
   XalanOutputStreamPrintWriter::println(
                        const char*             s,
  -                     unsigned int    theLength)
  +                     size_t                  theLength)
   {
        print(s, theLength);
   
  @@ -331,8 +331,8 @@
   
   void
   XalanOutputStreamPrintWriter::println(
  -                     const XalanDOMChar*             s,
  -                     unsigned int                    theLength)
  +                     const XalanDOMChar*                     s,
  +                     XalanDOMString::size_type       theLength)
   {
        print(s, theLength);
   
  
  
  
  1.2       +29 -25    
xml-xalan/c/src/PlatformSupport/XalanOutputStreamPrintWriter.hpp
  
  Index: XalanOutputStreamPrintWriter.hpp
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/c/src/PlatformSupport/XalanOutputStreamPrintWriter.hpp,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- XalanOutputStreamPrintWriter.hpp  2000/09/27 16:24:12     1.1
  +++ XalanOutputStreamPrintWriter.hpp  2001/09/25 21:12:51     1.2
  @@ -89,7 +89,6 @@
        virtual
        ~XalanOutputStreamPrintWriter();
   
  -     // These methods are inherited from PrintWriter ...
   
        virtual bool
       checkError() const;
  @@ -107,25 +106,26 @@
        getStream() const;
   
   
  -     // Output functions...
  -
        virtual void
  -     write(const char*       s,
  -               unsigned int  theOffset = 0,
  -               unsigned int  theLength = UINT_MAX);
  +     write(
  +                     const char*             s,
  +                     size_t                  theOffset = 0,
  +                     size_t                  theLength = size_t(-1));
   
        virtual void
  -     write(const XalanDOMChar*       s,
  -               unsigned int                  theOffset = 0,
  -               unsigned int                  theLength = UINT_MAX);
  +     write(
  +                     const XalanDOMChar*                     s,
  +                     XalanDOMString::size_type       theOffset = 0,
  +                     XalanDOMString::size_type       theLength = 
XalanDOMString::npos);
   
        virtual void
        write(XalanDOMChar              c);
   
        virtual void
  -     write(const XalanDOMString&             s,
  -               unsigned int                          theOffset = 0,
  -               unsigned int                          theLength = UINT_MAX);
  +     write(
  +                     const XalanDOMString&           s,
  +                     XalanDOMString::size_type       theOffset = 0,
  +                     XalanDOMString::size_type       theLength = 
XalanDOMString::npos);
   
   #if !defined(XALAN_BOOL_AS_INT)
        virtual void
  @@ -136,12 +136,14 @@
        print(char      c);
   
        virtual void
  -     print(const char*       s,
  -               unsigned int  theLength = UINT_MAX);
  +     print(
  +                     const char*             s,
  +                     size_t                  theLength = size_t(-1));
   
        virtual void
  -     print(const XalanDOMChar*       s,
  -               unsigned int                  theLength = UINT_MAX);
  +     print(
  +                     const XalanDOMChar*                     s,
  +                     XalanDOMString::size_type       theLength = 
XalanDOMString::npos);
   
        virtual void
        print(double    d);
  @@ -160,28 +162,30 @@
   
   #if !defined(XALAN_BOOL_AS_INT)
        virtual void
  -     println(bool    b);
  +     println(bool    x);
   #endif
   
        virtual void
  -     println(char    c);
  +     println(char    x);
   
        virtual void
  -     println(const char*             s,
  -                 unsigned int        theLength = UINT_MAX);
  +     println(
  +                     const char*             s,
  +                 size_t                      theLength = size_t(-1));
   
        virtual void
  -     println(const XalanDOMChar*             s,
  -                     unsigned int                    theLength = UINT_MAX);
  +     println(
  +                     const XalanDOMChar*                     s,
  +                     XalanDOMString::size_type       theLength = 
XalanDOMString::npos);
   
        virtual void
  -     println(double  d);
  +     println(double  x);
   
        virtual void
  -     println(int             i);
  +     println(int             x);
   
        virtual void
  -     println(long    l);
  +     println(long    x);
   
        virtual void
        println(const XalanDOMString&   s);
  
  
  
  1.4       +27 -14    
xml-xalan/c/src/PlatformSupport/XalanToXercesTranscoderWrapper.cpp
  
  Index: XalanToXercesTranscoderWrapper.cpp
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/c/src/PlatformSupport/XalanToXercesTranscoderWrapper.cpp,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- XalanToXercesTranscoderWrapper.cpp        2001/09/14 20:03:06     1.3
  +++ XalanToXercesTranscoderWrapper.cpp        2001/09/25 21:12:51     1.4
  @@ -85,27 +85,34 @@
   XalanToXercesTranscoderWrapper::eCode
   XalanToXercesTranscoderWrapper::transcode(
                        const XalanDOMChar*             theSourceData,
  -                     unsigned int                    theSourceCount,
  +                     size_t                                  theSourceCount,
                        XalanXMLByte*                   theTarget,
  -                     unsigned int                    theTargetSize,
  -                     unsigned int&                   
theSourceCharsTranscoded,
  -                     unsigned int&                   theTargetBytesUsed)
  +                     size_t                                  theTargetSize,
  +                     size_t&                                 
theSourceCharsTranscoded,
  +                     size_t&                                 
theTargetBytesUsed)
   {
        eCode   theCode = XalanTranscodingServices::OK;
   
        try
        {
  +             XercesSizeType  theXercesSourceCharsTranscoded = 0;
  +
  +             assert(XercesSizeType(theSourceCount) == theSourceCount);
  +             assert(XercesSizeType(theTargetSize) == theTargetSize);
  +
                theTargetBytesUsed = m_transcoder->transcodeTo(
                        theSourceData,
  -                     theSourceCount,
  +                     XercesSizeType(theSourceCount),
                        theTarget,
  -                     theTargetSize,
  -                     theSourceCharsTranscoded,
  +                     XercesSizeType(theTargetSize),
  +                     theXercesSourceCharsTranscoded,
                        // $$$ ToDo: Eventually, we're going to want to
                        // replace this with UnRep_Throw, and let the
                        // caller try to recover.
   //                   XMLTranscoder::UnRep_Throw);
                        XMLTranscoder::UnRep_RepChar);
  +
  +             theSourceCharsTranscoded = theXercesSourceCharsTranscoded;
        }
        catch(const XMLException&)
        {
  @@ -122,24 +129,30 @@
   XalanToXercesTranscoderWrapper::eCode
   XalanToXercesTranscoderWrapper::transcode(
                        const XalanXMLByte*             theSourceData,
  -                     unsigned int                    theSourceCount,
  +                     size_t                                  theSourceCount,
                        XalanDOMChar*                   theTarget,
  -                     unsigned int                    theTargetSize,
  -                     unsigned int&                   
theSourceCharsTranscoded,
  -                     unsigned int&                   theTargetBytesUsed,
  +                     size_t                                  theTargetSize,
  +                     size_t&                                 
theSourceCharsTranscoded,
  +                     size_t&                                 
theTargetBytesUsed,
                        unsigned char*                  theCharSizes)
   {
        eCode   theCode = XalanTranscodingServices::OK;
   
        try
        {
  -             theTargetBytesUsed = m_transcoder->transcodeFrom(
  +             assert(XercesSizeType(theSourceCount) == theSourceCount);
  +             assert(XercesSizeType(theTargetSize) == theTargetSize);
  +
  +             const XercesSizeType    theXercesTargetBytesUsed =
  +                             m_transcoder->transcodeFrom(
                        theSourceData,
  -                     theSourceCount,
  +                     XercesSizeType(theSourceCount),
                        theTarget,
  -                     theTargetSize,
  +                     XercesSizeType(theTargetSize),
                        theSourceCharsTranscoded,
                        theCharSizes);
  +
  +             theTargetBytesUsed = theXercesTargetBytesUsed;
        }
        catch(const XMLException&)
        {
  
  
  
  1.3       +11 -8     
xml-xalan/c/src/PlatformSupport/XalanToXercesTranscoderWrapper.hpp
  
  Index: XalanToXercesTranscoderWrapper.hpp
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/c/src/PlatformSupport/XalanToXercesTranscoderWrapper.hpp,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- XalanToXercesTranscoderWrapper.hpp        2001/09/14 20:03:06     1.2
  +++ XalanToXercesTranscoderWrapper.hpp        2001/09/25 21:12:51     1.3
  @@ -86,20 +86,20 @@
        virtual eCode
        transcode(
                        const XalanDOMChar*             theSourceData,
  -                     unsigned int                    theSourceCount,
  +                     size_t                                  theSourceCount,
                        XalanXMLByte*                   theTarget,
  -                     unsigned int                    theTargetSize,
  -                     unsigned int&                   
theSourceCharsTranscoded,
  -                     unsigned int&                   theTargetBytesUsed);
  +                     size_t                                  theTargetSize,
  +                     size_t&                                 
theSourceCharsTranscoded,
  +                     size_t&                                 
theTargetBytesUsed);
   
        virtual eCode
        transcode(
                        const XalanXMLByte*             theSourceData,
  -                     unsigned int                    theSourceCount,
  +                     size_t                                  theSourceCount,
                        XalanDOMChar*                   theTarget,
  -                     unsigned int                    theTargetSize,
  -                     unsigned int&                   
theSourceCharsTranscoded,
  -                     unsigned int&                   theTargetBytesUsed,
  +                     size_t                                  theTargetSize,
  +                     size_t&                                 
theSourceCharsTranscoded,
  +                     size_t&                                 
theTargetBytesUsed,
                        unsigned char*                  theCharSizes);
   
   private:
  @@ -110,7 +110,10 @@
        XalanToXercesTranscoderWrapper&
        operator=(const XalanToXercesTranscoderWrapper&);
   
  +     // A handy typedef...
  +     typedef unsigned int    XercesSizeType;
   
  +     // Data members...
        XMLTranscoder* const    m_transcoder;
   };
   
  
  
  
  1.6       +10 -10    
xml-xalan/c/src/PlatformSupport/XalanTranscodingServices.hpp
  
  Index: XalanTranscodingServices.hpp
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/c/src/PlatformSupport/XalanTranscodingServices.hpp,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- XalanTranscodingServices.hpp      2001/09/14 20:03:06     1.5
  +++ XalanTranscodingServices.hpp      2001/09/25 21:12:51     1.6
  @@ -100,7 +100,7 @@
   
        typedef unsigned char   XalanXMLByte;
   
  -     static unsigned int
  +     static size_t
        length(const XalanXMLByte*      theBytes)
        {
                assert(theBytes != 0);
  @@ -146,7 +146,7 @@
        makeNewTranscoder(
                        const XalanDOMString&   theEncodingName,
                        eCode&                                  theResult,
  -                     unsigned int                    theBlockSize);
  +                     size_t                                  theBlockSize);
   
        /**
         * Destroy a transcoder instance.
  @@ -313,11 +313,11 @@
        virtual eCode
        transcode(
                        const XalanDOMChar*             theSourceData,
  -                     unsigned int                    theSourceCount,
  +                     size_t                                  theSourceCount,
                        XalanXMLByte*                   theTarget,
  -                     unsigned int                    theTargetSize,
  -                     unsigned int&                   
theSourceCharsTranscoded,
  -                     unsigned int&                   theTargetBytesUsed) = 0;
  +                     size_t                                  theTargetSize,
  +                     size_t&                                 
theSourceCharsTranscoded,
  +                     size_t&                                 
theTargetBytesUsed) = 0;
   
        /**
         * Transcode data from the transcoder's encoding to UTF-16.  If 
successfull,
  @@ -336,11 +336,11 @@
        virtual eCode
        transcode(
                        const XalanXMLByte*             theSourceData,
  -                     unsigned int                    theSourceCount,
  +                     size_t                                  theSourceCount,
                        XalanDOMChar*                   theTarget,
  -                     unsigned int                    theTargetSize,
  -                     unsigned int&                   
theSourceCharsTranscoded,
  -                     unsigned int&                   theTargetBytesUsed,
  +                     size_t                                  theTargetSize,
  +                     size_t&                                 
theSourceCharsTranscoded,
  +                     size_t&                                 
theTargetBytesUsed,
                        unsigned char*                  theCharSizes) = 0;
   
   private:
  
  
  
  1.5       +8 -8      xml-xalan/c/src/PlatformSupport/XalanUTF16Transcoder.cpp
  
  Index: XalanUTF16Transcoder.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/PlatformSupport/XalanUTF16Transcoder.cpp,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- XalanUTF16Transcoder.cpp  2001/09/18 14:44:40     1.4
  +++ XalanUTF16Transcoder.cpp  2001/09/25 21:12:51     1.5
  @@ -78,11 +78,11 @@
   XalanUTF16Transcoder::eCode
   XalanUTF16Transcoder::transcode(
                        const XalanDOMChar*             theSourceData,
  -                     unsigned int                    theSourceCount,
  +                     size_t                                  theSourceCount,
                        XalanXMLByte*                   theTarget,
  -                     unsigned int                    theTargetSize,
  -                     unsigned int&                   
theSourceCharsTranscoded,
  -                     unsigned int&                   theTargetBytesUsed)
  +                     size_t                                  theTargetSize,
  +                     size_t&                                 
theSourceCharsTranscoded,
  +                     size_t&                                 
theTargetBytesUsed)
   {
        unsigned int    theSourceEaten = 0;
        unsigned int    theTargetPosition = 0;
  @@ -125,11 +125,11 @@
   XalanUTF16Transcoder::eCode
   XalanUTF16Transcoder::transcode(
                        const XalanXMLByte*             theSourceData,
  -                     unsigned int                    theSourceCount,
  +                     size_t                                  theSourceCount,
                        XalanDOMChar*                   theTarget,
  -                     unsigned int                    theTargetSize,
  -                     unsigned int&                   
theSourceCharsTranscoded,
  -                     unsigned int&                   theTargetBytesUsed,
  +                     size_t                                  theTargetSize,
  +                     size_t&                                 
theSourceCharsTranscoded,
  +                     size_t&                                 
theTargetBytesUsed,
                        unsigned char*                  theCharSizes)
   {
        unsigned int    theSourceEaten = 0;
  
  
  
  1.3       +8 -8      xml-xalan/c/src/PlatformSupport/XalanUTF16Transcoder.hpp
  
  Index: XalanUTF16Transcoder.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/PlatformSupport/XalanUTF16Transcoder.hpp,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- XalanUTF16Transcoder.hpp  2001/09/14 20:03:06     1.2
  +++ XalanUTF16Transcoder.hpp  2001/09/25 21:12:51     1.3
  @@ -94,11 +94,11 @@
        virtual eCode
        transcode(
                        const XalanDOMChar*             theSourceData,
  -                     unsigned int                    theSourceCount,
  +                     size_t                                  theSourceCount,
                        XalanXMLByte*                   theTarget,
  -                     unsigned int                    theTargetSize,
  -                     unsigned int&                   
theSourceCharsTranscoded,
  -                     unsigned int&                   theTargetBytesUsed);
  +                     size_t                                  theTargetSize,
  +                     size_t&                                 
theSourceCharsTranscoded,
  +                     size_t&                                 
theTargetBytesUsed);
   
        /**
         * Transcode data from UTF-16 to UTF-16.
  @@ -115,11 +115,11 @@
        virtual eCode
        transcode(
                        const XalanXMLByte*             theSourceData,
  -                     unsigned int                    theSourceCount,
  +                     size_t                                  theSourceCount,
                        XalanDOMChar*                   theTarget,
  -                     unsigned int                    theTargetSize,
  -                     unsigned int&                   
theSourceCharsTranscoded,
  -                     unsigned int&                   theTargetBytesUsed,
  +                     size_t                                  theTargetSize,
  +                     size_t&                                 
theSourceCharsTranscoded,
  +                     size_t&                                 
theTargetBytesUsed,
                        unsigned char*                  theCharSizes);
   
   private:
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to