* Update _isatty().
CORE-8080

svn path=/trunk/; revision=63274
This commit is contained in:
Amine Khaldi 2014-05-13 16:00:25 +00:00
parent 065ed0c860
commit 5ddc0c6c38

View file

@ -530,6 +530,20 @@ static int flush_buffer(FILE* file)
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 */
/*static*/ void alloc_buffer(FILE* file)
{
@ -1470,20 +1484,6 @@ intptr_t CDECL _get_osfhandle(int fd)
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.@)
*/