From 959831f4ef5a3e797f576c3de08cd65032c997ad Mon Sep 17 00:00:00 2001 From: David Walter Seikel Date: Sun, 13 Jan 2013 18:54:10 +1000 Subject: Remove damned ancient DOS line endings from Irrlicht. Hopefully I did not go overboard. --- .../irrlicht-1.8/source/Irrlicht/CXMLReader.cpp | 140 ++++++++++----------- 1 file changed, 70 insertions(+), 70 deletions(-) (limited to 'libraries/irrlicht-1.8/source/Irrlicht/CXMLReader.cpp') diff --git a/libraries/irrlicht-1.8/source/Irrlicht/CXMLReader.cpp b/libraries/irrlicht-1.8/source/Irrlicht/CXMLReader.cpp index bb42800..8bd3970 100644 --- a/libraries/irrlicht-1.8/source/Irrlicht/CXMLReader.cpp +++ b/libraries/irrlicht-1.8/source/Irrlicht/CXMLReader.cpp @@ -1,70 +1,70 @@ -// Copyright (C) 2002-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#include "CXMLReaderImpl.h" -#include "CXMLReader.h" -#include "IReadFile.h" - -namespace irr -{ -namespace io -{ - //! Irrlicht implementation of the file read callback for the xml parser - class CIrrXMLFileReadCallBack : public IFileReadCallBack - { - public: - - //! construct from FILE pointer - CIrrXMLFileReadCallBack(IReadFile* file) - : ReadFile(file) - { - ReadFile->grab(); - } - - //! destructor - virtual ~CIrrXMLFileReadCallBack() - { - ReadFile->drop(); - } - - //! Reads an amount of bytes from the file. - virtual int read(void* buffer, int sizeToRead) - { - return ReadFile->read(buffer, sizeToRead); - } - - //! Returns size of file in bytes - virtual long getSize() const - { - return ReadFile->getSize(); - } - - private: - - IReadFile* ReadFile; - }; // end class CMyXMLFileReadCallBack - - - // now create an implementation for IXMLReader using irrXML. - - //! Creates an instance of a wide character xml parser. - IXMLReader* createIXMLReader(IReadFile* file) - { - if (!file) - return 0; - - return new CXMLReaderImpl(new CIrrXMLFileReadCallBack(file)); - } - - //! Creates an instance of an UFT-8 or ASCII character xml parser. - IXMLReaderUTF8* createIXMLReaderUTF8(IReadFile* file) - { - if (!file) - return 0; - - return new CXMLReaderImpl(new CIrrXMLFileReadCallBack(file)); - } - -} // end namespace -} // end namespace +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "CXMLReaderImpl.h" +#include "CXMLReader.h" +#include "IReadFile.h" + +namespace irr +{ +namespace io +{ + //! Irrlicht implementation of the file read callback for the xml parser + class CIrrXMLFileReadCallBack : public IFileReadCallBack + { + public: + + //! construct from FILE pointer + CIrrXMLFileReadCallBack(IReadFile* file) + : ReadFile(file) + { + ReadFile->grab(); + } + + //! destructor + virtual ~CIrrXMLFileReadCallBack() + { + ReadFile->drop(); + } + + //! Reads an amount of bytes from the file. + virtual int read(void* buffer, int sizeToRead) + { + return ReadFile->read(buffer, sizeToRead); + } + + //! Returns size of file in bytes + virtual long getSize() const + { + return ReadFile->getSize(); + } + + private: + + IReadFile* ReadFile; + }; // end class CMyXMLFileReadCallBack + + + // now create an implementation for IXMLReader using irrXML. + + //! Creates an instance of a wide character xml parser. + IXMLReader* createIXMLReader(IReadFile* file) + { + if (!file) + return 0; + + return new CXMLReaderImpl(new CIrrXMLFileReadCallBack(file)); + } + + //! Creates an instance of an UFT-8 or ASCII character xml parser. + IXMLReaderUTF8* createIXMLReaderUTF8(IReadFile* file) + { + if (!file) + return 0; + + return new CXMLReaderImpl(new CIrrXMLFileReadCallBack(file)); + } + +} // end namespace +} // end namespace -- cgit v1.1