summaryrefslogtreecommitdiff
path: root/i/marvin/src/interpreter
diff options
context:
space:
mode:
authordufourj2006-04-20 21:00:28 +0000
committerdufourj2006-04-20 21:00:28 +0000
commit0e7bc7bb9ff3be0b28a7c60b624f0b75e780f99f (patch)
tree4ffd9bdfeaa61138bf1718e39b01c692a16f360d /i/marvin/src/interpreter
parentca36067c122bea18bda2b904ec831e26902f412e (diff)
Tester :
- better manage optargs; - correct the placement of the data_circular_buffer_factory. Interpreter : - better help format.
Diffstat (limited to 'i/marvin/src/interpreter')
-rw-r--r--i/marvin/src/interpreter/interpreter.cc19
1 files changed, 12 insertions, 7 deletions
diff --git a/i/marvin/src/interpreter/interpreter.cc b/i/marvin/src/interpreter/interpreter.cc
index 0c067cf..a160002 100644
--- a/i/marvin/src/interpreter/interpreter.cc
+++ b/i/marvin/src/interpreter/interpreter.cc
@@ -97,14 +97,19 @@ Interpreter::help (void) const
std::string ret;
for (Funcs::const_iterator i = funcs_.begin (); i != funcs_.end (); ++i)
{
- // Well, if you really want to implement this better, please do...
- for (std::string::const_iterator j = i->second.desc.begin ();
- j != i->second.desc.end (); j++)
+ ret += i->first;
+ if (!i->second.desc.empty ())
{
- if (*j == '\n')
- ret += "\n ";
- else
- ret += *j;
+ ret += " : ";
+ // Well, if you really want to implement this better, please do...
+ for (std::string::const_iterator j = i->second.desc.begin ();
+ j != i->second.desc.end (); j++)
+ {
+ if (*j == '\n')
+ ret += "\n ";
+ else
+ ret += *j;
+ }
}
ret += '\n';
}