[engine] fixed syntax errors
This commit is contained in:
parent
07424b1e7f
commit
24a174c7a4
|
@ -75,7 +75,7 @@ class Shell {
|
|||
};
|
||||
|
||||
public: /* Constructor */
|
||||
Shell<T>(const char* name);
|
||||
Shell<T>();
|
||||
|
||||
public: /* Public accessors */
|
||||
std::string name() const;
|
||||
|
@ -178,8 +178,6 @@ class Shell {
|
|||
int execution_errors() const;
|
||||
/* Quit the shell */
|
||||
void exit(const int& init_err = 0) const;
|
||||
|
||||
private: /* Private executors */
|
||||
/* Execute a command, the command line is the user's input to launch a command
|
||||
* The common_context is the data structure to exchange data between commands
|
||||
*/
|
||||
|
|
|
@ -63,7 +63,8 @@ int main(int argc, char** argv) {
|
|||
* 1. help
|
||||
* 2. exit
|
||||
*/
|
||||
Shell<ShellContext> shell("test_shell");
|
||||
Shell<ShellContext> shell;
|
||||
shell.set_name("test_shell");
|
||||
std::string shell_title;
|
||||
|
||||
shell_title += std::string("The MIT License\n");
|
||||
|
|
|
@ -105,14 +105,14 @@ int OpenfpgaShell::start(int argc, char** argv) {
|
|||
}
|
||||
/* Start a shell */
|
||||
if (true == start_cmd_context.option_enable(start_cmd, opt_interactive)) {
|
||||
shell_.run_interactive_mode(openfpga_context);
|
||||
shell_.run_interactive_mode(openfpga_ctx_);
|
||||
return shell_.exit_code();
|
||||
}
|
||||
|
||||
if (true == start_cmd_context.option_enable(start_cmd, opt_script_mode)) {
|
||||
shell_.run_script_mode(
|
||||
start_cmd_context.option_value(start_cmd, opt_script_mode).c_str(),
|
||||
openfpga_context,
|
||||
openfpga_ctx_,
|
||||
start_cmd_context.option_enable(start_cmd, opt_batch_exec));
|
||||
return shell_.exit_code();
|
||||
}
|
||||
|
|
|
@ -8,5 +8,5 @@
|
|||
*******************************************************************/
|
||||
int main(int argc, char** argv) {
|
||||
OpenfpgaShell openfpga_shell;
|
||||
return openfpga_shell.run(argc, argv);
|
||||
return openfpga_shell.start(argc, argv);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue