From f4b191f0ea396b58465bfba40749977780a3af58 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Wed, 11 Feb 2009 05:29:41 +0000 Subject: Just removing some things that are cluttering up the source tree. --- src/old/xmlfilereader.cpp | 58 ----------------------------------------------- 1 file changed, 58 deletions(-) delete mode 100644 src/old/xmlfilereader.cpp (limited to 'src/old/xmlfilereader.cpp') diff --git a/src/old/xmlfilereader.cpp b/src/old/xmlfilereader.cpp deleted file mode 100644 index ed674a8..0000000 --- a/src/old/xmlfilereader.cpp +++ /dev/null @@ -1,58 +0,0 @@ -#include "xmlfilereader.h" -#include "exceptions.h" -#include - -XmlFileReader::XmlFileReader( const char *sFile, bool bStrip ) - : XmlReader( bStrip ) -{ - fh = fopen( sFile, "rt" ); - - if( fh == NULL ) - { - throw XmlException("Couldn't open file: %s", sFile ); - //nError = 1; - } - else - { - buildDoc(); - } -} - -XmlFileReader::~XmlFileReader() -{ -} - -char XmlFileReader::getChar( int nIndex ) -{ - // Make sure we always have a little data left in the buffer - if( fbDataIn.getLength() <= nIndex+1 && fh ) - { - int nBytes = fbDataIn.getCapacity()-1; - char *buf = new char[nBytes]; - int nRead = fread( buf, 1, nBytes, fh ); - fbDataIn.appendData( buf, nRead ); - delete[] buf; - - if( nRead < nBytes ) - { - fclose( fh ); - fh = NULL; - } - } - if( fbDataIn.getLength() >= nIndex+1 ) - { - return fbDataIn.getData()[nIndex]; - } - else - { - throw XmlException("End of XML stream read."); - } -} - -void XmlFileReader::usedChar( int nAmnt ) -{ - if( fbDataIn.getLength()-nAmnt >= 0 ) - { - fbDataIn.usedData( nAmnt ); - } -} -- cgit v1.2.3