|
@@ -32,21 +32,6 @@
|
|
|
|
|
|
#include <rtthread.h>
|
|
|
#include "finsh.h"
|
|
|
-#if defined(_MSC_VER)
|
|
|
-static struct finsh_syscall* _next_syscall(struct finsh_syscall* call)
|
|
|
-{
|
|
|
- unsigned int *ptr;
|
|
|
- ptr = (unsigned int*) (call + 1);
|
|
|
- while ((*ptr == 0) && ((unsigned int*)ptr < (unsigned int*) _syscall_table_end))
|
|
|
- ptr ++;
|
|
|
-
|
|
|
- return (struct finsh_syscall*)ptr;
|
|
|
-}
|
|
|
-#define _NEXT_SYSCALl(index) index=_next_syscall(index)
|
|
|
-#else
|
|
|
-#define _NEXT_SYSCALl(index) index++
|
|
|
-#endif
|
|
|
-
|
|
|
|
|
|
rt_inline unsigned int rt_list_len(const rt_list_t *l)
|
|
|
{
|
|
@@ -564,7 +549,7 @@ long list(void)
|
|
|
rt_kprintf("--Function List:\n");
|
|
|
{
|
|
|
struct finsh_syscall *index;
|
|
|
- for (index = _syscall_table_begin; index < _syscall_table_end; _NEXT_SYSCALl(index))
|
|
|
+ for (index = _syscall_table_begin; index < _syscall_table_end; FINSH_NEXT_SYSCALL(index))
|
|
|
{
|
|
|
#ifdef FINSH_USING_DESCRIPTION
|
|
|
rt_kprintf("%-16s -- %s\n", index->name, index->desc);
|
|
@@ -649,7 +634,7 @@ void list_prefix(char *prefix)
|
|
|
/* checks in system function call */
|
|
|
{
|
|
|
struct finsh_syscall* index;
|
|
|
- for (index = _syscall_table_begin; index < _syscall_table_end; _NEXT_SYSCALl(index))
|
|
|
+ for (index = _syscall_table_begin; index < _syscall_table_end; FINSH_NEXT_SYSCALL(index))
|
|
|
{
|
|
|
if (str_is_prefix(prefix, index->name) == 0)
|
|
|
{
|