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

Subversion Repositories scarts

[/] [scarts/] [trunk/] [toolchain/] [scarts-newlib/] [newlib-1.17.0/] [newlib/] [libc/] [sys/] [arc/] [isatty.c] - Blame information for rev 9

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 9 jlechner
/* isatty.c */
2
 
3
/* Dumb implementation so programs will at least run.  */
4
 
5
#include <sys/stat.h>
6
#include <reent.h>
7
 
8
int
9
_isatty_r (struct _reent *ptr, int fd)
10
{
11
  struct stat buf;
12
 
13
  if (_fstat_r (ptr, fd, &buf) < 0)
14
    return 0;
15
  if (S_ISCHR (buf.st_mode))
16
    return 1;
17
  return 0;
18
}

powered by: WebSVN 2.1.0

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