namespace {
void fn(std::ostream & output, senf::console::ParseCommandInfo const & command) {
- senf::console::CommandNode::Arguments::iterator i (command.arguments().begin());
- senf::console::CommandNode::Arguments::iterator i_end (command.arguments().end());
+ typedef senf::console::ParseCommandInfo::ArgumentsRange::iterator iterator;
+ iterator i (command.arguments().begin());
+ iterator i_end (command.arguments().end());
for (; i != i_end; ++i) {
- senf::console::ParseCommandInfo::ArgumentsRange::value_type::iterator j (i->begin());
- senf::console::ParseCommandInfo::ArgumentsRange::value_type::iterator j_end (i->end());
+ iterator::value_type::iterator j (i->begin());
+ iterator::value_type::iterator j_end (i->end());
for (; j != j_end; ++j)
output << j->value() << ' ';
}
}
};
- int myMain(int argc, char const ** argv)
+ int myMain(int argc, char ** argv)
{
MyDaemon instance;
return instance.start(argc, argv);
}
- int run(int argc, char const ** argv)
+ int run(int argc, char ** argv)
{
int pid (::fork());
if (pid < 0) throw senf::SystemException("::fork()");
BOOST_AUTO_UNIT_TEST(testDaemon)
{
- char const * args[] = { "run",
- "--console-log=testDaemon.log,none",
- "--pid-file=testDaemon.pid" };
+ char * args[] = { "run",
+ "--console-log=testDaemon.log,none",
+ "--pid-file=testDaemon.pid" };
BOOST_CHECK_EQUAL( run(sizeof(args)/sizeof(*args),args), 0 );
BOOST_CHECK( ! boost::filesystem::exists("invalid.log") );