init: Propagated args to CmdHelp

This commit is contained in:
Paul Beckingham 2016-03-19 12:09:36 -04:00
parent dc8453ab63
commit 2dcd2470c7
3 changed files with 6 additions and 4 deletions

View file

@ -26,6 +26,8 @@
#include <cmake.h>
#include <iostream>
#include <vector>
#include <string>
////////////////////////////////////////////////////////////////////////////////
int CmdHelpUsage ()
@ -44,7 +46,7 @@ int CmdHelpUsage ()
}
////////////////////////////////////////////////////////////////////////////////
int CmdHelp ()
int CmdHelp (const std::vector <std::string>& args)
{
std::cout << "# help\n";
return 0;

View file

@ -43,7 +43,7 @@ int CmdExport ();
int CmdExtension ();
int CmdGaps ();
int CmdHelpUsage ();
int CmdHelp ();
int CmdHelp (const std::vector <std::string>&);
int CmdLog (const std::vector <std::string>&, Log&);
int CmdImport ();
int CmdReport ();

View file

@ -192,14 +192,14 @@ int dispatchCommand (
{
// These signatures are æxpected to be all different, therefore no
// command to fn mapping.
if (closeEnough (allCommands[0], args[1], 2)) status = CmdHelp ();
else if (closeEnough (allCommands[1], args[1], 2)) status = CmdClear ();
if (closeEnough (allCommands[1], args[1], 2)) status = CmdClear ();
else if (closeEnough (allCommands[2], args[1], 2)) status = CmdConfig ();
else if (closeEnough (allCommands[3], args[1], 2)) status = CmdContinue ();
else if (closeEnough (allCommands[4], args[1], 2)) status = CmdDefine (rules);
else if (closeEnough (allCommands[5], args[1], 2)) status = CmdDiagnostics (database, log);
else if (closeEnough (allCommands[6], args[1], 2)) status = CmdExport ();
else if (closeEnough (allCommands[7], args[1], 2)) status = CmdGaps ();
else if (closeEnough (allCommands[0], args[1], 2)) status = CmdHelp (args);
else if (closeEnough (allCommands[8], args[1], 2)) status = CmdImport ();
else if (closeEnough (allCommands[9], args[1], 2)) status = CmdLog (args, log);
else if (closeEnough (allCommands[10], args[1], 2)) status = CmdReport ();