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

  1. /* isterm.c (emx+gcc) -- Copyright (c) 1992-1993 by Eberhard Mattes */
  2.  
  3. #include <sys/emx.h>
  4. #include <io.h>
  5.  
  6. int _isterm (int handle)
  7. {
  8.   int j;
  9.  
  10.   if (!isatty (handle))
  11.     return (0);
  12.   j = __ioctl1 (handle, 0);
  13.   if (j < 0)
  14.     return (0);
  15.   return ((j & 0x03) ? 1 : 0);
  16. }
  17.