diff options
Diffstat (limited to 'Build/source/texk/dvisvgm/dvisvgm-0.8.7/src/Message.cpp')
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-0.8.7/src/Message.cpp | 74 |
1 files changed, 0 insertions, 74 deletions
diff --git a/Build/source/texk/dvisvgm/dvisvgm-0.8.7/src/Message.cpp b/Build/source/texk/dvisvgm/dvisvgm-0.8.7/src/Message.cpp deleted file mode 100644 index 5a4e0b05526..00000000000 --- a/Build/source/texk/dvisvgm/dvisvgm-0.8.7/src/Message.cpp +++ /dev/null @@ -1,74 +0,0 @@ -/************************************************************************* -** Message.cpp ** -** ** -** This file is part of dvisvgm -- the DVI to SVG converter ** -** Copyright (C) 2005-2009 Martin Gieseking <martin.gieseking@uos.de> ** -** ** -** This program is free software; you can redistribute it and/or ** -** modify it under the terms of the GNU General Public License as ** -** published by the Free Software Foundation; either version 3 of ** -** the License, or (at your option) any later version. ** -** ** -** This program is distributed in the hope that it will be useful, but ** -** WITHOUT ANY WARRANTY; without even the implied warranty of ** -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ** -** GNU General Public License for more details. ** -** ** -** You should have received a copy of the GNU General Public License ** -** along with this program; if not, see <http://www.gnu.org/licenses/>. ** -*************************************************************************/ - -#include <cstdarg> -#include <iostream> -#include "Message.h" - -using namespace std; - - -struct NullStreamBuf : public streambuf -{ - streambuf::int_type overflow (int c) {return 0;} - streambuf::int_type underflow () {return traits_type::eof();} - int sync () {return traits_type::eof();} -}; - - -struct NullStream : public ostream -{ - NullStream () : ostream(new NullStreamBuf) {} - ~NullStream () {delete rdbuf();} -}; - - -static NullStream nullStream; - -// maximal verbosity -int Message::level = Message::MESSAGES | Message::WARNINGS | Message::ERRORS; - - -/** Returns the stream for usual messages. */ -ostream& Message::mstream (bool prefix) { - ostream *os = (level & MESSAGES) ? &cerr : &nullStream; - if (prefix) - *os << "MESSAGE: "; - return *os; -} - - -/** Returns the stream for warning messages. */ -ostream& Message::wstream (bool prefix) { - ostream *os = (level & WARNINGS) ? &cerr : &nullStream; - if (prefix) - *os << "WARNING: "; - return *os; -} - - -/** Returns the stream for error messages. */ -ostream& Message::estream (bool prefix) { - ostream *os = (level & ERRORS) ? &cerr : &nullStream; - if (prefix) - *os << "ERROR: "; - return *os; -} - |