Author: akhaldi Date: Tue May 13 16:00:25 2014 New Revision: 63274
URL: http://svn.reactos.org/svn/reactos?rev=63274&view=rev Log: [CRT] * Update _isatty(). CORE-8080
Modified: trunk/reactos/lib/sdk/crt/stdio/file.c
Modified: trunk/reactos/lib/sdk/crt/stdio/file.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/stdio/file.c?re... ============================================================================== --- trunk/reactos/lib/sdk/crt/stdio/file.c [iso-8859-1] (original) +++ trunk/reactos/lib/sdk/crt/stdio/file.c [iso-8859-1] Tue May 13 16:00:25 2014 @@ -528,6 +528,20 @@ file->_cnt=file->_bufsiz; } 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 */ @@ -1468,20 +1482,6 @@ TRACE(":fd (%d) handle (%p)\n",fd,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; }
/*********************************************************************