提交 48848c29 编写于 作者: G gbcwbz

[libc][armlibc] Fix getchar error after exit vi

 - _sys_istty() add stdio as tty
 - without this, after exit vi program getchar will return -1, I don't know why it works
上级 0924d277
...@@ -270,7 +270,10 @@ long _sys_flen(FILEHANDLE fh) ...@@ -270,7 +270,10 @@ long _sys_flen(FILEHANDLE fh)
int _sys_istty(FILEHANDLE fh) int _sys_istty(FILEHANDLE fh)
{ {
return 0; if((STDIN <= fh) && (fh <= STDERR))
return 1;
else
return 0;
} }
int remove(const char *filename) int remove(const char *filename)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册