mirror of
https://github.com/reactos/reactos.git
synced 2025-08-01 19:13:30 +00:00
[CRT]
* Update _isatty(). CORE-8080 svn path=/trunk/; revision=63274
This commit is contained in:
parent
065ed0c860
commit
5ddc0c6c38
1 changed files with 14 additions and 14 deletions
|
@ -530,6 +530,20 @@ static int flush_buffer(FILE* file)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*********************************************************************
|
||||||
|
* _isatty (MSVCRT.@)
|
||||||
|
*/
|
||||||
|
int CDECL _isatty(int fd)
|
||||||
|
{
|
||||||
|
HANDLE hand = fdtoh(fd);
|
||||||
|
|
||||||
|
TRACE(":fd (%d) handle (%p)\n",fd,hand);
|
||||||
|
if (hand == INVALID_HANDLE_VALUE)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
return GetFileType(hand) == FILE_TYPE_CHAR? 1 : 0;
|
||||||
|
}
|
||||||
|
|
||||||
/* INTERNAL: Allocate stdio file buffer */
|
/* INTERNAL: Allocate stdio file buffer */
|
||||||
/*static*/ void alloc_buffer(FILE* file)
|
/*static*/ void alloc_buffer(FILE* file)
|
||||||
{
|
{
|
||||||
|
@ -1470,20 +1484,6 @@ intptr_t CDECL _get_osfhandle(int fd)
|
||||||
return (intptr_t)hand;
|
return (intptr_t)hand;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*********************************************************************
|
|
||||||
* _isatty (MSVCRT.@)
|
|
||||||
*/
|
|
||||||
int CDECL _isatty(int fd)
|
|
||||||
{
|
|
||||||
HANDLE hand = fdtoh(fd);
|
|
||||||
|
|
||||||
TRACE(":fd (%d) handle (%p)\n",fd,hand);
|
|
||||||
if (hand == INVALID_HANDLE_VALUE)
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
return GetFileType(hand) == FILE_TYPE_CHAR? 1 : 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*********************************************************************
|
/*********************************************************************
|
||||||
* _mktemp (MSVCRT.@)
|
* _mktemp (MSVCRT.@)
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue