Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
BaiXuePrincess
rt-thread
提交
06c6630b
R
rt-thread
项目概览
BaiXuePrincess
/
rt-thread
与 Fork 源项目一致
Fork自
RT-Thread / rt-thread
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
rt-thread
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
06c6630b
编写于
4月 04, 2013
作者:
U
user
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix compiling warning in finsh shell
上级
009eccf6
变更
4
显示空白变更内容
内联
并排
Showing
4 changed file
with
13 addition
and
37 deletion
+13
-37
components/finsh/finsh.h
components/finsh/finsh.h
+0
-3
components/finsh/finsh_token.c
components/finsh/finsh_token.c
+8
-1
components/finsh/shell.c
components/finsh/shell.c
+0
-31
components/libc/newlib/libc.c
components/libc/newlib/libc.c
+5
-2
未找到文件。
components/finsh/finsh.h
浏览文件 @
06c6630b
...
@@ -86,9 +86,6 @@ typedef unsigned int size_t;
...
@@ -86,9 +86,6 @@ typedef unsigned int size_t;
int
strcmp
(
const
char
*
s1
,
const
char
*
s2
);
int
strcmp
(
const
char
*
s1
,
const
char
*
s2
);
char
*
strdup
(
const
char
*
s
);
char
*
strdup
(
const
char
*
s
);
int
isalpha
(
int
ch
);
int
atoi
(
const
char
*
s
);
#else
#else
/* use libc of armcc */
/* use libc of armcc */
#include <ctype.h>
#include <ctype.h>
...
...
components/finsh/finsh_token.c
浏览文件 @
06c6630b
...
@@ -28,10 +28,12 @@
...
@@ -28,10 +28,12 @@
* 2013-04-03 Bernard strip more characters.
* 2013-04-03 Bernard strip more characters.
*/
*/
#include <finsh.h>
#include <finsh.h>
#include <stdlib.h>
#include "finsh_token.h"
#include "finsh_token.h"
#include "finsh_error.h"
#include "finsh_error.h"
#define is_alpha(ch) ((ch | 0x20) - 'a') < 26u
#define is_digit(ch) ((ch) >= '0' && (ch) <= '9')
#define is_digit(ch) ((ch) >= '0' && (ch) <= '9')
#define is_separator(ch) !(((ch) >= 'a' && (ch) <= 'z') \
#define is_separator(ch) !(((ch) >= 'a' && (ch) <= 'z') \
|| ((ch) >= 'A' && (ch) <= 'Z') || ((ch) >= '0' && (ch) <= '9') || ((ch) == '_'))
|| ((ch) >= 'A' && (ch) <= 'Z') || ((ch) >= '0' && (ch) <= '9') || ((ch) == '_'))
...
@@ -329,10 +331,15 @@ static int token_match_name(struct finsh_token* self, const char* str)
...
@@ -329,10 +331,15 @@ static int token_match_name(struct finsh_token* self, const char* str)
static
void
token_trim_space
(
struct
finsh_token
*
self
)
static
void
token_trim_space
(
struct
finsh_token
*
self
)
{
{
char
ch
;
char
ch
;
#if 0
while ( (ch = token_next_char(self)) ==' ' ||
while ( (ch = token_next_char(self)) ==' ' ||
ch == '\t' ||
ch == '\t' ||
ch == '\r' ||
ch == '\r' ||
ch == '\n');
ch == '\n');
#else
while
(
(
ch
=
token_next_char
(
self
))
==
' '
||
ch
==
'\t'
);
#endif
token_prev_char
(
self
);
token_prev_char
(
self
);
}
}
...
@@ -489,7 +496,7 @@ static void token_proc_number(struct finsh_token* self)
...
@@ -489,7 +496,7 @@ static void token_proc_number(struct finsh_token* self)
{
{
b
=
16
;
b
=
16
;
ch
=
token_next_char
(
self
);
ch
=
token_next_char
(
self
);
while
(
is_digit
(
ch
)
||
isalpha
(
ch
)
)
while
(
is_digit
(
ch
)
||
is
_
alpha
(
ch
)
)
{
{
*
p
++
=
ch
;
*
p
++
=
ch
;
ch
=
token_next_char
(
self
);
ch
=
token_next_char
(
self
);
...
...
components/finsh/shell.c
浏览文件 @
06c6630b
...
@@ -76,37 +76,6 @@ char *strdup(const char *s)
...
@@ -76,37 +76,6 @@ char *strdup(const char *s)
}
}
#endif
#endif
#if !defined(__CC_ARM) && !defined(__IAR_SYSTEMS_ICC__) && !defined(__ADSPBLACKFIN__) && !defined(_MSC_VER)
int
isalpha
(
int
ch
)
{
return
(
unsigned
int
)((
ch
|
0x20
)
-
'a'
)
<
26u
;
}
int
atoi
(
const
char
*
s
)
{
long
int
v
=
0
;
int
sign
=
1
;
while
(
*
s
==
' '
||
(
unsigned
int
)(
*
s
-
9
)
<
5u
)
s
++
;
switch
(
*
s
)
{
case
'-'
:
sign
=-
1
;
case
'+'
:
++
s
;
}
while
((
unsigned
int
)
(
*
s
-
'0'
)
<
10u
)
{
v
=
v
*
10
+*
s
-
'0'
;
++
s
;
}
return
sign
==-
1
?-
v
:
v
;
}
int
isprint
(
unsigned
char
ch
)
{
return
(
unsigned
int
)(
ch
-
' '
)
<
127u
-
' '
;
}
#endif
#endif
#endif
#if defined(RT_USING_DFS) && defined(DFS_USING_WORKDIR)
#if defined(RT_USING_DFS) && defined(DFS_USING_WORKDIR)
...
...
components/libc/newlib/libc.c
浏览文件 @
06c6630b
...
@@ -5,12 +5,15 @@
...
@@ -5,12 +5,15 @@
#include <sys/time.h>
#include <sys/time.h>
#include "libc.h"
#include "libc.h"
#ifdef RT_USING_PTHREADS
#include <pthread.h>
#endif
void
libc_system_init
(
const
char
*
tty_name
)
void
libc_system_init
(
const
char
*
tty_name
)
{
{
#ifdef RT_USING_DFS
int
fd
;
int
fd
;
extern
int
pthread_system_init
(
void
);
#ifdef RT_USING_DFS
#ifndef RT_USING_DFS_DEVFS
#ifndef RT_USING_DFS_DEVFS
#error Please enable devfs by defining RT_USING_DFS_DEVFS in rtconfig.h
#error Please enable devfs by defining RT_USING_DFS_DEVFS in rtconfig.h
#endif
#endif
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录