From aa33bc22ec4cd14e200ba9e09c43e884a2101a74 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Mon, 22 Oct 2007 17:40:39 +0000 Subject: basis system console --- src/common/Makefile.am | 2 +- src/common/file.cc | 15 +++++++-------- 2 files changed, 8 insertions(+), 9 deletions(-) (limited to 'src/common') diff --git a/src/common/Makefile.am b/src/common/Makefile.am index 86bb4e1..dbed1fb 100644 --- a/src/common/Makefile.am +++ b/src/common/Makefile.am @@ -3,6 +3,6 @@ METASOURCES = AUTO libcommon_la_LDFLAGS = -avoid-version -no-undefined noinst_LTLIBRARIES = libcommon.la libcommon_la_SOURCES = color.cc color.h file.cc file.h functions.cc functions.h \ - vector3f.cc vector3f.h + vector3f.cc vector3f.h console.cc console.h diff --git a/src/common/file.cc b/src/common/file.cc index 2ebd457..d7603c3 100644 --- a/src/common/file.cc +++ b/src/common/file.cc @@ -6,9 +6,7 @@ // project headers #include "file.h" - -// C++ headers -#include +#include "console.h" namespace common { @@ -29,7 +27,7 @@ void File::open(const char * filename, ios_base::openmode mode) fn.append(filename); std::ifstream::open(fn.c_str(), mode); if (this->is_open()) { - std::cerr << "File opened " << fn << std::endl; + condebug << "File opened " << fn << std::endl; return; } @@ -38,7 +36,7 @@ void File::open(const char * filename, ios_base::openmode mode) fn.append(moddir); std::ifstream::open(fn.c_str(), mode); if (this->is_open()) { - std::cerr << "File opened " << fn << std::endl; + condebug << "File opened " << fn << std::endl; return; } } @@ -49,7 +47,7 @@ void File::open(const char * filename, ios_base::openmode mode) fn.append(filename); std::ifstream::open(fn.c_str(), mode); if (this->is_open()) { - std::cerr << "File opened " << fn << std::endl; + condebug << "File opened " << fn << std::endl; return; } @@ -61,10 +59,11 @@ void File::open(const char * filename, ios_base::openmode mode) // FIXME console if (!this->is_open()) { - std::cerr << "File could not open " << filename << std::endl; + condebug << "File could not open " << filename << std::endl; } else { - std::cerr << "File opened " << fn << std::endl; + conmesg << "File opened " << fn << std::endl; } } } // namespace common + -- cgit v1.2.3