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...@locus.apache.org on 2000/09/19 16:50:11 UTC

cvs commit: xml-xalan/c/src/XercesPlatformSupport XercesDOMPrintWriter.cpp XercesDOMPrintWriter.hpp XercesTextOutputStream.cpp

dbertoni    00/09/19 07:50:10

  Modified:    c/src/XercesPlatformSupport XercesDOMPrintWriter.cpp
                        XercesDOMPrintWriter.hpp XercesTextOutputStream.cpp
  Log:
  Changes for AIX port and for output transcoding.
  
  Revision  Changes    Path
  1.14      +16 -0     xml-xalan/c/src/XercesPlatformSupport/XercesDOMPrintWriter.cpp
  
  Index: XercesDOMPrintWriter.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XercesPlatformSupport/XercesDOMPrintWriter.cpp,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- XercesDOMPrintWriter.cpp	2000/09/05 02:24:57	1.13
  +++ XercesDOMPrintWriter.cpp	2000/09/19 14:50:02	1.14
  @@ -112,6 +112,22 @@
   
   
   
  +TextOutputStream*
  +XercesDOMPrintWriter::getStream()
  +{
  +	return &m_OutputStream;
  +}
  +
  +
  +
  +const TextOutputStream*
  +XercesDOMPrintWriter::getStream() const
  +{
  +	return &m_OutputStream;
  +}
  +
  +
  +
   void
   XercesDOMPrintWriter::write(
   			const char*		s,
  
  
  
  1.6       +6 -0      xml-xalan/c/src/XercesPlatformSupport/XercesDOMPrintWriter.hpp
  
  Index: XercesDOMPrintWriter.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XercesPlatformSupport/XercesDOMPrintWriter.hpp,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- XercesDOMPrintWriter.hpp	2000/08/15 19:42:41	1.5
  +++ XercesDOMPrintWriter.hpp	2000/09/19 14:50:04	1.6
  @@ -100,6 +100,12 @@
   	virtual void
   	flush();
   
  +	virtual TextOutputStream*
  +	getStream();
  +
  +	virtual const TextOutputStream*
  +	getStream() const;
  +
   
   	// Output functions...
   
  
  
  
  1.9       +21 -0     xml-xalan/c/src/XercesPlatformSupport/XercesTextOutputStream.cpp
  
  Index: XercesTextOutputStream.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XercesPlatformSupport/XercesTextOutputStream.cpp,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- XercesTextOutputStream.cpp	2000/09/05 02:24:57	1.8
  +++ XercesTextOutputStream.cpp	2000/09/19 14:50:05	1.9
  @@ -195,10 +195,31 @@
   {
   	assert(theBuffer != 0);
   
  +#if 0
       const XalanArrayAutoPtr<char>	theTranscodedString(XMLString::transcode(theBuffer));
   
   	writeData(theTranscodedString.get(),
   			  strlen(theTranscodedString.get()));
  +#else
  +	try
  +	{
  +		TranscodeVectorType		theTranscodedData;
  +
  +		transcode(theBuffer, length(theBuffer), theTranscodedData);
  +
  +		assert(&theTranscodedData[0] != 0);
  +
  +		writeData(reinterpret_cast<const char*>(&theTranscodedData[0]),
  +				  theTranscodedData.size());
  +	}
  +	catch(const TextOutputStreamException&)
  +	{
  +		// Have to catch this error and flush any output remaining...
  +		m_buffer.clear();
  +
  +		throw;
  +	}
  +#endif
   }