From fe95954f9d17c9dade1827fe5d4cf8cffffddbce Mon Sep 17 00:00:00 2001
From: Stijn Buys <ingar@osirion.org>
Date: Sat, 26 Apr 2008 16:55:57 +0000
Subject: virtual console::flush()

---
 osirion.kdevelop.pcs         | Bin 555162 -> 561248 bytes
 osirion.kdevses              |  18 +++---------------
 src/client/console.cc        |   7 +++++++
 src/filesystem/filesystem.cc |   7 ++++---
 src/server/console.cc        |   7 +++++++
 src/sys/consoleinterface.h   |   3 +++
 6 files changed, 24 insertions(+), 18 deletions(-)

diff --git a/osirion.kdevelop.pcs b/osirion.kdevelop.pcs
index 54e6375..b532052 100644
Binary files a/osirion.kdevelop.pcs and b/osirion.kdevelop.pcs differ
diff --git a/osirion.kdevses b/osirion.kdevses
index 16c5d69..8674cfa 100644
--- a/osirion.kdevses
+++ b/osirion.kdevses
@@ -1,22 +1,10 @@
 <?xml version = '1.0' encoding = 'UTF-8'?>
 <!DOCTYPE KDevPrjSession>
 <KDevPrjSession>
- <DocsAndViews NumberOfDocuments="5" >
-  <Doc0 NumberOfViews="1" URL="file:///home/ingar/projects/osirion/osirion-work/src/core/model.cc" >
-   <View0 Encoding="" line="79" Type="Source" />
+ <DocsAndViews NumberOfDocuments="1" >
+  <Doc0 NumberOfViews="1" URL="file:///home/ingar/projects/osirion/osirion-work/src/sys/sys.cc" >
+   <View0 Encoding="" line="30" Type="Source" />
   </Doc0>
-  <Doc1 NumberOfViews="1" URL="file:///home/ingar/projects/osirion/osirion-work/src/core/model.h" >
-   <View0 Encoding="" Type="Source" />
-  </Doc1>
-  <Doc2 NumberOfViews="1" URL="file:///home/ingar/projects/osirion/osirion-work/src/render/draw.cc" >
-   <View0 Encoding="" Type="Source" />
-  </Doc2>
-  <Doc3 NumberOfViews="1" URL="file:///home/ingar/projects/osirion/osirion-work/src/render/render.h" >
-   <View0 Encoding="" Type="Source" />
-  </Doc3>
-  <Doc4 NumberOfViews="1" URL="file:///home/ingar/projects/osirion/osirion-work/src/render/render.cc" >
-   <View0 Encoding="" line="89" Type="Source" />
-  </Doc4>
  </DocsAndViews>
  <pluginList>
   <kdevdebugger>
diff --git a/src/client/console.cc b/src/client/console.cc
index 28d80f0..9e2a782 100644
--- a/src/client/console.cc
+++ b/src/client/console.cc
@@ -37,6 +37,9 @@ public:
 	/// stream to send debug messages too
 	virtual std::ostream & debugstream();
 
+	/// flush buffered messages
+	virtual void flush();
+
 	/// console text buffer
 	std::stringstream buffer;
 };
@@ -356,6 +359,10 @@ void load_history()
 }
 //--- private -----------------------------------------------------
 
+void Console::flush()
+{
+	console::flush();
+}
 std::ostream & Console::messagestream()
 {
 	return (buffer << ". ");
diff --git a/src/filesystem/filesystem.cc b/src/filesystem/filesystem.cc
index 130aeb7..e0b45a9 100644
--- a/src/filesystem/filesystem.cc
+++ b/src/filesystem/filesystem.cc
@@ -24,18 +24,19 @@ void init()
 {
 	con_print << "Initializing filesystem..." << std::endl;
 
-	// FIXME datadir should by set by ./configure and read from config.h
-
 	// initialize game data locations
+	// FIXME datadir should by set by ./configure and read from config.h
 	datadir = "./data/";
+
+	// FIXME a local or remote game module must be able to set these
 	basedir = "base/";
 	moddir = "";
 
-	// FIXME win32
 #ifndef _WIN32
 	homedir = getenv("HOME");
 	homedir = homedir + "/.osirion/";
 #else
+	// FIXME win32
 	homedir = "./home/";
 #endif
 
diff --git a/src/server/console.cc b/src/server/console.cc
index 77b5d28..b5d0aaf 100644
--- a/src/server/console.cc
+++ b/src/server/console.cc
@@ -30,6 +30,9 @@ public:
 	/// stream to send debug messages too
 	virtual std::ostream & debugstream();
 
+	/// flush does nothing in this implementation
+	virtual void flush();
+
 	unsigned long ping;
 	
 };
@@ -65,6 +68,10 @@ void shutdown()
 
 //--- private -----------------------------------------------------
 
+void Console::flush()
+{
+}
+
 std::ostream & Console::messagestream()
 {
 	return std::cout;
diff --git a/src/sys/consoleinterface.h b/src/sys/consoleinterface.h
index 0215d55..33dc5b5 100644
--- a/src/sys/consoleinterface.h
+++ b/src/sys/consoleinterface.h
@@ -52,6 +52,9 @@ public:
 	/// stream to send debug messages too
 	virtual std::ostream & debugstream() = 0;
 
+	/// flush buffered messages
+	virtual void flush() = 0;
+
 	/// a pointer to the current console instance
 	static ConsoleInterface *instance();
 
-- 
cgit v1.2.3