update for HEAD-2003091401
[reactos.git] / lib / msvcrt / io / isatty.c
1 #include <msvcrt/io.h>
2 #include <msvcrt/sys/stat.h>
3
4 #define NDEBUG
5 #include <msvcrt/msvcrtdbg.h>
6
7 /*
8  * @implemented
9  */
10 int _isatty( int fd )
11 {
12   struct stat buf;
13   DPRINT("_isatty(fd %d)\n", fd);
14   if (_fstat (fd, &buf) < 0)
15     return 0;
16   if (S_ISCHR (buf.st_mode))
17     return 1;
18   return 0;
19 }