You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xalan.apache.org by db...@apache.org on 2002/04/04 08:18:28 UTC

cvs commit: xml-xalan/c/src/PlatformSupport URISupport.cpp

dbertoni    02/04/03 22:18:28

  Modified:    c/src/PlatformSupport URISupport.cpp
  Log:
  Cleaned up a bit.
  
  Revision  Changes    Path
  1.18      +5 -18     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.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- URISupport.cpp	2 Apr 2002 06:10:06 -0000	1.17
  +++ URISupport.cpp	4 Apr 2002 06:18:28 -0000	1.18
  @@ -231,7 +231,9 @@
   	}
   	else
   	{
  -		const XalanDOMString	theProtocolString(substring(urlString, 0, theColonIndex));
  +		XalanDOMString	theProtocolString;
  +		
  +		substring(urlString, theProtocolString, 0, theColonIndex);
   
   		// $$$ ToDo: XMLURL::lookupByName() is supposed to be static, but is not.
   		const XMLURL::Protocols		theProtocol =
  @@ -270,7 +272,7 @@
   					// Strip off file name from context...
   					if (indexOfSlash < baseLen)
   					{
  -						context = substring(context, 0, indexOfSlash + 1);
  +						substring(context, context, 0, indexOfSlash + 1);
   					}
   
   					// OK, everything looks good, so strip off the protocol 
  @@ -299,28 +301,13 @@
   
   	if (index != len)
   	{
  -#if 1
   		// Start replacing at the index point, since that's the
   		// first one...
   		replace(
  -				uriString.begin(),
  +				uriString.begin() + index,
   				uriString.end(),
   				XalanDOMChar(XalanUnicode::charReverseSolidus),
   				XalanDOMChar(XalanUnicode::charSolidus));
  -#else
  -		XalanDOMCharVectorType	theVector =
  -			MakeXalanDOMCharVector(uriString);
  -
  -		// Start replacing at the index point, since that's the
  -		// first one...
  -		replace(
  -				theVector.begin(),
  -				theVector.end(),
  -				XalanDOMCharVectorType::value_type(XalanUnicode::charReverseSolidus),
  -				XalanDOMCharVectorType::value_type(XalanUnicode::charSolidus));
  -
  -		uriString = XalanDOMString(&theVector[0]);
  -#endif
   	}
   
   	return uriString;
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-cvs-help@xml.apache.org