summaryrefslogtreecommitdiff
path: root/components
diff options
context:
space:
mode:
authorBernard Xiong <[email protected]>2015-12-02 23:28:05 +0800
committerBernard Xiong <[email protected]>2015-12-02 23:28:05 +0800
commitd2aee2539125e2910bdd06d7931ee66ffbc6359d (patch)
tree5ffda6b1be1928789ce8b8dcdc5238566ff83ec7 /components
parent2c7c049af05ed7a5bf2e56f5b169331ebe082dc1 (diff)
parent1eea52307bbc03220ce87b12ca5b9b927afaf4b6 (diff)
Merge pull request #593 from SchumyHao/master
finsh: change no echo mode. cpp: remove RT_USE_LIBC depends
Diffstat (limited to 'components')
-rw-r--r--components/cplusplus/SConscript2
-rw-r--r--components/finsh/shell.c9
2 files changed, 7 insertions, 4 deletions
diff --git a/components/cplusplus/SConscript b/components/cplusplus/SConscript
index b41537a52b..63f68ec3d8 100644
--- a/components/cplusplus/SConscript
+++ b/components/cplusplus/SConscript
@@ -6,6 +6,6 @@ cwd = GetCurrentDir()
src = Glob('*.cpp') + Glob('*.c')
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')
diff --git a/components/finsh/shell.c b/components/finsh/shell.c
index 8962a7333f..a04214b727 100644
--- a/components/finsh/shell.c
+++ b/components/finsh/shell.c
@@ -200,7 +200,8 @@ void finsh_run_line(struct finsh_parser *parser, const char *line)
{
const char *err_str;
- rt_kprintf("\n");
+ if(shell->echo_mode)
+ rt_kprintf("\n");
finsh_parser_run(parser, (unsigned char *)line);
/* compile node root */
@@ -489,7 +490,8 @@ void finsh_thread_entry(void *parameter)
#ifdef FINSH_USING_MSH
if (msh_is_used() == RT_TRUE)
{
- rt_kprintf("\n");
+ if (shell->echo_mode)
+ rt_kprintf("\n");
msh_exec(shell->line, shell->line_position);
}
else
@@ -500,7 +502,8 @@ void finsh_thread_entry(void *parameter)
shell->line[shell->line_position] = ';';
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
}