home *** CD-ROM | disk | FTP | other *** search
- static char sccs_id[] = "@(#) isatty.c 1.2 " __DATE__ " HJR";
-
- /* isatty.c (c) Copyright 1990 H.Rogers */
-
- #include <errno.h>
-
- #include "sys/types.h"
- #include "sys/dev.h"
- #include "sys/unix.h"
-
- int
- isatty (int fd)
- {
- register struct file *f;
-
- if (BADF (fd))
- {
- errno = EBADF;
- return (-1);
- }
-
- f = __u->file + fd;
-
- return (major (f->dev) == DEV_TTY);
- }
-