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