mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2025-10-20 05:25:04 +08:00
[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
This commit is contained in:
@@ -270,6 +270,9 @@ long _sys_flen(FILEHANDLE fh)
|
|||||||
|
|
||||||
int _sys_istty(FILEHANDLE fh)
|
int _sys_istty(FILEHANDLE fh)
|
||||||
{
|
{
|
||||||
|
if((STDIN <= fh) && (fh <= STDERR))
|
||||||
|
return 1;
|
||||||
|
else
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user