source:
trunk/libs/newlib/src/libgloss/sparc/libsys/isatty.c
@
569
Last change on this file since 569 was 444, checked in by , 6 years ago | |
---|---|
File size: 239 bytes |
Rev | Line | |
---|---|---|
[444] | 1 | /* isatty.c */ |
2 | ||
3 | /* Dumb implementation so programs will at least run. */ | |
4 | ||
5 | #include <sys/stat.h> | |
6 | ||
7 | int | |
8 | isatty (int fd) | |
9 | { | |
10 | struct stat buf; | |
11 | ||
12 | if (fstat (fd, &buf) < 0) | |
13 | return 0; | |
14 | if (S_ISCHR (buf.st_mode)) | |
15 | return 1; | |
16 | return 0; | |
17 | } |
Note: See TracBrowser
for help on using the repository browser.