OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [rtems/] [c/] [src/] [lib/] [libc/] [isatty.c] - Blame information for rev 846

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 30 unneback
/* 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
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.