home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / INFO / C / DLLIB.ZIP / ISCONS.DOC < prev    next >
Encoding:
Text File  |  1986-09-25  |  772 b   |  39 lines

  1.  
  2.  
  3.  
  4.  
  5.         NAME
  6.                 iscons -- is file descriptor the console
  7.  
  8.         SYNOPSIS
  9.                 r = iscons(fd);
  10.                 BOOL r;
  11.                 FILE *fd;
  12.  
  13.  
  14.         DESCRIPTION
  15.         The specified file descriptor (not file handle!) is tested
  16.         to see if it refers to the console device.  TRUE (not 0)
  17.         is returned if it does, and FALSE (0) otherwise.
  18.         This is a test primarily aimed at detecting if stdin or
  19.         stdout have been redirected away from the default console.
  20.  
  21.  
  22.  
  23.         EXAMPLE
  24.                 if(iscons(stdin) puts("stdin is the keyboard");
  25.                 else ("stdin is probably a file");
  26.  
  27.  
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.         This function is found in SMDLx.LIB for the Datalight Compiler
  39.