aboutsummaryrefslogtreecommitdiffstats
path: root/os/various/shell.c
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2012-06-18 16:22:34 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2012-06-18 16:22:34 +0000
commit9057c6c72be213bb7f07929e2ddd1ab1e942a1de (patch)
tree2e61c984622621c39207b1d63198ca50a2e99f6c /os/various/shell.c
parent3626647d7b924ca07df4197f9cde4a7965b8cbdf (diff)
downloadChibiOS-9057c6c72be213bb7f07929e2ddd1ab1e942a1de.tar.gz
ChibiOS-9057c6c72be213bb7f07929e2ddd1ab1e942a1de.tar.bz2
ChibiOS-9057c6c72be213bb7f07929e2ddd1ab1e942a1de.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@4294 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/various/shell.c')
-rw-r--r--os/various/shell.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/os/various/shell.c b/os/various/shell.c
index fd9451f2e..611da6de0 100644
--- a/os/various/shell.c
+++ b/os/various/shell.c
@@ -38,11 +38,6 @@
*/
EventSource shell_terminated;
-static void _putc(BaseSequentialStream *chp, char c) {
-
- chSequentialStreamWrite(chp, (const uint8_t *)&c, 1);
-}
-
static char *_strtok(char *str, const char *delim, char **saveptr) {
char *token;
if (str)
@@ -271,9 +266,9 @@ bool_t shellGetLine(BaseSequentialStream *chp, char *line, unsigned size) {
}
if (c == 8) {
if (p != line) {
- _putc(chp, c);
- _putc(chp, 0x20);
- _putc(chp, c);
+ chSequentialStreamPut(chp, c);
+ chSequentialStreamPut(chp, 0x20);
+ chSequentialStreamPut(chp, c);
p--;
}
continue;
@@ -286,7 +281,7 @@ bool_t shellGetLine(BaseSequentialStream *chp, char *line, unsigned size) {
if (c < 0x20)
continue;
if (p < line + size - 1) {
- _putc(chp, c);
+ chSequentialStreamPut(chp, c);
*p++ = (char)c;
}
}