home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / LIBSRC.ZOO / libsrc / local / isatty.c < prev    next >
Text File  |  1992-02-16  |  338b  |  22 lines

  1. #define INCL_DOSFILEMGR
  2. #include <os2.h>
  3.  
  4. ULONG Dos32QueryHType() asm ("Dos32QueryHType");
  5.  
  6. int isatty (int handle)
  7. {
  8.    ULONG handtype;
  9.    ULONG flagword;
  10.    ULONG rc;
  11.  
  12.    rc = Dos32QueryHType (handle, &handtype, &flagword);
  13.  
  14.    if (rc) return (0);
  15.  
  16.    if (handtype & 255 == 1)
  17.       return (1);
  18.  
  19.    return (0);
  20. }
  21.  
  22.