diff options
author | Stijn Buys <ingar@osirion.org> | 2007-10-22 17:40:39 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2007-10-22 17:40:39 +0000 |
commit | aa33bc22ec4cd14e200ba9e09c43e884a2101a74 (patch) | |
tree | 632021226cb8f0d5c05266b2bb84c607fbc27b80 /src/common | |
parent | f8e9eab39a5e96d478762d06e27ec38f80128435 (diff) |
basis system console
Diffstat (limited to 'src/common')
-rw-r--r-- | src/common/Makefile.am | 2 | ||||
-rw-r--r-- | src/common/file.cc | 15 |
2 files changed, 8 insertions, 9 deletions
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 <iostream> +#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 + |