提交 e6fd3ffc 编写于 作者: mysterywolf's avatar mysterywolf 提交者: Bernard Xiong

[libc]修理一些细节问题

上级 e1a17f0b
......@@ -276,10 +276,7 @@ char *_sys_command_string(char *cmd, int len)
void _ttywrch(int ch)
{
#ifdef RT_USING_CONSOLE
char c;
c = (char)ch;
rt_kprintf(&c);
rt_kprintf("%c", (char)ch);
#endif /* RT_USING_CONSOLE */
}
......@@ -337,10 +334,7 @@ int remove(const char *filename)
int fputc(int c, FILE *f)
{
#ifdef RT_USING_CONSOLE
char ch[2] = {0};
ch[0] = c;
rt_kprintf(&ch[0]);
rt_kprintf("%c", (char)c);
return 1;
#else
return 0; /* error */
......
......@@ -10,8 +10,6 @@
#ifndef __COMPILER_PRIVATE_H__
#define __COMPILER_PRIVATE_H__
#include <rtconfig.h>
#define _WARNING_WITHOUT_FS "Please enable RT_USING_POSIX_FS"
#define _WARNING_WITHOUT_STDIO "Please enable RT_USING_POSIX_FS and RT_USING_POSIX_STDIO"
......
......@@ -56,8 +56,8 @@ static const short __spm[13] =
(31 + 28 + 31 + 30 + 31 + 30 + 31 + 31 + 30 + 31 + 30 + 31),
};
ALIGN(4) static const char days[] = "Sun Mon Tue Wed Thu Fri Sat ";
ALIGN(4) static const char months[] = "Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec ";
ALIGN(4) static const char *days = "Sun Mon Tue Wed Thu Fri Sat ";
ALIGN(4) static const char *months = "Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec ";
static int __isleap(int year)
{
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册