source: rtems/cpukit/libcsupport/src/isatty.c @ f26145b

4.104.114.84.95
Last change on this file since f26145b was 50f32b11, checked in by Ralf Corsepius <ralf.corsepius@…>, on 04/18/04 at 06:05:35

Remove stray white spaces.

  • Property mode set to 100644
File size: 479 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.rtems.com/license/LICENSE.
8 *
9 *  $Id$
10 */
11
12#if HAVE_CONFIG_H
13#include "config.h"
14#endif
15
16#include <sys/stat.h>
17
18int isatty(
19  int fd
20)
21{
22  struct stat buf;
23
24  if (fstat (fd, &buf) < 0)
25    return 0;
26
27  if (S_ISCHR (buf.st_mode))
28    return 1;
29
30  return 0;
31}
Note: See TracBrowser for help on using the repository browser.