From d3477eedc113a2c126f36f41384b8921d610906a Mon Sep 17 00:00:00 2001
From: Stijn Buys <ingar@osirion.org>
Date: Fri, 8 Feb 2008 19:24:12 +0000
Subject: updated filesystem, removed inifile, updated game and tga loader
 minor cleanups

---
 src/sys/sys.cc | 10 +++++++---
 src/sys/sys.h  | 21 ++++++++++++++-------
 2 files changed, 21 insertions(+), 10 deletions(-)

(limited to 'src/sys')

diff --git a/src/sys/sys.cc b/src/sys/sys.cc
index 9957408..508756d 100644
--- a/src/sys/sys.cc
+++ b/src/sys/sys.cc
@@ -25,17 +25,21 @@
 
 namespace sys {
 
-bool mkdir(const char *path)
+void mkdir(const char *path)
 {
 #ifdef _WIN32
 	::mkdir(path);
-	// FIXME check return value
 	return true;
 #else
-	return (::mkdir(path, 0777) == 0);
+	::mkdir(path, 0777);
 #endif
 }
 
+void mkdir(const std::string &path)
+{
+	mkdir(path.c_str());
+}
+
 void signal(int signum, signalfunc handler)
 {
 #ifndef _WIN32
diff --git a/src/sys/sys.h b/src/sys/sys.h
index 4769832..178fe60 100644
--- a/src/sys/sys.h
+++ b/src/sys/sys.h
@@ -9,6 +9,8 @@
 
 #include "config.h"
 
+#include <string>
+
 /// maximum line size throught the game
 #define MAXCMDSIZE 1024
 
@@ -20,19 +22,24 @@ namespace sys
 typedef void (* signalfunc)(int signum);
 
 /// create a directory
-extern bool mkdir(const char *path);
+void mkdir(const char *path);
+
+void mkdir(const std::string &path);
+
 /// intercept OS signals
-extern void signal(int signum, signalfunc handler);
-/// quit
-/** @param status return value
+void signal(int signum, signalfunc handler);
+
+/** 
+ * @brief operation system exit() application
+ * @param status return value
  */
-extern void quit(int status);
+void quit(int status);
 
 /// suspend process for a number of seconds
-extern void sleep(float seconds);
+void sleep(float seconds);
 
 /// return the current system time of day, in seconds after midnight
-extern unsigned long time();
+unsigned long time();
 
 }
 
-- 
cgit v1.2.3