diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2011-12-18 08:27:30 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2011-12-18 08:27:30 +0000 |
commit | 39f9216bbc515e21b57532003af2866b718b6f17 (patch) | |
tree | 34bd006a10da9c634f049260e263040b86277074 /os | |
parent | d1f54cbe5aae641b116bcf8d6b63adaad6e4edc3 (diff) | |
download | ChibiOS-39f9216bbc515e21b57532003af2866b718b6f17.tar.gz ChibiOS-39f9216bbc515e21b57532003af2866b718b6f17.tar.bz2 ChibiOS-39f9216bbc515e21b57532003af2866b718b6f17.zip |
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@3635 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os')
-rw-r--r-- | os/various/shell.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/os/various/shell.c b/os/various/shell.c index 94aeb5045..69c8a6fbb 100644 --- a/os/various/shell.c +++ b/os/various/shell.c @@ -26,7 +26,6 @@ * @{
*/
-#include <stdio.h>
#include <string.h>
#include "ch.h"
@@ -39,11 +38,7 @@ */
EventSource shell_terminated;
-#if defined(WIN32)
-/*
- * MinGW does not seem to have this function...
- */
-static char *strtok_r(char *str, const char *delim, char **saveptr) {
+static char *_strtok(char *str, const char *delim, char **saveptr) {
char *token;
if (str)
*saveptr = str;
@@ -59,7 +54,6 @@ static char *strtok_r(char *str, const char *delim, char **saveptr) { return *token ? token : NULL;
}
-#endif
static void usage(BaseChannel *chp, char *p) {
@@ -162,10 +156,10 @@ static msg_t shell_thread(void *p) { chprintf(chp, "\r\nlogout");
break;
}
- lp = strtok_r(line, " \009", &tokp);
+ lp = _strtok(line, " \009", &tokp);
cmd = lp;
n = 0;
- while ((lp = strtok_r(NULL, " \009", &tokp)) != NULL) {
+ while ((lp = _strtok(NULL, " \009", &tokp)) != NULL) {
if (n >= SHELL_MAX_ARGUMENTS) {
chprintf(chp, "too many arguments\r\n");
cmd = NULL;
|