-/* $Id$
-
-This file is part of gldbg
-Copyright © 2009-2011 Mikko Rasa, Mikkosoft Productions
-Distributed under the GPL
-*/
-
#include <stdexcept>
#include <cstdlib>
#include <signal.h>
}
+CommandInterpreter::~CommandInterpreter()
+{
+ for(CommandMap::iterator i=commands.begin(); i!=commands.end(); ++i)
+ delete i->second;
+}
+
void CommandInterpreter::execute(const string &cmd)
{
- unsigned space = cmd.find(' ');
+ string::size_type space = cmd.find(' ');
string name = cmd.substr(0, space);
CommandMap::const_iterator i = commands.lower_bound(name);
if(i==commands.end() || i->first.compare(0, name.size(), name))