home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / CLIPPER / MISC / EMXLIB8F.ZIP / EMX / LIB / IO / ISATTY.C < prev    next >
Encoding:
C/C++ Source or Header  |  1993-01-02  |  317 b   |  17 lines

  1. /* isatty.c (emx+gcc) -- Copyright (c) 1990-1993 by Eberhard Mattes */
  2.  
  3. #include <sys/emx.h>
  4. #include <io.h>
  5. #include <errno.h>
  6.  
  7. int isatty (int handle)
  8. {
  9.   if (handle < 0 || handle >= _nfiles)
  10.     {
  11.       errno = EBADF;
  12.       return (0);
  13.     }
  14.   else
  15.     return ((_files[handle] & F_DEV) ? 1 : 0);
  16. }
  17.