4.104.114.84.95
Last change
on this file since 946178d was
662678d1,
checked in by Joel Sherrill <joel.sherrill@…>, on 08/25/00 at 13:13:57
|
2000-08-25 Joel Sherrill <joel.sherrill@…>
- libc/isatty.c, libc/imfs_handlers_directory.c, libc/creat.c,
libc/imfs_directory.c: Fixed style issues.
|
-
Property mode set to
100644
|
File size:
440 bytes
|
Line | |
---|
1 | /* |
---|
2 | * COPYRIGHT (c) 1989-1999. |
---|
3 | * On-Line Applications Research Corporation (OAR). |
---|
4 | * |
---|
5 | * The license and distribution terms for this file may be |
---|
6 | * found in the file LICENSE in this distribution or at |
---|
7 | * http://www.OARcorp.com/rtems/license.html. |
---|
8 | * |
---|
9 | * $Id$ |
---|
10 | */ |
---|
11 | |
---|
12 | #include <sys/stat.h> |
---|
13 | |
---|
14 | int isatty( |
---|
15 | int fd |
---|
16 | ) |
---|
17 | { |
---|
18 | struct stat buf; |
---|
19 | |
---|
20 | if (fstat (fd, &buf) < 0) |
---|
21 | return 0; |
---|
22 | |
---|
23 | if (S_ISCHR (buf.st_mode)) |
---|
24 | return 1; |
---|
25 | |
---|
26 | return 0; |
---|
27 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.