From 09fb43f3d36847977ac202c10c5a11f34af03a43 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Mon, 4 Feb 2008 01:17:44 +0000 Subject: astyle --- src/sys/consoleinterface.cc | 8 +++++--- src/sys/consoleinterface.h | 6 ++++-- src/sys/sys.h | 37 +++++++++++++++++++------------------ 3 files changed, 28 insertions(+), 23 deletions(-) (limited to 'src/sys') diff --git a/src/sys/consoleinterface.cc b/src/sys/consoleinterface.cc index 45df367..5740807 100644 --- a/src/sys/consoleinterface.cc +++ b/src/sys/consoleinterface.cc @@ -10,11 +10,13 @@ #include -namespace sys { +namespace sys +{ ConsoleInterface *ConsoleInterface::consoleinterface_instance = 0; -ConsoleInterface::ConsoleInterface() { +ConsoleInterface::ConsoleInterface() +{ if (consoleinterface_instance) { std::cerr << "multiple singleton instances: sys::ConsoleInterface" << std::endl; sys::quit(2); @@ -27,7 +29,7 @@ ConsoleInterface::~ConsoleInterface() consoleinterface_instance = 0; } -ConsoleInterface *ConsoleInterface::instance() +ConsoleInterface *ConsoleInterface::instance() { return consoleinterface_instance; } diff --git a/src/sys/consoleinterface.h b/src/sys/consoleinterface.h index 6540d95..0215d55 100644 --- a/src/sys/consoleinterface.h +++ b/src/sys/consoleinterface.h @@ -27,10 +27,12 @@ #define con_debug if (0) *(std::ostream*)(0) #endif -namespace sys { +namespace sys +{ /// interface for the client and server Console classes -class ConsoleInterface { +class ConsoleInterface +{ public: /// default constructor ConsoleInterface(); diff --git a/src/sys/sys.h b/src/sys/sys.h index dec5ab9..4769832 100644 --- a/src/sys/sys.h +++ b/src/sys/sys.h @@ -13,25 +13,26 @@ #define MAXCMDSIZE 1024 /// contains operating system dependent functions -/** sys is a core subsystem +/** sys is a core subsystem */ -namespace sys { - typedef void (* signalfunc)(int signum); - - /// create a directory - extern bool mkdir(const char *path); - /// intercept OS signals - extern void signal(int signum, signalfunc handler); - /// quit - /** @param status return value - */ - extern void quit(int status); - - /// suspend process for a number of seconds - extern void sleep(float seconds); - - /// return the current system time of day, in seconds after midnight - extern unsigned long time(); +namespace sys +{ +typedef void (* signalfunc)(int signum); + +/// create a directory +extern bool mkdir(const char *path); +/// intercept OS signals +extern void signal(int signum, signalfunc handler); +/// quit +/** @param status return value + */ +extern void quit(int status); + +/// suspend process for a number of seconds +extern void sleep(float seconds); + +/// return the current system time of day, in seconds after midnight +extern unsigned long time(); } -- cgit v1.2.3