Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Zortech C++ Language Reference - isatty http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
   isatty
   Usage
   #include <io.h>
   int isatty(int fd);

   Description
   isatty  determines  if the handle fd is associated  with  a  terminal,
   printer, or a serial port.

   Example
   #include <stdio.h>
   #include <io.h>
   main()
   {
        if(isatty(fileno(stdin)))
             printf("stdin is connected to keyboard\n");
        else
             printf("stdin is connected to a file\n");
   }

   Return Value
   The  function  isatty  returns a non-zero value if  the  device  is  a
   terminal, console, etc. and a zero if not (like a disk file).


See Also: fstat

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson