dbertoni    00/06/04 17:50:53

  Modified:    c/src/PlatformSupport DOMStringHelper.cpp
                        DOMStringHelper.hpp URISupport.cpp
  Log:
  Fixes for Xerces DOMString changes.
  
  Revision  Changes    Path
  1.24      +1 -1      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.23
  retrieving revision 1.24
  diff -u -r1.23 -r1.24
  --- DOMStringHelper.cpp       2000/05/18 18:34:42     1.23
  +++ DOMStringHelper.cpp       2000/06/05 00:50:51     1.24
  @@ -1241,7 +1241,7 @@
   XALAN_PLATFORMSUPPORT_EXPORT_FUNCTION(string)
   DOMStringToStdString(const XalanDOMString&   domString)
   {
  -     XalanDOMChar* const             toTranscode = domString.rawBuffer();
  +     const XalanDOMChar* const       toTranscode = c_wstr(domString);
        unsigned int                    len = domString.length();
   
   
  
  
  
  1.23      +4 -25     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.22
  retrieving revision 1.23
  diff -u -r1.22 -r1.23
  --- DOMStringHelper.hpp       2000/05/31 16:58:58     1.22
  +++ DOMStringHelper.hpp       2000/06/05 00:50:51     1.23
  @@ -162,14 +162,14 @@
    * @param theString target string
    * @return array of XalanDOMChar
    */
  -inline XalanDOMChar*
  +inline const XalanDOMChar*
   toCharArray(const XalanDOMString&    theString)
   {
        return theString.rawBuffer();
   }
   
   
  -
  +#if 0
   /**
    * Get the underlying representation of the target XalanDOMString as an 
array of
    * XalanDOMChar, not guaranteed to be null-terminated.
  @@ -177,11 +177,12 @@
    * @param theString target string
    * @return array of XalanDOMChar
    */
  -inline XalanDOMChar*
  +inline const XalanDOMChar*
   toCharArray(XalanDOMString&          theString)
   {
        return theString.rawBuffer();
   }
  +#endif
   
   
   
  @@ -1186,28 +1187,6 @@
   #else
        theString = static_cast<DOM_NullPtr*>(0);
   #endif
  -}
  -
  -
  -
  -/**
  - * Replaces a character at a specified index in a XalanDOMString
  - * 
  - * @param theString target string
  - * @param theIndex  index of character
  - * @param theChar target character
  - */
  -inline void
  -setCharAt(
  -                     XalanDOMString&         theString,
  -                     unsigned int            theIndex,
  -                     XalanDOMChar            theChar)
  -{
  -     assert(theIndex < length(theString));
  -
  -     XalanDOMChar* const     theBuffer = toCharArray(theString);
  -
  -     theBuffer[theIndex] = theChar;
   }
   
   
  
  
  
  1.4       +6 -1      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.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- URISupport.cpp    2000/06/01 14:35:17     1.3
  +++ URISupport.cpp    2000/06/05 00:50:51     1.4
  @@ -229,9 +229,14 @@
   
        if (index != len)
        {
  +             XalanDOMCharVectorType  theVector =
  +                     MakeXalanDOMCharVector(uriString);
  +
                // Start replacing at the index point, since that's the
                // first one...
  -             replace(toCharArray(uriString) + index, toCharArray(uriString) 
+ len, '\\', '/');
  +             replace(theVector.begin(), theVector.end(), '\\', '/');
  +
  +             uriString = XalanDOMString(&theVector[0]);
        }
   
        return uriString;
  
  
  

Reply via email to