提交 d2aee253 编写于 作者: B Bernard Xiong

Merge pull request #593 from SchumyHao/master

finsh: change no echo mode. cpp: remove RT_USE_LIBC depends
...@@ -6,6 +6,6 @@ cwd = GetCurrentDir() ...@@ -6,6 +6,6 @@ cwd = GetCurrentDir()
src = Glob('*.cpp') + Glob('*.c') src = Glob('*.cpp') + Glob('*.c')
CPPPATH = [cwd] CPPPATH = [cwd]
group = DefineGroup('CPlusPlus', src, depend = ['RT_USING_CPLUSPLUS', 'RT_USING_LIBC'], CPPPATH = CPPPATH) group = DefineGroup('CPlusPlus', src, depend = ['RT_USING_CPLUSPLUS'], CPPPATH = CPPPATH)
Return('group') Return('group')
...@@ -200,6 +200,7 @@ void finsh_run_line(struct finsh_parser *parser, const char *line) ...@@ -200,6 +200,7 @@ void finsh_run_line(struct finsh_parser *parser, const char *line)
{ {
const char *err_str; const char *err_str;
if(shell->echo_mode)
rt_kprintf("\n"); rt_kprintf("\n");
finsh_parser_run(parser, (unsigned char *)line); finsh_parser_run(parser, (unsigned char *)line);
...@@ -489,6 +490,7 @@ void finsh_thread_entry(void *parameter) ...@@ -489,6 +490,7 @@ void finsh_thread_entry(void *parameter)
#ifdef FINSH_USING_MSH #ifdef FINSH_USING_MSH
if (msh_is_used() == RT_TRUE) if (msh_is_used() == RT_TRUE)
{ {
if (shell->echo_mode)
rt_kprintf("\n"); rt_kprintf("\n");
msh_exec(shell->line, shell->line_position); msh_exec(shell->line, shell->line_position);
} }
...@@ -500,7 +502,8 @@ void finsh_thread_entry(void *parameter) ...@@ -500,7 +502,8 @@ void finsh_thread_entry(void *parameter)
shell->line[shell->line_position] = ';'; shell->line[shell->line_position] = ';';
if (shell->line_position != 0) finsh_run_line(&shell->parser, shell->line); if (shell->line_position != 0) finsh_run_line(&shell->parser, shell->line);
else rt_kprintf("\n"); else
if (shell->echo_mode) rt_kprintf("\n");
#endif #endif
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册