From 09fb43f3d36847977ac202c10c5a11f34af03a43 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Mon, 4 Feb 2008 01:17:44 +0000 Subject: astyle --- src/core/commandbuffer.cc | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) (limited to 'src/core/commandbuffer.cc') diff --git a/src/core/commandbuffer.cc b/src/core/commandbuffer.cc index fbeba7b..292013b 100644 --- a/src/core/commandbuffer.cc +++ b/src/core/commandbuffer.cc @@ -1,7 +1,7 @@ /* core/commandbuffer.cc - This file is part of the Osirion project and is distributed under - the terms of the GNU General Public License version 2 + This file is part of the Osirion project and is distributed under + the terms of the GNU General Public License version 2 */ #include "core/commandbuffer.h" @@ -11,18 +11,20 @@ #include #include -namespace core { +namespace core +{ std::stringstream cmd(std::stringstream::in | std::stringstream::out); namespace commandbuffer { -void exec(const char *text) { +void exec(const char *text) +{ std::stringstream cmdstream(text); std::string cmdname; cmdstream >> cmdname; - + Func f = func_find(cmdname); if (f) { @@ -33,24 +35,26 @@ void exec(const char *text) { con_print << "unknown command '" << cmdname << "'" << std::endl; } -void execute() { +void execute() +{ if (core::cmd.eof()) return; char line[MAXCMDSIZE]; - while(core::cmd.getline(line, MAXCMDSIZE-1)) { + while (core::cmd.getline(line, MAXCMDSIZE-1)) { exec(line); } cmd.clear(); } -void clear() { +void clear() +{ char line[MAXCMDSIZE]; - while(core::cmd.getline(line, MAXCMDSIZE-1)); + while (core::cmd.getline(line, MAXCMDSIZE-1)); } -} +} // namespace commandbuffer -} +} // namespace core -- cgit v1.2.3